mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 13:00:32 +00:00
Don't try to compile quadwrite shader if required extensions are missing
This commit is contained in:
@@ -689,6 +689,7 @@ extern bool IsGLES;
|
||||
EXT_TO_CHECK(44, 99, ARB_query_buffer_object) \
|
||||
EXT_TO_CHECK(45, 99, ARB_clip_control) \
|
||||
EXT_TO_CHECK(45, 99, ARB_direct_state_access) \
|
||||
EXT_TO_CHECK(45, 99, ARB_derivative_control) \
|
||||
EXT_TO_CHECK(46, 99, ARB_polygon_offset_clamp) \
|
||||
EXT_TO_CHECK(46, 99, ARB_texture_filter_anisotropic) \
|
||||
EXT_TO_CHECK(46, 99, ARB_pipeline_statistics_query) \
|
||||
|
||||
@@ -258,7 +258,7 @@ ResourceId GLReplay::RenderOverlay(ResourceId texid, CompType typeHint, DebugOve
|
||||
{
|
||||
std::string defines = "";
|
||||
|
||||
if(GLCoreVersion < 45)
|
||||
if(!HasExt[ARB_derivative_control])
|
||||
{
|
||||
// dFdx fine functions not available before GLSL 450. Use normal dFdx, which might be coarse,
|
||||
// so won't show quad overdraw properly
|
||||
@@ -267,14 +267,16 @@ ResourceId GLReplay::RenderOverlay(ResourceId texid, CompType typeHint, DebugOve
|
||||
|
||||
RDCWARN("Quad overdraw requires GLSL 4.50 for dFd(xy)fine, using possibly coarse dFd(xy).");
|
||||
}
|
||||
else
|
||||
{
|
||||
glslVer = 450;
|
||||
}
|
||||
|
||||
std::string source =
|
||||
GenerateGLSLShader(GetEmbeddedResource(glsl_quadwrite_frag), shaderType, glslVer, defines);
|
||||
DebugData.quadoverdrawFragShader = CreateShader(eGL_FRAGMENT_SHADER, source);
|
||||
DebugData.quadoverdrawFragShader = 0;
|
||||
|
||||
// needs these extensions
|
||||
if(HasExt[ARB_gpu_shader5] && HasExt[ARB_shader_image_load_store])
|
||||
{
|
||||
std::string source =
|
||||
GenerateGLSLShader(GetEmbeddedResource(glsl_quadwrite_frag), shaderType, glslVer, defines);
|
||||
DebugData.quadoverdrawFragShader = CreateShader(eGL_FRAGMENT_SHADER, source);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user