-
-
Notifications
You must be signed in to change notification settings - Fork 45
[WIP] update to wgpu-native v25.0.2.1 #718
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
base: main
Are you sure you want to change the base?
Conversation
Can you share some references? |
I managed to do use the instance extras to specify Dxc with a hard coded path for the .dll which resulted I. Shader model 6.5. the default is fxc which does like shader model 5.1 or 5.2. But I haven't been successful in doing the instance flag for debug, is is meant to set the compiler to output debug symbols for the shader module... Not quite sure where it's failing. It needs to reach here https://github.com/gfx-rs/wgpu/blob/f35cf942af1a3bb6f48aa9185f4d2bcee809f814/wgpu-hal/src/dx12/shader_compilation.rs#L297 via what's explained here gfx-rs/wgpu-native#327 But I am not sure if there is like an order to it. I will maybe paste or push the C and python version to do this, it's really janky right now. As Dxc isn't packaged you have to point to two files manually, in the Future only one of them. Maybe we can consider setting these with |
while CI is green but directx is crashing on tests that request native limits for push constants.... I will try to gather my memory from last update there this already caused some trouble. Could be one of those pointer dereferences again - but wouldn't make much sense as Vulkan and OpenGL work... I put the C code that changed directx compiler for me here: https://github.com/Vipitis/wgpu-native/tree/instance-extras |
current suspicion. D3D12 is running into another issue (gfx-rs/wgpu#5285) and therefore is using the Default DownlevelLimits, which set I also saw that Vulkan complained about these tests with the InstanceFlag for validation (proving they seem to work at least). Running test_normal_push_constants ...
Forcing backend: Vulkan (6)
VALIDATION [VUID-VkGraphicsPipelineCreateInfo-layout-10069 (0xadf5e51f)]
vkCreateGraphicsPipelines(): pCreateInfos[0].pStages[0] SPIR-V (VK_SHADER_STAGE_VERTEX_BIT) has a push constant buffer Block with range [0, 80] which outside the VkPushConstantRange of [0, 40].
The Vulkan spec states: If a push constant block is declared in a shader, the block must be contained inside the push constant range in layout that matches the stage (https://vulkan.lunarg.com/doc/view/1.4.313.0/windows/antora/spec/latestchapters/pipelines.html#VUID-VkGraphicsPipelineCreateInfo-layout-10069)
objects: (type: SHADER_MODULE, hndl: 0xb000000000b, name: ?), (type: PIPELINE_LAYOUT, hndl: 0xa000000000a, name: ?)
VALIDATION [VUID-VkGraphicsPipelineCreateInfo-layout-10069 (0xadf5e51f)]
vkCreateGraphicsPipelines(): pCreateInfos[0].pStages[1] SPIR-V (VK_SHADER_STAGE_FRAGMENT_BIT) has a push constant buffer Block with range [0, 80] which outside the VkPushConstantRange of [40, 80].
The Vulkan spec states: If a push constant block is declared in a shader, the block must be contained inside the push constant range in layout that matches the stage (https://vulkan.lunarg.com/doc/view/1.4.313.0/windows/antora/spec/latestchapters/pipelines.html#VUID-VkGraphicsPipelineCreateInfo-layout-10069)
objects: (type: SHADER_MODULE, hndl: 0xc000000000c, name: ?), (type: PIPELINE_LAYOUT, hndl: 0xa000000000a, name: ?) |
An idea for the API design. Add a function to Now subsequent calls to Will try to implement that tomorrow night, let me know if there is other suggestions. |
as usual, trying to get this done. Barely anything new - but changes to Dx12 which might need some fixes.
also thinking about how to make InstanceExtras available to the user.
useful links:
Preparations
Upstream
webgpu.h
. (it hasn't changed since v24)Update to latest wgpu-native
The lines below can be copied in the PR's top post.
python tools/download_wgpu_native.py --version xx
to download the latest webgpu.h and DLL.python codegen
to apply the automatic patches to the code.hparser.py
to adjust to new formatting.wgpu_native/_api.py
to get an idea of what structs and functions have changed._api.py
:* Apply any necessary changes.
* Remove the FIXME comment if no further action is needed, or turn into a TODO for later.
python codegen
again to validate that all is well. Repeat the steps above if necessary.Wrapping up