Merge branch 'blender-v4.2-release'

This commit is contained in:
Campbell Barton 2024-07-02 17:06:35 +10:00
commit dffc47e6cf
3 changed files with 20 additions and 1 deletions

@ -301,7 +301,6 @@ static void detect_workarounds()
GCaps.depth_blitting_workaround = true;
GCaps.mip_render_workaround = true;
GLContext::debug_layer_workaround = true;
GLContext::unused_fb_slot_workaround = true;
/* Turn off Blender features. */
GCaps.hdr_viewport_support = false;
/* Turn off OpenGL 4.4 features. */

@ -384,6 +384,12 @@ void GLFrameBuffer::bind(bool enabled_srgb)
}
}
if (!GLContext::texture_barrier_support && !GLContext::framebuffer_fetch_support) {
for (int index : IndexRange(GPU_FB_MAX_ATTACHMENT)) {
tmp_detached_[index] = GPU_ATTACHMENT_NONE;
}
}
if (dirty_attachments_) {
this->update_attachments();
this->viewport_reset();

@ -52,8 +52,22 @@ class GPUOpenGLTest : public GPUTest {
{
}
};
class GPUOpenGLWorkaroundsTest : public GPUTest {
public:
GPUOpenGLWorkaroundsTest()
: GPUTest(GHOST_kDrawingContextTypeOpenGL,
GPU_BACKEND_OPENGL,
G_DEBUG_GPU | G_DEBUG_GPU_FORCE_WORKAROUNDS)
{
}
};
# define GPU_OPENGL_TEST(test_name) \
TEST_F(GPUOpenGLTest, test_name) \
{ \
test_##test_name(); \
} \
TEST_F(GPUOpenGLWorkaroundsTest, test_name) \
{ \
test_##test_name(); \
}