v3d: remove primconvert
authorJose Maria Casanova Crespo <jmcasanova@igalia.com>
Tue, 31 Aug 2021 15:43:34 +0000 (17:43 +0200)
committerJose Maria Casanova Crespo <jmcasanova@igalia.com>
Fri, 3 Sep 2021 07:24:23 +0000 (09:24 +0200)
Reference: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5277
Suggested-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12669>

src/gallium/drivers/v3d/v3d_context.c
src/gallium/drivers/v3d/v3d_context.h
src/gallium/drivers/v3d/v3dx_draw.c

index f931447..50a0e60 100644 (file)
@@ -32,7 +32,6 @@
 #include "util/u_blitter.h"
 #include "util/u_upload_mgr.h"
 #include "util/u_prim.h"
-#include "indices/u_primconvert.h"
 #include "pipe/p_screen.h"
 
 #include "v3d_screen.h"
@@ -282,9 +281,6 @@ v3d_context_destroy(struct pipe_context *pctx)
         if (v3d->blitter)
                 util_blitter_destroy(v3d->blitter);
 
-        if (v3d->primconvert)
-                util_primconvert_destroy(v3d->primconvert);
-
         if (v3d->uploader)
                 u_upload_destroy(v3d->uploader);
         if (v3d->state_uploader)
@@ -394,11 +390,6 @@ v3d_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
                 goto fail;
         v3d->blitter->use_index_buffer = true;
 
-        v3d->primconvert = util_primconvert_create(pctx,
-                                                   (1 << PIPE_PRIM_QUADS) - 1);
-        if (!v3d->primconvert)
-                goto fail;
-
         V3D_DEBUG |= saved_shaderdb_flag;
 
         v3d->sample_mask = (1 << V3D_MAX_SAMPLES) - 1;
index 5bd3e27..964289c 100644 (file)
@@ -500,8 +500,6 @@ struct v3d_context {
         /** bitfield of V3D_DIRTY_* */
         uint64_t dirty;
 
-        struct primconvert_context *primconvert;
-
         uint32_t next_uncompiled_program_id;
         uint64_t next_compiled_program_id;
 
index ba94df7..caf9dbe 100644 (file)
@@ -28,7 +28,6 @@
 #include "util/u_pack_color.h"
 #include "util/u_prim_restart.h"
 #include "util/u_upload_mgr.h"
-#include "indices/u_primconvert.h"
 
 #include "v3d_context.h"
 #include "v3d_resource.h"
@@ -972,14 +971,6 @@ v3d_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info,
                 }
         }
 
-        if (info->mode >= PIPE_PRIM_QUADS && info->mode <= PIPE_PRIM_POLYGON) {
-                util_primconvert_save_rasterizer_state(v3d->primconvert, &v3d->rasterizer->base);
-                util_primconvert_draw_vbo(v3d->primconvert, info, drawid_offset, indirect, draws, num_draws);
-                perf_debug("Fallback conversion for %d %s vertices\n",
-                           draws[0].count, u_prim_name(info->mode));
-                return;
-        }
-
         /* Before setting up the draw, flush anything writing to the resources
          * that we read from or reading from resources we write to.
          */