nir: add shader_info::last_msaa_image
for radeonsi Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
This commit is contained in:
@@ -360,6 +360,7 @@ nir_shader_gather_info(nir_shader *shader, nir_function_impl *entrypoint)
|
||||
{
|
||||
shader->info.num_textures = 0;
|
||||
shader->info.num_images = 0;
|
||||
shader->info.last_msaa_image = -1;
|
||||
nir_foreach_variable(var, &shader->uniforms) {
|
||||
/* Bindless textures and images don't use non-bindless slots. */
|
||||
if (var->data.bindless)
|
||||
@@ -367,6 +368,11 @@ nir_shader_gather_info(nir_shader *shader, nir_function_impl *entrypoint)
|
||||
|
||||
shader->info.num_textures += glsl_type_get_sampler_count(var->type);
|
||||
shader->info.num_images += glsl_type_get_image_count(var->type);
|
||||
|
||||
/* Assuming image slots don't have holes (e.g. OpenGL) */
|
||||
if (glsl_type_is_image(var->type) &&
|
||||
glsl_get_sampler_dim(var->type) == GLSL_SAMPLER_DIM_MS)
|
||||
shader->info.last_msaa_image = shader->info.num_images - 1;
|
||||
}
|
||||
|
||||
shader->info.inputs_read = 0;
|
||||
|
Reference in New Issue
Block a user