This change also removes the now duplicate NumImages field.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
}
sh->Program->info.num_textures = uniform_size.num_shader_samplers;
- sh->NumImages = uniform_size.num_shader_images;
+ sh->Program->info.num_images = uniform_size.num_shader_images;
sh->num_uniform_components = uniform_size.num_shader_uniform_components;
sh->num_combined_uniform_components = sh->num_uniform_components;
struct gl_linked_shader *sh = prog->_LinkedShaders[i];
if (sh) {
- if (sh->NumImages > ctx->Const.Program[i].MaxImageUniforms)
+ if (sh->Program->info.num_images > ctx->Const.Program[i].MaxImageUniforms)
linker_error(prog, "Too many %s shader image uniforms (%u > %u)\n",
- _mesa_shader_stage_to_string(i), sh->NumImages,
+ _mesa_shader_stage_to_string(i),
+ sh->Program->info.num_images,
ctx->Const.Program[i].MaxImageUniforms);
- total_image_units += sh->NumImages;
+ total_image_units += sh->Program->info.num_images;
total_shader_storage_blocks += sh->Program->info.num_ssbos;
if (i == MESA_SHADER_FRAGMENT) {
struct exec_list *fragdata_arrays;
struct glsl_symbol_table *symbols;
- /**
- * Number of image uniforms defined in the shader. It specifies
- * the number of valid elements in the \c ImageUnits and \c
- * ImageAccess arrays.
- */
- GLuint NumImages;
-
struct gl_shader_info info;
};
struct gl_program *dst = dst_sh->Program;
- dst->info.num_images = dst_sh->NumImages;
dst->info.separate_shader = src->SeparateShader;
switch (dst_sh->Stage) {
c = &st->ctx->Const.Program[shader->Stage];
- for (i = 0; i < shader->NumImages; i++) {
+ for (i = 0; i < shader->Program->info.num_images; i++) {
struct gl_image_unit *u =
&st->ctx->ImageUnits[shader->Program->sh.ImageUnits[i]];
struct st_texture_object *stObj = st_texture_object(u->TexObj);
}
}
}
- cso_set_shader_images(st->cso_context, shader_type, 0, shader->NumImages,
- images);
+ cso_set_shader_images(st->cso_context, shader_type, 0,
+ shader->Program->info.num_images, images);
/* clear out any stale shader images */
- if (shader->NumImages < c->MaxImageUniforms)
+ if (shader->Program->info.num_images < c->MaxImageUniforms)
cso_set_shader_images(
st->cso_context, shader_type,
- shader->NumImages,
- c->MaxImageUniforms - shader->NumImages,
+ shader->Program->info.num_images,
+ c->MaxImageUniforms - shader->Program->info.num_images,
NULL);
}
if (program->use_shared_memory)
t->shared_memory = ureg_DECL_memory(ureg, TGSI_MEMORY_TYPE_SHARED);
- for (i = 0; i < program->shader->NumImages; i++) {
+ for (i = 0; i < program->shader->Program->info.num_images; i++) {
if (program->images_used & (1 << i)) {
t->images[i] = ureg_DECL_image(ureg, i,
program->image_targets[i],
if (prog->info.num_textures)
*states |= new_sampler_views | new_samplers;
- if (shader->NumImages)
+ if (prog->info.num_images)
*states |= new_images;
if (prog->info.num_ubos)