Only emit layout() on vertex inputs in version 330/300 es.

This commit is contained in:
Hans-Kristian Arntzen 2017-10-18 09:56:13 +02:00
parent 0cabdcb7c2
commit 712084b5b2

View File

@ -1152,6 +1152,14 @@ string CompilerGLSL::layout_for_variable(const SPIRVariable &var)
can_use_varying_location = false;
}
if (get_execution_model() == ExecutionModelVertex && var.storage == StorageClassInput)
{
if (options.es && options.version < 300)
can_use_varying_location = false;
else if (!options.es && options.version < 330)
can_use_varying_location = false;
}
if (can_use_varying_location)
{
uint64_t combined_decoration = 0;