diff options
author | Timothy Arceri <[email protected]> | 2016-11-07 14:47:18 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2016-11-19 15:45:46 +1100 |
commit | 203c8794a1debc0e45019fe945d1cc55459e6c6f (patch) | |
tree | 29eafc191c0fb98ebc28673e95d3d1918f883bb0 /src/mesa/main/uniforms.c | |
parent | 65cd0a0d7f411eefac81408ebf7b704ccd1c9bf7 (diff) |
st/mesa/glsl/nir/i965: make use of new gl_shader_program_data in gl_shader_program
Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/mesa/main/uniforms.c')
-rw-r--r-- | src/mesa/main/uniforms.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c index 3921644892c..f26fd784e71 100644 --- a/src/mesa/main/uniforms.c +++ b/src/mesa/main/uniforms.c @@ -915,7 +915,7 @@ _mesa_GetUniformLocation(GLuint programObj, const GLcharARB *name) * "If program has not been successfully linked, the error * INVALID_OPERATION is generated." */ - if (shProg->LinkStatus == GL_FALSE) { + if (shProg->data->LinkStatus == GL_FALSE) { _mesa_error(ctx, GL_INVALID_OPERATION, "glGetUniformLocation(program not linked)"); return -1; @@ -1002,10 +1002,10 @@ _mesa_UniformBlockBinding(GLuint program, if (!shProg) return; - if (uniformBlockIndex >= shProg->NumUniformBlocks) { + if (uniformBlockIndex >= shProg->data->NumUniformBlocks) { _mesa_error(ctx, GL_INVALID_VALUE, "glUniformBlockBinding(block index %u >= %u)", - uniformBlockIndex, shProg->NumUniformBlocks); + uniformBlockIndex, shProg->data->NumUniformBlocks); return; } @@ -1016,13 +1016,14 @@ _mesa_UniformBlockBinding(GLuint program, return; } - if (shProg->UniformBlocks[uniformBlockIndex].Binding != + if (shProg->data->UniformBlocks[uniformBlockIndex].Binding != uniformBlockBinding) { FLUSH_VERTICES(ctx, 0); ctx->NewDriverState |= ctx->DriverFlags.NewUniformBuffer; - shProg->UniformBlocks[uniformBlockIndex].Binding = uniformBlockBinding; + shProg->data->UniformBlocks[uniformBlockIndex].Binding = + uniformBlockBinding; } } @@ -1044,10 +1045,11 @@ _mesa_ShaderStorageBlockBinding(GLuint program, if (!shProg) return; - if (shaderStorageBlockIndex >= shProg->NumShaderStorageBlocks) { + if (shaderStorageBlockIndex >= shProg->data->NumShaderStorageBlocks) { _mesa_error(ctx, GL_INVALID_VALUE, "glShaderStorageBlockBinding(block index %u >= %u)", - shaderStorageBlockIndex, shProg->NumShaderStorageBlocks); + shaderStorageBlockIndex, + shProg->data->NumShaderStorageBlocks); return; } @@ -1059,13 +1061,13 @@ _mesa_ShaderStorageBlockBinding(GLuint program, return; } - if (shProg->ShaderStorageBlocks[shaderStorageBlockIndex].Binding != + if (shProg->data->ShaderStorageBlocks[shaderStorageBlockIndex].Binding != shaderStorageBlockBinding) { FLUSH_VERTICES(ctx, 0); ctx->NewDriverState |= ctx->DriverFlags.NewShaderStorageBuffer; - shProg->ShaderStorageBlocks[shaderStorageBlockIndex].Binding = + shProg->data->ShaderStorageBlocks[shaderStorageBlockIndex].Binding = shaderStorageBlockBinding; } } |