summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r--src/mesa/main/context.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 76e2eccfd5c..cfebbd2cd72 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -561,9 +561,9 @@ _mesa_init_constants(struct gl_context *ctx)
ctx->Const.MaxTextureRectSize = MAX_TEXTURE_RECT_SIZE;
ctx->Const.MaxArrayTextureLayers = MAX_ARRAY_TEXTURE_LAYERS;
ctx->Const.MaxTextureCoordUnits = MAX_TEXTURE_COORD_UNITS;
- ctx->Const.FragmentProgram.MaxTextureImageUnits = MAX_TEXTURE_IMAGE_UNITS;
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits = MAX_TEXTURE_IMAGE_UNITS;
ctx->Const.MaxTextureUnits = MIN2(ctx->Const.MaxTextureCoordUnits,
- ctx->Const.FragmentProgram.MaxTextureImageUnits);
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits);
ctx->Const.MaxTextureMaxAnisotropy = MAX_TEXTURE_MAX_ANISOTROPY;
ctx->Const.MaxTextureLodBias = MAX_TEXTURE_LOD_BIAS;
ctx->Const.MaxTextureBufferSize = 65536;
@@ -593,9 +593,9 @@ _mesa_init_constants(struct gl_context *ctx)
ctx->Const.MaxUniformBlockSize = 16384;
ctx->Const.UniformBufferOffsetAlignment = 1;
- init_program_limits(ctx, GL_VERTEX_PROGRAM_ARB, &ctx->Const.VertexProgram);
- init_program_limits(ctx, GL_FRAGMENT_PROGRAM_ARB, &ctx->Const.FragmentProgram);
- init_program_limits(ctx, MESA_GEOMETRY_PROGRAM, &ctx->Const.GeometryProgram);
+ init_program_limits(ctx, GL_VERTEX_PROGRAM_ARB, &ctx->Const.Program[MESA_SHADER_VERTEX]);
+ init_program_limits(ctx, GL_FRAGMENT_PROGRAM_ARB, &ctx->Const.Program[MESA_SHADER_FRAGMENT]);
+ init_program_limits(ctx, MESA_GEOMETRY_PROGRAM, &ctx->Const.Program[MESA_SHADER_GEOMETRY]);
ctx->Const.MaxProgramMatrices = MAX_PROGRAM_MATRICES;
ctx->Const.MaxProgramMatrixStackDepth = MAX_PROGRAM_MATRIX_STACK_DEPTH;
@@ -609,10 +609,10 @@ _mesa_init_constants(struct gl_context *ctx)
ctx->Const.MaxColorAttachments = MAX_COLOR_ATTACHMENTS;
ctx->Const.MaxRenderbufferSize = MAX_RENDERBUFFER_SIZE;
- ctx->Const.VertexProgram.MaxTextureImageUnits = MAX_TEXTURE_IMAGE_UNITS;
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxTextureImageUnits = MAX_TEXTURE_IMAGE_UNITS;
ctx->Const.MaxCombinedTextureImageUnits = MAX_COMBINED_TEXTURE_IMAGE_UNITS;
ctx->Const.MaxVarying = 16; /* old limit not to break tnl and swrast */
- ctx->Const.GeometryProgram.MaxTextureImageUnits = MAX_TEXTURE_IMAGE_UNITS;
+ ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxTextureImageUnits = MAX_TEXTURE_IMAGE_UNITS;
ctx->Const.MaxGeometryOutputVertices = MAX_GEOMETRY_OUTPUT_VERTICES;
ctx->Const.MaxGeometryTotalOutputComponents = MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS;
@@ -699,24 +699,24 @@ check_context_limits(struct gl_context *ctx)
(8 * sizeof(ctx->FragmentProgram._Current->Base.InputsRead)));
/* shader-related checks */
- assert(ctx->Const.FragmentProgram.MaxLocalParams <= MAX_PROGRAM_LOCAL_PARAMS);
- assert(ctx->Const.VertexProgram.MaxLocalParams <= MAX_PROGRAM_LOCAL_PARAMS);
+ assert(ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxLocalParams <= MAX_PROGRAM_LOCAL_PARAMS);
+ assert(ctx->Const.Program[MESA_SHADER_VERTEX].MaxLocalParams <= MAX_PROGRAM_LOCAL_PARAMS);
/* Texture unit checks */
- assert(ctx->Const.FragmentProgram.MaxTextureImageUnits > 0);
- assert(ctx->Const.FragmentProgram.MaxTextureImageUnits <= MAX_TEXTURE_IMAGE_UNITS);
+ assert(ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits > 0);
+ assert(ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits <= MAX_TEXTURE_IMAGE_UNITS);
assert(ctx->Const.MaxTextureCoordUnits > 0);
assert(ctx->Const.MaxTextureCoordUnits <= MAX_TEXTURE_COORD_UNITS);
assert(ctx->Const.MaxTextureUnits > 0);
assert(ctx->Const.MaxTextureUnits <= MAX_TEXTURE_IMAGE_UNITS);
assert(ctx->Const.MaxTextureUnits <= MAX_TEXTURE_COORD_UNITS);
- assert(ctx->Const.MaxTextureUnits == MIN2(ctx->Const.FragmentProgram.MaxTextureImageUnits,
+ assert(ctx->Const.MaxTextureUnits == MIN2(ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits,
ctx->Const.MaxTextureCoordUnits));
assert(ctx->Const.MaxCombinedTextureImageUnits > 0);
assert(ctx->Const.MaxCombinedTextureImageUnits <= MAX_COMBINED_TEXTURE_IMAGE_UNITS);
assert(ctx->Const.MaxTextureCoordUnits <= MAX_COMBINED_TEXTURE_IMAGE_UNITS);
/* number of coord units cannot be greater than number of image units */
- assert(ctx->Const.MaxTextureCoordUnits <= ctx->Const.FragmentProgram.MaxTextureImageUnits);
+ assert(ctx->Const.MaxTextureCoordUnits <= ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits);
/* Texture size checks */