[Mesa-dev] [PATCH 3/7] glsl: simplify image resources check
Kenneth Graunke
kenneth at whitecape.org
Sat Apr 2 04:41:15 UTC 2016
On Saturday, April 2, 2016 3:03:54 PM PDT Timothy Arceri wrote:
> We already have a count of active SSBOs per stage so use it.
> ---
> 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 649fb7c..c9eaa6b 100644
> --- a/src/compiler/glsl/linker.cpp
> +++ b/src/compiler/glsl/linker.cpp
> @@ -3075,13 +3075,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) {
>
I think the title of this patch should be "glsl: simplify SSBO resources
check", not "image"?
Patches 2-3 are:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160401/0d14c0ce/attachment.sig>
More information about the mesa-dev
mailing list