mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-16 07:38:14 +02:00
gallivm/nir: add subpass sampler type support
Fixes: dEQP-VK.renderpass.dedicated_allocation.attachment_allocation.input_output.* dEQP-VK.renderpass.dedicated_allocation.formats*input* Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6381>
This commit is contained in:
parent
21324c4036
commit
6596957641
1 changed files with 4 additions and 2 deletions
|
|
@ -111,12 +111,14 @@ static unsigned glsl_sampler_to_pipe(int sampler_dim, bool is_array)
|
|||
pipe_target = is_array ? PIPE_TEXTURE_1D_ARRAY : PIPE_TEXTURE_1D;
|
||||
break;
|
||||
case GLSL_SAMPLER_DIM_2D:
|
||||
case GLSL_SAMPLER_DIM_SUBPASS:
|
||||
pipe_target = is_array ? PIPE_TEXTURE_2D_ARRAY : PIPE_TEXTURE_2D;
|
||||
break;
|
||||
case GLSL_SAMPLER_DIM_3D:
|
||||
pipe_target = PIPE_TEXTURE_3D;
|
||||
break;
|
||||
case GLSL_SAMPLER_DIM_MS:
|
||||
case GLSL_SAMPLER_DIM_SUBPASS_MS:
|
||||
pipe_target = is_array ? PIPE_TEXTURE_2D_ARRAY : PIPE_TEXTURE_2D;
|
||||
break;
|
||||
case GLSL_SAMPLER_DIM_CUBE:
|
||||
|
|
@ -1121,8 +1123,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]);
|
||||
if (glsl_get_sampler_dim(type) == GLSL_SAMPLER_DIM_MS || glsl_get_sampler_dim(type) == GLSL_SAMPLER_DIM_SUBPASS_MS)
|
||||
params.ms_index = cast_type(bld_base, get_src(bld_base, instr->src[2]), nir_type_uint, 32);
|
||||
params.image_index = var->data.binding + (indir_index ? 0 : const_index);
|
||||
params.image_index_offset = indir_index;
|
||||
bld_base->image_op(bld_base, ¶ms);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue