i965, anv: Use NIR FragCoord re-center and y-transform passes.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 17 May 2016 08:52:16 +0000 (01:52 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 20 May 2016 21:30:08 +0000 (14:30 -0700)
commitdac10e8a1390711f1f36f224644c4a33586cebe3
treefa332e97d19225f705f72a6247ef1e3c254cf832
parent6e5d86c07af920fa52afbe075a04116b9ebb3cc3
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>
src/intel/vulkan/anv_pipeline.c
src/mesa/drivers/dri/i965/brw_defines.h
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_fs_generator.cpp
src/mesa/drivers/dri/i965/brw_fs_nir.cpp
src/mesa/drivers/dri/i965/brw_nir.c
src/mesa/drivers/dri/i965/brw_nir_uniforms.cpp