OSDN Git Service

radeonsi: handle MultiDrawIndirect in si_get_draw_start_count
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 20 Feb 2017 09:46:13 +0000 (10:46 +0100)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 21 Feb 2017 09:45:02 +0000 (10:45 +0100)
commit6a1d9684f4ec1e1eed49bc14749be7b7784277ec
treea74b44d0b96ab27f93f1288cedae1455a53ddf79
parent550125e1e73e2441989da11495057a20dd9dad44
radeonsi: handle MultiDrawIndirect in si_get_draw_start_count

Also handle the GL_ARB_indirect_parameters case where the count itself
is in a buffer.

Use transfers rather than mapping the buffers directly. This anticipates
the possibility that the buffers are sparse (once ARB_sparse_buffer is
implemented), in which case they cannot be mapped directly.

Fixes GL45-CTS.gtf43.GL3Tests.multi_draw_indirect.multi_draw_indirect_type
on <= CIK.

v2:
- unmap the indirect buffer correctly
- handle the corner case where we have indirect draws, but all of them
  have count 0.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net>
src/gallium/drivers/radeonsi/si_state_draw.c