diff --git a/Gems/Atom/RHI/Code/Include/Atom/RHI.Reflect/BufferDescriptor.h b/Gems/Atom/RHI/Code/Include/Atom/RHI.Reflect/BufferDescriptor.h index f5ec9feebb..d12d30284e 100644 --- a/Gems/Atom/RHI/Code/Include/Atom/RHI.Reflect/BufferDescriptor.h +++ b/Gems/Atom/RHI/Code/Include/Atom/RHI.Reflect/BufferDescriptor.h @@ -33,7 +33,7 @@ namespace AZ /// Supports input assembly access through a IndexBufferView or StreamBufferView. This flag is for buffers that are not updated often InputAssembly = AZ_BIT(0), - /// Supports input assembly access through a IndexBufferView or StreamBufferView. This flag is for buffers that are updated perf frame + /// Supports input assembly access through a IndexBufferView or StreamBufferView. This flag is for buffers that are updated frequently DynamicInputAssembly = AZ_BIT(1), /// Supports constant access through a ShaderResourceGroup. diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI.Builders/ShaderPlatformInterface.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI.Builders/ShaderPlatformInterface.cpp index 866c355dad..841c71126a 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI.Builders/ShaderPlatformInterface.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI.Builders/ShaderPlatformInterface.cpp @@ -835,6 +835,8 @@ namespace AZ size_t prevEndOfLine = argBufferStr.rfind("\n", resourceStartPos); size_t nextEndOfLine = argBufferStr.find("\n", resourceStartPos); size_t startOfEntryPos = argBufferStr.find(resourceStr, prevEndOfLine); + + //Check to see if a valid entry is found. if(startOfEntryPos == AZStd::string::npos || startOfEntryPos > nextEndOfLine) { AZ_Error(MetalShaderPlatformName, startOfEntryPos != AZStd::string::npos, "Entry-> %s not found within Descriptor set %s", resourceStr, argBufferStr.c_str()); diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/Conversions.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/Conversions.cpp index d6b2b2c906..f95e871d33 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/Conversions.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/Conversions.cpp @@ -211,6 +211,7 @@ namespace AZ return GetCPUGPUMemoryMode(); } + //This flag is used for IA buffers that is updated frequently and hence shared mmory is the best fit if (RHI::CheckBitsAll(descriptor.m_bindFlags, RHI::BufferBindFlags::DynamicInputAssembly)) { return MTLStorageModeShared;