Use R"(shader source)" to keep consistent

BUG=dawn:186
TEST=dawn_end2end_tests

Change-Id: I6b5b6590e917965537238ca86ec4af7ce6dc969a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8781
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
Yunchao He 2019-07-11 18:15:35 +00:00 committed by Commit Bot service account
parent 110700304f
commit 4b24886afe
3 changed files with 15 additions and 15 deletions

View File

@ -40,11 +40,11 @@ class ClipSpaceTest : public DawnTest {
utils::CreateShaderModule(device, dawn::ShaderStage::Vertex, vs);
const char* fs =
"#version 450\n"
"layout(location = 0) out vec4 fragColor;"
"void main() {\n"
" fragColor = vec4(1.0, 0.0, 0.0, 1.0);\n"
"}\n";
R"(#version 450
layout(location = 0) out vec4 fragColor;
void main() {
fragColor = vec4(1.0, 0.0, 0.0, 1.0);
})";
pipelineDescriptor.cFragmentStage.module =
utils::CreateShaderModule(device, dawn::ShaderStage::Fragment, fs);

View File

@ -43,11 +43,11 @@ class CullingTest : public DawnTest {
// RGBA8 format for the back buffer. So (gl_FragCoord.xy - vec2(0.5)) / 255 in shader code
// will make the pixel's R and G channels exactly equal to the pixel's x and y coordinates.
const char* fs =
"#version 450\n"
"layout(location = 0) out vec4 fragColor;"
"void main() {\n"
" fragColor = vec4((gl_FragCoord.xy - vec2(0.5)) / 255, 0.0, 1.0);\n"
"}\n";
R"(#version 450
layout(location = 0) out vec4 fragColor;
void main() {
fragColor = vec4((gl_FragCoord.xy - vec2(0.5)) / 255, 0.0, 1.0);
})";
pipelineDescriptor.cFragmentStage.module =
utils::CreateShaderModule(device, dawn::ShaderStage::Fragment, fs);

View File

@ -68,11 +68,11 @@ class TextureZeroInitTest : public DawnTest {
utils::CreateShaderModule(device, dawn::ShaderStage::Vertex, vs);
const char* fs =
"#version 450\n"
"layout(location = 0) out vec4 fragColor;"
"void main() {\n"
" fragColor = vec4(1.0, 0.0, 0.0, 1.0);\n"
"}\n";
R"(#version 450
layout(location = 0) out vec4 fragColor;
void main() {
fragColor = vec4(1.0, 0.0, 0.0, 1.0);
})";
pipelineDescriptor.cFragmentStage.module =
utils::CreateShaderModule(device, dawn::ShaderStage::Fragment, fs);