diff options
author | Jason Ekstrand <[email protected]> | 2016-04-07 16:56:34 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-04-07 16:56:34 -0700 |
commit | e26a978773ba8fbff04cd2ab3342fcb02e90c06e (patch) | |
tree | 303f7d5e47f2b11ad2edf7ed0f82e90620646df9 /src/mesa/main | |
parent | 15895bf777bd5f68a197506fdeaced28aa440622 (diff) | |
parent | 1cd19ebc4a892ada69f9085892441c00674b2764 (diff) |
Merge remote-tracking branch 'public/master' into vulkan
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/fbobject.c | 5 | ||||
-rw-r--r-- | src/mesa/main/mtypes.h | 55 | ||||
-rw-r--r-- | src/mesa/main/shader_query.cpp | 7 | ||||
-rw-r--r-- | src/mesa/main/shaderapi.c | 2 | ||||
-rw-r--r-- | src/mesa/main/shaderobj.c | 10 | ||||
-rw-r--r-- | src/mesa/main/uniforms.c | 8 |
6 files changed, 24 insertions, 63 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index bb8d4c3112b..c81f5a083eb 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -1369,6 +1369,11 @@ _mesa_BindRenderbufferEXT(GLenum target, GLuint renderbuffer) bind_renderbuffer(target, renderbuffer, true); } +/** + * ARB_framebuffer_no_attachment - Application passes requested param's + * here. NOTE: NumSamples requested need not be _NumSamples which is + * what the hw supports. + */ static void framebuffer_parameteri(struct gl_context *ctx, struct gl_framebuffer *fb, GLenum pname, GLint param, const char *func) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 1fbda420401..6c09948af04 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2295,30 +2295,6 @@ struct gl_shader */ unsigned num_combined_uniform_components; - /** - * This shader's uniform/ssbo block information. - * - * These fields are only set post-linking. - * - * BufferInterfaceBlocks is a list containing both UBOs and SSBOs. This is - * useful during the linking process so that we don't have to handle SSBOs - * specifically. - * - * UniformBlocks is a list of UBOs. This is useful for backends that need - * or prefer to see separate index spaces for UBOS and SSBOs like the GL - * API specifies. - * - * ShaderStorageBlocks is a list of SSBOs. This is useful for backends that - * need or prefer to see separate index spaces for UBOS and SSBOs like the - * GL API specifies. - * - * UniformBlocks and ShaderStorageBlocks only have pointers into - * BufferInterfaceBlocks so the actual resource information is not - * duplicated. - */ - unsigned NumBufferInterfaceBlocks; - struct gl_uniform_block **BufferInterfaceBlocks; - unsigned NumUniformBlocks; struct gl_uniform_block **UniformBlocks; @@ -2529,11 +2505,6 @@ struct gl_uniform_block */ GLuint UniformBufferSize; - /** - * Is this actually an interface block for a shader storage buffer? - */ - bool IsShaderStorage; - /** Stages that reference this block */ uint8_t stageref; @@ -2809,33 +2780,11 @@ struct gl_shader_program */ unsigned LastClipDistanceArraySize; - /** - * This shader's uniform/ssbo block information. - * - * BufferInterfaceBlocks is a list containing both UBOs and SSBOs. This is - * useful during the linking process so that we don't have to handle SSBOs - * specifically. - * - * UniformBlocks is a list of UBOs. This is useful for backends that need - * or prefer to see separate index spaces for UBOS and SSBOs like the GL - * API specifies. - * - * ShaderStorageBlocks is a list of SSBOs. This is useful for backends that - * need or prefer to see separate index spaces for UBOS and SSBOs like the - * GL API specifies. - * - * UniformBlocks and ShaderStorageBlocks only have pointers into - * BufferInterfaceBlocks so the actual resource information is not - * duplicated and are only set after linking. - */ - unsigned NumBufferInterfaceBlocks; - struct gl_uniform_block *BufferInterfaceBlocks; - unsigned NumUniformBlocks; - struct gl_uniform_block **UniformBlocks; + struct gl_uniform_block *UniformBlocks; unsigned NumShaderStorageBlocks; - struct gl_uniform_block **ShaderStorageBlocks; + struct gl_uniform_block *ShaderStorageBlocks; /** * Map of active uniform names to locations diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp index 4ef6a81204e..2c1a6ee3505 100644 --- a/src/mesa/main/shader_query.cpp +++ b/src/mesa/main/shader_query.cpp @@ -925,8 +925,11 @@ is_resource_referenced(struct gl_shader_program *shProg, if (res->Type == GL_ATOMIC_COUNTER_BUFFER) return RESOURCE_ATC(res)->StageReferences[stage]; - if (res->Type == GL_UNIFORM_BLOCK || res->Type == GL_SHADER_STORAGE_BLOCK) - return shProg->BufferInterfaceBlocks[index].stageref & (1 << stage); + if (res->Type == GL_UNIFORM_BLOCK) + return shProg->UniformBlocks[index].stageref & (1 << stage); + + if (res->Type == GL_SHADER_STORAGE_BLOCK) + return shProg->ShaderStorageBlocks[index].stageref & (1 << stage); return res->StageReferences & (1 << stage); } diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index ba2607221d9..b28b5ce5457 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -727,7 +727,7 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, for (i = 0; i < shProg->NumUniformBlocks; i++) { /* Add one for the terminating NUL character. */ - const GLint len = strlen(shProg->UniformBlocks[i]->Name) + 1; + const GLint len = strlen(shProg->UniformBlocks[i].Name) + 1; if (len > max_len) max_len = len; diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c index 8b9166ceecb..274cb129b07 100644 --- a/src/mesa/main/shaderobj.c +++ b/src/mesa/main/shaderobj.c @@ -292,9 +292,13 @@ _mesa_clear_shader_program_data(struct gl_shader_program *shProg) ralloc_free(shProg->InfoLog); shProg->InfoLog = ralloc_strdup(shProg, ""); - ralloc_free(shProg->BufferInterfaceBlocks); - shProg->BufferInterfaceBlocks = NULL; - shProg->NumBufferInterfaceBlocks = 0; + ralloc_free(shProg->UniformBlocks); + shProg->UniformBlocks = NULL; + shProg->NumUniformBlocks = 0; + + ralloc_free(shProg->ShaderStorageBlocks); + shProg->ShaderStorageBlocks = NULL; + shProg->NumShaderStorageBlocks = 0; ralloc_free(shProg->AtomicBuffers); shProg->AtomicBuffers = NULL; diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c index 7dcbdccf442..a9308d09f69 100644 --- a/src/mesa/main/uniforms.c +++ b/src/mesa/main/uniforms.c @@ -1016,13 +1016,13 @@ _mesa_UniformBlockBinding(GLuint program, return; } - if (shProg->UniformBlocks[uniformBlockIndex]->Binding != + if (shProg->UniformBlocks[uniformBlockIndex].Binding != uniformBlockBinding) { FLUSH_VERTICES(ctx, 0); ctx->NewDriverState |= ctx->DriverFlags.NewUniformBuffer; - shProg->UniformBlocks[uniformBlockIndex]->Binding = uniformBlockBinding; + shProg->UniformBlocks[uniformBlockIndex].Binding = uniformBlockBinding; } } @@ -1059,13 +1059,13 @@ _mesa_ShaderStorageBlockBinding(GLuint program, return; } - if (shProg->ShaderStorageBlocks[shaderStorageBlockIndex]->Binding != + if (shProg->ShaderStorageBlocks[shaderStorageBlockIndex].Binding != shaderStorageBlockBinding) { FLUSH_VERTICES(ctx, 0); ctx->NewDriverState |= ctx->DriverFlags.NewShaderStorageBuffer; - shProg->ShaderStorageBlocks[shaderStorageBlockIndex]->Binding = + shProg->ShaderStorageBlocks[shaderStorageBlockIndex].Binding = shaderStorageBlockBinding; } } |