mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-21 23:11:38 +00:00
Create GLES shaders as version 300 if replaying on GL ES 3.0. Refs #1770
This commit is contained in:
@@ -22,7 +22,9 @@
|
||||
* THE SOFTWARE.
|
||||
******************************************************************************/
|
||||
|
||||
#if defined(OPENGL_CORE)
|
||||
#if defined(GLES)
|
||||
#extension GL_OES_sample_variables : require
|
||||
#elif defined(OPENGL_CORE)
|
||||
#extension GL_ARB_sample_shading : require
|
||||
#endif
|
||||
|
||||
|
||||
@@ -44,7 +44,10 @@ void GetGLSLVersions(ShaderType &shaderType, int &glslVersion, int &glslBaseVer,
|
||||
if(IsGLES)
|
||||
{
|
||||
shaderType = ShaderType::GLSLES;
|
||||
glslVersion = glslBaseVer = glslCSVer = 310;
|
||||
glslVersion = glslBaseVer = glslCSVer = 300;
|
||||
|
||||
if(GLCoreVersion >= 31)
|
||||
glslVersion = glslBaseVer = glslCSVer = 310;
|
||||
|
||||
if(GLCoreVersion >= 32)
|
||||
glslVersion = glslBaseVer = glslCSVer = 320;
|
||||
@@ -777,7 +780,8 @@ void GLReplay::InitDebugData()
|
||||
ARRAY_COUNT(DebugData.minmaxTileProgram) >= (TEXDISPLAY_SINT_TEX | TEXDISPLAY_TYPEMASK) + 1,
|
||||
"not enough programs");
|
||||
|
||||
if(HasExt[ARB_compute_shader] && HasExt[ARB_shader_storage_buffer_object])
|
||||
if(HasExt[ARB_compute_shader] && HasExt[ARB_shader_storage_buffer_object] &&
|
||||
HasExt[ARB_shading_language_420pack])
|
||||
{
|
||||
for(int t = 1; t <= RESTYPE_TEXTYPEMAX; t++)
|
||||
{
|
||||
@@ -868,7 +872,7 @@ void GLReplay::InitDebugData()
|
||||
eGL_DYNAMIC_READ);
|
||||
}
|
||||
|
||||
if(HasExt[ARB_compute_shader])
|
||||
if(HasExt[ARB_compute_shader] && HasExt[ARB_shading_language_420pack])
|
||||
{
|
||||
cs = GenerateGLSLShader(GetEmbeddedResource(glsl_mesh_comp), shaderType, glslCSVer);
|
||||
DebugData.meshPickProgram = CreateCShaderProgram(cs);
|
||||
@@ -1078,7 +1082,8 @@ void GLReplay::InitDebugData()
|
||||
m_Degraded = true;
|
||||
}
|
||||
|
||||
if(!HasExt[ARB_shader_image_load_store] || !HasExt[ARB_compute_shader])
|
||||
if(!HasExt[ARB_shader_image_load_store] || !HasExt[ARB_compute_shader] ||
|
||||
!HasExt[ARB_shading_language_420pack])
|
||||
{
|
||||
RDCWARN(
|
||||
"Don't have shader image load/store or compute shaders, functionality will be degraded.");
|
||||
@@ -1432,7 +1437,7 @@ bool GLReplay::GetMinMax(ResourceId texid, const Subresource &sub, CompType type
|
||||
if(texid == ResourceId() || m_pDriver->m_Textures.find(texid) == m_pDriver->m_Textures.end())
|
||||
return false;
|
||||
|
||||
if(!HasExt[ARB_compute_shader])
|
||||
if(!HasExt[ARB_compute_shader] || !HasExt[ARB_shading_language_420pack])
|
||||
return false;
|
||||
|
||||
auto &texDetails = m_pDriver->m_Textures[texid];
|
||||
@@ -1654,7 +1659,7 @@ bool GLReplay::GetHistogram(ResourceId texid, const Subresource &sub, CompType t
|
||||
if(m_pDriver->m_Textures.find(texid) == m_pDriver->m_Textures.end())
|
||||
return false;
|
||||
|
||||
if(!HasExt[ARB_compute_shader])
|
||||
if(!HasExt[ARB_compute_shader] || !HasExt[ARB_shading_language_420pack])
|
||||
return false;
|
||||
|
||||
auto &texDetails = m_pDriver->m_Textures[texid];
|
||||
@@ -1918,7 +1923,7 @@ uint32_t GLReplay::PickVertex(uint32_t eventId, int32_t width, int32_t height,
|
||||
{
|
||||
WrappedOpenGL &drv = *m_pDriver;
|
||||
|
||||
if(!HasExt[ARB_compute_shader])
|
||||
if(!HasExt[ARB_compute_shader] || !HasExt[ARB_shading_language_420pack])
|
||||
return ~0U;
|
||||
|
||||
MakeCurrentReplayContext(m_DebugCtx);
|
||||
|
||||
@@ -65,7 +65,7 @@ void WrappedOpenGL::ArrayMSPrograms::Create()
|
||||
|
||||
DepthArray2MS = DepthMS2Array = 0;
|
||||
|
||||
if(HasExt[ARB_texture_multisample])
|
||||
if(HasExt[ARB_texture_multisample] && HasExt[ARB_sample_shading])
|
||||
{
|
||||
GLuint prevProg = 0;
|
||||
GL.glGetIntegerv(eGL_CURRENT_PROGRAM, (GLint *)&prevProg);
|
||||
@@ -94,7 +94,9 @@ void WrappedOpenGL::ArrayMSPrograms::Create()
|
||||
{
|
||||
MS2Array = 0;
|
||||
Array2MS = 0;
|
||||
RDCWARN("GL_ARB_texture_multisample not supported, disabling 2DMS depth-stencil save/load.");
|
||||
RDCWARN(
|
||||
"GL_ARB_texture_multisample or GL_ARB_sample_shading not supported, disabling 2DMS "
|
||||
"depth-stencil save/load.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user