From: Marek Olšák Date: Fri, 10 Jan 2020 21:47:04 +0000 (-0500) Subject: radeonsi: don't adjust depth and stencil PS output locations X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b144d4be74bfe459c2cd6d1a2b7a4304d89f2340;p=mesa.git radeonsi: don't adjust depth and stencil PS output locations this was for compatibility with TGSI Reviewed-by: Timothy Arceri --- 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; - } - } } /**