Buffer counter modified

This commit is contained in:
Polona Caserman 2017-01-03 12:04:55 +01:00 committed by Robert Konrad
parent 742ec49946
commit 20d2b59c8d

View File

@ -1523,6 +1523,7 @@ uint32_t CompilerMSL::get_metal_resource_index(SPIRVariable &var, SPIRType::Base
switch (basetype)
{
case SPIRType::Struct:
if (execution.model == ExecutionModelVertex && next_metal_resource_index.msl_buffer == 0) next_metal_resource_index.msl_buffer = 1;
return next_metal_resource_index.msl_buffer++;
case SPIRType::Image:
return next_metal_resource_index.msl_texture++;