mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 21:40:08 +01:00
nir/lower_image: Handle index and bindless image_size
Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12005>
This commit is contained in:
parent
1d6c790f9f
commit
c6102dda0a
1 changed files with 13 additions and 7 deletions
|
|
@ -70,14 +70,20 @@ lower_image_instr(nir_builder *b, nir_instr *instr, void *state)
|
|||
const nir_lower_image_options *options = state;
|
||||
nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr);
|
||||
|
||||
if (options->lower_cube_size &&
|
||||
intrin->intrinsic == nir_intrinsic_image_deref_size &&
|
||||
nir_intrinsic_image_dim(intrin) == GLSL_SAMPLER_DIM_CUBE) {
|
||||
lower_cube_size(b, intrin);
|
||||
return true;
|
||||
}
|
||||
switch (intrin->intrinsic) {
|
||||
case nir_intrinsic_image_size:
|
||||
case nir_intrinsic_image_deref_size:
|
||||
case nir_intrinsic_bindless_image_size:
|
||||
if (options->lower_cube_size &&
|
||||
nir_intrinsic_image_dim(intrin) == GLSL_SAMPLER_DIM_CUBE) {
|
||||
lower_cube_size(b, intrin);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
return false;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue