diff options
author | Iago Toral Quiroga <[email protected]> | 2017-03-23 11:54:16 +0100 |
---|---|---|
committer | Iago Toral Quiroga <[email protected]> | 2017-03-24 08:11:53 +0100 |
commit | 023ea3772dfcd81e6a5822a1812ff991d68cccd8 (patch) | |
tree | 84eed0e61e23318b9426860ee807190948124626 /src/intel | |
parent | 4da1832c00ab93cbf90b14501840dd698565a869 (diff) |
nir/lower_wpos_center: support adding sample position to fragment coordinate
According to section 14.6 of the Vulkan specification:
"When sample shading is enabled, the x and y components of FragCoord
reflect the location of the sample corresponding to the shader
invocation."
So add a boolean parameter to the lowering pass to select this behavior
when we need it.
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/vulkan/anv_pipeline.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index 23274ef2a87..8ad2d485360 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -158,7 +158,7 @@ anv_shader_compile_to_nir(struct anv_device *device, nir_var_shader_in | nir_var_shader_out | nir_var_system_value); if (stage == MESA_SHADER_FRAGMENT) - NIR_PASS_V(nir, nir_lower_wpos_center); + NIR_PASS_V(nir, nir_lower_wpos_center, false); /* Now that we've deleted all but the main function, we can go ahead and * lower the rest of the constant initializers. |