aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_draw.c3
-rw-r--r--src/mesa/state_tracker/st_draw_feedback.c2
2 files changed, 2 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
index a8ff306e00a..10374746734 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -85,8 +85,7 @@ setup_primitive_restart(struct gl_context *ctx, struct pipe_draw_info *info)
if (ctx->Array._PrimitiveRestart) {
unsigned index_size = info->index_size;
- info->restart_index =
- _mesa_primitive_restart_index(ctx, index_size);
+ info->restart_index = ctx->Array._RestartIndex[index_size - 1];
/* Enable primitive restart only when the restart index can have an
* effect. This is required for correctness in radeonsi GFX8 support.
diff --git a/src/mesa/state_tracker/st_draw_feedback.c b/src/mesa/state_tracker/st_draw_feedback.c
index 8d82884ba8d..a4a38556199 100644
--- a/src/mesa/state_tracker/st_draw_feedback.c
+++ b/src/mesa/state_tracker/st_draw_feedback.c
@@ -216,7 +216,7 @@ st_feedback_draw_vbo(struct gl_context *ctx,
if (ctx->Array._PrimitiveRestart) {
info.primitive_restart = true;
- info.restart_index = _mesa_primitive_restart_index(ctx, info.index_size);
+ info.restart_index = ctx->Array._RestartIndex[index_size - 1];
}
} else {
info.index_size = 0;