Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Android] Work around Qualcomm's broken garbage in their v53 drivers.…
… This doesn't fix the issue, just a work around. This is the stupidest issue coming from Qualcomm. Now Dolphin Mobile won't crash immediately, but there are new SPS issues.
  • Loading branch information
Sonicadvance1 committed Dec 19, 2013
1 parent 945b903 commit e697d7a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Source/Core/VideoBackends/OGL/Src/ProgramShaderCache.cpp
Expand Up @@ -592,6 +592,9 @@ void ProgramShaderCache::CreateHeader ( void )
"#define frac fract\n"
"#define lerp mix\n"

// Terrible hack, look at DriverDetails.h
"%s\n"

, v==GLSLES3 ? "#version 300 es" : v==GLSL_130 ? "#version 130" : v==GLSL_140 ? "#version 140" : "#version 150"
, g_ActiveConfig.backend_info.bSupportsGLSLUBO && v<GLSL_140 ? "#extension GL_ARB_uniform_buffer_object : enable" : ""
, g_ActiveConfig.backend_info.bSupportsEarlyZ ? "#extension GL_ARB_shader_image_load_store : enable" : ""
Expand All @@ -600,6 +603,7 @@ void ProgramShaderCache::CreateHeader ( void )

, DriverDetails::HasBug(DriverDetails::BUG_BROKENCENTROID) ? "in" : "centroid in"
, DriverDetails::HasBug(DriverDetails::BUG_BROKENCENTROID) ? "out" : "centroid out"
, DriverDetails::HasBug(DriverDetails::BUG_BROKENTEXTURESIZE) ? "#define textureSize(x, y) ivec2(1, 1)" : ""
);
}

Expand Down
1 change: 1 addition & 0 deletions Source/Core/VideoCommon/Src/DriverDetails.cpp
Expand Up @@ -44,6 +44,7 @@ namespace DriverDetails
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, BUG_ANNIHILATEDUBOS, 41.0, 46.0, true},
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, BUG_BROKENSWAP, -1.0, 46.0, true},
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, BUG_BROKENBUFFERSTREAM, -1.0, -1.0, true},
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, BUG_BROKENTEXTURESIZE, -1.0, -1.0, true},
{OS_ALL, VENDOR_ARM, DRIVER_ARM_T6XX, BUG_BROKENBUFFERSTREAM, -1.0, -1.0, true},
{OS_ALL, VENDOR_MESA, DRIVER_NOUVEAU, BUG_BROKENUBO, 900, 916, true},
{OS_ALL, VENDOR_MESA, DRIVER_R600, BUG_BROKENUBO, 900, 913, true},
Expand Down
6 changes: 6 additions & 0 deletions Source/Core/VideoCommon/Src/DriverDetails.h
Expand Up @@ -135,6 +135,12 @@ namespace DriverDetails
// The driver stalls in each instance no matter what you do
// Apparently Mali and Adreno share code in this regard since it was wrote by the same person.
BUG_BROKENBUFFERSTREAM,
// Bug: GLSL ES 3.0 textureSize causes abort
// Affected devices: Adreno a3xx
// Started Version: v53
// Ended Version: -1
// If a shader includes a textureSize function call then the shader compiler will call abort()
BUG_BROKENTEXTURESIZE,
};

// Initializes our internal vendor, device family, and driver version
Expand Down

0 comments on commit e697d7a

Please sign in to comment.