diff options
author | Dave Airlie <[email protected]> | 2020-03-23 15:15:51 +1000 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-05-06 06:20:37 +0000 |
commit | 609a3bea16b14cd5bbc59c702b91367ed768d629 (patch) | |
tree | 143364a58f1fd0823cec31c0acafb0cab657562a /src/gallium | |
parent | be8a10e2651d362b61a5566092a13311ba1ffe26 (diff) |
gallivm/nir: add multisample image operations
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_nir.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir.c b/src/gallium/auxiliary/gallivm/lp_bld_nir.c index 171d452ff0e..1b1d7002099 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_nir.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_nir.c @@ -1078,6 +1078,8 @@ static void visit_load_image(struct lp_build_nir_context *bld_base, params.coords = coords; params.outdata = result; params.img_op = LP_IMG_LOAD; + if (glsl_get_sampler_dim(type) == GLSL_SAMPLER_DIM_MS) + params.ms_index = get_src(bld_base, instr->src[2]); params.image_index = var->data.binding; bld_base->image_op(bld_base, ¶ms); } @@ -1107,6 +1109,8 @@ static void visit_store_image(struct lp_build_nir_context *bld_base, params.indata[i] = LLVMBuildExtractValue(builder, in_val, i, ""); params.indata[i] = LLVMBuildBitCast(builder, params.indata[i], bld_base->base.vec_type, ""); } + if (glsl_get_sampler_dim(type) == GLSL_SAMPLER_DIM_MS) + params.ms_index = get_src(bld_base, instr->src[2]); params.img_op = LP_IMG_STORE; params.image_index = var->data.binding; @@ -1169,6 +1173,8 @@ static void visit_atomic_image(struct lp_build_nir_context *bld_base, if (params.target == PIPE_TEXTURE_1D_ARRAY) coords[2] = coords[1]; params.coords = coords; + if (glsl_get_sampler_dim(type) == GLSL_SAMPLER_DIM_MS) + params.ms_index = get_src(bld_base, instr->src[2]); if (instr->intrinsic == nir_intrinsic_image_deref_atomic_comp_swap) { LLVMValueRef cas_val = get_src(bld_base, instr->src[4]); params.indata[0] = in_val; |