summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/gallivm
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2019-10-09 13:12:31 +1000
committerDave Airlie <[email protected]>2019-10-11 00:32:15 +0000
commit05b008c961faf4de322bbf08a452893f01fb143d (patch)
tree7afeb7ce8a9d075b7302065b65be0f79bedde17d /src/gallium/auxiliary/gallivm
parenta70f0a88412f840d158309374407e9e7e30af451 (diff)
llvmpipe: add support for tg4 component selection.
This is needed as part of GLES3.1 and helps for ARB_gpu_shader5. Fixes: KHR-GLES31.core.texture_gather.* cases Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/gallivm')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
index 1f42c4ef549..9bfe41b9062 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
@@ -2237,6 +2237,10 @@ emit_tex( struct lp_build_tgsi_soa_context *bld,
lod_property = lp_build_lod_property(&bld->bld_base, inst, 0);
}
+ if (sampler_op == LP_SAMPLER_OP_GATHER) {
+ uint32_t comp_val = inst->Src[sampler_reg].Register.SwizzleX;
+ sample_key |= (comp_val << LP_SAMPLER_GATHER_COMP_SHIFT);
+ }
if (modifier == LP_BLD_TEX_MODIFIER_PROJECTED) {
oow = lp_build_emit_fetch(&bld->bld_base, inst, 0, 3);
oow = lp_build_rcp(&bld->bld_base.base, oow);