diff options
Diffstat (limited to 'source/blender/gpu/opengl/gl_backend.cc')
-rw-r--r-- | source/blender/gpu/opengl/gl_backend.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/gpu/opengl/gl_backend.cc b/source/blender/gpu/opengl/gl_backend.cc index 24ca8c25bc0..2375e78d9f1 100644 --- a/source/blender/gpu/opengl/gl_backend.cc +++ b/source/blender/gpu/opengl/gl_backend.cc @@ -386,6 +386,11 @@ static void detect_workarounds() } } + /* Disable TF on macOS. */ + if (GPU_type_matches(GPU_DEVICE_ANY, GPU_OS_MAC, GPU_DRIVER_ANY)) { + GCaps.transform_feedback_support = false; + } + /* Some Intel drivers have issues with using mips as frame-buffer targets if * GL_TEXTURE_MAX_LEVEL is higher than the target MIP. * Only check at the end after all other workarounds because this uses the drawing code. @@ -431,7 +436,6 @@ static void detect_workarounds() /** Internal capabilities. */ GLint GLContext::max_cubemap_size = 0; -GLint GLContext::max_texture_3d_size = 0; GLint GLContext::max_ubo_binds = 0; GLint GLContext::max_ubo_size = 0; GLint GLContext::max_ssbo_binds = 0; @@ -499,6 +503,8 @@ void GLBackend::capabilities_init() GCaps.shader_draw_parameters_support = epoxy_has_gl_extension("GL_ARB_shader_draw_parameters"); GCaps.compute_shader_support = epoxy_has_gl_extension("GL_ARB_compute_shader") && epoxy_gl_version() >= 43; + GCaps.max_samplers = GCaps.max_textures; + if (GCaps.compute_shader_support) { glGetIntegeri_v(GL_MAX_COMPUTE_WORK_GROUP_COUNT, 0, &GCaps.max_work_group_count[0]); glGetIntegeri_v(GL_MAX_COMPUTE_WORK_GROUP_COUNT, 1, &GCaps.max_work_group_count[1]); @@ -512,8 +518,10 @@ void GLBackend::capabilities_init() } GCaps.shader_storage_buffer_objects_support = epoxy_has_gl_extension( "GL_ARB_shader_storage_buffer_object"); + GCaps.transform_feedback_support = true; + /* GL specific capabilities. */ - glGetIntegerv(GL_MAX_3D_TEXTURE_SIZE, &GLContext::max_texture_3d_size); + glGetIntegerv(GL_MAX_3D_TEXTURE_SIZE, &GCaps.max_texture_3d_size); glGetIntegerv(GL_MAX_CUBE_MAP_TEXTURE_SIZE, &GLContext::max_cubemap_size); glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_BLOCKS, &GLContext::max_ubo_binds); glGetIntegerv(GL_MAX_UNIFORM_BLOCK_SIZE, &GLContext::max_ubo_size); |