ac/nir: fix lds store for patch outputs.

This wasn't calculating the correct value, this along with
a nir patch fixes a regression in:
dEQP-VK.tessellation.shader_input_output.barrier

Fixes: 043d14db30 (ac/nir: don't write tcs outputs to LDS that aren't read back.)
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Dave Airlie 2017-12-18 16:53:44 +10:00
parent 0e8e7ccf9d
commit dd517ad96d
1 changed files with 1 additions and 1 deletions

View File

@ -2803,7 +2803,7 @@ store_tcs_output(struct nir_to_llvm_context *ctx,
bool store_lds = true;
if (instr->variables[0]->var->data.patch) {
if (!(ctx->tcs_patch_outputs_read & (1U << instr->variables[0]->var->data.location)))
if (!(ctx->tcs_patch_outputs_read & (1U << (instr->variables[0]->var->data.location - VARYING_SLOT_PATCH0))))
store_lds = false;
} else {
if (!(ctx->tcs_outputs_read & (1ULL << instr->variables[0]->var->data.location)))