Vulkan/PostProcessing: Make file-scope std::string instances const char arrays

Avoids performing avoidable file-scope heap allocations
This commit is contained in:
Lioncash 2018-05-21 12:19:41 -04:00
parent 42a1545f8e
commit 8a1a924e2e
1 changed files with 2 additions and 2 deletions

View File

@ -134,7 +134,7 @@ void VulkanPostProcessing::FillUniformBuffer(u8* buf, const TargetRectangle& src
} }
} }
static const std::string DEFAULT_FRAGMENT_SHADER_SOURCE = R"( constexpr char DEFAULT_FRAGMENT_SHADER_SOURCE[] = R"(
layout(set = 1, binding = 0) uniform sampler2DArray samp0; layout(set = 1, binding = 0) uniform sampler2DArray samp0;
layout(location = 0) in float3 uv0; layout(location = 0) in float3 uv0;
@ -147,7 +147,7 @@ static const std::string DEFAULT_FRAGMENT_SHADER_SOURCE = R"(
} }
)"; )";
static const std::string POSTPROCESSING_SHADER_HEADER = R"( constexpr char POSTPROCESSING_SHADER_HEADER[] = R"(
SAMPLER_BINDING(0) uniform sampler2DArray samp0; SAMPLER_BINDING(0) uniform sampler2DArray samp0;
SAMPLER_BINDING(1) uniform sampler2DArray samp1; SAMPLER_BINDING(1) uniform sampler2DArray samp1;