aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2018-02-16 16:14:29 +1100
committerTimothy Arceri <[email protected]>2018-02-19 08:47:48 +1100
commit51e745cf77277ec2b598b3332f0207b083f492db (patch)
tree04aaee22c2cb307c7f706e4d5657a4501d6027da /src/gallium/drivers
parent347038baa9e897aee32df9db99a099146f249f42 (diff)
radeonsi/nir: fix gl_FragCoord for pixel_center_integer
Fixes piglit test glsl-arb-fragment-coord-conventions Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader_nir.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c
index 1ac6903bbc3..4f44e968f83 100644
--- a/src/gallium/drivers/radeonsi/si_shader_nir.c
+++ b/src/gallium/drivers/radeonsi/si_shader_nir.c
@@ -281,6 +281,11 @@ void si_nir_scan_shader(const struct nir_shader *nir,
nir->info.fs.early_fragment_tests | nir->info.fs.post_depth_coverage;
info->properties[TGSI_PROPERTY_FS_POST_DEPTH_COVERAGE] = nir->info.fs.post_depth_coverage;
+ if (nir->info.fs.pixel_center_integer) {
+ info->properties[TGSI_PROPERTY_FS_COORD_PIXEL_CENTER] =
+ TGSI_FS_COORD_PIXEL_CENTER_INTEGER;
+ }
+
if (nir->info.fs.depth_layout != FRAG_DEPTH_LAYOUT_NONE) {
switch (nir->info.fs.depth_layout) {
case FRAG_DEPTH_LAYOUT_ANY: