diff options
author | Andreas Baierl <[email protected]> | 2019-04-26 15:01:43 +0200 |
---|---|---|
committer | Qiang Yu <[email protected]> | 2019-04-29 02:46:44 +0000 |
commit | b82de2b4d702789620f84c70577aa3e106d6ae4f (patch) | |
tree | 59133cbb3891d8a87dadcb45dde3bcb6e28ada6f /src/compiler/nir/nir.h | |
parent | 7050eccd77f6f435ab4c8ab4a31706e42b53817b (diff) |
nir: add rcp(w) lowering for gl_FragCoord
On some hardware (e.g. Mali400) the shader needs to apply some
transformations for correct gl_FragCoord handling. The lowering
actions look like the following in pseudocode:
gl_FragCoord.xyz = gl_FragCoord_orig.xyz
gl_FragCoord.w = 1.0 / gl_FragCoord_orig.w
Add this lowering as a nir pass in preparation for using it in the driver.
Signed-off-by: Andreas Baierl <[email protected]>
Reviewed-by: Qiang Yu <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir.h')
-rw-r--r-- | src/compiler/nir/nir.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index e878a63409d..0ba90caad38 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -3159,6 +3159,7 @@ void nir_lower_io_to_scalar(nir_shader *shader, nir_variable_mode mask); void nir_lower_io_to_scalar_early(nir_shader *shader, nir_variable_mode mask); bool nir_lower_io_to_vector(nir_shader *shader, nir_variable_mode mask); +void nir_lower_fragcoord_wtrans(nir_shader *shader); void nir_lower_viewport_transform(nir_shader *shader); bool nir_lower_uniforms_to_ubo(nir_shader *shader, int multiplier); |