}
/* Images in user SGPRs. */
- unsigned non_msaa_images = sel->info.images_declared & ~sel->info.base.msaa_images;
+ unsigned non_msaa_images = u_bit_consecutive(0, sel->info.base.num_images) &
+ ~sel->info.base.msaa_images;
for (unsigned i = 0; i < 3 && non_msaa_images & (1 << i); i++) {
unsigned num_sgprs = sel->info.base.image_buffers & (1 << i) ? 4 : 8;
enabled_constbuf = info->const_buffers_declared;
enabled_shaderbuf = u_bit_consecutive(0, info->base.num_ssbos);
enabled_samplers = info->base.textures_used;
- enabled_images = info->images_declared;
+ enabled_images = u_bit_consecutive(0, info->base.num_images);
} else {
enabled_constbuf =
sctx->const_and_shader_buffers[processor].enabled_mask >> SI_NUM_SHADER_BUFFERS;
si_sampler_views_check_encrypted(sctx, &sctx->samplers[i],
current_shader[i]->cso->info.base.textures_used);
use_encrypted_bo |= si_image_views_check_encrypted(sctx, &sctx->images[i],
- current_shader[i]->cso->info.images_declared);
+ u_bit_consecutive(0, current_shader[i]->cso->info.base.num_images));
}
use_encrypted_bo |= si_buffer_resources_check_encrypted(sctx, &sctx->rw_buffers);
*/
return si_buffer_resources_check_encrypted(sctx, &sctx->const_and_shader_buffers[sh]) ||
si_sampler_views_check_encrypted(sctx, &sctx->samplers[sh], info->base.textures_used) ||
- si_image_views_check_encrypted(sctx, &sctx->images[sh], info->images_declared) ||
+ si_image_views_check_encrypted(sctx, &sctx->images[sh], u_bit_consecutive(0, info->base.num_images)) ||
si_buffer_resources_check_encrypted(sctx, &sctx->rw_buffers);
}
ctx->num_shader_buffers = info->base.num_ssbos;
ctx->num_samplers = util_last_bit(info->base.textures_used);
- ctx->num_images = util_last_bit(info->images_declared);
+ ctx->num_images = info->base.num_images;
si_llvm_init_resource_callbacks(ctx);
unsigned num_written_culldistance;
unsigned num_written_clipdistance;
- unsigned images_declared; /**< bitmask of declared images */
-
/** Whether all codepaths write tess factors in all invocations. */
bool tessfactors_are_def_in_all_invocs;
};
info->constbuf0_num_slots = nir->num_uniforms;
info->const_buffers_declared = u_bit_consecutive(0, nir->info.num_ubos);
- info->images_declared = u_bit_consecutive(0, nir->info.num_images);
info->num_written_clipdistance = nir->info.clip_distance_array_size;
info->num_written_culldistance = nir->info.cull_distance_array_size;
}
/* Images. */
- if (vs->info.images_declared) {
- unsigned num_images = util_last_bit(vs->info.images_declared);
-
+ unsigned num_images = vs->info.base.num_images;
+ if (num_images) {
for (unsigned i = 0; i < num_images; i++) {
struct pipe_resource *res = sctx->images[PIPE_SHADER_VERTEX].views[i].resource;
if (!res)
num_shaderbufs = info->base.num_ssbos;
num_constbufs = util_last_bit(info->const_buffers_declared);
/* two 8-byte images share one 16-byte slot */
- num_images = align(util_last_bit(info->images_declared), 2);
+ num_images = align(info->base.num_images, 2);
num_msaa_images = align(util_last_bit(info->base.msaa_images), 2);
num_samplers = util_last_bit(info->base.textures_used);