mesa: Add validation helpers for new indirect draws
authorChris Forbes <chrisf@ijw.co.nz>
Wed, 6 Nov 2013 07:03:21 +0000 (20:03 +1300)
committerChris Forbes <chrisf@ijw.co.nz>
Mon, 25 Nov 2013 09:01:35 +0000 (22:01 +1300)
commit36046ae2789f74c04e6b62fa5250d81e8d1160eb
treec71e4f473e6e9b2b71b2144caedc861b3692db29
parenta95236cfc1d55750840a6ac7a5747da3ecd200d2
mesa: Add validation helpers for new indirect draws

Based on part of Patch 2 of Christoph Bumiller's ARB_draw_indirect series.

V3: - Disallow primcount==0 for DrawMulti*Indirect. The spec is unclear
      on this, but it's silly. We might go back on this later if it
      turns out to be a problem.

    - Make it clear that the caller has dealt with stride==0

V4: - Allow primcount==0 again.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/main/api_validate.c
src/mesa/main/api_validate.h