summaryrefslogtreecommitdiffstats
path: root/src/mesa/program
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-11-07 14:47:18 +1100
committerTimothy Arceri <[email protected]>2016-11-19 15:45:46 +1100
commit203c8794a1debc0e45019fe945d1cc55459e6c6f (patch)
tree29eafc191c0fb98ebc28673e95d3d1918f883bb0 /src/mesa/program
parent65cd0a0d7f411eefac81408ebf7b704ccd1c9bf7 (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/program')
-rw-r--r--src/mesa/program/ir_to_mesa.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index 88a7f368ee1..558f0ea4f68 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -1622,7 +1622,7 @@ calc_sampler_offsets(struct gl_shader_program *prog, ir_dereference *deref,
* all that would work would be an unrolled loop counter that ends
* up being constant above.
*/
- ralloc_strcat(&prog->InfoLog,
+ ralloc_strcat(&prog->data->InfoLog,
"warning: Variable sampler array index unsupported.\n"
"This feature of the language was removed in GLSL 1.20 "
"and is unlikely to be supported for 1.10 in Mesa.\n");
@@ -1668,8 +1668,8 @@ get_sampler_uniform_value(class ir_dereference *sampler,
calc_sampler_offsets(shader_program, sampler, &offset, &array_elements,
&location);
- assert(shader_program->UniformStorage[location].opaque[shader].active);
- return shader_program->UniformStorage[location].opaque[shader].index +
+ assert(shader_program->data->UniformStorage[location].opaque[shader].active);
+ return shader_program->data->UniformStorage[location].opaque[shader].index +
offset;
}
@@ -2441,7 +2441,7 @@ add_uniform_to_shader::visit_field(const glsl_type *type, const char *name,
return;
struct gl_uniform_storage *storage =
- &this->shader_program->UniformStorage[location];
+ &this->shader_program->data->UniformStorage[location];
assert(storage->type->is_sampler() &&
storage->opaque[shader_type].active);
@@ -2510,7 +2510,7 @@ _mesa_associate_uniform_storage(struct gl_context *ctx,
continue;
struct gl_uniform_storage *storage =
- &shader_program->UniformStorage[location];
+ &shader_program->data->UniformStorage[location];
/* Do not associate any uniform storage to built-in uniforms */
if (storage->builtin)
@@ -2883,11 +2883,11 @@ get_mesa_program(struct gl_context *ctx,
mesa_inst++;
i++;
- if (!shader_program->LinkStatus)
+ if (!shader_program->data->LinkStatus)
break;
}
- if (!shader_program->LinkStatus) {
+ if (!shader_program->data->LinkStatus) {
goto fail_exit;
}
@@ -2936,7 +2936,7 @@ get_mesa_program(struct gl_context *ctx,
* program constant) has to happen before creating this linkage.
*/
_mesa_associate_uniform_storage(ctx, shader_program, prog->Parameters);
- if (!shader_program->LinkStatus) {
+ if (!shader_program->data->LinkStatus) {
goto fail_exit;
}
@@ -2959,7 +2959,7 @@ extern "C" {
GLboolean
_mesa_ir_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
{
- assert(prog->LinkStatus);
+ assert(prog->data->LinkStatus);
for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
if (prog->_LinkedShaders[i] == NULL)
@@ -3037,7 +3037,7 @@ _mesa_ir_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
}
build_program_resource_list(ctx, prog);
- return prog->LinkStatus;
+ return prog->data->LinkStatus;
}
/**
@@ -3050,7 +3050,7 @@ _mesa_glsl_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
_mesa_clear_shader_program_data(ctx, prog);
- prog->LinkStatus = GL_TRUE;
+ prog->data->LinkStatus = GL_TRUE;
for (i = 0; i < prog->NumShaders; i++) {
if (!prog->Shaders[i]->CompileStatus) {
@@ -3058,24 +3058,24 @@ _mesa_glsl_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
}
}
- if (prog->LinkStatus) {
+ if (prog->data->LinkStatus) {
link_shaders(ctx, prog);
}
- if (prog->LinkStatus) {
+ if (prog->data->LinkStatus) {
if (!ctx->Driver.LinkShader(ctx, prog)) {
- prog->LinkStatus = GL_FALSE;
+ prog->data->LinkStatus = GL_FALSE;
}
}
if (ctx->_Shader->Flags & GLSL_DUMP) {
- if (!prog->LinkStatus) {
+ if (!prog->data->LinkStatus) {
fprintf(stderr, "GLSL shader program %d failed to link\n", prog->Name);
}
- if (prog->InfoLog && prog->InfoLog[0] != 0) {
+ if (prog->data->InfoLog && prog->data->InfoLog[0] != 0) {
fprintf(stderr, "GLSL shader program %d info log:\n", prog->Name);
- fprintf(stderr, "%s\n", prog->InfoLog);
+ fprintf(stderr, "%s\n", prog->data->InfoLog);
}
}
}