Skip to content

Conversation

mcourteaux
Copy link
Contributor

Please carefully review what I did. I only needed rgba16, which worked for me after this change, but this is the first time I'm working with bgfx compute shaders.

Copy link
Owner

@bkaradzic bkaradzic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just add variant that you tested and it works... It's better to lack something, than have it untested (it creates more confusion).

@mcourteaux
Copy link
Contributor Author

If you're concerned about testing, I can only speak to the success of this in Vulkan. Shaderc did compile it for GLSL, SPIRV and Metal (can't do D3D12/HLSL because I don't have the microsoft shader compiler 🤷🏻).

The source of information was this commit in glslang:

https://github.com/KhronosGroup/glslang/pull/1918/files#diff-2ce711ecd274f146c2ca7969d6de4f729aa9e5350ddde7b7d028c2bb049674de

@mcourteaux
Copy link
Contributor Author

Curious... If I deliberately put in the wrong format (not matching the actual texture format), it all still just works. As if Vulkan is ignoring the format spec in the shader, and is actually looking at the Texture's pixel format. Is this normal behavior?

@mcourteaux
Copy link
Contributor Author

mcourteaux commented Sep 4, 2025

Can confirm it also works on MacOS (metal) and Windows (vulkan) by now.

@bkaradzic bkaradzic merged commit 53293f0 into bkaradzic:master Sep 4, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants