compiler: Add SYSTEM_VALUE_IS_INDEXED_DRAW and instrinsics
authorAntia Puentes <apuentes@igalia.com>
Sat, 28 Apr 2018 12:09:18 +0000 (14:09 +0200)
committerAntia Puentes <apuentes@igalia.com>
Wed, 2 May 2018 09:20:40 +0000 (11:20 +0200)
commit9e6b886cf25f88eea584d38c6763dbded99bd064
tree5a26de9923666b27ded3420edcccd5819e04d20b
parent0737c1e3a603e13ce9764ff5432e332b233c4b9d
compiler: Add SYSTEM_VALUE_IS_INDEXED_DRAW and instrinsics

This VS system value contains if the draw command used to start the
rendering was an indexed draw command or a non-indexed one
(~0/0 respectively). Useful to calculate the gl_BaseVertex as:
(SYSTEM_VALUE_IS_INDEXED_DRAW & SYSTEM_VALUE_FIRST_VERTEX).

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir.c
src/compiler/nir/nir_gather_info.c
src/compiler/nir/nir_intrinsics.py
src/compiler/shader_enums.c
src/compiler/shader_enums.h