-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
area: naga back-endOutputs of naga shader conversionOutputs of naga shader conversionexternal: fxc issueIssues with the FXC HLSL compilerIssues with the FXC HLSL compilerlang: HLSLD3D Shading LanguageD3D Shading LanguagenagaShader TranslatorShader Translatortype: bugSomething isn't workingSomething isn't working
Description
set_push_constant
seems to be broken on Dx12. I have a small test that runs fine on GL, Vulkan, and Metal, but breaks on Dx12.
The test is simple. My push constants are an array of sixteen i32s, (the squares from 0 to 255). In either the vertex shader or the fragment shader I copy the constants to a buffer. I then read the contents of the buffer and compare with the values that were originally pushed.
assert_eq(result, expected_result);
Panic: assertion `left == right` failed
left: [0, 16, 64, 144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
right: [0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225]
It seems strange that I'm seeing every fourth constant. And I'm only seeing this on Dx12.
bug_report.zip contains a single file bug_report.rs, which is a wgpu test.
Metadata
Metadata
Assignees
Labels
area: naga back-endOutputs of naga shader conversionOutputs of naga shader conversionexternal: fxc issueIssues with the FXC HLSL compilerIssues with the FXC HLSL compilerlang: HLSLD3D Shading LanguageD3D Shading LanguagenagaShader TranslatorShader Translatortype: bugSomething isn't workingSomething isn't working