radeonsi: cleanup some primitive discard CS TODOs regarding instancing, etc.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11102>
This commit is contained in:
Marek Olšák 2021-06-01 00:18:51 -04:00 committed by Marge Bot
parent 4b5eb336e1
commit 6a2e3d2736
2 changed files with 5 additions and 3 deletions

View File

@ -956,9 +956,11 @@ si_prepare_prim_discard_or_split_draw(struct si_context *sctx, const struct pipe
/* Split draws at the draw call level if the ring is full. This makes
* better use of the ring space.
*
* If instancing is enabled and there is not enough ring buffer space, compute-based
* primitive discard is disabled.
*/
if (ring_full && num_prims > PRIMS_PER_BATCH &&
instance_count == 1) { /* TODO: support splitting instanced draws */
if (ring_full && num_prims > PRIMS_PER_BATCH && instance_count == 1) {
unsigned vert_count_per_subdraw = 0;
if (prim == PIPE_PRIM_TRIANGLES)

View File

@ -1936,7 +1936,7 @@ static void si_draw_vbo(struct pipe_context *ctx,
(1 << prim) & ((1 << PIPE_PRIM_TRIANGLES) | (1 << PIPE_PRIM_TRIANGLE_STRIP)) &&
/* Instancing is limited to 16-bit indices, because InstanceID is packed into
VertexID. */
/* TODO: DrawArraysInstanced doesn't sometimes work, so it's disabled. */
/* Instanced index_size == 0 requires that start + count < USHRT_MAX, so just reject it. */
(instance_count == 1 ||
(instance_count <= USHRT_MAX && index_size && index_size <= 2) ||
pd_msg("instance_count too large or index_size == 4 or DrawArraysInstanced"))) &&