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 <ichgeh@imkreisrum.de> Reviewed-by: Qiang Yu <yuq825@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
@@ -123,6 +123,7 @@ files_libnir = files(
|
||||
'nir_lower_constant_initializers.c',
|
||||
'nir_lower_double_ops.c',
|
||||
'nir_lower_drawpixels.c',
|
||||
'nir_lower_fragcoord_wtrans.c',
|
||||
'nir_lower_frexp.c',
|
||||
'nir_lower_global_vars_to_local.c',
|
||||
'nir_lower_gs_intrinsics.c',
|
||||
|
Reference in New Issue
Block a user