Skip to content

Commit

Permalink
mupen64plus: Pi: temporarily workaround texture rendering/segfault issue
Browse files Browse the repository at this point in the history
May be reverted later - see: gonetz/GLideN64#1665
  • Loading branch information
psyke83 committed Nov 30, 2017
1 parent 2cb0f84 commit 1888efb
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scriptmodules/emulators/mupen64plus.sh
Expand Up @@ -52,7 +52,10 @@ function sources_mupen64plus() {
gitPullOrClone "$dir" https://github.com/${repo[0]}/mupen64plus-${repo[1]} ${repo[2]}
done
gitPullOrClone "$md_build/GLideN64" https://github.com/gonetz/GLideN64.git


# temporary workaround for https://github.com/gonetz/GLideN64/issues/1665
isPlatform "rpi" && applyPatch "$md_data/rpi-yuv.diff"

local config_version=$(grep -oP '(?<=CONFIG_VERSION_CURRENT ).+?(?=U)' GLideN64/src/Config.h)
echo "$config_version" > "$md_build/GLideN64_config_version.ini"
}
Expand Down
4 changes: 4 additions & 0 deletions scriptmodules/emulators/mupen64plus/mupen64plus.sh
Expand Up @@ -254,6 +254,10 @@ function testCompatibility() {
iniSet "EnableFBEmulation" "True"
# Set native resolution factor of 1
iniSet "UseNativeResolutionFactor" "1"
# Force 3-point bilinear filtering & disable shader/key cache on Pi
# See: https://github.com/gonetz/GLideN64/issues/1665
iniSet "bilinearMode" "False"
iniSet "EnableShadersStorage" "False"
for game in "${GLideN64NativeResolution_blacklist[@]}"; do
if [[ "${ROM,,}" == *"$game"* ]]; then
iniSet "UseNativeResolutionFactor" "0"
Expand Down
26 changes: 26 additions & 0 deletions scriptmodules/emulators/mupen64plus/rpi-yuv.diff
@@ -0,0 +1,26 @@
diff --git a/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramBuilder.cpp b/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramBuilder.cpp
index ae8c2e7..9f61a39 100644
--- a/GLideN64/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramBuilder.cpp
+++ b/GLideN64/src/Graphics/OpenGLContext/GLSL/glsl_CombinerProgramBuilder.cpp
@@ -1167,10 +1167,7 @@ public:
m_part =
" nCurrentTile = 0; \n"
" lowp vec4 readtex0; \n"
- " if (uBiLerp[0] != 0) \n"
" readtex0 = readTex(uTex0, vTexCoord0, uFbMonochrome[0], uFbFixedAlpha[0]); \n"
- " else \n"
- " readtex0 = YUV_Convert(uTex0, vTexCoord0, uTextureConvert[0], uTextureFormat[0], readtex0); \n"
;
} else {
if (config.video.multisampling > 0) {
@@ -1205,10 +1202,7 @@ public:
m_part =
" nCurrentTile = 1; \n"
" lowp vec4 readtex1; \n"
- " if (uBiLerp[1] != 0) \n"
" readtex1 = readTex(uTex1, vTexCoord1, uFbMonochrome[1], uFbFixedAlpha[1]); \n"
- " else \n"
- " readtex1 = YUV_Convert(uTex1, vTexCoord1, uTextureConvert[1], uTextureFormat[1], readtex0); \n"
;
} else {
if (config.video.multisampling > 0) {

0 comments on commit 1888efb

Please sign in to comment.