Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebGPU: Fix compile errors with newer Dawn versions after WGPUProgrammableStageDescriptor rename #8369

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PhantomCloak
Copy link

Dawn renamed WGPUProgrammableStageDescriptor type to WGPUComputeState (webgpu-native/webgpu-headers#413) which breaks the current Dawn backend when building against newer versions. WGPU hasn't renamed it yet, so adding type alias as temporary fix until both backends adopt the same naming.

Compile errors encountered with newer versions of Dawn.

/home/phantom/Developer/Rain2/Rain-EngineUpgrade/vendor/imgui/backends/imgui_impl_wgpu.cpp:266:8: error: unknown type name 'WGPUProgrammableStageDescriptor'
static WGPUProgrammableStageDescriptor ImGui_ImplWGPU_CreateShaderModule(const char* wgsl_source)
       ^
/home/phantom/Developer/Rain2/Rain-EngineUpgrade/vendor/imgui/backends/imgui_impl_wgpu.cpp:283:5: error: unknown type name 'WGPUProgrammableStageDescriptor'
    WGPUProgrammableStageDescriptor stage_desc = {};
    ^
/home/phantom/Developer/Rain2/Rain-EngineUpgrade/vendor/imgui/backends/imgui_impl_wgpu.cpp:668:5: error: unknown type name 'WGPUProgrammableStageDescriptor'
    WGPUProgrammableStageDescriptor vertex_shader_desc = ImGui_ImplWGPU_CreateShaderModule(__shader_vert_wgsl);
    ^
/home/phantom/Developer/Rain2/Rain-EngineUpgrade/vendor/imgui/backends/imgui_impl_wgpu.cpp:690:5: error: unknown type name 'WGPUProgrammableStageDescriptor'
    WGPUProgrammableStageDescriptor pixel_shader_desc = ImGui_ImplWGPU_CreateShaderModule(__shader_frag_wgsl);
    ^
4 errors generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants