diff options
author | Marek Olšák <[email protected]> | 2013-05-02 02:30:44 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2013-05-11 23:45:01 +0200 |
commit | 5e78433eec94fcaa87bdcb2526ec0910a69ed347 (patch) | |
tree | ebc6225aacfd5303bcab3422c2b57c8de53fe975 /src/glsl | |
parent | d27d29f1a67babd93091d34aae4c2784a8d62f31 (diff) |
mesa: move max texture image unit constants to gl_program_constants
Const.MaxTextureImageUnits -> Const.FragmentProgram.MaxTextureImageUnits
Const.MaxVertexTextureImageUnits -> Const.VertexProgram.MaxTextureImageUnits
etc.
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/glsl')
-rw-r--r-- | src/glsl/glsl_parser_extras.cpp | 4 | ||||
-rw-r--r-- | src/glsl/linker.cpp | 8 | ||||
-rw-r--r-- | src/glsl/standalone_scaffolding.cpp | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index e4636f87309..cf6c8c62151 100644 --- a/src/glsl/glsl_parser_extras.cpp +++ b/src/glsl/glsl_parser_extras.cpp @@ -93,9 +93,9 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx, this->Const.MaxVertexAttribs = ctx->Const.VertexProgram.MaxAttribs; this->Const.MaxVertexUniformComponents = ctx->Const.VertexProgram.MaxUniformComponents; this->Const.MaxVaryingFloats = ctx->Const.MaxVarying * 4; - this->Const.MaxVertexTextureImageUnits = ctx->Const.MaxVertexTextureImageUnits; + this->Const.MaxVertexTextureImageUnits = ctx->Const.VertexProgram.MaxTextureImageUnits; this->Const.MaxCombinedTextureImageUnits = ctx->Const.MaxCombinedTextureImageUnits; - this->Const.MaxTextureImageUnits = ctx->Const.MaxTextureImageUnits; + this->Const.MaxTextureImageUnits = ctx->Const.FragmentProgram.MaxTextureImageUnits; this->Const.MaxFragmentUniformComponents = ctx->Const.FragmentProgram.MaxUniformComponents; this->Const.MinProgramTexelOffset = ctx->Const.MinProgramTexelOffset; this->Const.MaxProgramTexelOffset = ctx->Const.MaxProgramTexelOffset; diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 2b30d2b652d..3ef5940f892 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -1512,15 +1512,15 @@ check_resources(struct gl_context *ctx, struct gl_shader_program *prog) }; const unsigned max_samplers[MESA_SHADER_TYPES] = { - ctx->Const.MaxVertexTextureImageUnits, - ctx->Const.MaxTextureImageUnits, - ctx->Const.MaxGeometryTextureImageUnits + ctx->Const.VertexProgram.MaxTextureImageUnits, + ctx->Const.FragmentProgram.MaxTextureImageUnits, + ctx->Const.GeometryProgram.MaxTextureImageUnits }; const unsigned max_uniform_components[MESA_SHADER_TYPES] = { ctx->Const.VertexProgram.MaxUniformComponents, ctx->Const.FragmentProgram.MaxUniformComponents, - 0 /* FINISHME: Geometry shaders. */ + ctx->Const.GeometryProgram.MaxUniformComponents }; const unsigned max_uniform_blocks[MESA_SHADER_TYPES] = { diff --git a/src/glsl/standalone_scaffolding.cpp b/src/glsl/standalone_scaffolding.cpp index 3c8f70f9e29..8653c4e1eef 100644 --- a/src/glsl/standalone_scaffolding.cpp +++ b/src/glsl/standalone_scaffolding.cpp @@ -117,9 +117,9 @@ void initialize_context_to_defaults(struct gl_context *ctx, gl_api api) ctx->Const.VertexProgram.MaxUniformComponents = 512; ctx->Const.MaxVarying = 8; /* == gl_MaxVaryingFloats / 4 */ - ctx->Const.MaxVertexTextureImageUnits = 0; + ctx->Const.VertexProgram.MaxTextureImageUnits = 0; ctx->Const.MaxCombinedTextureImageUnits = 2; - ctx->Const.MaxTextureImageUnits = 2; + ctx->Const.FragmentProgram.MaxTextureImageUnits = 2; ctx->Const.FragmentProgram.MaxUniformComponents = 64; ctx->Const.MaxDrawBuffers = 1; |