Use wgpu::ShaderModuleWGSLDescriptor.code

This commit is contained in:
Luke Street 2023-05-27 14:57:03 -04:00
parent 3edd2c0e58
commit fca51127a2
3 changed files with 3 additions and 3 deletions

View File

@ -1330,7 +1330,7 @@ fn fs_main(in: VertexOutput) -> @location(0) vec4<f32> {{{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,

View File

@ -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<WGPUChainedStruct*>(&wgsl_desc);

View File

@ -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)