[Android] Make Tegra 4 output graphics that aren't visually appealing.
This commit is contained in:
parent
615bac7ebc
commit
cf7521dc36
|
@ -65,7 +65,17 @@ FramebufferManager::FramebufferManager(int targetWidth, int targetHeight, int ms
|
||||||
// alpha channel should be ignored if the EFB does not have one.
|
// alpha channel should be ignored if the EFB does not have one.
|
||||||
|
|
||||||
// Create EFB target.
|
// Create EFB target.
|
||||||
|
u32 depthType, rgbaType;
|
||||||
|
if (DriverDetails::HasBug(BUG_ISTEGRA))
|
||||||
|
{
|
||||||
|
depthType = GL_DEPTH_COMPONENT;
|
||||||
|
rgbaType = GL_RGBA;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
depthType = GL_DEPTH_COMPONENT24;
|
||||||
|
rgbaType = GL_RGBA8;
|
||||||
|
}
|
||||||
glGenFramebuffers(1, &m_efbFramebuffer);
|
glGenFramebuffers(1, &m_efbFramebuffer);
|
||||||
glActiveTexture(GL_TEXTURE0 + 9);
|
glActiveTexture(GL_TEXTURE0 + 9);
|
||||||
|
|
||||||
|
@ -81,15 +91,15 @@ FramebufferManager::FramebufferManager(int targetWidth, int targetHeight, int ms
|
||||||
|
|
||||||
glBindTexture(getFbType(), m_efbColor);
|
glBindTexture(getFbType(), m_efbColor);
|
||||||
glTexParameteri(getFbType(), GL_TEXTURE_MAX_LEVEL, 0);
|
glTexParameteri(getFbType(), GL_TEXTURE_MAX_LEVEL, 0);
|
||||||
glTexImage2D(getFbType(), 0, GL_RGBA8, m_targetWidth, m_targetHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
|
glTexImage2D(getFbType(), 0, rgbaType, m_targetWidth, m_targetHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
|
||||||
|
|
||||||
glBindTexture(getFbType(), m_efbDepth);
|
glBindTexture(getFbType(), m_efbDepth);
|
||||||
glTexParameteri(getFbType(), GL_TEXTURE_MAX_LEVEL, 0);
|
glTexParameteri(getFbType(), GL_TEXTURE_MAX_LEVEL, 0);
|
||||||
glTexImage2D(getFbType(), 0, GL_DEPTH_COMPONENT24, m_targetWidth, m_targetHeight, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL);
|
glTexImage2D(getFbType(), 0, depthType, m_targetWidth, m_targetHeight, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL);
|
||||||
|
|
||||||
glBindTexture(getFbType(), m_resolvedColorTexture);
|
glBindTexture(getFbType(), m_resolvedColorTexture);
|
||||||
glTexParameteri(getFbType(), GL_TEXTURE_MAX_LEVEL, 0);
|
glTexParameteri(getFbType(), GL_TEXTURE_MAX_LEVEL, 0);
|
||||||
glTexImage2D(getFbType(), 0, GL_RGBA8, m_targetWidth, m_targetHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
|
glTexImage2D(getFbType(), 0, rgbaType, m_targetWidth, m_targetHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
|
||||||
|
|
||||||
// Bind target textures to the EFB framebuffer.
|
// Bind target textures to the EFB framebuffer.
|
||||||
|
|
||||||
|
@ -146,11 +156,11 @@ FramebufferManager::FramebufferManager(int targetWidth, int targetHeight, int ms
|
||||||
|
|
||||||
glBindTexture(getFbType(), m_resolvedColorTexture);
|
glBindTexture(getFbType(), m_resolvedColorTexture);
|
||||||
glTexParameteri(getFbType(), GL_TEXTURE_MAX_LEVEL, 0);
|
glTexParameteri(getFbType(), GL_TEXTURE_MAX_LEVEL, 0);
|
||||||
glTexImage2D(getFbType(), 0, GL_RGBA8, m_targetWidth, m_targetHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
|
glTexImage2D(getFbType(), 0, rgbaType, m_targetWidth, m_targetHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
|
||||||
|
|
||||||
glBindTexture(getFbType(), m_resolvedDepthTexture);
|
glBindTexture(getFbType(), m_resolvedDepthTexture);
|
||||||
glTexParameteri(getFbType(), GL_TEXTURE_MAX_LEVEL, 0);
|
glTexParameteri(getFbType(), GL_TEXTURE_MAX_LEVEL, 0);
|
||||||
glTexImage2D(getFbType(), 0, GL_DEPTH_COMPONENT24, m_targetWidth, m_targetHeight, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL);
|
glTexImage2D(getFbType(), 0, depthType, m_targetWidth, m_targetHeight, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL);
|
||||||
|
|
||||||
// Bind resolved textures to resolved framebuffer.
|
// Bind resolved textures to resolved framebuffer.
|
||||||
|
|
||||||
|
|
|
@ -167,10 +167,16 @@ void Init()
|
||||||
glBindTexture(getFbType(), s_srcTexture);
|
glBindTexture(getFbType(), s_srcTexture);
|
||||||
glTexParameteri(getFbType(), GL_TEXTURE_MAX_LEVEL, 0);
|
glTexParameteri(getFbType(), GL_TEXTURE_MAX_LEVEL, 0);
|
||||||
|
|
||||||
|
u32 rgbaType;
|
||||||
|
if (DriverDetails::HasBug(BUG_ISTEGRA))
|
||||||
|
rgbaType = GL_RGBA;
|
||||||
|
else
|
||||||
|
rgbaType = GL_RGBA8;
|
||||||
|
|
||||||
glGenTextures(1, &s_dstTexture);
|
glGenTextures(1, &s_dstTexture);
|
||||||
glBindTexture(GL_TEXTURE_2D, s_dstTexture);
|
glBindTexture(GL_TEXTURE_2D, s_dstTexture);
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
|
||||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, renderBufferWidth, renderBufferHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
|
glTexImage2D(GL_TEXTURE_2D, 0, rgbaType, renderBufferWidth, renderBufferHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
|
||||||
|
|
||||||
CreatePrograms();
|
CreatePrograms();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue