Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/opengl/gl_backend.cc
| Show First 20 Lines • Show All 375 Lines • ▼ Show 20 Lines | |||||
| bool GLContext::unused_fb_slot_workaround = false; | bool GLContext::unused_fb_slot_workaround = false; | ||||
| float GLContext::derivative_signs[2] = {1.0f, 1.0f}; | float GLContext::derivative_signs[2] = {1.0f, 1.0f}; | ||||
| void GLBackend::capabilities_init(void) | void GLBackend::capabilities_init(void) | ||||
| { | { | ||||
| BLI_assert(GLEW_VERSION_3_3); | BLI_assert(GLEW_VERSION_3_3); | ||||
| /* Common Capabilities. */ | /* Common Capabilities. */ | ||||
| glGetIntegerv(GL_MAX_TEXTURE_SIZE, &GCaps.max_texture_size); | glGetIntegerv(GL_MAX_TEXTURE_SIZE, &GCaps.max_texture_size); | ||||
| /* It is not clearly defined what `GL_MAX_TEXTURE_SIZE` exactly means. Both on AMD and NVIDIA we | |||||
| * have issues when textures get this big that they don't get created. The unclarity is that gl | |||||
| * data types and mipmaps could have affect on the max texture size. It isn't clear that Vulkan has | |||||
| * a better definition so for now it is implemented as an OpenGL limitation. */ | |||||
| GCaps.max_texture_save_size = GCaps.max_texture_size * 3 / 4; | |||||
| glGetIntegerv(GL_MAX_ARRAY_TEXTURE_LAYERS, &GCaps.max_texture_layers); | glGetIntegerv(GL_MAX_ARRAY_TEXTURE_LAYERS, &GCaps.max_texture_layers); | ||||
| glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &GCaps.max_textures_frag); | glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &GCaps.max_textures_frag); | ||||
| glGetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, &GCaps.max_textures_vert); | glGetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, &GCaps.max_textures_vert); | ||||
| glGetIntegerv(GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS, &GCaps.max_textures_geom); | glGetIntegerv(GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS, &GCaps.max_textures_geom); | ||||
| glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &GCaps.max_textures); | glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &GCaps.max_textures); | ||||
| GCaps.mem_stats_support = GLEW_NVX_gpu_memory_info || GLEW_ATI_meminfo; | GCaps.mem_stats_support = GLEW_NVX_gpu_memory_info || GLEW_ATI_meminfo; | ||||
| GCaps.shader_image_load_store_support = GLEW_ARB_shader_image_load_store; | GCaps.shader_image_load_store_support = GLEW_ARB_shader_image_load_store; | ||||
| /* GL specific capabilities. */ | /* GL specific capabilities. */ | ||||
| Show All 30 Lines | |||||