aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/linker.cpp
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-11-10 19:46:11 +1100
committerTimothy Arceri <[email protected]>2017-01-19 15:55:02 +1100
commit90d950038f801551cc5b939ef31c379bccf96f5f (patch)
treebf03d13a1e15f49de1fdf31bc1341f586f31a2f0 /src/compiler/glsl/linker.cpp
parent62f718bfcb75ab6f8e7276d1acdea767e55feac9 (diff)
mesa/glsl: move ProgramResourceList to gl_shader_program_data
We also move NumProgramResourceList at the same time. GLES does interface validation on SSO at runtime so we need to move this to be able to switch to storing gl_program pointers in CurrentProgram. Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/compiler/glsl/linker.cpp')
-rw-r--r--src/compiler/glsl/linker.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 5f6b27c887b..dea78384a38 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -3536,25 +3536,25 @@ add_program_resource(struct gl_shader_program *prog,
if (_mesa_set_search(resource_set, data))
return true;
- prog->ProgramResourceList =
+ prog->data->ProgramResourceList =
reralloc(prog,
- prog->ProgramResourceList,
+ prog->data->ProgramResourceList,
gl_program_resource,
- prog->NumProgramResourceList + 1);
+ prog->data->NumProgramResourceList + 1);
- if (!prog->ProgramResourceList) {
+ if (!prog->data->ProgramResourceList) {
linker_error(prog, "Out of memory during linking.\n");
return false;
}
struct gl_program_resource *res =
- &prog->ProgramResourceList[prog->NumProgramResourceList];
+ &prog->data->ProgramResourceList[prog->data->NumProgramResourceList];
res->Type = type;
res->Data = data;
res->StageReferences = stages;
- prog->NumProgramResourceList++;
+ prog->data->NumProgramResourceList++;
_mesa_set_add(resource_set, data);
@@ -4198,10 +4198,10 @@ build_program_resource_list(struct gl_context *ctx,
struct gl_shader_program *shProg)
{
/* Rebuild resource list. */
- if (shProg->ProgramResourceList) {
- ralloc_free(shProg->ProgramResourceList);
- shProg->ProgramResourceList = NULL;
- shProg->NumProgramResourceList = 0;
+ if (shProg->data->ProgramResourceList) {
+ ralloc_free(shProg->data->ProgramResourceList);
+ shProg->data->ProgramResourceList = NULL;
+ shProg->data->NumProgramResourceList = 0;
}
int input_stage = MESA_SHADER_STAGES, output_stage = 0;