You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And it actually made a HLSL version of the bindless example work (though I still haven't gotten samplers working correctly so this was just with Texture2DTable[input.instance_index].Load(int3(0, 0, 0)))
The text was updated successfully, but these errors were encountered:
I modified examples/bindless.rs to use hassle-rs (DXC) and had some success:
RUST_LOG=info cargo run --example bindless -- --hlsl --hassle-rs
When I don't pass the --hassle-rs flag it uses Shaderc and fails:
binding #0 with #63 descriptors being updated but this update oversteps the bounds
`main` entrypoint not found for stage VK_SHADER_STAGE_FRAGMENT_BIT
create_graphics_pipelines: An unknown error has occurred, due to an implementation or application bug
Oh! I hadn't thought of that. It looks like bindless does work with dxc in my renderer! I've been using shaderc mostly as I haven't tried setting up hassle-rs with hot reloading yet, so I've been using my workaround from the first post. But I have a cargo feature to switch to dxc so it's easy to test both. (It's also handy to be able to pass -Od to dxc to disable opt so it doesn't strip out things (like bindings) that screen-13 needs if you aren't using them in the shader yet.)
Yep! I can figure out a larger example. Are you looking for something that can be added to the repo as an official hlsl example, or just a larger code base in general that's using hlsl with screen-13?
I'm interested in finding the minimal HLSL that you think should work, but does not. Hopefully that would help figure out if there is anything this crate could change which would fix things, and probably make examples along the way.
I used HLSL professionally for years before switching to Vulkan and GLSL; personally at least for what I do I don't mind the clunkiness of the language because I avoid all of these random bugs. Unfortunately this has rotted my HLSL skills to basically zero - so my ask for an example is because I want to make sure I'm fixing the correct random bugs. 😊
I think this is maybe not sufficient for detecting bindless:
screen-13/src/driver/graphic.rs
Lines 457 to 459 in 71c1c05
In HLSL using
Texture2D Texture2DTable[] : register(t0, space0);
the binding count ends up being 1 instead of 0.I don't think it's really a solution, but as a test, before here:
screen-13/src/driver/shader.rs
Lines 871 to 873 in 71c1c05
And it actually made a HLSL version of the bindless example work (though I still haven't gotten samplers working correctly so this was just with
Texture2DTable[input.instance_index].Load(int3(0, 0, 0))
)The text was updated successfully, but these errors were encountered: