Page MenuHomeWildfire Games

Uses fixed-function pipeline functions only in FFP mode
ClosedPublic

Authored by vladislavbelov on Feb 5 2020, 1:22 AM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rP23481: Uses fixed-function pipeline functions only in FFP mode.
Summary

According to OpenGL wiki:

Also keep in mind that glTexEnvi has no effect when a fragment shader is bound.

According to OpenGL 3.3 specification (in GL2 it's not deprecated yet):

Fixed-function fragment processing - AreTexturesResident, PrioritizeTextures, and TexParameter target TEXTURE_PRIORITY; TexEnv target
TEXTURE_ENV, and all associated parameters; TexEnv target TEXTURE_-
FILTER_CONTROL, and parameter name TEXTURE_LOD_BIAS;

So if it works for a particular driver it doesn't mean it'll work for others.

Test Plan
  1. Apply the patch and compile the game
  2. Run the game
  3. Check that there is now new strange behaviour

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

vladislavbelov created this revision.Feb 5 2020, 1:22 AM
Vulcan added a comment.Feb 5 2020, 1:28 AM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1714/display/redirect

Stan added a subscriber: Stan.Feb 5 2020, 7:40 AM

I assume one has to play in FFP to test?

source/gui/GUIRenderer.cpp
347 ↗(On Diff #11277)

Why remove the todo?

450 ↗(On Diff #11277)

Why remove the todo?

In D2619#109732, @Stan wrote:

I assume one has to play in FFP to test?

No, since the behaviour wasn't changed in FFP mode, only with shaders.

source/gui/GUIRenderer.cpp
347 ↗(On Diff #11277)

Because we don't have FFP in GLES, and we don't plan to have it. We support only GLSL shaders there.

450 ↗(On Diff #11277)

The same.

Stan added a comment.Feb 5 2020, 11:04 AM

Have the checks always been missing and executing deadcode?

In D2619#109740, @Stan wrote:

Have the checks always been missing and executing deadcode?

I think yes, since in that case fragment shader should control the behaviour.

Stan added a comment.Feb 5 2020, 12:19 PM

Nice then. Have you checked for completeness?

In D2619#109742, @Stan wrote:

Nice then. Have you checked for completeness?

For using glTexEnv* in shader mode - yes.

This revision was not accepted when it landed; it landed in state Needs Review.Feb 5 2020, 3:00 PM
This revision was automatically updated to reflect the committed changes.
vladislavbelov marked 2 inline comments as done.