summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/cso_cache
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2020-10-30 09:53:50 -0400
committerMarge Bot <eric+marge@anholt.net>2020-11-18 01:41:24 +0000
commit1a717dca04657e1f5a621afbe1ae391e3da067d5 (patch)
tree37a137603df3886fbf5af475e3cdfbc87bd45dc6 /src/gallium/auxiliary/cso_cache
parent238ee7b801cf3f861871d7b7849c25e180da5894 (diff)
gallium: move count_from_stream_output into pipe_draw_indirect_info
This removes some overhead from tc_draw_vbo and increases the maximum number of draws per batch from 153 to 192 in u_threaded_context. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7441>
Diffstat (limited to 'src/gallium/auxiliary/cso_cache')
-rw-r--r--src/gallium/auxiliary/cso_cache/cso_context.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c
index 3911ee73d30..2fdea6cc35f 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.c
+++ b/src/gallium/auxiliary/cso_cache/cso_context.c
@@ -1727,10 +1727,14 @@ cso_draw_vbo(struct cso_context *cso,
struct u_vbuf *vbuf = cso->vbuf_current;
/* We can't have both indirect drawing and SO-vertex-count drawing */
- assert(info->indirect == NULL || info->count_from_stream_output == NULL);
+ assert(!info->indirect ||
+ info->indirect->buffer == NULL ||
+ info->indirect->count_from_stream_output == NULL);
/* We can't have SO-vertex-count drawing with an index buffer */
- assert(info->count_from_stream_output == NULL || info->index_size == 0);
+ assert(info->index_size == 0 ||
+ !info->indirect ||
+ info->indirect->count_from_stream_output == NULL);
if (vbuf) {
u_vbuf_draw_vbo(vbuf, info);