st/mesa: use MAX3() instead of MAX2(MAX2) in draw_textured_quad()
authorBrian Paul <brianp@vmware.com>
Thu, 15 Oct 2015 15:32:50 +0000 (09:32 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 20 Oct 2015 18:52:40 +0000 (12:52 -0600)
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_cb_drawpixels.c

index 20cbfdefd23e8da44f794598397e176feb45e6ac..c0e0484042b8715783027f715bf7a5414cbc8e63 100644 (file)
@@ -667,7 +667,8 @@ draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
    /* user textures, plus the drawpix textures */
    if (fpv) {
       struct pipe_sampler_view *sampler_views[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_sampler_views[PIPE_SHADER_FRAGMENT]);
 
       memcpy(sampler_views, st->state.sampler_views[PIPE_SHADER_FRAGMENT],