Skip to content
This repository has been archived by the owner on Jun 18, 2021. It is now read-only.

Invalid HLSL generated for push constants in rust-gpu example #670

Closed
grovesNL opened this issue Dec 8, 2020 · 2 comments
Closed

Invalid HLSL generated for push constants in rust-gpu example #670

grovesNL opened this issue Dec 8, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@grovesNL
Copy link
Collaborator

grovesNL commented Dec 8, 2020

(just filing this issue so I don't forget about it)

Invalid HLSL seems to be generated when trying to push constants on the DX12 backend in rust-gpu's sky shader example. According to the chat on Discord, the HLSL ends up containing lines like static ??? _765;

I quickly glanced through the wgpu example runner and the push constant does appear to be defined and set, but we should check what's happening here in case it's a bug in SPIRV-Cross/wgpu/gfx-hal that we could address.

Also rust-gpu seems to be using wgpu 0.6 so it would also be useful to test it on master in case it's already addressed somewhere.

@grovesNL grovesNL added the bug Something isn't working label Dec 8, 2020
@grovesNL
Copy link
Collaborator Author

grovesNL commented Jan 9, 2021

I glanced at the problematic SPIR-V a few weeks ago, and it looks like it might be related to EmbarkStudios/rust-gpu#362 on rust-gpu's side. i.e. SPIRV-Cross expects this too, because we're following the Vulkan rules when converting SPIR-V to HLSL. So maybe we can wait for that fix first in case we don't have to do anything here.

@kvark
Copy link
Member

kvark commented Jun 3, 2021

We are moving to wgpu now, so please re-open there if still a bug!

@kvark kvark closed this as completed Jun 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants