clover: Set images/samplers_used when lowering images
Also, stop using BITSET_SET_RANGE_INSIDE_WORD for textures so we can handle more than 32 of them. Reviewed-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16435>
This commit is contained in:
parent
b282d504a4
commit
0a4c0bc0dd
|
@ -119,7 +119,11 @@ clover_nir_lower_images(nir_shader *shader)
|
||||||
shader->info.num_textures = num_rd_images;
|
shader->info.num_textures = num_rd_images;
|
||||||
BITSET_ZERO(shader->info.textures_used);
|
BITSET_ZERO(shader->info.textures_used);
|
||||||
if (num_rd_images)
|
if (num_rd_images)
|
||||||
BITSET_SET_RANGE_INSIDE_WORD(shader->info.textures_used, 0, num_rd_images - 1);
|
BITSET_SET_RANGE(shader->info.textures_used, 0, num_rd_images - 1);
|
||||||
|
|
||||||
|
BITSET_ZERO(shader->info.images_used);
|
||||||
|
if (num_wr_images)
|
||||||
|
BITSET_SET_RANGE(shader->info.images_used, 0, num_wr_images - 1);
|
||||||
shader->info.num_images = num_wr_images;
|
shader->info.num_images = num_wr_images;
|
||||||
|
|
||||||
last_loc = -1;
|
last_loc = -1;
|
||||||
|
@ -137,6 +141,9 @@ clover_nir_lower_images(nir_shader *shader)
|
||||||
assert(!glsl_type_is_sampler(var->type));
|
assert(!glsl_type_is_sampler(var->type));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
BITSET_ZERO(shader->info.samplers_used);
|
||||||
|
if (num_samplers)
|
||||||
|
BITSET_SET_RANGE(shader->info.samplers_used, 0, num_samplers - 1);
|
||||||
|
|
||||||
nir_builder b;
|
nir_builder b;
|
||||||
nir_builder_init(&b, impl);
|
nir_builder_init(&b, impl);
|
||||||
|
|
Loading…
Reference in New Issue