radeonsi: don't adjust depth and stencil PS output locations

this was for compatibility with TGSI

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
Marek Olšák 2020-01-10 16:47:04 -05:00
parent 3cc501be69
commit b144d4be74
2 changed files with 3 additions and 11 deletions

View File

@ -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,

View File

@ -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;
}
}
}
/**