Enforce the standard builtin array names.

This commit is contained in:
Hans-Kristian Arntzen 2017-05-22 15:55:42 +02:00
parent 623eaebdf8
commit 167fffd4af

View File

@ -1543,6 +1543,12 @@ void CompilerGLSL::emit_declared_builtin_block(StorageClass storage, ExecutionMo
bool tessellation = model == ExecutionModelTessellationEvaluation || model == ExecutionModelTessellationControl;
if (builtin_array)
{
// Make sure the array has a supported name in the code.
if (storage == StorageClassOutput)
set_name(var.self, "gl_out");
else if (storage == StorageClassInput)
set_name(var.self, "gl_in");
if (model == ExecutionModelTessellationControl && storage == StorageClassOutput)
end_scope_decl(join(to_name(var.self), "[", get_entry_point().output_vertices, "]"));
else