i965, anv: Use NIR FragCoord re-center and y-transform passes.

This handles gl_FragCoord transformations and other window system vs.
user FBO coordinate system flipping by multiplying/adding uniform
values, rather than recompiles.

This is much better because we have no decent way to guess whether
the application is going to use a shader with the window system FBO
or a user FBO, much less the drawable height.  This led to a lot of
recompiles in many applications.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
Kenneth Graunke
2016-05-17 01:52:16 -07:00
parent 6e5d86c07a
commit dac10e8a13
8 changed files with 39 additions and 57 deletions

View File

@@ -142,6 +142,11 @@ anv_shader_compile_to_nir(struct anv_device *device,
free(spec_entries);
if (stage == MESA_SHADER_FRAGMENT) {
nir_lower_wpos_center(nir);
nir_validate_shader(nir);
}
nir_lower_returns(nir);
nir_validate_shader(nir);