@@ -4396,9 +4396,9 @@ void HLSL2GLSLConverterImpl::ConversionStream::RemoveSpecialShaderAttributes()
43964396 );
43974397}
43984398
4399- String HLSL2GLSLConverterImpl::ConversionStream::BuildGLSLSource ()
4399+ StringAlloc HLSL2GLSLConverterImpl::ConversionStream::BuildGLSLSource ()
44004400{
4401- String Output;
4401+ StringAlloc Output{ STD_ALLOCATOR_RAW_MEM (Char, GetRawAllocator (), " Allocator for String " )} ;
44024402 for (const auto & Token : m_Tokens)
44034403 {
44044404 if ((Token.Type == TokenType::kw_linear ||
@@ -4412,8 +4412,8 @@ String HLSL2GLSLConverterImpl::ConversionStream::BuildGLSLSource()
44124412 continue ;
44134413 }
44144414
4415- Output.append (Token.Delimiter );
4416- Output.append (Token.Literal );
4415+ Output.append (Token.Delimiter . begin (), Token. Delimiter . end () );
4416+ Output.append (Token.Literal . begin (), Token. Literal . end () );
44174417 }
44184418 return Output;
44194419}
@@ -4460,7 +4460,7 @@ HLSL2GLSLConverterImpl::ConversionStream::ConversionStream(IReferenceCounters*
44604460}
44614461
44624462
4463- String HLSL2GLSLConverterImpl::Convert (ConversionAttribs& Attribs) const
4463+ StringAlloc HLSL2GLSLConverterImpl::Convert (ConversionAttribs& Attribs) const
44644464{
44654465 if (Attribs.ppConversionStream == nullptr )
44664466 {
@@ -4473,7 +4473,7 @@ String HLSL2GLSLConverterImpl::Convert(ConversionAttribs& Attribs) const
44734473 }
44744474 catch (std::runtime_error&)
44754475 {
4476- return " " ;
4476+ return StringAlloc{ " " , STD_ALLOCATOR_RAW_MEM (Char, GetRawAllocator (), " Allocator for String " )} ;
44774477 }
44784478 }
44794479 else
@@ -4531,7 +4531,7 @@ void HLSL2GLSLConverterImpl::ConversionStream::Convert(const Char* EntryPoint,
45314531{
45324532 try
45334533 {
4534- auto GLSLSource = Convert (EntryPoint, ShaderType, IncludeDefintions, SamplerSuffix, UseInOutLocationQualifiers, UseRowMajorMatrices);
4534+ StringAlloc GLSLSource = Convert (EntryPoint, ShaderType, IncludeDefintions, SamplerSuffix, UseInOutLocationQualifiers, UseRowMajorMatrices);
45354535 StringDataBlobImpl* pDataBlob = MakeNewRCObj<StringDataBlobImpl>()(std::move (GLSLSource));
45364536 pDataBlob->QueryInterface (IID_DataBlob, reinterpret_cast <IObject**>(ppGLSLSource));
45374537 }
@@ -4541,12 +4541,12 @@ void HLSL2GLSLConverterImpl::ConversionStream::Convert(const Char* EntryPoint,
45414541 }
45424542}
45434543
4544- String HLSL2GLSLConverterImpl::ConversionStream::Convert (const Char* EntryPoint,
4545- SHADER_TYPE ShaderType,
4546- bool IncludeDefintions,
4547- const char * SamplerSuffix,
4548- bool UseInOutLocationQualifiers,
4549- bool UseRowMajorMatrices)
4544+ StringAlloc HLSL2GLSLConverterImpl::ConversionStream::Convert (const Char* EntryPoint,
4545+ SHADER_TYPE ShaderType,
4546+ bool IncludeDefintions,
4547+ const char * SamplerSuffix,
4548+ bool UseInOutLocationQualifiers,
4549+ bool UseRowMajorMatrices)
45504550{
45514551 m_bUseInOutLocationQualifiers = UseInOutLocationQualifiers;
45524552 m_bUseRowMajorMatrices = UseRowMajorMatrices;
@@ -4788,7 +4788,7 @@ String HLSL2GLSLConverterImpl::ConversionStream::Convert(const Char* EntryPoint,
47884788
47894789 RemoveSpecialShaderAttributes ();
47904790
4791- auto GLSLSource = BuildGLSLSource ();
4791+ StringAlloc GLSLSource = BuildGLSLSource ();
47924792
47934793 if (m_bPreserveTokens)
47944794 {
0 commit comments