summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/ast_to_hir.cpp6
-rw-r--r--src/glsl/builtin_variables.cpp4
-rw-r--r--src/glsl/glsl_parser_extras.cpp28
-rw-r--r--src/glsl/link_atomics.cpp12
-rw-r--r--src/glsl/link_varyings.cpp8
-rw-r--r--src/glsl/linker.cpp24
-rw-r--r--src/glsl/main.cpp122
-rw-r--r--src/glsl/standalone_scaffolding.cpp14
8 files changed, 109 insertions, 109 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 3e79f1a8ed5..1ac60478aa7 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -1986,13 +1986,13 @@ validate_binding_qualifier(struct _mesa_glsl_parse_state *state,
unsigned limit = 0;
switch (state->stage) {
case MESA_SHADER_VERTEX:
- limit = ctx->Const.VertexProgram.MaxTextureImageUnits;
+ limit = ctx->Const.Program[MESA_SHADER_VERTEX].MaxTextureImageUnits;
break;
case MESA_SHADER_GEOMETRY:
- limit = ctx->Const.GeometryProgram.MaxTextureImageUnits;
+ limit = ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxTextureImageUnits;
break;
case MESA_SHADER_FRAGMENT:
- limit = ctx->Const.FragmentProgram.MaxTextureImageUnits;
+ limit = ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits;
break;
}
diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp
index 1a9489e53da..f630923eda4 100644
--- a/src/glsl/builtin_variables.cpp
+++ b/src/glsl/builtin_variables.cpp
@@ -554,9 +554,9 @@ builtin_variable_generator::generate_constants()
*/
if (state->is_version(0, 300)) {
add_const("gl_MaxVertexOutputVectors",
- state->ctx->Const.VertexProgram.MaxOutputComponents / 4);
+ state->ctx->Const.Program[MESA_SHADER_VERTEX].MaxOutputComponents / 4);
add_const("gl_MaxFragmentInputVectors",
- state->ctx->Const.FragmentProgram.MaxInputComponents / 4);
+ state->ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxInputComponents / 4);
} else {
add_const("gl_MaxVaryingVectors",
state->ctx->Const.MaxVarying);
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index fe29dddceb2..21dc3abd74f 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -96,30 +96,30 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx,
this->Const.MaxClipPlanes = ctx->Const.MaxClipPlanes;
this->Const.MaxTextureUnits = ctx->Const.MaxTextureUnits;
this->Const.MaxTextureCoords = ctx->Const.MaxTextureCoordUnits;
- this->Const.MaxVertexAttribs = ctx->Const.VertexProgram.MaxAttribs;
- this->Const.MaxVertexUniformComponents = ctx->Const.VertexProgram.MaxUniformComponents;
- this->Const.MaxVertexTextureImageUnits = ctx->Const.VertexProgram.MaxTextureImageUnits;
+ this->Const.MaxVertexAttribs = ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs;
+ this->Const.MaxVertexUniformComponents = ctx->Const.Program[MESA_SHADER_VERTEX].MaxUniformComponents;
+ this->Const.MaxVertexTextureImageUnits = ctx->Const.Program[MESA_SHADER_VERTEX].MaxTextureImageUnits;
this->Const.MaxCombinedTextureImageUnits = ctx->Const.MaxCombinedTextureImageUnits;
- this->Const.MaxTextureImageUnits = ctx->Const.FragmentProgram.MaxTextureImageUnits;
- this->Const.MaxFragmentUniformComponents = ctx->Const.FragmentProgram.MaxUniformComponents;
+ this->Const.MaxTextureImageUnits = ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits;
+ this->Const.MaxFragmentUniformComponents = ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxUniformComponents;
this->Const.MinProgramTexelOffset = ctx->Const.MinProgramTexelOffset;
this->Const.MaxProgramTexelOffset = ctx->Const.MaxProgramTexelOffset;
this->Const.MaxDrawBuffers = ctx->Const.MaxDrawBuffers;
/* 1.50 constants */
- this->Const.MaxVertexOutputComponents = ctx->Const.VertexProgram.MaxOutputComponents;
- this->Const.MaxGeometryInputComponents = ctx->Const.GeometryProgram.MaxInputComponents;
- this->Const.MaxGeometryOutputComponents = ctx->Const.GeometryProgram.MaxOutputComponents;
- this->Const.MaxFragmentInputComponents = ctx->Const.FragmentProgram.MaxInputComponents;
- this->Const.MaxGeometryTextureImageUnits = ctx->Const.GeometryProgram.MaxTextureImageUnits;
+ this->Const.MaxVertexOutputComponents = ctx->Const.Program[MESA_SHADER_VERTEX].MaxOutputComponents;
+ this->Const.MaxGeometryInputComponents = ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxInputComponents;
+ this->Const.MaxGeometryOutputComponents = ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxOutputComponents;
+ this->Const.MaxFragmentInputComponents = ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxInputComponents;
+ this->Const.MaxGeometryTextureImageUnits = ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxTextureImageUnits;
this->Const.MaxGeometryOutputVertices = ctx->Const.MaxGeometryOutputVertices;
this->Const.MaxGeometryTotalOutputComponents = ctx->Const.MaxGeometryTotalOutputComponents;
- this->Const.MaxGeometryUniformComponents = ctx->Const.GeometryProgram.MaxUniformComponents;
+ this->Const.MaxGeometryUniformComponents = ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxUniformComponents;
- this->Const.MaxVertexAtomicCounters = ctx->Const.VertexProgram.MaxAtomicCounters;
- this->Const.MaxGeometryAtomicCounters = ctx->Const.GeometryProgram.MaxAtomicCounters;
- this->Const.MaxFragmentAtomicCounters = ctx->Const.FragmentProgram.MaxAtomicCounters;
+ this->Const.MaxVertexAtomicCounters = ctx->Const.Program[MESA_SHADER_VERTEX].MaxAtomicCounters;
+ this->Const.MaxGeometryAtomicCounters = ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxAtomicCounters;
+ this->Const.MaxFragmentAtomicCounters = ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxAtomicCounters;
this->Const.MaxCombinedAtomicCounters = ctx->Const.MaxCombinedAtomicCounters;
this->Const.MaxAtomicBufferBindings = ctx->Const.MaxAtomicBufferBindings;
diff --git a/src/glsl/link_atomics.cpp b/src/glsl/link_atomics.cpp
index bfa09a3bca6..7f4ddafdbda 100644
--- a/src/glsl/link_atomics.cpp
+++ b/src/glsl/link_atomics.cpp
@@ -215,15 +215,15 @@ link_check_atomic_counter_resources(struct gl_context *ctx,
struct gl_shader_program *prog)
{
const unsigned max_atomic_counters[] = {
- ctx->Const.VertexProgram.MaxAtomicCounters,
- ctx->Const.GeometryProgram.MaxAtomicCounters,
- ctx->Const.FragmentProgram.MaxAtomicCounters
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxAtomicCounters,
+ ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxAtomicCounters,
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxAtomicCounters
};
STATIC_ASSERT(Elements(max_atomic_counters) == MESA_SHADER_STAGES);
const unsigned max_atomic_buffers[] = {
- ctx->Const.VertexProgram.MaxAtomicBuffers,
- ctx->Const.GeometryProgram.MaxAtomicBuffers,
- ctx->Const.FragmentProgram.MaxAtomicBuffers
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxAtomicBuffers,
+ ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxAtomicBuffers,
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxAtomicBuffers
};
STATIC_ASSERT(Elements(max_atomic_buffers) == MESA_SHADER_STAGES);
unsigned num_buffers;
diff --git a/src/glsl/link_varyings.cpp b/src/glsl/link_varyings.cpp
index 7a31f972ae1..6672b878018 100644
--- a/src/glsl/link_varyings.cpp
+++ b/src/glsl/link_varyings.cpp
@@ -1252,10 +1252,10 @@ check_against_output_limit(struct gl_context *ctx,
unsigned max_output_components;
switch (producer->Stage) {
case MESA_SHADER_VERTEX:
- max_output_components = ctx->Const.VertexProgram.MaxOutputComponents;
+ max_output_components = ctx->Const.Program[MESA_SHADER_VERTEX].MaxOutputComponents;
break;
case MESA_SHADER_GEOMETRY:
- max_output_components = ctx->Const.GeometryProgram.MaxOutputComponents;
+ max_output_components = ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxOutputComponents;
break;
case MESA_SHADER_FRAGMENT:
default:
@@ -1301,10 +1301,10 @@ check_against_input_limit(struct gl_context *ctx,
unsigned max_input_components;
switch (consumer->Stage) {
case MESA_SHADER_GEOMETRY:
- max_input_components = ctx->Const.GeometryProgram.MaxInputComponents;
+ max_input_components = ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxInputComponents;
break;
case MESA_SHADER_FRAGMENT:
- max_input_components = ctx->Const.FragmentProgram.MaxInputComponents;
+ max_input_components = ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxInputComponents;
break;
case MESA_SHADER_VERTEX:
default:
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index 91a7220fc8e..7efc29e6ca4 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -1895,32 +1895,32 @@ static void
check_resources(struct gl_context *ctx, struct gl_shader_program *prog)
{
const unsigned max_samplers[] = {
- ctx->Const.VertexProgram.MaxTextureImageUnits,
- ctx->Const.GeometryProgram.MaxTextureImageUnits,
- ctx->Const.FragmentProgram.MaxTextureImageUnits
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxTextureImageUnits,
+ ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxTextureImageUnits,
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits
};
STATIC_ASSERT(Elements(max_samplers) == MESA_SHADER_STAGES);
const unsigned max_default_uniform_components[] = {
- ctx->Const.VertexProgram.MaxUniformComponents,
- ctx->Const.GeometryProgram.MaxUniformComponents,
- ctx->Const.FragmentProgram.MaxUniformComponents
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxUniformComponents,
+ ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxUniformComponents,
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxUniformComponents
};
STATIC_ASSERT(Elements(max_default_uniform_components) ==
MESA_SHADER_STAGES);
const unsigned max_combined_uniform_components[] = {
- ctx->Const.VertexProgram.MaxCombinedUniformComponents,
- ctx->Const.GeometryProgram.MaxCombinedUniformComponents,
- ctx->Const.FragmentProgram.MaxCombinedUniformComponents
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxCombinedUniformComponents,
+ ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxCombinedUniformComponents,
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxCombinedUniformComponents
};
STATIC_ASSERT(Elements(max_combined_uniform_components) ==
MESA_SHADER_STAGES);
const unsigned max_uniform_blocks[] = {
- ctx->Const.VertexProgram.MaxUniformBlocks,
- ctx->Const.GeometryProgram.MaxUniformBlocks,
- ctx->Const.FragmentProgram.MaxUniformBlocks
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxUniformBlocks,
+ ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxUniformBlocks,
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxUniformBlocks
};
STATIC_ASSERT(Elements(max_uniform_blocks) == MESA_SHADER_STAGES);
diff --git a/src/glsl/main.cpp b/src/glsl/main.cpp
index 736689eb75c..03b7c786b7d 100644
--- a/src/glsl/main.cpp
+++ b/src/glsl/main.cpp
@@ -62,20 +62,20 @@ initialize_context(struct gl_context *ctx, gl_api api)
ctx->Const.MaxTextureCoordUnits = 0;
ctx->Const.MaxTextureUnits = 8;
- ctx->Const.VertexProgram.MaxAttribs = 8;
- ctx->Const.VertexProgram.MaxTextureImageUnits = 0;
- ctx->Const.VertexProgram.MaxUniformComponents = 128 * 4;
- ctx->Const.VertexProgram.MaxInputComponents = 0; /* not used */
- ctx->Const.VertexProgram.MaxOutputComponents = 32;
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs = 8;
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxTextureImageUnits = 0;
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxUniformComponents = 128 * 4;
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxInputComponents = 0; /* not used */
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxOutputComponents = 32;
- ctx->Const.FragmentProgram.MaxTextureImageUnits =
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits =
ctx->Const.MaxCombinedTextureImageUnits;
- ctx->Const.FragmentProgram.MaxUniformComponents = 16 * 4;
- ctx->Const.FragmentProgram.MaxInputComponents =
- ctx->Const.VertexProgram.MaxOutputComponents;
- ctx->Const.FragmentProgram.MaxOutputComponents = 0; /* not used */
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxUniformComponents = 16 * 4;
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxInputComponents =
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxOutputComponents;
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxOutputComponents = 0; /* not used */
- ctx->Const.MaxVarying = ctx->Const.VertexProgram.MaxOutputComponents / 4;
+ ctx->Const.MaxVarying = ctx->Const.Program[MESA_SHADER_VERTEX].MaxOutputComponents / 4;
break;
case 110:
case 120:
@@ -88,20 +88,20 @@ initialize_context(struct gl_context *ctx, gl_api api)
ctx->Const.MaxTextureCoordUnits = 2;
ctx->Const.MaxTextureUnits = 2;
- ctx->Const.VertexProgram.MaxAttribs = 16;
- ctx->Const.VertexProgram.MaxTextureImageUnits = 0;
- ctx->Const.VertexProgram.MaxUniformComponents = 512;
- ctx->Const.VertexProgram.MaxInputComponents = 0; /* not used */
- ctx->Const.VertexProgram.MaxOutputComponents = 32;
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs = 16;
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxTextureImageUnits = 0;
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxUniformComponents = 512;
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxInputComponents = 0; /* not used */
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxOutputComponents = 32;
- ctx->Const.FragmentProgram.MaxTextureImageUnits =
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits =
ctx->Const.MaxCombinedTextureImageUnits;
- ctx->Const.FragmentProgram.MaxUniformComponents = 64;
- ctx->Const.FragmentProgram.MaxInputComponents =
- ctx->Const.VertexProgram.MaxOutputComponents;
- ctx->Const.FragmentProgram.MaxOutputComponents = 0; /* not used */
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxUniformComponents = 64;
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxInputComponents =
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxOutputComponents;
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxOutputComponents = 0; /* not used */
- ctx->Const.MaxVarying = ctx->Const.VertexProgram.MaxOutputComponents / 4;
+ ctx->Const.MaxVarying = ctx->Const.Program[MESA_SHADER_VERTEX].MaxOutputComponents / 4;
break;
case 130:
case 140:
@@ -114,19 +114,19 @@ initialize_context(struct gl_context *ctx, gl_api api)
ctx->Const.MaxTextureCoordUnits = 8;
ctx->Const.MaxTextureUnits = 2;
- ctx->Const.VertexProgram.MaxAttribs = 16;
- ctx->Const.VertexProgram.MaxTextureImageUnits = 16;
- ctx->Const.VertexProgram.MaxUniformComponents = 1024;
- ctx->Const.VertexProgram.MaxInputComponents = 0; /* not used */
- ctx->Const.VertexProgram.MaxOutputComponents = 64;
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs = 16;
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxTextureImageUnits = 16;
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxUniformComponents = 1024;
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxInputComponents = 0; /* not used */
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxOutputComponents = 64;
- ctx->Const.FragmentProgram.MaxTextureImageUnits = 16;
- ctx->Const.FragmentProgram.MaxUniformComponents = 1024;
- ctx->Const.FragmentProgram.MaxInputComponents =
- ctx->Const.VertexProgram.MaxOutputComponents;
- ctx->Const.FragmentProgram.MaxOutputComponents = 0; /* not used */
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits = 16;
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxUniformComponents = 1024;
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxInputComponents =
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxOutputComponents;
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxOutputComponents = 0; /* not used */
- ctx->Const.MaxVarying = ctx->Const.VertexProgram.MaxOutputComponents / 4;
+ ctx->Const.MaxVarying = ctx->Const.Program[MESA_SHADER_VERTEX].MaxOutputComponents / 4;
break;
case 150:
case 330:
@@ -138,28 +138,28 @@ initialize_context(struct gl_context *ctx, gl_api api)
ctx->Const.MaxTextureCoordUnits = 8;
ctx->Const.MaxTextureUnits = 2;
- ctx->Const.VertexProgram.MaxAttribs = 16;
- ctx->Const.VertexProgram.MaxTextureImageUnits = 16;
- ctx->Const.VertexProgram.MaxUniformComponents = 1024;
- ctx->Const.VertexProgram.MaxInputComponents = 0; /* not used */
- ctx->Const.VertexProgram.MaxOutputComponents = 64;
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs = 16;
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxTextureImageUnits = 16;
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxUniformComponents = 1024;
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxInputComponents = 0; /* not used */
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxOutputComponents = 64;
- ctx->Const.GeometryProgram.MaxTextureImageUnits = 16;
- ctx->Const.GeometryProgram.MaxUniformComponents = 1024;
- ctx->Const.GeometryProgram.MaxInputComponents =
- ctx->Const.VertexProgram.MaxOutputComponents;
- ctx->Const.GeometryProgram.MaxOutputComponents = 128;
+ ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxTextureImageUnits = 16;
+ ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxUniformComponents = 1024;
+ ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxInputComponents =
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxOutputComponents;
+ ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxOutputComponents = 128;
- ctx->Const.FragmentProgram.MaxTextureImageUnits = 16;
- ctx->Const.FragmentProgram.MaxUniformComponents = 1024;
- ctx->Const.FragmentProgram.MaxInputComponents =
- ctx->Const.GeometryProgram.MaxOutputComponents;
- ctx->Const.FragmentProgram.MaxOutputComponents = 0; /* not used */
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits = 16;
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxUniformComponents = 1024;
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxInputComponents =
+ ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxOutputComponents;
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxOutputComponents = 0; /* not used */
ctx->Const.MaxCombinedTextureImageUnits =
- ctx->Const.VertexProgram.MaxTextureImageUnits
- + ctx->Const.GeometryProgram.MaxTextureImageUnits
- + ctx->Const.FragmentProgram.MaxTextureImageUnits;
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxTextureImageUnits
+ + ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxTextureImageUnits
+ + ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits;
ctx->Const.MaxGeometryOutputVertices = 256;
ctx->Const.MaxGeometryTotalOutputComponents = 1024;
@@ -178,18 +178,18 @@ initialize_context(struct gl_context *ctx, gl_api api)
ctx->Const.MaxTextureCoordUnits = 0;
ctx->Const.MaxTextureUnits = 0;
- ctx->Const.VertexProgram.MaxAttribs = 16;
- ctx->Const.VertexProgram.MaxTextureImageUnits = 16;
- ctx->Const.VertexProgram.MaxUniformComponents = 1024;
- ctx->Const.VertexProgram.MaxInputComponents = 0; /* not used */
- ctx->Const.VertexProgram.MaxOutputComponents = 16 * 4;
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs = 16;
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxTextureImageUnits = 16;
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxUniformComponents = 1024;
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxInputComponents = 0; /* not used */
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxOutputComponents = 16 * 4;
- ctx->Const.FragmentProgram.MaxTextureImageUnits = 16;
- ctx->Const.FragmentProgram.MaxUniformComponents = 224;
- ctx->Const.FragmentProgram.MaxInputComponents = 15 * 4;
- ctx->Const.FragmentProgram.MaxOutputComponents = 0; /* not used */
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits = 16;
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxUniformComponents = 224;
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxInputComponents = 15 * 4;
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxOutputComponents = 0; /* not used */
- ctx->Const.MaxVarying = ctx->Const.FragmentProgram.MaxInputComponents / 4;
+ ctx->Const.MaxVarying = ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxInputComponents / 4;
break;
}
diff --git a/src/glsl/standalone_scaffolding.cpp b/src/glsl/standalone_scaffolding.cpp
index 6a717458e60..257d2e7a94b 100644
--- a/src/glsl/standalone_scaffolding.cpp
+++ b/src/glsl/standalone_scaffolding.cpp
@@ -127,16 +127,16 @@ void initialize_context_to_defaults(struct gl_context *ctx, gl_api api)
ctx->Const.MaxClipPlanes = 6;
ctx->Const.MaxTextureUnits = 2;
ctx->Const.MaxTextureCoordUnits = 2;
- ctx->Const.VertexProgram.MaxAttribs = 16;
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs = 16;
- ctx->Const.VertexProgram.MaxUniformComponents = 512;
- ctx->Const.VertexProgram.MaxOutputComponents = 32;
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxUniformComponents = 512;
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxOutputComponents = 32;
ctx->Const.MaxVarying = 8; /* == gl_MaxVaryingFloats / 4 */
- ctx->Const.VertexProgram.MaxTextureImageUnits = 0;
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxTextureImageUnits = 0;
ctx->Const.MaxCombinedTextureImageUnits = 2;
- ctx->Const.FragmentProgram.MaxTextureImageUnits = 2;
- ctx->Const.FragmentProgram.MaxUniformComponents = 64;
- ctx->Const.FragmentProgram.MaxInputComponents = 32;
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits = 2;
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxUniformComponents = 64;
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxInputComponents = 32;
ctx->Const.MaxDrawBuffers = 1;