From a68489fb835a678f57b6621314a9e2e12171fd5e Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Mon, 28 Jun 2021 16:57:13 +0000 Subject: [PATCH] CopyTextureForBrowser(): Fix macro declaration This is fixup for the https://dawn-review.googlesource.com/c/dawn/+/54800 where the macre was not properly declared. Clang doesn't claims about it, but GCC does. The errors example for GCC 9.3.0: /dawn/src/dawn_native/CopyTextureForBrowserHelper.cpp:40:5: error: unterminated raw string 40 | R"( | ^ /dawn/src/dawn_native/CopyTextureForBrowserHelper.cpp:46:6: warning: missing terminating " character 46 | )" | ^ Bug: chromium:1217153, chromium:819294 Change-Id: I47aa2dac37d9dfa7c02532caeb3341edd22fcd07 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56066 Reviewed-by: Corentin Wallez Commit-Queue: Corentin Wallez --- src/dawn_native/CopyTextureForBrowserHelper.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/dawn_native/CopyTextureForBrowserHelper.cpp b/src/dawn_native/CopyTextureForBrowserHelper.cpp index 8dbc9aab6a..46da2c8cec 100644 --- a/src/dawn_native/CopyTextureForBrowserHelper.cpp +++ b/src/dawn_native/CopyTextureForBrowserHelper.cpp @@ -36,14 +36,12 @@ namespace dawn_native { // TODO(crbug.com/1221110): Remove this header macro by merging vertex and // fragment shaders into one shader source. Now it blocks by // crbug.com/dawn/947 and crbug.com/tint/915 -#define HEADER \ - R"( - [[block]] struct Uniforms { - u_scale: vec2; - u_offset: vec2; - u_alphaOp: u32; - }; - )" +#define HEADER \ + " [[block]] struct Uniforms {\n" \ + " u_scale: vec2;\n" \ + " u_offset: vec2;\n" \ + " u_alphaOp: u32;\n" \ + " };\n" static const char sCopyTextureForBrowserVertex[] = HEADER R"( [[binding(0), group(0)]] var uniforms : Uniforms;