3rdParty: update mupen64plus-video-GLideN64

This commit is contained in:
Rosalie Wanders
2025-05-18 19:18:44 +02:00
parent 5cab9282e7
commit 6e1df7fc79
8 changed files with 22 additions and 6 deletions
+2 -2
View File
@@ -6,7 +6,7 @@
[subrepo]
remote = git@github.com:/gonetz/GLideN64.git
branch = master
commit = 9f8fc1e4c59c4cdb37112ef0c100158b25c2c1cb
parent = 3c615c84599a0ea8624c2deea4c8ba438ce988d6
commit = 55c436c706224eae6cd1395b88e083105b7d7834
parent = 5cab9282e7a7f1407cde18b6e5d1630f3c156042
method = merge
cmdver = 0.4.6
+1 -1
View File
@@ -204,7 +204,7 @@ void GBIInfo::_makeCurrent(MicrocodeInfo * _pCurrent)
RDP_Init();
G_TRI1 = G_TRI2 = G_TRIX = G_QUAD = -1; // For correct work of gSPFlushTriangles()
G_TRI1 = G_TRI2 = G_TRIX = G_QUAD = G_TRISTRIP = G_TRIFAN = -1; // For correct work of gSPFlushTriangles()
gSP.clipRatio = 1U;
switch (m_pCurrent->type) {
@@ -53,6 +53,7 @@ void _loadSettings(GlSettings & settings)
config.generalEmulation.enableLegacyBlending = settings.value("enableLegacyBlending", config.generalEmulation.enableLegacyBlending).toInt(); //ini only
config.generalEmulation.enableHybridFilter = settings.value("enableHybridFilter", config.generalEmulation.enableHybridFilter).toInt(); //ini only
config.generalEmulation.enableFragmentDepthWrite = settings.value("enableFragmentDepthWrite", config.generalEmulation.enableFragmentDepthWrite).toInt(); //ini only
config.generalEmulation.hacks |= settings.value("hacks", config.generalEmulation.hacks).toInt(); //ini only
config.generalEmulation.enableCustomSettings = settings.value("enableCustomSettings", config.generalEmulation.enableCustomSettings).toInt();
settings.endGroup();
@@ -58,6 +58,7 @@ void _loadSettings(QSettings & settings)
config.generalEmulation.enableLegacyBlending = settings.value("enableLegacyBlending", config.generalEmulation.enableLegacyBlending).toInt(); //ini only
config.generalEmulation.enableHybridFilter = settings.value("enableHybridFilter", config.generalEmulation.enableHybridFilter).toInt(); //ini only
config.generalEmulation.enableFragmentDepthWrite = settings.value("enableFragmentDepthWrite", config.generalEmulation.enableFragmentDepthWrite).toInt(); //ini only
config.generalEmulation.hacks |= settings.value("hacks", config.generalEmulation.hacks).toInt(); //ini only
config.generalEmulation.enableCustomSettings = settings.value("enableCustomSettings", config.generalEmulation.enableCustomSettings).toInt();
settings.endGroup();
@@ -193,7 +193,7 @@ void GLInfo::init() {
eglImage = (Utils::isEGLExtensionSupported("EGL_KHR_image_base") || Utils::isEGLExtensionSupported("EGL_KHR_image"));
ext_fetch_arm = Utils::isExtensionSupported(*this, "GL_ARM_shader_framebuffer_fetch") && !ext_fetch;
dual_source_blending = !isGLESX || (Utils::isExtensionSupported(*this, "GL_EXT_blend_func_extended") && !isAnyAdreno);
dual_source_blending = !isGLESX || ((!isGLES2) && (Utils::isExtensionSupported(*this, "GL_EXT_blend_func_extended") && !isAnyAdreno));
anisotropic_filtering = Utils::isExtensionSupported(*this, "GL_EXT_texture_filter_anisotropic");
#ifdef OS_ANDROID
@@ -43,6 +43,8 @@ void gSPFlushTriangles()
(RSP.nextCmd != G_TRI1) &&
(RSP.nextCmd != G_TRI2) &&
(RSP.nextCmd != G_TRIX) &&
(RSP.nextCmd != G_TRISTRIP) &&
(RSP.nextCmd != G_TRIFAN) &&
(RSP.nextCmd != G_QUAD)
) {
dwnd().getDrawer().drawTriangles();
@@ -396,6 +396,8 @@ void Config_LoadCustomConfig()
if (result == M64ERR_SUCCESS) config.generalEmulation.enableLegacyBlending = atoi(value);
result = ConfigExternalGetParameter(fileHandle, sectionName, "generalEmulation\\enableFragmentDepthWrite", value, sizeof(value));
if (result == M64ERR_SUCCESS) config.generalEmulation.enableFragmentDepthWrite = atoi(value);
result = ConfigExternalGetParameter(fileHandle, sectionName, "generalEmulation\\hacks", value, sizeof(value));
if (result == M64ERR_SUCCESS) config.generalEmulation.hacks |= atoi(value);
result = ConfigExternalGetParameter(fileHandle, sectionName, "graphics2D\\correctTexrectCoords", value, sizeof(value));
if (result == M64ERR_SUCCESS) config.graphics2D.correctTexrectCoords = atoi(value);
@@ -170,7 +170,9 @@ struct Vertices7
u8 v[7];
inline bool valid(u8 i) const
{ return v[i] < 64; }
{
return v[i] < 64;
}
};
static inline Vertices7 unpackVertices7(u32 w0, u32 w1)
@@ -186,8 +188,15 @@ static inline Vertices7 unpackVertices7(u32 w0, u32 w1)
return v;
}
struct DeferFlush
{
~DeferFlush()
{ gSPFlushTriangles(); }
};
static void F3DEX3_TriStrip(u32 w0, u32 w1)
{
DeferFlush flush;
Vertices7 vertices = unpackVertices7(w0, w1);
// *v1 - v2 - v3, v3 - v2 - v4, v3 - v4 - v5, v5 - v4 - v6, v5 - v6 - v7
if (!vertices.valid(0) || !vertices.valid(1) || !vertices.valid(2)) return;
@@ -208,6 +217,7 @@ static void F3DEX3_TriStrip(u32 w0, u32 w1)
static void F3DEX3_TriFan(u32 w0, u32 w1)
{
DeferFlush flush;
Vertices7 vertices = unpackVertices7(w0, w1);
// *v1 - v2 - v3, v1 - v3 - v4, v1 - v4 - v5, v1 - v5 - v6, v1 - v6 - v7
if (!vertices.valid(0) || !vertices.valid(1) || !vertices.valid(2)) return;
@@ -220,7 +230,7 @@ static void F3DEX3_TriFan(u32 w0, u32 w1)
gSPTriangle(vertices.v[0], vertices.v[3], vertices.v[4]);
if (!vertices.valid(5)) return;
gSPTriangle(vertices.v[0], vertices.v[3], vertices.v[5]);
gSPTriangle(vertices.v[0], vertices.v[4], vertices.v[5]);
if (!vertices.valid(6)) return;
gSPTriangle(vertices.v[0], vertices.v[5], vertices.v[6]);