Module: Mesa
Branch: main
Commit: dc69d797ba1d80b4a0747a8936aa986c5c5333b3
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=dc69d797ba1d80b4a0747a8936aa986c5c5333b3

Author: Marek Olšák <[email protected]>
Date:   Sat Dec 31 22:39:55 2022 -0500

mesa: enable GL_SELECT and GL_FEEDBACK modes for indirect draws

This enables the correct GL_SELECT/GL_FEEDBACK codepaths for indirect
draws.

Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26786>

---

 src/mesa/main/draw.c             | 2 +-
 src/mesa/state_tracker/st_draw.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/mesa/main/draw.c b/src/mesa/main/draw.c
index a1c4df0bf93..bb219986443 100644
--- a/src/mesa/main/draw.c
+++ b/src/mesa/main/draw.c
@@ -2247,7 +2247,7 @@ _mesa_DrawTransformFeedbackStreamInstanced(GLenum mode, 
GLuint name,
    info.mode = mode;
    info.instance_count = primcount;
 
-   cso_draw_vbo(st_context(ctx)->cso_context, &info, 0, &indirect, &draw, 1);
+   ctx->Driver.DrawGallium(ctx, &info, 0, &indirect, &draw, 1);
 
    if (MESA_DEBUG_FLAGS & DEBUG_ALWAYS_FLUSH) {
       _mesa_flush(ctx);
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
index 58514404f26..6fb82dedca4 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -162,7 +162,7 @@ rewrite_partial_stride_indirect(struct st_context *st,
    if (!new_draws)
       return;
    for (unsigned i = 0; i < draw_count; i++)
-      cso_draw_vbo(st->cso_context, &new_draws[i].info, i, NULL, 
&new_draws[i].draw, 1);
+      st->ctx->Driver.DrawGallium(st->ctx, &new_draws[i].info, i, NULL, 
&new_draws[i].draw, 1);
    free(new_draws);
 }
 
@@ -244,7 +244,7 @@ st_indirect_draw_vbo(struct gl_context *ctx,
 
       indirect.draw_count = 1;
       for (i = 0; i < draw_count; i++) {
-         cso_draw_vbo(st->cso_context, &info, i, &indirect, &draw, 1);
+         ctx->Driver.DrawGallium(ctx, &info, i, &indirect, &draw, 1);
          indirect.offset += stride;
       }
    } else {
@@ -264,7 +264,7 @@ st_indirect_draw_vbo(struct gl_context *ctx,
             indirect_draw_count->buffer;
          indirect.indirect_draw_count_offset = indirect_draw_count_offset;
       }
-      cso_draw_vbo(st->cso_context, &info, 0, &indirect, &draw, 1);
+      ctx->Driver.DrawGallium(ctx, &info, 0, &indirect, &draw, 1);
    }
 
    if (MESA_DEBUG_FLAGS & DEBUG_ALWAYS_FLUSH)

Reply via email to