diff options
author | Timothy Arceri <[email protected]> | 2018-03-21 12:23:08 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2018-03-28 09:59:37 +1100 |
commit | 51f175028dcc69e055d7e612024f7bfe79d7ed5d (patch) | |
tree | ef35b35b0a287d4a6c1e296070076406e56a89b1 | |
parent | fc51fdbcdec60f96b9bf593d74beb42e465cc277 (diff) |
ac/nir_to_llvm: fix component packing for double outputs
We need to wait until after the writemask is widened before we
adjust it for component packing.
Together with the previous patch this fixes a number of
arb_enhanced_layouts component layout piglit tests.
Reviewed-by: Marek Olšák <[email protected]>
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index b7d29ef0b53..0d85d047cd9 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -1793,7 +1793,7 @@ visit_store_var(struct ac_nir_context *ctx, int idx = instr->variables[0]->var->data.driver_location; unsigned comp = instr->variables[0]->var->data.location_frac; LLVMValueRef src = ac_to_float(&ctx->ac, get_src(ctx, instr->src[0])); - int writemask = instr->const_index[0] << comp; + int writemask = instr->const_index[0]; LLVMValueRef indir_index; unsigned const_index; get_deref_offset(ctx, instr->variables[0], false, @@ -1808,6 +1808,8 @@ visit_store_var(struct ac_nir_context *ctx, writemask = widen_mask(writemask, 2); } + writemask = writemask << comp; + switch (instr->variables[0]->var->data.mode) { case nir_var_shader_out: |