Skip to content
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

SPIRV+OpenGL plain matrix uniform types are wrong #2

Closed
cubeleo opened this issue May 17, 2024 · 7 comments
Closed

SPIRV+OpenGL plain matrix uniform types are wrong #2

cubeleo opened this issue May 17, 2024 · 7 comments
Assignees
Labels
fix available The issue has been fixed by AMD team internally fixed The issue has been fixed in published release OpenGL This is an issue with OpenGL driver reproduced The issue is reproduced by AMD team Windows The issue is reported on Windows platform

Comments

@cubeleo
Copy link

cubeleo commented May 17, 2024

We are trying to migrate our project from runtime compiled shaders to precompiled SPIRV. It was going well until I tried an AMD GPU (Windows 11, Radeon RX 6800S). I'm using plain uniforms for my transformation matrices. When I use glGetActiveUniform to get their type on NVidia, I get GL_FLOAT_MAT4. But when I do it on AMD, I get GL_FLOAT_VEC4 of size 4.

I don't want to have to make weird assumptions about mat4 being an array of vec4 only on certain systems. I also don't want to just move all mat4s to arrays of vec4, since this means I have to do extra work with uniform layout locations in the shaders. I could switch to some alternative way to pass my matrices in like SSBO, but I'd rather not yet, and this seems like basic usage that should work fine (and does on other devices). I'm assuming I goofed something up and not a driver bug, since it's such a basic problem. I created a minimal repro case and pushed it to a git repo. What might cause this? FYI, this repo assumes glslangValidator is available on the dev machine.

https://github.com/cubeleo/GLSPIRVMatrixBugAMD.git

@jinjianrong jinjianrong added the OpenGL This is an issue with OpenGL driver label May 22, 2024
@jinjianrong jinjianrong added the Windows The issue is reported on Windows platform label May 27, 2024
@lubaozho lubaozho added the reproduced The issue is reproduced by AMD team label May 27, 2024
@lubaozho
Copy link
Collaborator

Thanks for reporting it, an internal bug ticket has been created to track this issue, will keep you posted on its progress. Thanks.

@lubaozho lubaozho added the fix available The issue has been fixed by AMD team internally label Jul 1, 2024
@DonglinWei2018
Copy link
Contributor

This issue is understood and fixed internally. The future Adrenalin driver releases will include the complete fix.

@lubaozho lubaozho added the fixed The issue has been fixed in published release label Sep 3, 2024
@lubaozho lubaozho closed this as completed Sep 3, 2024
@cubeleo
Copy link
Author

cubeleo commented Sep 4, 2024

Great to see this is fixed, thank you! Any idea when the publically available drivers will contain the fix?

@lubaozho
Copy link
Collaborator

lubaozho commented Sep 4, 2024

Great to see this is fixed, thank you! Any idea when the publically available drivers will contain the fix?

@cubeleo Could you try the latest driver "24.8.1 Adrenalin release"?

@cubeleo
Copy link
Author

cubeleo commented Sep 5, 2024

I updated to 24.8.1 and built and ran the program in the repo I linked to in my bug report, and still get GL_FLOAT_VEC4.

@lubaozho
Copy link
Collaborator

lubaozho commented Sep 6, 2024

I updated to 24.8.1 and built and ran the program in the repo I linked to in my bug report, and still get GL_FLOAT_VEC4.

Hi, @cubeleo the fix is not yet included into the Adrenalin driver releases, I will notify you if I get any update on this. Thanks.

@cubeleo
Copy link
Author

cubeleo commented Sep 6, 2024

Ok thanks! I have a few workarounds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix available The issue has been fixed by AMD team internally fixed The issue has been fixed in published release OpenGL This is an issue with OpenGL driver reproduced The issue is reproduced by AMD team Windows The issue is reported on Windows platform
Projects
None yet
Development

No branches or pull requests

6 participants
@jinjianrong @cubeleo @DonglinWei2018 @owenzhangzhengzhong @lubaozho and others