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:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user