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

Running the cube example on windows crashes with a D3D compile error #184

Closed
MindSwipe opened this issue Sep 10, 2021 · 7 comments
Closed
Labels
bug Something isn't working resolution: external Issue is is a dependency

Comments

@MindSwipe
Copy link
Contributor

Cloning and running the cube example locally (modifying it to use the DX12 backend by adding Some(rend3::types::Backend::Dx12) to the create_iad call) crashes when running it

Here's the error:

[ERROR wgpu_core::validation] Unexpected varying type: Array { base: [4], size: Constant([7]), stride: 4 }
[ERROR wgpu::backend::direct] wgpu error: Validation Error

    Caused by:
        In Device::create_render_pipeline
          note: label = `depth opaque prepass`
        Internal error in VERTEX shader: D3DCompile error (0x80004005): C:\Source\rend3\depth pass vert(47,12-17): error X3003: redefinition of 'VertexOutput_main::member'

For the time being I can use the default (Vulkan) backend but that spams a lot of wgpu_hal errors into the terminal

@cwfitzgerald
Copy link
Member

Thanks for the report!

This particular validation error has been fixed in the latest naga/wgpu-hal so make sure both are up to date: cargo update. Unfortunately once you hit that, you'll hit another D3D compile error. This one I know about but haven't yet reported to naga. Will use this issue as a tracking issue for that.

The vulkan validation errors might also be solved by updating. If it isn't solved, make sure your validation layers are up to date. If it still reports an issue, file a new issue.

@cwfitzgerald cwfitzgerald added bug Something isn't working resolution: external Issue is is a dependency labels Sep 10, 2021
@cwfitzgerald
Copy link
Member

cwfitzgerald commented Sep 10, 2021

Ah sorry, I realized I had patched to a git version of wgpu but never removed it. I'll remove that in my next PR tonight. If you want to test it yourself, remove the patches in the top level Cargo.toml then run cargo update The d3d error for context:

    Caused by:
        In Device::create_render_pipeline
          note: label = `opaque pass`
        Internal error in FRAGMENT shader: D3DCompile error (0x80004005): C:\Users\conno\Programming\rend3\forward pass frag(463,30-37): error X3004: undeclared identifier '_expr388'

@MindSwipe
Copy link
Contributor Author

Yup, you're totally right, after running cargo update and updating to the newest version of rend3 I'm now running into exactly that error message.

Switching back to the Vulkan backend I'm getting these errors:

[ERROR wgpu_hal::vulkan::instance] GENERAL [Loader Message (0x0)]
        Failed to open dynamic library "C:\ProgramData\obs-studio-hook\.\graphics-hook32.dll" with error 193
[ERROR wgpu_hal::vulkan::instance]      objects: (type: INSTANCE, hndl: 0x2c1ec089f30, name: ?)
[ERROR wgpu_core::validation] Unexpected varying type: Array { base: [4], size: Constant([8]), stride: 4 }
[ERROR wgpu_core::validation] Unexpected varying type: Array { base: [4], size: Constant([5]), stride: 4 }

The first message (i.e the Failed to open dynamic library ...) is most definitely my "fault" (RTSS did some weird shenanigans), but I'm not sure if the others are also my faults or not, but at least that's all of them

@cwfitzgerald
Copy link
Member

Are those errors fatal? If not they look expected. The first and second are the same problem (loading the obs layer failed for some reason), and the last two are known problems with glslc (it generates code that touches a builtin that I don't actually use, and webgpu doesn't support)

@MindSwipe
Copy link
Contributor Author

MindSwipe commented Sep 12, 2021

They're not fatal, the application just keeps on trucking

@cwfitzgerald
Copy link
Member

Filed gfx-rs/wgpu#4359

@cwfitzgerald
Copy link
Member

Fixed in 0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolution: external Issue is is a dependency
Projects
None yet
Development

No branches or pull requests

2 participants