intel/compiler: Add a uses_firstvertex flag

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Neil Roberts
2018-01-25 19:15:39 +01:00
committed by Ian Romanick
parent 5ff848df7b
commit 0c8395e15d
2 changed files with 5 additions and 0 deletions

View 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;
};

View 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;