From e60a6fd40cbc0f0d8548f0160bb92437e3d79509 Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 20 Sep 2022 14:51:11 -0700 Subject: Support raw string literals. (#2405) * Support raw string literals. * Use raw string literal in tests. Co-authored-by: Yong He --- tests/cpu-program/gfx-smoke.slang | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'tests/cpu-program') diff --git a/tests/cpu-program/gfx-smoke.slang b/tests/cpu-program/gfx-smoke.slang index 2ad33052f..37beede7e 100644 --- a/tests/cpu-program/gfx-smoke.slang +++ b/tests/cpu-program/gfx-smoke.slang @@ -23,17 +23,17 @@ public __extern_cpp int main() device.value.createCommandQueue(&queueDesc, queue); gfx.ShaderProgramDesc2 programDesc = {}; - NativeString s = - "[shader(\"compute\")]" - "[numthreads(4, 1, 1)]" - "void computeMain(" - " uint3 sv_dispatchThreadID: SV_DispatchThreadID," - " uniform RWStructuredBuffer buffer" - " )" - "{" - " var input = buffer[sv_dispatchThreadID.x];" - " buffer[sv_dispatchThreadID.x] = sv_dispatchThreadID.x;" - "}"; + NativeString s = R"( + [shader("compute")] + [numthreads(4, 1, 1)] + void computeMain( + uint3 sv_dispatchThreadID: SV_DispatchThreadID, + uniform RWStructuredBuffer buffer + ) + { + var input = buffer[sv_dispatchThreadID.x]; + buffer[sv_dispatchThreadID.x] = sv_dispatchThreadID.x; + })"; programDesc.sourceData = s; programDesc.sourceType = gfx.ShaderModuleSourceType.SlangSource; programDesc.sourceDataSize = s.length; -- cgit v1.2.3