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/mesa/state_tracker | |
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/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_atom_sampler.c | 6 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_atom_texture.c | 8 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 8 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_mesa_to_tgsi.c | 2 |
5 files changed, 13 insertions, 13 deletions
diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c index db51eead16b..302e1298143 100644 --- a/src/mesa/state_tracker/st_atom_sampler.c +++ b/src/mesa/state_tracker/st_atom_sampler.c @@ -279,14 +279,14 @@ update_samplers(struct st_context *st) update_shader_samplers(st, PIPE_SHADER_FRAGMENT, &ctx->FragmentProgram._Current->Base, - ctx->Const.MaxTextureImageUnits, + ctx->Const.FragmentProgram.MaxTextureImageUnits, st->state.samplers[PIPE_SHADER_FRAGMENT], &st->state.num_samplers[PIPE_SHADER_FRAGMENT]); update_shader_samplers(st, PIPE_SHADER_VERTEX, &ctx->VertexProgram._Current->Base, - ctx->Const.MaxVertexTextureImageUnits, + ctx->Const.VertexProgram.MaxTextureImageUnits, st->state.samplers[PIPE_SHADER_VERTEX], &st->state.num_samplers[PIPE_SHADER_VERTEX]); @@ -294,7 +294,7 @@ update_samplers(struct st_context *st) update_shader_samplers(st, PIPE_SHADER_GEOMETRY, &ctx->GeometryProgram._Current->Base, - ctx->Const.MaxGeometryTextureImageUnits, + ctx->Const.GeometryProgram.MaxTextureImageUnits, st->state.samplers[PIPE_SHADER_GEOMETRY], &st->state.num_samplers[PIPE_SHADER_GEOMETRY]); } diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c index fc2d69013ae..8d1250fdc91 100644 --- a/src/mesa/state_tracker/st_atom_texture.c +++ b/src/mesa/state_tracker/st_atom_texture.c @@ -325,11 +325,11 @@ update_vertex_textures(struct st_context *st) { const struct gl_context *ctx = st->ctx; - if (ctx->Const.MaxVertexTextureImageUnits > 0) { + if (ctx->Const.VertexProgram.MaxTextureImageUnits > 0) { update_textures(st, PIPE_SHADER_VERTEX, &ctx->VertexProgram._Current->Base, - ctx->Const.MaxVertexTextureImageUnits, + ctx->Const.VertexProgram.MaxTextureImageUnits, st->state.sampler_views[PIPE_SHADER_VERTEX], &st->state.num_sampler_views[PIPE_SHADER_VERTEX]); } @@ -344,7 +344,7 @@ update_fragment_textures(struct st_context *st) update_textures(st, PIPE_SHADER_FRAGMENT, &ctx->FragmentProgram._Current->Base, - ctx->Const.MaxTextureImageUnits, + ctx->Const.FragmentProgram.MaxTextureImageUnits, st->state.sampler_views[PIPE_SHADER_FRAGMENT], &st->state.num_sampler_views[PIPE_SHADER_FRAGMENT]); } @@ -359,7 +359,7 @@ update_geometry_textures(struct st_context *st) update_textures(st, PIPE_SHADER_GEOMETRY, &ctx->GeometryProgram._Current->Base, - ctx->Const.MaxTextureImageUnits, + ctx->Const.FragmentProgram.MaxTextureImageUnits, st->state.sampler_views[PIPE_SHADER_GEOMETRY], &st->state.num_sampler_views[PIPE_SHADER_GEOMETRY]); } diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index a72728c1a82..9111d1fc594 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -90,12 +90,12 @@ void st_init_limits(struct st_context *st) c->MaxArrayTextureLayers = screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS); - c->MaxTextureImageUnits + c->FragmentProgram.MaxTextureImageUnits = _min(screen->get_shader_param(screen, PIPE_SHADER_FRAGMENT, PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS), MAX_TEXTURE_IMAGE_UNITS); - c->MaxVertexTextureImageUnits + c->VertexProgram.MaxTextureImageUnits = _min(screen->get_shader_param(screen, PIPE_SHADER_VERTEX, PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS), MAX_TEXTURE_IMAGE_UNITS); @@ -105,9 +105,9 @@ void st_init_limits(struct st_context *st) MAX_COMBINED_TEXTURE_IMAGE_UNITS); c->MaxTextureCoordUnits - = _min(c->MaxTextureImageUnits, MAX_TEXTURE_COORD_UNITS); + = _min(c->FragmentProgram.MaxTextureImageUnits, MAX_TEXTURE_COORD_UNITS); - c->MaxTextureUnits = _min(c->MaxTextureImageUnits, c->MaxTextureCoordUnits); + c->MaxTextureUnits = _min(c->FragmentProgram.MaxTextureImageUnits, c->MaxTextureCoordUnits); /* Define max viewport size and max renderbuffer size in terms of * max texture size (note: max tex RECT size = max tex 2D size). diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 5f1ffecc6dd..dd8810d454c 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -4930,7 +4930,7 @@ st_translate_program( assert(i == program->num_immediates); /* texture samplers */ - for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++) { + for (i = 0; i < ctx->Const.FragmentProgram.MaxTextureImageUnits; i++) { if (program->samplers_used & (1 << i)) { t->samplers[i] = ureg_DECL_sampler(ureg, i); } diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c index 2581e1ea88c..dd9f4fc53bf 100644 --- a/src/mesa/state_tracker/st_mesa_to_tgsi.c +++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c @@ -1221,7 +1221,7 @@ st_translate_mesa_program( } /* texture samplers */ - for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++) { + for (i = 0; i < ctx->Const.FragmentProgram.MaxTextureImageUnits; i++) { if (program->SamplersUsed & (1 << i)) { t->samplers[i] = ureg_DECL_sampler( ureg, i ); } |