intel/compiler: Add uses_is_indexed_draw flag
authorAntia Puentes <apuentes@igalia.com>
Sat, 28 Apr 2018 12:09:19 +0000 (14:09 +0200)
committerAntia Puentes <apuentes@igalia.com>
Wed, 2 May 2018 09:20:48 +0000 (11:20 +0200)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/compiler/brw_compiler.h
src/intel/compiler/brw_vec4.cpp

index 24196248b8ed67b6096862af942308b1e7764580..e3bf535a519173c2120c6ee6b3bdb14696ca0b2a 100644 (file)
@@ -978,6 +978,7 @@ struct brw_vs_prog_data {
    bool uses_vertexid;
    bool uses_instanceid;
    bool uses_basevertex;
+   bool uses_is_indexed_draw;
    bool uses_firstvertex;
    bool uses_baseinstance;
    bool uses_drawid;
index 1e384f5bf4d4ebdc84ce47c514e4c0724c2fc07d..e583c54920437bfeebf7885daf491f004c0f75ca 100644 (file)
@@ -2837,6 +2837,10 @@ brw_compile_vs(const struct brw_compiler *compiler, void *log_data,
        BITFIELD64_BIT(SYSTEM_VALUE_BASE_VERTEX))
       prog_data->uses_basevertex = true;
 
+   if (shader->info.system_values_read &
+       BITFIELD64_BIT(SYSTEM_VALUE_IS_INDEXED_DRAW))
+      prog_data->uses_is_indexed_draw = true;
+
    if (shader->info.system_values_read &
        BITFIELD64_BIT(SYSTEM_VALUE_FIRST_VERTEX))
       prog_data->uses_firstvertex = true;