[Android] Tegra 4 'support.' This brings up the OpenGL backend to support Tegra 4 to the point where it will run games but it doesn't have any video output for some reason. This is a large change that doesn't actually change much functionally. Walking through the changes.

It changes the string in the Android backend select to just OpenGL ES.
Adds a check in the Android code to check for Tegra 4 and to enable the option to select the OpenGL ES backend.
Adds a DriverDetails bug under BUG_ISTEGRA as a blanket case of Tegra 4 support.
The changes that effects most lines in this change. Removing all float suffixes in the pixel/vertex/util shaders since OpenGL ES 2 doesn't support float suffixes.
Disables the shaders for reinterpreting the EFB format since Tegra 4 doesn't support integers.
Changes GLFunctions.cpp to grab the correct Tegra extension functions.
Readds the GLSL 1.2 'hacks' as GLSLES2 'hacks' since they are required for GLSL ES 2
Adds a GLSLES2 to the GLSL_VERSION enum.
Disable the SamplerCache on Tegra since Tegra doesn't support samplers...
Enable glBufferSubData on Tegra since it is the only mobile GPU to correctly work with it.
Disable glDrawRangeElements on Tegra since it doesn't support it, This uses glDrawElements instead.
This commit is contained in:
Ryan Houdek
2013-10-06 03:12:13 -05:00
parent 2b08172a45
commit 6bdcde9dd6
20 changed files with 404 additions and 285 deletions

View File

@ -78,7 +78,7 @@
<string name="fastmem_desc">Uses potentially unsafe optimizations for memory access.</string>
<string name="video_settings">Video</string>
<string name="software_renderer">Software Renderer</string>
<string name="opengl_es3">OpenGL ES 3</string>
<string name="opengl_es3">OpenGL ES</string>
<string name="video_backend">Video Backend</string>
<string name="video_backend_to_use">Video backend to use</string>
<string name="show_fps">Show FPS</string>

View File

@ -76,7 +76,6 @@ public final class EmulationActivity extends Activity
NativeLibrary.SetDimensions((int)screenHeight, (int)screenWidth);
else
NativeLibrary.SetDimensions((int)screenWidth, (int)screenHeight);
NativeLibrary.SetFilename(gameToEmulate.getStringExtra("SelectedGame"));
Running = true;

View File

@ -27,6 +27,7 @@ public final class VideoSettingsFragment extends PreferenceFragment
public static String m_GLVersion;
public static String m_GLVendor;
public static String m_GLRenderer;
public static String m_GLExtensions;
private Activity m_activity;
/**
@ -104,6 +105,16 @@ public final class VideoSettingsFragment extends PreferenceFragment
return mGL.glGetString(GL10.GL_RENDERER);
}
/**
* Gets the extension that the device supports
*
* @return String containing the extensions
*/
public String getExtensions()
{
return mGL.glGetString(GL10.GL_EXTENSIONS);
}
private EGLConfig chooseConfig()
{
int[] attribList = new int[] {
@ -139,6 +150,7 @@ public final class VideoSettingsFragment extends PreferenceFragment
m_GLVersion = mbuffer.getVersion();
m_GLVendor = mbuffer.getVendor();
m_GLRenderer = mbuffer.getRenderer();
m_GLExtensions = mbuffer.getExtensions();
boolean mSupportsGLES3 = false;
@ -170,6 +182,14 @@ public final class VideoSettingsFragment extends PreferenceFragment
mSupportsGLES3 = true;
}
}
if (!mSupportsGLES3 &&
m_GLVendor != null && m_GLVendor.equals("NVIDIA Corporation") &&
m_GLRenderer != null && m_GLRenderer.equals("NVIDIA Tegra") &&
m_GLExtensions != null && m_GLExtensions.contains("GL_OES_depth24"))
{
// Is a Tegra 4 since it supports 24bit depth
mSupportsGLES3 = true;
}
return mSupportsGLES3;
}