intel/compiler: Add a uses_firstvertex flag
authorNeil Roberts <nroberts@igalia.com>
Thu, 25 Jan 2018 18:15:39 +0000 (19:15 +0100)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 19 Apr 2018 22:57:45 +0000 (15:57 -0700)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/intel/compiler/brw_compiler.h
src/intel/compiler/brw_vec4.cpp

index 875b293..2419624 100644 (file)
@@ -978,6 +978,7 @@ struct brw_vs_prog_data {
    bool uses_vertexid;
    bool uses_instanceid;
    bool uses_basevertex;
+   bool uses_firstvertex;
    bool uses_baseinstance;
    bool uses_drawid;
 };
index 218925c..9459d61 100644 (file)
@@ -2837,6 +2837,10 @@ brw_compile_vs(const struct brw_compiler *compiler, void *log_data,
       prog_data->uses_basevertex = true;
 
    if (shader->info.system_values_read &
+       BITFIELD64_BIT(SYSTEM_VALUE_FIRST_VERTEX))
+      prog_data->uses_firstvertex = true;
+
+   if (shader->info.system_values_read &
        BITFIELD64_BIT(SYSTEM_VALUE_BASE_INSTANCE))
       prog_data->uses_baseinstance = true;