mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 20:10:14 +01:00
glsl: simplify SSBO resources check
We already have a count of active SSBOs per stage so use it. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
3e74bf5b9d
commit
0082b33a78
1 changed files with 1 additions and 7 deletions
|
|
@ -3072,13 +3072,7 @@ check_image_resources(struct gl_context *ctx, struct gl_shader_program *prog)
|
||||||
ctx->Const.Program[i].MaxImageUniforms);
|
ctx->Const.Program[i].MaxImageUniforms);
|
||||||
|
|
||||||
total_image_units += sh->NumImages;
|
total_image_units += sh->NumImages;
|
||||||
|
total_shader_storage_blocks += sh->NumShaderStorageBlocks;
|
||||||
for (unsigned j = 0; j < prog->NumBufferInterfaceBlocks; j++) {
|
|
||||||
int stage_index = prog->InterfaceBlockStageIndex[i][j];
|
|
||||||
if (stage_index != -1 &&
|
|
||||||
sh->BufferInterfaceBlocks[stage_index]->IsShaderStorage)
|
|
||||||
total_shader_storage_blocks++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (i == MESA_SHADER_FRAGMENT) {
|
if (i == MESA_SHADER_FRAGMENT) {
|
||||||
foreach_in_list(ir_instruction, node, sh->ir) {
|
foreach_in_list(ir_instruction, node, sh->ir) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue