summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-06-09 23:54:16 +0200
committerMarek Olšák <[email protected]>2017-06-22 01:51:02 +0200
commitbc4e914f959efe61edc47f2b159bed527808475b (patch)
treef609a0a8e5686accbd032f70d003e3ebcb31b364 /src/mesa
parent68a0e15f44cf351eab97a734b1cffeade1873fdf (diff)
mesa: simplify a loop in _mesa_update_texture_state
Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/texstate.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index 1e90bf87dac..0a2883fcc69 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -840,13 +840,7 @@ _mesa_update_texture_state(struct gl_context *ctx)
int old_max_unit = ctx->Texture._MaxEnabledTexImageUnit;
BITSET_DECLARE(enabled_texture_units, MAX_COMBINED_TEXTURE_IMAGE_UNITS);
- for (i = 0; i < MESA_SHADER_STAGES; i++) {
- if (ctx->_Shader->CurrentProgram[i]) {
- prog[i] = ctx->_Shader->CurrentProgram[i];
- } else {
- prog[i] = NULL;
- }
- }
+ memcpy(prog, ctx->_Shader->CurrentProgram, sizeof(prog));
if (prog[MESA_SHADER_FRAGMENT] == NULL &&
_mesa_arb_fragment_program_enabled(ctx)) {