Changeset View
Changeset View
Standalone View
Standalone View
source/renderer/backend/gl/Device.cpp
Show First 20 Lines • Show All 359 Lines • ▼ Show 20 Lines | #endif | ||||
if (arb) | if (arb) | ||||
{ | { | ||||
#if !CONFIG2_GLES | #if !CONFIG2_GLES | ||||
glEnable(GL_VERTEX_PROGRAM_ARB); | glEnable(GL_VERTEX_PROGRAM_ARB); | ||||
glEnable(GL_FRAGMENT_PROGRAM_ARB); | glEnable(GL_FRAGMENT_PROGRAM_ARB); | ||||
#endif | #endif | ||||
} | } | ||||
// Some drivers might invalidate an incorrect surface which leads to artifacts. | |||||
Stan: Is that documented somewhere? I couldn't find any documentation or relevant bugs from a quick… | |||||
vladislavbelovAuthorUnsubmitted Done Inline ActionsThis feature is mostly used for mobile platforms. vladislavbelov: This feature is mostly used for mobile platforms. | |||||
StanUnsubmitted Done Inline ActionsWhy do we use it then? Stan: Why do we use it then? | |||||
vladislavbelovAuthorUnsubmitted Done Inline ActionsFor platforms like RPi where performance difference of TBR is more noticeable. vladislavbelov: For platforms like RPi where performance difference of TBR is more noticeable. | |||||
bool enableFramebufferInvalidating = false; | |||||
CFG_GET_VAL("renderer.backend.gl.enableframebufferinvalidating", enableFramebufferInvalidating); | |||||
if (enableFramebufferInvalidating) | |||||
{ | |||||
#if CONFIG2_GLES | #if CONFIG2_GLES | ||||
device->m_UseFramebufferInvalidating = ogl_HaveExtension("GL_EXT_discard_framebuffer"); | device->m_UseFramebufferInvalidating = ogl_HaveExtension("GL_EXT_discard_framebuffer"); | ||||
#else | #else | ||||
device->m_UseFramebufferInvalidating = !arb && ogl_HaveExtension("GL_ARB_invalidate_subdata"); | device->m_UseFramebufferInvalidating = !arb && ogl_HaveExtension("GL_ARB_invalidate_subdata"); | ||||
#endif | #endif | ||||
} | |||||
Capabilities& capabilities = device->m_Capabilities; | Capabilities& capabilities = device->m_Capabilities; | ||||
capabilities.ARBShaders = !ogl_HaveExtensions(0, "GL_ARB_vertex_program", "GL_ARB_fragment_program", nullptr); | capabilities.ARBShaders = !ogl_HaveExtensions(0, "GL_ARB_vertex_program", "GL_ARB_fragment_program", nullptr); | ||||
if (capabilities.ARBShaders) | if (capabilities.ARBShaders) | ||||
capabilities.ARBShadersShadow = ogl_HaveExtension("GL_ARB_fragment_program_shadow"); | capabilities.ARBShadersShadow = ogl_HaveExtension("GL_ARB_fragment_program_shadow"); | ||||
capabilities.computeShaders = ogl_HaveVersion(4, 3) || ogl_HaveExtension("GL_ARB_compute_shader"); | capabilities.computeShaders = ogl_HaveVersion(4, 3) || ogl_HaveExtension("GL_ARB_compute_shader"); | ||||
#if CONFIG2_GLES | #if CONFIG2_GLES | ||||
// Some GLES implementations have GL_EXT_texture_compression_dxt1 | // Some GLES implementations have GL_EXT_texture_compression_dxt1 | ||||
▲ Show 20 Lines • Show All 707 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
Is that documented somewhere? I couldn't find any documentation or relevant bugs from a quick google search.