diff options
author | Dave Airlie <[email protected]> | 2020-01-20 12:03:23 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2020-01-23 13:48:16 +1000 |
commit | 6c88c81df9544fc6653eca02ec088ed4c842235c (patch) | |
tree | 88a5a6f6b38b9ec43e4942c80bd3a4abc3594b72 /src/gallium | |
parent | 65e432695d9eadca8ac8be928bf5d434e1d9e912 (diff) |
gallivm: fix gather component handling.
Fixes the extended gather test for gpu shader5
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3528>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_nir.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir.c b/src/gallium/auxiliary/gallivm/lp_bld_nir.c index 34e6420c588..a8a2f845e29 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_nir.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_nir.c @@ -1466,9 +1466,10 @@ static void visit_tex(struct lp_build_nir_context *bld_base, nir_tex_instr *inst } if (instr->op == nir_texop_txf || instr->op == nir_texop_txf_ms) sample_key |= LP_SAMPLER_OP_FETCH << LP_SAMPLER_OP_TYPE_SHIFT; - else if (instr->op == nir_texop_tg4) + else if (instr->op == nir_texop_tg4) { sample_key |= LP_SAMPLER_OP_GATHER << LP_SAMPLER_OP_TYPE_SHIFT; - else if (instr->op == nir_texop_lod) + sample_key |= (instr->component << LP_SAMPLER_GATHER_COMP_SHIFT); + } else if (instr->op == nir_texop_lod) sample_key |= LP_SAMPLER_OP_LODQ << LP_SAMPLER_OP_TYPE_SHIFT; for (unsigned i = 0; i < instr->num_srcs; i++) { switch (instr->src[i].src_type) { |