aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_pipeline.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2016-05-17 01:52:16 -0700
committerKenneth Graunke <[email protected]>2016-05-20 14:30:08 -0700
commitdac10e8a1390711f1f36f224644c4a33586cebe3 (patch)
treefa332e97d19225f705f72a6247ef1e3c254cf832 /src/intel/vulkan/anv_pipeline.c
parent6e5d86c07af920fa52afbe075a04116b9ebb3cc3 (diff)
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 <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_pipeline.c')
-rw-r--r--src/intel/vulkan/anv_pipeline.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index faa0adbc971..a9cecd69eb5 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -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);