panfrost: Fix primconvert check
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Fri, 15 Mar 2019 02:13:34 +0000 (02:13 +0000)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Tue, 19 Mar 2019 03:52:20 +0000 (03:52 +0000)
In addition to fixing actual primconvert bugs, this prevents an infinite
loop when trying to draw POINTS.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
src/gallium/drivers/panfrost/pan_context.c

index 378a631410b800a5c1d4a6de352fb1213445f298..b6cf5302cae2795559e2b0c5526d82408ca9b65e 100644 (file)
@@ -1362,7 +1362,7 @@ panfrost_draw_vbo(
 
         /* Fallback for unsupported modes */
 
-        if (!(ctx->draw_modes & mode)) {
+        if (!(ctx->draw_modes & (1 << mode))) {
                 if (mode == PIPE_PRIM_QUADS && info->count == 4 && ctx->rasterizer && !ctx->rasterizer->base.flatshade) {
                         mode = PIPE_PRIM_TRIANGLE_FAN;
                 } else {