screen-13
screen-13 copied to clipboard
Bindless not detected when using HLSL
I think this is maybe not sufficient for detecting bindless: https://github.com/attackgoat/screen-13/blob/71c1c05f74c17d0ca891ae784d3e701c8fdcbc12/src/driver/graphic.rs#L457-L459
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: https://github.com/attackgoat/screen-13/blob/71c1c05f74c17d0ca891ae784d3e701c8fdcbc12/src/driver/shader.rs#L871-L873 I tried setting the binding count to 0 with:
if "Texture2DTable" == name.as_deref().unwrap_or_default() {
binding_count = 0;
}
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)))