diff options
author | Kenneth Graunke <[email protected]> | 2017-01-13 14:29:52 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2017-01-13 17:25:48 -0800 |
commit | 0d5071db5e50629a63490639a3c86dfc65bf27ab (patch) | |
tree | 3edcacffce10a0106263994c1a6ce7e095afd34b /src/compiler/nir/nir_opt_algebraic.py | |
parent | 40a8f9e6f2d048e0fd32f9a974cc0ca58ad1335e (diff) |
i965: Move Gen4-5 interpolation stuff to brw_wm_prog_data.
This fixes glxgears rendering, which had surprisingly been broken since
late October! Specifically, commit 91d61fbf7cb61a44adcaae51ee08ad0dd6b.
glxgears uses glShadeModel(GL_FLAT) when drawing the main portion of the
gears, then uses glShadeModel(GL_SMOOTH) for drawing the Gouraud-shaded
inner portion of the gears. This results in the same fragment program
having two different state-dependent interpolation maps: one where
gl_Color is flat, and another where it's smooth.
The problem is that there's only one gen4_fragment_program, so it can't
store both. Each FS compile would trash the last one. But, the FS
compiles are cached, so the first one would store FLAT, and the second
would see a matching program in the cache and never bother to compile
one with SMOOTH. (Clearing the program cache on every draw made it
render correctly.)
Instead, move it to brw_wm_prog_data, where we can keep a copy for
every specialization of the program. The only downside is bloating
the structure a bit, but we can tighten that up a bit if we need to.
This also lets us kill gen4_fragment_program entirely!
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_opt_algebraic.py')
0 files changed, 0 insertions, 0 deletions