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 875b2936fd8d790a8687a0103a8e579d16874623..24196248b8ed67b6096862af942308b1e7764580 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 218925ccb1263729c6dba0fe3e77f207b1020290..9459d61af6c6174d81245bc7fbbe6f5861e3e659 100644 (file)
@@ -2836,6 +2836,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_FIRST_VERTEX))
+      prog_data->uses_firstvertex = true;
+
    if (shader->info.system_values_read &
        BITFIELD64_BIT(SYSTEM_VALUE_BASE_INSTANCE))
       prog_data->uses_baseinstance = true;