mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 21:40:20 +01:00
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:
parent
fa86a2a94d
commit
cbed4d784e
3 changed files with 5 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue