-
Notifications
You must be signed in to change notification settings - Fork 53
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
Some test fail with d3d12 mesa driver (22.2.5) (WSLg) #852
Comments
|
|
|
|
|
The heightmap sample doesn't say why it's failing but I have two very strong guesses:
The compute shader in heightmap is used for terrain shadows. In theory it could be possible to skip this (at the cost of not having terrain shadows), but supporting such path has its development cost. |
Interestingly, it seems that |
Quickly skimming through ARB_compute_shader shows "OpenGL 4.2 is required." Thus it makes sense that the extension won't be exposed. However that same document says OpenGL 4.2 is also done for d3d12. Try seeing if glxinfo reports GL 4.1 or 4.2 If glxinfo reports 4.1, there's something wrong in your setup. If both glxinfo and gazebo load the same GL libraries but one creats a 4.2 context and the other 4.1; then that's likely a weird Ogre bug. |
Ok, some more debugging.
|
Ok that makes more sense. The Honestly I think there was no driver in the world that implemented Compute Shaders without reporting GL 4.3; if there was, then it was only live for a few months a decade ago. |
Ok, I was able to get all tests to pass with the following steps.
diff --git a/ogre2/src/media/2.0/scripts/materials/Common/GLSL/GaussianBlurBase_cs.glsl b/ogre2/src/media/2.0/scripts/materials/Common/GLSL/GaussianBlurBase_cs.glsl
index 9e013df6..5dadc8fe 100644
--- a/ogre2/src/media/2.0/scripts/materials/Common/GLSL/GaussianBlurBase_cs.glsl
+++ b/ogre2/src/media/2.0/scripts/materials/Common/GLSL/GaussianBlurBase_cs.glsl
@@ -1,5 +1,7 @@
@property( syntax != glslvk )
- #version 430
+ #version 420
+ #extension GL_ARB_arrays_of_arrays: enable
+ #extension GL_ARB_compute_shader: enable
@else
#version 450
@end
diff --git a/ogre2/src/media/2.0/scripts/materials/Terra/GLSL/TerraShadowGenerator.glsl b/ogre2/src/media/2.0/scripts/materials/Terra/GLSL/TerraShadowGenerator.glsl
index e519d273..4b0d428d 100644
--- a/ogre2/src/media/2.0/scripts/materials/Terra/GLSL/TerraShadowGenerator.glsl
+++ b/ogre2/src/media/2.0/scripts/materials/Terra/GLSL/TerraShadowGenerator.glsl
@@ -1,5 +1,6 @@
@property( syntax != glslvk )
- #version 430
+ #version 420
+ #extension GL_ARB_compute_shader: enable
#define ogre_B0 binding = 0
#define ogre_B1 binding = 1
@else By doing that, all tests pass fine. I still have a segfault on program exit once the test pass, but this seems unrelated (see microsoft/wslg#715). |
OpenGL via d3d12 (Mesa) under WSL; since it currently supports up to OpenGL 4.2. Affects gazebosim/gz-rendering#852
Thanks for the detective work! Since we try to aim to 430 for simplicity (probably 420 + extension is the exact same thing; but I'm trying to play safe), I incorporated your fixes only if 430 isn't present (which is basically WSLg drivers). |
Cool, thanks! Yes that seems the right thing to do. |
Another instance of |
I incorporated the fixes to this issue (except for the |
thanks for investigating the issue and the fixes! |
Fixed by #851 . |
Environment
dxdiag
and report the GPU-related information.system_profiler SPDisplaysDataType
. Copy the output here.~/.gz/rendering
Description
After fixing the basic problem in gazebosim/gz-sim#920, on a WSLg installation using the d3d12 driver, some tests of the test suite of gz-rendering are failing, while the test suite works fine if one sets
export LIBGL_ALWAYS_SOFTWARE=true
.Steps to reproduce
Run the testsuite on WSLg with d3d12 after applying the following patches:
Output
More info will be provided in the next comments.
INTEGRATION_gpu_rays_ogre2_gl3plus
,INTEGRATION_heightmap_ogre2_gl3plus
andUNIT_Utils_TEST_ogre2_gl3plus
failures are of the kindCompute Program 0TerraShadowGenerator failed to compile
, but as no shader program was placed in the log directory, I modified directly OgreNext to print the shader program:For the
INTEGRATION_lidar_visual_ogre2_gl3plus
andINTEGRATION_projector_ogre2_gl3plus
tests, the failure seems to be related to something else.The text was updated successfully, but these errors were encountered: