Mesa (staging/20.3): zink: fix 8 bit index handling code

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Dec 16 19:11:00 UTC 2020


Module: Mesa
Branch: staging/20.3
Commit: cf0f7d243e0d20cb3cd7fb1a46dc32850807f4f4
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cf0f7d243e0d20cb3cd7fb1a46dc32850807f4f4

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Mon Dec 14 11:51:14 2020 +0100

zink: fix 8 bit index handling code

index_size is specified in bytes, not bits.

Fixes: f4583b40863 ("zink: move 8bit index handling out of u_primconvert path")

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8081>
(cherry picked from commit ba74e1be22f646f9639e85b12c7707e96351a075)

Conflicts:
	src/gallium/drivers/zink/zink_draw.c

---

 .pick_status.json                    | 2 +-
 src/gallium/drivers/zink/zink_draw.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 2533e257509..8361ecc5fe2 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -175,7 +175,7 @@
         "description": "zink: fix 8 bit index handling code",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "f4583b40863e3e57fe0df60daf1d5ab5ea8ebbae"
     },
diff --git a/src/gallium/drivers/zink/zink_draw.c b/src/gallium/drivers/zink/zink_draw.c
index 3daafcf9833..8f97bb508ea 100644
--- a/src/gallium/drivers/zink/zink_draw.c
+++ b/src/gallium/drivers/zink/zink_draw.c
@@ -272,7 +272,7 @@ zink_draw_vbo(struct pipe_context *pctx,
    if (dinfo->index_size > 0) {
        uint32_t restart_index = util_prim_restart_index_from_size(dinfo->index_size);
        if ((dinfo->primitive_restart && (dinfo->restart_index != restart_index)) ||
-           (!screen->info.have_EXT_index_type_uint8 && dinfo->index_size == 8)) {
+           (!screen->info.have_EXT_index_type_uint8 && dinfo->index_size == 1)) {
           util_translate_prim_restart_ib(pctx, dinfo, &index_buffer);
           need_index_buffer_unref = true;
        } else {



More information about the mesa-commit mailing list