lima: handle 1D samplers

It's just a matter of changing number of dimensions in texture
descriptor.

Reviewed-by: Andreas Baierl <ichgeh@imkreisrum.de>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13213>
This commit is contained in:
Vasily Khoruzhick 2021-10-06 07:01:18 -07:00 committed by Marge Bot
parent fa86a2a94d
commit cbed4d784e
3 changed files with 5 additions and 0 deletions

View file

@ -447,6 +447,7 @@ static bool ppir_emit_tex(ppir_block *block, nir_instr *ni)
}
switch (instr->sampler_dim) {
case GLSL_SAMPLER_DIM_1D:
case GLSL_SAMPLER_DIM_2D:
case GLSL_SAMPLER_DIM_3D:
case GLSL_SAMPLER_DIM_CUBE:

View file

@ -131,6 +131,9 @@ lima_update_tex_desc(struct lima_context *ctx, struct lima_sampler_state *sample
memset(desc, 0, desc_size);
switch (texture->base.target) {
case PIPE_TEXTURE_1D:
desc->sampler_dim = LIMA_SAMPLER_DIM_1D;
break;
case PIPE_TEXTURE_2D:
case PIPE_TEXTURE_RECT:
desc->sampler_dim = LIMA_SAMPLER_DIM_2D;

View file

@ -27,6 +27,7 @@
#define lima_min_tex_desc_size 64
#define LIMA_SAMPLER_DIM_1D 0
#define LIMA_SAMPLER_DIM_2D 1
#define LIMA_SAMPLER_DIM_3D 2