-
Notifications
You must be signed in to change notification settings - Fork 179
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
Blank video output with Mupen64plus (GLES2/Raspberry Pi) #2837
Comments
Try with: Or clear your shader cache. |
No, ignoring/erasing the shader cache doesn't seem to help - I still get a black screen. For a couple of launches, before invalidating the cache, I got a video output. Then, for the subsequent launches, using |
Then seek for |
Thanks.
and previously also printed:
I think the latter messages have been printed after I cleared the shader cache, the former are printed right now when I start and get a blank video output. |
I can repro the screen being fully black if I hack the snoise functions to always return 0.0. I suspect this is what's happening. My guess is the GLSL Can you see if this fixes it? diff --git a/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramBuilderCommon.cpp b/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramBuilderCommon.cpp
index 901d17ab..1de49ab1 100644
--- a/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramBuilderCommon.cpp
+++ b/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramBuilderCommon.cpp
@@ -1007,8 +1007,8 @@ public:
"uniform float uNoiseSeed; \n"
"lowp float snoise() \n"
"{ \n"
- " mediump vec2 coord = floor(gl_FragCoord.xy/uScreenScale); \n"
- " mediump vec3 p3 = vec3(uNoiseSeed, coord); \n"
+ " highp vec2 coord = floor(gl_FragCoord.xy/uScreenScale); \n"
+ " highp vec3 p3 = vec3(uNoiseSeed, coord); \n"
// hash13 from https://www.shadertoy.com/view/4djSRW
" p3 = fract(p3 * .1031); \n"
" p3 += dot(p3, p3.zyx + 31.32); \n"
@@ -1063,13 +1063,13 @@ public:
if (config.generalEmulation.enableHiresNoiseDithering != 0)
// multiplier for higher res noise effect
m_part +=
- " lowp float mult = 1.0 + step(2.0, uScreenScale.x); \n";
+ " highp float mult = 1.0 + step(2.0, uScreenScale.x); \n";
else
m_part +=
- " lowp float mult = 1.0; \n";
+ " highp float mult = 1.0; \n";
m_part +=
- " mediump vec2 coord = floor(mult * (gl_FragCoord.xy/uScreenScale)); \n"
- " mediump vec3 p3 = vec3(uNoiseSeed, coord); \n"
+ " highp vec2 coord = floor(mult * (gl_FragCoord.xy/uScreenScale)); \n"
+ " highp vec3 p3 = vec3(uNoiseSeed, coord); \n"
// hash33 from https://www.shadertoy.com/view/4djSRW
" p3 = fract(p3 * vec3(.1031, .1030, .0973)); \n"
" p3 += dot(p3, p3.yxz+33.33); \n"
@@ -1081,14 +1081,14 @@ public:
if (config.generalEmulation.enableHiresNoiseDithering != 0)
// multiplier for higher res noise effect
m_part +=
- " lowp float mult = 1.0 + step(2.0, uScreenScale.x); \n";
+ " highp float mult = 1.0 + step(2.0, uScreenScale.x); \n";
else
m_part +=
- " lowp float mult = 1.0; \n";
+ " highp float mult = 1.0; \n";
m_part +=
" \n"
- " mediump vec2 coord = floor(mult * (gl_FragCoord.xy/uScreenScale)); \n"
- " mediump vec3 p3 = vec3(uNoiseSeed, coord); \n"
+ " highp vec2 coord = floor(mult * (gl_FragCoord.xy/uScreenScale)); \n"
+ " highp vec3 p3 = vec3(uNoiseSeed, coord); \n"
// hash13 from https://www.shadertoy.com/view/4djSRW
" p3 = fract(p3 * .1031); \n"
" p3 += dot(p3, p3.zyx + 31.32); \n" |
@scurest thank you for the patch. Unfortunately it doesn't resolve the issue - still getting a black video. Here's a MESA shader cache dump taken from the start-up - https://gist.github.com/cmitu/57bd70c14e9f6914a96732f5844f1769. |
@cmitu Okay, thanks. I notice that if the shader has compilation errors it also produces a black screen. Compilation errors only get logged to You can test whether logging of shader compilation errors is working with a patch like this diff --git a/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramBuilderCommon.cpp b/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramBuilderCommon.cpp
index 901d17ab..e04c05bd 100644
--- a/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramBuilderCommon.cpp
+++ b/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramBuilderCommon.cpp
@@ -1073,7 +1073,7 @@ public:
// hash33 from https://www.shadertoy.com/view/4djSRW
" p3 = fract(p3 * vec3(.1031, .1030, .0973)); \n"
" p3 += dot(p3, p3.yxz+33.33); \n"
- " return fract((p3.xxy + p3.yxx)*p3.zyx); \n"
+ " return adsfhdsakjhfjlksahliurhsadsakjdfhl; \n"
"} \n"
"lowp float snoiseA() \n"
"{ \n" which will definitely trigger an error. Also make sure to clear the shader cache before testing. @Jj0YzL5nvJ I don't understand the connection to this issue. |
It's very likely a float precision issue as well. That hardware originally only had support for OpenGL 2.0, but later received support for OpenGL 3.3 in software. It works with If it were possible to know exactly what the driver doesn't like, a special path/hack could be created for that hardware. |
Thank you. I've switched to a Debug build and the behavior/logging is changed. Running the emulator crashes outright because of an assert:
The |
Please try diff --git a/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramBuilderCommon.cpp b/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramBuilderCommon.cpp
index 901d17ab..5ef84042 100644
--- a/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramBuilderCommon.cpp
+++ b/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramBuilderCommon.cpp
@@ -1004,11 +1004,11 @@ public:
ShaderNoise(const opengl::GLInfo & _glinfo)
{
m_part =
- "uniform float uNoiseSeed; \n"
+ "uniform mediump float uNoiseSeed; \n"
"lowp float snoise() \n"
"{ \n"
- " mediump vec2 coord = floor(gl_FragCoord.xy/uScreenScale); \n"
- " mediump vec3 p3 = vec3(uNoiseSeed, coord); \n"
+ " highp vec2 coord = floor(gl_FragCoord.xy/uScreenScale); \n"
+ " highp vec3 p3 = vec3(uNoiseSeed, coord); \n"
// hash13 from https://www.shadertoy.com/view/4djSRW
" p3 = fract(p3 * .1031); \n"
" p3 += dot(p3, p3.zyx + 31.32); \n"
@@ -1068,8 +1068,8 @@ public:
m_part +=
" lowp float mult = 1.0; \n";
m_part +=
- " mediump vec2 coord = floor(mult * (gl_FragCoord.xy/uScreenScale)); \n"
- " mediump vec3 p3 = vec3(uNoiseSeed, coord); \n"
+ " highp vec2 coord = floor(mult * (gl_FragCoord.xy/uScreenScale)); \n"
+ " highp vec3 p3 = vec3(uNoiseSeed, coord); \n"
// hash33 from https://www.shadertoy.com/view/4djSRW
" p3 = fract(p3 * vec3(.1031, .1030, .0973)); \n"
" p3 += dot(p3, p3.yxz+33.33); \n"
@@ -1087,8 +1087,8 @@ public:
" lowp float mult = 1.0; \n";
m_part +=
" \n"
- " mediump vec2 coord = floor(mult * (gl_FragCoord.xy/uScreenScale)); \n"
- " mediump vec3 p3 = vec3(uNoiseSeed, coord); \n"
+ " highp vec2 coord = floor(mult * (gl_FragCoord.xy/uScreenScale)); \n"
+ " highp vec3 p3 = vec3(uNoiseSeed, coord); \n"
// hash13 from https://www.shadertoy.com/view/4djSRW
" p3 = fract(p3 * .1031); \n"
" p3 += dot(p3, p3.zyx + 31.32); \n" |
@scurest Thank you for the patch - after applying it now video output shows up, no longer a black screen. |
@scurest could you PR that patch? it fixes rendering on my pinebook pro aswell with GLES. |
Hello,
starting with commit 1a0621d (bisected via
git bisecgt
), there's no video output on some N64 titles (i.e Cruis'n USA). There's sound and the input (keyboard in my case) still works, but there's a blank/black video output.It may be related to the device/renderer used - a Rpi4 with GLES3, also reported to have issues on the Pi5. OS is current RaspiOS (based on Debian 12 bookworm, current stable) on 64bit ARM (
aarch64
). The log doesn't show much, see below.Mupen64plus log
Is there anything that could be added to the config to increase the logging or to better diagnose the issue ?
The text was updated successfully, but these errors were encountered: