summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorRyan Houdek <Sonicadvance1@gmail.com>2013-10-06 21:51:41 -0500
committerRyan Houdek <Sonicadvance1@gmail.com>2013-10-06 21:51:41 -0500
commit26c38648ece6e27b4b98e61312fe2d383757b8a4 (patch)
tree3e75bce8254c0c2ffa622dfb67a6bc3e2f82b17e /Source
parenta40daac5b14387a88d396f746a5298c39df76e34 (diff)
[Android] Missed a few things for PowerVR544MP3 'support.' It doesn't actually get any video output on it just like Tegra 4.
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/VideoCommon/Src/DriverDetails.cpp1
-rw-r--r--Source/Core/VideoCommon/Src/DriverDetails.h7
-rw-r--r--Source/Core/VideoCommon/Src/PixelShaderGen.cpp6
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp4
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/Render.cpp2
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.cpp4
6 files changed, 17 insertions, 7 deletions
diff --git a/Source/Core/VideoCommon/Src/DriverDetails.cpp b/Source/Core/VideoCommon/Src/DriverDetails.cpp
index 1f7e43cca6..860a805dd3 100644
--- a/Source/Core/VideoCommon/Src/DriverDetails.cpp
+++ b/Source/Core/VideoCommon/Src/DriverDetails.cpp
@@ -39,6 +39,7 @@ namespace DriverDetails
{VENDOR_MESA, DRIVER_NOUVEAU, BUG_BROKENHACKEDBUFFER, -1.0, -1.0, true},
{VENDOR_ATI, DRIVER_ATI, BUG_BROKENPINNEDMEMORY, -1.0, -1.0, true},
{VENDOR_TEGRA, DRIVER_NVIDIA, BUG_ISTEGRA, -1.0, -1.0, true},
+ {VENDOR_IMGTEC, DRIVER_IMGTEC, BUG_ISPOWERVR, -1.0, -1.0, true},
};
std::map<Bug, BugInfo> m_bugs;
diff --git a/Source/Core/VideoCommon/Src/DriverDetails.h b/Source/Core/VideoCommon/Src/DriverDetails.h
index 6006feb336..f81eccf246 100644
--- a/Source/Core/VideoCommon/Src/DriverDetails.h
+++ b/Source/Core/VideoCommon/Src/DriverDetails.h
@@ -122,6 +122,13 @@ namespace DriverDetails
// Tegra 4 hardware limitations don't allow it to support OpenGL ES 3
// This is fixed in Tegra 5
BUG_ISTEGRA,
+ // Bug: Running on a PowerVR5 device
+ // Affected devices: PowerVR54x
+ // Started Version: 540
+ // Ended Version: 6xxx
+ // PowerVR 5 hardware limitations don't allow it to support OpenGL ES 3
+ // This is fixed in PowerVR6
+ BUG_ISPOWERVR,
};
// Initializes our internal vendor, device family, and driver version
diff --git a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp
index e4d2bc569f..1720e4e8b1 100644
--- a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp
+++ b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp
@@ -658,12 +658,12 @@ static inline void GeneratePixelShader(T& out, DSTALPHA_MODE dstAlphaMode, API_T
if (dstAlphaMode == DSTALPHA_ALPHA_PASS)
{
out.SetConstantsUsed(C_ALPHA, C_ALPHA);
- out.Write("\tocol0 = float4(prev.rgb, " I_ALPHA"[0].a);\n");
+ out.Write("\tgl_FragColor = float4(prev.rgb, " I_ALPHA"[0].a);\n");
}
else
{
WriteFog<T>(out, uid_data);
- out.Write("\tocol0 = prev;\n");
+ out.Write("\tgl_FragColor = prev;\n");
}
// Use dual-source color blending to perform dst alpha in a single pass
@@ -674,7 +674,7 @@ static inline void GeneratePixelShader(T& out, DSTALPHA_MODE dstAlphaMode, API_T
// Colors will be blended against the alpha from ocol1 and
// the alpha from ocol0 will be written to the framebuffer.
out.Write("\tocol1 = prev;\n");
- out.Write("\tocol0.a = " I_ALPHA"[0].a;\n");
+ out.Write("\tgl_FragColor.a = " I_ALPHA"[0].a;\n");
}
out.Write("}\n");
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp
index a8360fa9c3..94b9502d2f 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp
@@ -576,8 +576,8 @@ void ProgramShaderCache::CreateHeader ( void )
, v==GLSLES2 ? "#define out " : ""
, v==GLSLES2 ? "#define ocol0 gl_FragColor" : ""
, v==GLSLES2 ? "#define ocol1 gl_FragColor" : ""
- , v==GLSLES2 ? "#extension GL_NV_uniform_buffer_object : enable" : ""
- , v==GLSLES2 ? "#extension GL_NV_fragdepth : enable" : ""
+ , DriverDetails::HasBug(DriverDetails::BUG_ISTEGRA) ? "#extension GL_NV_uniform_buffer_object : enable" : ""
+ , DriverDetails::HasBug(DriverDetails::BUG_ISTEGRA) ? "#extension GL_NV_fragdepth : enable" : ""
, v==GLSLES2 ? "" : "out vec4 name;"
);
}
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
index baeb520815..82aeabd30a 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
@@ -388,7 +388,7 @@ Renderer::Renderer()
g_ogl_config.bSupportCoverageMSAA = false; // XXX: GLES3 spec has MSAA
g_ogl_config.bSupportSampleShading = false;
g_ogl_config.bSupportOGL31 = false;
- if (DriverDetails::HasBug(DriverDetails::BUG_ISTEGRA))
+ if (DriverDetails::HasBug(DriverDetails::BUG_ISTEGRA) || DriverDetails::HasBug(DriverDetails::BUG_ISPOWERVR))
g_ogl_config.eSupportedGLSLVersion = GLSLES2;
else
g_ogl_config.eSupportedGLSLVersion = GLSLES3;
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.cpp b/Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.cpp
index f0833637d0..983d82103f 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/StreamBuffer.cpp
@@ -33,7 +33,9 @@ StreamBuffer::StreamBuffer(u32 type, size_t size, StreamType uploadType)
g_Config.bHackedBufferUpload = false;
}
- if(!g_ogl_config.bSupportsGLBaseVertex && (m_uploadtype & BUFFERDATA) && !DriverDetails::HasBug(DriverDetails::BUG_ISTEGRA))
+ if(!g_ogl_config.bSupportsGLBaseVertex && (m_uploadtype & BUFFERDATA)
+ && !DriverDetails::HasBug(DriverDetails::BUG_ISPOWERVR)
+ && !DriverDetails::HasBug(DriverDetails::BUG_ISTEGRA))
m_uploadtype = BUFFERDATA;
else if(!g_ogl_config.bSupportsGLBaseVertex && (m_uploadtype & BUFFERSUBDATA))
m_uploadtype = BUFFERSUBDATA;