aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_shader_nir.c
diff options
context:
space:
mode:
authorRhys Perry <[email protected]>2019-01-09 11:09:33 +0000
committerRhys Perry <[email protected]>2019-01-09 14:57:07 +0000
commitee8488ea3b99ad0632e5eac6defcef0264d8782c (patch)
treec66684a488bbaf5917e463eb47f3d1cf598abe11 /src/gallium/drivers/radeonsi/si_shader_nir.c
parentb8c4f523b40e3d9dbe1f81f2c69b31618f7a9b62 (diff)
ac/nir,radv,radeonsi/nir: use correct indices for interpolation intrinsics
Fixes artifacts in World of Warcraft when Multi-sample Alpha-Test is enabled with DXVK. It also fixes artifacts with Fallout 4's god rays with DXVK. Various piglit interpolateAt*() tests under NIR are also fixed. v2: formatting fix update commit message to include Fallout 4 and the Fixes tag Fixes: f4e499ec791 ('radv: add initial non-conformant radv vulkan driver') Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106595 Signed-off-by: Rhys Perry <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_shader_nir.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader_nir.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c
index 64acf41679b..a1bc4cbd1aa 100644
--- a/src/gallium/drivers/radeonsi/si_shader_nir.c
+++ b/src/gallium/drivers/radeonsi/si_shader_nir.c
@@ -1011,6 +1011,9 @@ bool si_nir_build_llvm(struct si_shader_context *ctx, struct nir_shader *nir)
LLVMValueRef data[4];
unsigned loc = variable->data.location;
+ if (loc >= VARYING_SLOT_VAR0 && nir->info.stage == MESA_SHADER_FRAGMENT)
+ ctx->abi.fs_input_attr_indices[loc - VARYING_SLOT_VAR0] = input_idx / 4;
+
for (unsigned i = 0; i < attrib_count; i++) {
/* Packed components share the same location so skip
* them if we have already processed the location.