From fca51127a2134ae2465063792f1a0725940121a4 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Sat, 27 May 2023 14:57:03 -0400 Subject: [PATCH] Use wgpu::ShaderModuleWGSLDescriptor.code --- lib/gfx/gx_shader.cpp | 2 +- lib/imgui_impl_wgpu.cpp | 2 +- lib/webgpu/gpu.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/gfx/gx_shader.cpp b/lib/gfx/gx_shader.cpp index da8c095..6871c96 100644 --- a/lib/gfx/gx_shader.cpp +++ b/lib/gfx/gx_shader.cpp @@ -1330,7 +1330,7 @@ fn fs_main(in: VertexOutput) -> @location(0) vec4 {{{8}{7} } wgpu::ShaderModuleWGSLDescriptor wgslDescriptor{}; - wgslDescriptor.source = shaderSource.c_str(); + wgslDescriptor.code = shaderSource.c_str(); const auto label = fmt::format(FMT_STRING("GX Shader {:x}"), hash); const auto shaderDescriptor = wgpu::ShaderModuleDescriptor{ .nextInChain = &wgslDescriptor, diff --git a/lib/imgui_impl_wgpu.cpp b/lib/imgui_impl_wgpu.cpp index 573c0f3..d5745c2 100644 --- a/lib/imgui_impl_wgpu.cpp +++ b/lib/imgui_impl_wgpu.cpp @@ -196,7 +196,7 @@ static WGPUShaderModule ImGui_ImplWGPU_CreateShaderModule(const char* source) { WGPUShaderModuleWGSLDescriptor wgsl_desc = {}; wgsl_desc.chain.sType = WGPUSType_ShaderModuleWGSLDescriptor; - wgsl_desc.source = source; + wgsl_desc.code = source; WGPUShaderModuleDescriptor desc = {}; desc.nextInChain = reinterpret_cast(&wgsl_desc); diff --git a/lib/webgpu/gpu.cpp b/lib/webgpu/gpu.cpp index d6e1b06..ad5ae08 100644 --- a/lib/webgpu/gpu.cpp +++ b/lib/webgpu/gpu.cpp @@ -147,7 +147,7 @@ static TextureWithSampler create_depth_texture() { void create_copy_pipeline() { wgpu::ShaderModuleWGSLDescriptor sourceDescriptor{}; - sourceDescriptor.source = R"""( + sourceDescriptor.code = R"""( @group(0) @binding(0) var efb_sampler: sampler; @group(0) @binding(1)