mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-18 12:30:47 +02:00
radeonsi/nir: fix number of used samplers
Commitf3e978dbincorrectly assumed the maximum number of samplers was equal to the max number of defined samplers e.g. where bindings skip slots. This fixes an assert in si_nir_load_sampler_desc() for an enemy territory quake wars shader. And fixes potential bugs with incorrect bounds limiting in the same code for production builds of mesa. Fixes:f3e978db("radeonsi/nir: Remove uniform variable scanning") Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
This commit is contained in:
parent
c5010e72b6
commit
741cff91d3
1 changed files with 1 additions and 1 deletions
|
|
@ -783,7 +783,7 @@ void si_nir_scan_shader(const struct nir_shader *nir,
|
|||
if (nir->num_uniforms > 0)
|
||||
info->const_buffers_declared |= 1;
|
||||
info->images_declared = u_bit_consecutive(0, nir->info.num_images);
|
||||
info->samplers_declared = u_bit_consecutive(0, nir->info.num_textures);
|
||||
info->samplers_declared = nir->info.textures_used;
|
||||
|
||||
info->num_written_clipdistance = nir->info.clip_distance_array_size;
|
||||
info->num_written_culldistance = nir->info.cull_distance_array_size;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue