Mesa (master): glsl: simplify SSBO resources check
Timothy Arceri
tarceri at kemper.freedesktop.org
Sat Apr 2 06:12:05 UTC 2016
Module: Mesa
Branch: master
Commit: 0082b33a78cd007054f7774c57a4f7ea9fc1d209
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0082b33a78cd007054f7774c57a4f7ea9fc1d209
Author: Timothy Arceri <timothy.arceri at collabora.com>
Date: Sat Apr 2 11:48:27 2016 +1100
glsl: simplify SSBO resources check
We already have a count of active SSBOs per stage so use it.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/compiler/glsl/linker.cpp | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index ab90961..47087c8 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -3072,13 +3072,7 @@ check_image_resources(struct gl_context *ctx, struct gl_shader_program *prog)
ctx->Const.Program[i].MaxImageUniforms);
total_image_units += sh->NumImages;
-
- 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++;
- }
+ total_shader_storage_blocks += sh->NumShaderStorageBlocks;
if (i == MESA_SHADER_FRAGMENT) {
foreach_in_list(ir_instruction, node, sh->ir) {
More information about the mesa-commit
mailing list