summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2016-02-09 14:20:41 -0700
committerBrian Paul <[email protected]>2016-02-09 17:48:25 -0700
commit9e2a9d5743246e0fdaa03fe90f8dc341cea10907 (patch)
treeb1a139bbdec70ffdbb031cfcfc21e86518ecd4e7 /src
parenta5b8ede25319217843f8ff7681a0af5ad4aab84a (diff)
st/mesa: use MAX3() macro, as we do for sampler view code below
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index 9c1eba49dcd..7096bd277ba 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -650,7 +650,8 @@ draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
if (fpv) {
/* drawing a color image */
const struct pipe_sampler_state *samplers[PIPE_MAX_SAMPLERS];
- uint num = MAX2(MAX2(fpv->drawpix_sampler, fpv->pixelmap_sampler) + 1,
+ uint num = MAX3(fpv->drawpix_sampler + 1,
+ fpv->pixelmap_sampler + 1,
st->state.num_samplers[PIPE_SHADER_FRAGMENT]);
uint i;