-
Notifications
You must be signed in to change notification settings - Fork 63
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
Adreno-based XR devices: VkCreateGraphicsPipelines returns VK_ERROR_UNKNOWN for PBR shaders. #625
Labels
kind/bug
Categorizes issue or PR as related to a bug.
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
sig/graphics-audio
Categorizes an issue or PR as relevant to SIG graphics-audio.
Comments
galibzon
added
kind/bug
Categorizes issue or PR as related to a bug.
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
needs-sig
Indicates an issue or PR lacks a `sig/foo` label and requires one.
labels
Nov 30, 2023
FYI @moudgils , @jhmueller-huawei |
galibzon
added a commit
to galibzon/o3de
that referenced
this issue
Nov 30, 2023
Resolves o3de#17148 (DXC should be customizable via Settings Registry) Which enables working around this bug: o3de/o3de-extras#625 Developers can now pick a custom version of the DXC executable via the Settings Registry Key: `/O3DE/Atom/DxcOverridePath`. Also, introduced the macro `PRE_HLSL_2021`, along with an explanation in the following file: /o3de/Gems/Atom/Feature/Common/Assets/ShaderLib/PRE_HLSL_2021.md TL;DR: If a game project uses a DXC executable that doesn't conform to the HLSL 2021 standard, then they should globally define the macro PRE_HLSL_2021 when compiling shaders. The O3DE default version of DXC is 1.7.2308 which conforms to HLSL 2021. The problem is that some shaders get compiled to versions of SPIRV not supported by Adreno GPU drivers. This commit gives the option to use a different DXC and avoid this issue. Removed redundant LinearToSRGB conversion functions. Signed-off-by: galibzon <[email protected]>
galibzon
added a commit
to galibzon/o3de
that referenced
this issue
Nov 30, 2023
Resolves o3de#17148 (DXC should be customizable via Settings Registry) Which enables working around this bug: o3de/o3de-extras#625 Developers can now pick a custom version of the DXC executable via the Settings Registry Key: `/O3DE/Atom/DxcOverridePath`. Also, introduced the macro `PRE_HLSL_2021`, along with an explanation in the following file: /o3de/Gems/Atom/Feature/Common/Assets/ShaderLib/PRE_HLSL_2021.md TL;DR: If a game project uses a DXC executable that doesn't conform to the HLSL 2021 standard, then they should globally define the macro PRE_HLSL_2021 when compiling shaders. The O3DE default version of DXC is 1.7.2308 which conforms to HLSL 2021. The problem is that some shaders get compiled to versions of SPIRV not supported by Adreno GPU drivers. This commit gives the option to use a different DXC and avoid this issue. Removed redundant LinearToSRGB conversion functions. Signed-off-by: galibzon <[email protected]>
galibzon
added a commit
to galibzon/o3de
that referenced
this issue
Nov 30, 2023
Resolves o3de#17148 (DXC should be customizable via Settings Registry) Which enables working around this bug: o3de/o3de-extras#625 Developers can now pick a custom version of the DXC executable via the Settings Registry Key: `/O3DE/Atom/DxcOverridePath`. Also, introduced the macro `PRE_HLSL_2021`, along with an explanation in the following file: /o3de/Gems/Atom/Feature/Common/Assets/ShaderLib/PRE_HLSL_2021.md TL;DR: If a game project uses a DXC executable that doesn't conform to the HLSL 2021 standard, then they should globally define the macro PRE_HLSL_2021 when compiling shaders. The O3DE default version of DXC is 1.7.2308 which conforms to HLSL 2021. The problem is that some shaders get compiled to versions of SPIRV not supported by Adreno GPU drivers. This commit gives the option to use a different DXC and avoid this issue. Removed redundant LinearToSRGB conversion functions. Signed-off-by: galibzon <[email protected]>
galibzon
added a commit
to galibzon/o3de
that referenced
this issue
Nov 30, 2023
Resolves o3de#17148 (DXC should be customizable via Settings Registry) Which enables working around this bug: o3de/o3de-extras#625 Developers can now pick a custom version of the DXC executable via the Settings Registry Key: `/O3DE/Atom/DxcOverridePath`. Also, introduced the macro `PRE_HLSL_2021`, along with an explanation in the following file: /o3de/Gems/Atom/Feature/Common/Assets/ShaderLib/PRE_HLSL_2021.md TL;DR: If a game project uses a DXC executable that doesn't conform to the HLSL 2021 standard, then they should globally define the macro PRE_HLSL_2021 when compiling shaders. The O3DE default version of DXC is 1.7.2308 which conforms to HLSL 2021. The problem is that some shaders get compiled to versions of SPIRV not supported by Adreno GPU drivers. This commit gives the option to use a different DXC and avoid this issue. Removed redundant LinearToSRGB conversion functions. Signed-off-by: galibzon <[email protected]>
galibzon
added a commit
to o3de/o3de
that referenced
this issue
Dec 2, 2023
* Allow customization of DXC executable Resolves #17148 (DXC should be customizable via Settings Registry) Which enables working around this bug: o3de/o3de-extras#625 Developers can now pick a custom version of the DXC executable via the Settings Registry Key: `/O3DE/Atom/DxcOverridePath`. Also, introduced the macro `PRE_HLSL_2021`, along with an explanation in the following file: /o3de/Gems/Atom/Feature/Common/Assets/ShaderLib/PRE_HLSL_2021.md TL;DR: If a game project uses a DXC executable that doesn't conform to the HLSL 2021 standard, then they should globally define the macro PRE_HLSL_2021 when compiling shaders. The O3DE default version of DXC is 1.7.2308 which conforms to HLSL 2021. The problem is that some shaders get compiled to versions of SPIRV not supported by Adreno GPU drivers. This commit gives the option to use a different DXC and avoid this issue. Removed redundant LinearToSRGB conversion functions. * Removed "real*" Linear<->SRGB functions in favor of both "float*" and "half*" functions. --------- Signed-off-by: galibzon <[email protected]>
martinwinter-huawei
pushed a commit
to martinwinter-huawei/o3de
that referenced
this issue
Dec 7, 2023
* Allow customization of DXC executable Resolves o3de#17148 (DXC should be customizable via Settings Registry) Which enables working around this bug: o3de/o3de-extras#625 Developers can now pick a custom version of the DXC executable via the Settings Registry Key: `/O3DE/Atom/DxcOverridePath`. Also, introduced the macro `PRE_HLSL_2021`, along with an explanation in the following file: /o3de/Gems/Atom/Feature/Common/Assets/ShaderLib/PRE_HLSL_2021.md TL;DR: If a game project uses a DXC executable that doesn't conform to the HLSL 2021 standard, then they should globally define the macro PRE_HLSL_2021 when compiling shaders. The O3DE default version of DXC is 1.7.2308 which conforms to HLSL 2021. The problem is that some shaders get compiled to versions of SPIRV not supported by Adreno GPU drivers. This commit gives the option to use a different DXC and avoid this issue. Removed redundant LinearToSRGB conversion functions. * Removed "real*" Linear<->SRGB functions in favor of both "float*" and "half*" functions. --------- Signed-off-by: galibzon <[email protected]>
lemonade-dm
added
sig/graphics-audio
Categorizes an issue or PR as relevant to SIG graphics-audio.
and removed
needs-sig
Indicates an issue or PR lacks a `sig/foo` label and requires one.
labels
Dec 13, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
kind/bug
Categorizes issue or PR as related to a bug.
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
sig/graphics-audio
Categorizes an issue or PR as relevant to SIG graphics-audio.
Describe the bug
It was found that meshes with PBR materials don't render when the game project is deployed and executed natively on Meta Quest Pro devices.
Workaround: Use DXC 1.6.2112 instead of the current one DXC 1.7.2308. I'm working on a PR that would allow to customize DXC via a settings registry.
Assets required
OpenXRTest game project.
Steps to reproduce
Compile and deploy OpenXRTest game project on an Meta Quest Pro or Quest3 device.
Expected behavior
The DefaultLevel has a SkyBox, a Grid, a Plane and a ShaderBall. All of them should be visible.
Actual behavior
Only the SkyBox and the Grid are visible.
The Plane and the ShaderBall are not visible.
Screenshots/Video
If applicable, add screenshots and/or a video to help explain your problem.
Found in Branch
o3de/development: commit e5a4c9482a2fee04d15584e7bdc5dd79297fbb60
o3de-extras/development: commit a30927e
Desktop/Device (please complete the following information):
Additional context
After noticing the missing meshes when running OpenXRTest on the Meta Quest Pro, I decided to debug with Android Studio.
The error occurred here, when executing VkCreateGraphicsPipelines, which returned VK_ERROR_UNKNOWN:
https://github.com/o3de/o3de/blob/1fea4bc55837d7ea0091b294dc3c17661806aeaa/Gems/Atom/RHI/Vulkan/Code/Source/RHI/GraphicsPipeline.cpp#L109
The shader name was:
standardpbr_multiviewpipeline_forwardpass_standardlighting
.Found a similar error as described here:
https://developer.qualcomm.com/forum/qdn-forums/software/adreno-gpu-sdk/68860
They suggest as a solution to code the shaders directly in GLSL instead of HLSL to GLSL (which is not an option for us).
That gave me the hint to revert to the older version of DXC and voila' everything worked again.
I also tried to use the Adreno Offline Compiler and compare the results between the same shader compiled with
DXC 1.6.2112
vsDXC 1.7.2308
. Unfortunately both versions of the shaders produced the following errors when using AOC:Result for shaders compiled with DXC1.6.2112 (The good DXC):
Result for shaders compiled with DXC1.7.2308 (The "bad" DXC):
As mentioned above the workaround is to use DXC1.6.2112 so I'm working on a feature to allow developers to customize which DXC version to use via a Settings Registry. This will buy us some time while I try to get help from Qualcomm.
The text was updated successfully, but these errors were encountered: