aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2020-01-10 16:47:04 -0500
committerMarek Olšák <[email protected]>2020-01-14 18:46:07 -0500
commitb144d4be74bfe459c2cd6d1a2b7a4304d89f2340 (patch)
treeb6af3089ffa68348bbd693c8846f31ad291629ec /src/gallium
parent3cc501be694e3434dcba0547153af1319503d655 (diff)
radeonsi: don't adjust depth and stencil PS output locations
this was for compatibility with TGSI Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c4
-rw-r--r--src/gallium/drivers/radeonsi/si_shader_nir.c10
2 files changed, 3 insertions, 11 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 39297225617..07199a295d5 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -3060,11 +3060,11 @@ static void si_llvm_return_fs_outputs(struct ac_shader_abi *abi,
break;
case TGSI_SEMANTIC_POSITION:
depth = LLVMBuildLoad(builder,
- addrs[4 * i + 2], "");
+ addrs[4 * i + 0], "");
break;
case TGSI_SEMANTIC_STENCIL:
stencil = LLVMBuildLoad(builder,
- addrs[4 * i + 1], "");
+ addrs[4 * i + 0], "");
break;
case TGSI_SEMANTIC_SAMPLEMASK:
samplemask = LLVMBuildLoad(builder,
diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c
index d050ff0bc09..03f819ec772 100644
--- a/src/gallium/drivers/radeonsi/si_shader_nir.c
+++ b/src/gallium/drivers/radeonsi/si_shader_nir.c
@@ -955,16 +955,8 @@ void si_nir_adjust_driver_locations(struct nir_shader *nir)
variable->data.driver_location *= 4;
}
- nir_foreach_variable(variable, &nir->outputs) {
+ nir_foreach_variable(variable, &nir->outputs)
variable->data.driver_location *= 4;
-
- if (nir->info.stage == MESA_SHADER_FRAGMENT) {
- if (variable->data.location == FRAG_RESULT_DEPTH)
- variable->data.driver_location += 2;
- else if (variable->data.location == FRAG_RESULT_STENCIL)
- variable->data.driver_location += 1;
- }
- }
}
/**