diff options
| author | 2018-11-17 20:28:14 -0400 | |
|---|---|---|
| committer | 2018-11-21 11:43:17 -0400 | |
| commit | 0368260c997f9c03aa280367c5cfd6e0e82b8c88 (patch) | |
| tree | e6f13fc30ece1a7db3eac22cb990a20815c6c14f /src | |
| parent | Update OpenGL's backend version from 3.3 to 4.3 (diff) | |
| download | yuzu-0368260c997f9c03aa280367c5cfd6e0e82b8c88.tar.gz yuzu-0368260c997f9c03aa280367c5cfd6e0e82b8c88.tar.xz yuzu-0368260c997f9c03aa280367c5cfd6e0e82b8c88.zip | |
Removed pre 4.3 ARB extensions
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 5 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.h | 2 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | 16 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_state.cpp | 8 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/main.cpp | 14 | ||||
| -rw-r--r-- | src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | 14 |
7 files changed, 13 insertions, 48 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index ae6aaee4c..8e5ca298f 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp | |||
| @@ -98,14 +98,9 @@ RasterizerOpenGL::RasterizerOpenGL(Core::Frontend::EmuWindow& window, ScreenInfo | |||
| 98 | has_ARB_direct_state_access = true; | 98 | has_ARB_direct_state_access = true; |
| 99 | } else if (extension == "GL_ARB_multi_bind") { | 99 | } else if (extension == "GL_ARB_multi_bind") { |
| 100 | has_ARB_multi_bind = true; | 100 | has_ARB_multi_bind = true; |
| 101 | } else if (extension == "GL_ARB_separate_shader_objects") { | ||
| 102 | has_ARB_separate_shader_objects = true; | ||
| 103 | } else if (extension == "GL_ARB_vertex_attrib_binding") { | ||
| 104 | has_ARB_vertex_attrib_binding = true; | ||
| 105 | } | 101 | } |
| 106 | } | 102 | } |
| 107 | 103 | ||
| 108 | ASSERT_MSG(has_ARB_separate_shader_objects, "has_ARB_separate_shader_objects is unsupported"); | ||
| 109 | OpenGLState::ApplyDefaultState(); | 104 | OpenGLState::ApplyDefaultState(); |
| 110 | 105 | ||
| 111 | // Create render framebuffer | 106 | // Create render framebuffer |
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.h b/src/video_core/renderer_opengl/gl_rasterizer.h index 6e78ab4cd..fd6c8c3c5 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.h +++ b/src/video_core/renderer_opengl/gl_rasterizer.h | |||
| @@ -187,8 +187,6 @@ private: | |||
| 187 | 187 | ||
| 188 | bool has_ARB_direct_state_access = false; | 188 | bool has_ARB_direct_state_access = false; |
| 189 | bool has_ARB_multi_bind = false; | 189 | bool has_ARB_multi_bind = false; |
| 190 | bool has_ARB_separate_shader_objects = false; | ||
| 191 | bool has_ARB_vertex_attrib_binding = false; | ||
| 192 | 190 | ||
| 193 | OpenGLState state; | 191 | OpenGLState state; |
| 194 | 192 | ||
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp index 9ca82c06c..83e6a4b50 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | |||
| @@ -265,11 +265,11 @@ static constexpr std::array<FormatTuple, VideoCore::Surface::MaxPixelFormat> tex | |||
| 265 | {GL_COMPRESSED_RG_RGTC2, GL_RG, GL_UNSIGNED_INT_8_8_8_8, ComponentType::UNorm, | 265 | {GL_COMPRESSED_RG_RGTC2, GL_RG, GL_UNSIGNED_INT_8_8_8_8, ComponentType::UNorm, |
| 266 | true}, // DXN2UNORM | 266 | true}, // DXN2UNORM |
| 267 | {GL_COMPRESSED_SIGNED_RG_RGTC2, GL_RG, GL_INT, ComponentType::SNorm, true}, // DXN2SNORM | 267 | {GL_COMPRESSED_SIGNED_RG_RGTC2, GL_RG, GL_INT, ComponentType::SNorm, true}, // DXN2SNORM |
| 268 | {GL_COMPRESSED_RGBA_BPTC_UNORM_ARB, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, ComponentType::UNorm, | 268 | {GL_COMPRESSED_RGBA_BPTC_UNORM, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, ComponentType::UNorm, |
| 269 | true}, // BC7U | 269 | true}, // BC7U |
| 270 | {GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB, GL_RGB, GL_UNSIGNED_INT_8_8_8_8, | 270 | {GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT, GL_RGB, GL_UNSIGNED_INT_8_8_8_8, ComponentType::Float, |
| 271 | ComponentType::Float, true}, // BC6H_UF16 | 271 | true}, // BC6H_UF16 |
| 272 | {GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB, GL_RGB, GL_UNSIGNED_INT_8_8_8_8, ComponentType::Float, | 272 | {GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT, GL_RGB, GL_UNSIGNED_INT_8_8_8_8, ComponentType::Float, |
| 273 | true}, // BC6H_SF16 | 273 | true}, // BC6H_SF16 |
| 274 | {GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE, ComponentType::UNorm, false}, // ASTC_2D_4X4 | 274 | {GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE, ComponentType::UNorm, false}, // ASTC_2D_4X4 |
| 275 | {GL_RG8, GL_RG, GL_UNSIGNED_BYTE, ComponentType::UNorm, false}, // G8R8U | 275 | {GL_RG8, GL_RG, GL_UNSIGNED_BYTE, ComponentType::UNorm, false}, // G8R8U |
| @@ -306,8 +306,8 @@ static constexpr std::array<FormatTuple, VideoCore::Surface::MaxPixelFormat> tex | |||
| 306 | true}, // DXT23_SRGB | 306 | true}, // DXT23_SRGB |
| 307 | {GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, ComponentType::UNorm, | 307 | {GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, ComponentType::UNorm, |
| 308 | true}, // DXT45_SRGB | 308 | true}, // DXT45_SRGB |
| 309 | {GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, | 309 | {GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, ComponentType::UNorm, |
| 310 | ComponentType::UNorm, true}, // BC7U_SRGB | 310 | true}, // BC7U_SRGB |
| 311 | {GL_SRGB8_ALPHA8, GL_RGBA, GL_UNSIGNED_BYTE, ComponentType::UNorm, false}, // ASTC_2D_4X4_SRGB | 311 | {GL_SRGB8_ALPHA8, GL_RGBA, GL_UNSIGNED_BYTE, ComponentType::UNorm, false}, // ASTC_2D_4X4_SRGB |
| 312 | {GL_SRGB8_ALPHA8, GL_RGBA, GL_UNSIGNED_BYTE, ComponentType::UNorm, false}, // ASTC_2D_8X8_SRGB | 312 | {GL_SRGB8_ALPHA8, GL_RGBA, GL_UNSIGNED_BYTE, ComponentType::UNorm, false}, // ASTC_2D_8X8_SRGB |
| 313 | {GL_SRGB8_ALPHA8, GL_RGBA, GL_UNSIGNED_BYTE, ComponentType::UNorm, false}, // ASTC_2D_8X5_SRGB | 313 | {GL_SRGB8_ALPHA8, GL_RGBA, GL_UNSIGNED_BYTE, ComponentType::UNorm, false}, // ASTC_2D_8X5_SRGB |
| @@ -346,7 +346,7 @@ static GLenum SurfaceTargetToGL(SurfaceTarget target) { | |||
| 346 | case SurfaceTarget::TextureCubemap: | 346 | case SurfaceTarget::TextureCubemap: |
| 347 | return GL_TEXTURE_CUBE_MAP; | 347 | return GL_TEXTURE_CUBE_MAP; |
| 348 | case SurfaceTarget::TextureCubeArray: | 348 | case SurfaceTarget::TextureCubeArray: |
| 349 | return GL_TEXTURE_CUBE_MAP_ARRAY_ARB; | 349 | return GL_TEXTURE_CUBE_MAP_ARRAY; |
| 350 | } | 350 | } |
| 351 | LOG_CRITICAL(Render_OpenGL, "Unimplemented texture target={}", static_cast<u32>(target)); | 351 | LOG_CRITICAL(Render_OpenGL, "Unimplemented texture target={}", static_cast<u32>(target)); |
| 352 | UNREACHABLE(); | 352 | UNREACHABLE(); |
| @@ -726,7 +726,7 @@ static void CopySurface(const Surface& src_surface, const Surface& dst_surface, | |||
| 726 | const std::size_t buffer_size = std::max(src_params.size_in_bytes, dst_params.size_in_bytes); | 726 | const std::size_t buffer_size = std::max(src_params.size_in_bytes, dst_params.size_in_bytes); |
| 727 | 727 | ||
| 728 | glBindBuffer(GL_PIXEL_PACK_BUFFER, copy_pbo_handle); | 728 | glBindBuffer(GL_PIXEL_PACK_BUFFER, copy_pbo_handle); |
| 729 | glBufferData(GL_PIXEL_PACK_BUFFER, buffer_size, nullptr, GL_STREAM_DRAW_ARB); | 729 | glBufferData(GL_PIXEL_PACK_BUFFER, buffer_size, nullptr, GL_STREAM_DRAW); |
| 730 | if (source_format.compressed) { | 730 | if (source_format.compressed) { |
| 731 | glGetCompressedTextureImage(src_surface->Texture().handle, src_attachment, | 731 | glGetCompressedTextureImage(src_surface->Texture().handle, src_attachment, |
| 732 | static_cast<GLsizei>(src_params.size_in_bytes), nullptr); | 732 | static_cast<GLsizei>(src_params.size_in_bytes), nullptr); |
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp index d9910c6e8..9f96b2745 100644 --- a/src/video_core/renderer_opengl/gl_state.cpp +++ b/src/video_core/renderer_opengl/gl_state.cpp | |||
| @@ -339,14 +339,14 @@ void OpenGLState::ApplyTargetBlending(std::size_t target, bool force) const { | |||
| 339 | if (blend_changed || updated.src_rgb_func != current.src_rgb_func || | 339 | if (blend_changed || updated.src_rgb_func != current.src_rgb_func || |
| 340 | updated.dst_rgb_func != current.dst_rgb_func || updated.src_a_func != current.src_a_func || | 340 | updated.dst_rgb_func != current.dst_rgb_func || updated.src_a_func != current.src_a_func || |
| 341 | updated.dst_a_func != current.dst_a_func) { | 341 | updated.dst_a_func != current.dst_a_func) { |
| 342 | glBlendFuncSeparateiARB(static_cast<GLuint>(target), updated.src_rgb_func, | 342 | glBlendFuncSeparatei(static_cast<GLuint>(target), updated.src_rgb_func, |
| 343 | updated.dst_rgb_func, updated.src_a_func, updated.dst_a_func); | 343 | updated.dst_rgb_func, updated.src_a_func, updated.dst_a_func); |
| 344 | } | 344 | } |
| 345 | 345 | ||
| 346 | if (blend_changed || updated.rgb_equation != current.rgb_equation || | 346 | if (blend_changed || updated.rgb_equation != current.rgb_equation || |
| 347 | updated.a_equation != current.a_equation) { | 347 | updated.a_equation != current.a_equation) { |
| 348 | glBlendEquationSeparateiARB(static_cast<GLuint>(target), updated.rgb_equation, | 348 | glBlendEquationSeparatei(static_cast<GLuint>(target), updated.rgb_equation, |
| 349 | updated.a_equation); | 349 | updated.a_equation); |
| 350 | } | 350 | } |
| 351 | } | 351 | } |
| 352 | 352 | ||
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index ea38da932..aad0b07ca 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp | |||
| @@ -484,7 +484,7 @@ bool RendererOpenGL::Init() { | |||
| 484 | Core::Telemetry().AddField(Telemetry::FieldType::UserSystem, "GPU_Model", gpu_model); | 484 | Core::Telemetry().AddField(Telemetry::FieldType::UserSystem, "GPU_Model", gpu_model); |
| 485 | Core::Telemetry().AddField(Telemetry::FieldType::UserSystem, "GPU_OpenGL_Version", gl_version); | 485 | Core::Telemetry().AddField(Telemetry::FieldType::UserSystem, "GPU_OpenGL_Version", gl_version); |
| 486 | 486 | ||
| 487 | if (!GLAD_GL_VERSION_3_3) { | 487 | if (!GLAD_GL_VERSION_4_3) { |
| 488 | return false; | 488 | return false; |
| 489 | } | 489 | } |
| 490 | 490 | ||
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 451a3fafd..9c6d150a5 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -518,32 +518,18 @@ void GMainWindow::OnDisplayTitleBars(bool show) { | |||
| 518 | QStringList GMainWindow::GetUnsupportedGLExtensions() { | 518 | QStringList GMainWindow::GetUnsupportedGLExtensions() { |
| 519 | QStringList unsupported_ext; | 519 | QStringList unsupported_ext; |
| 520 | 520 | ||
| 521 | if (!GLAD_GL_ARB_program_interface_query) | ||
| 522 | unsupported_ext.append("ARB_program_interface_query"); | ||
| 523 | if (!GLAD_GL_ARB_separate_shader_objects) | ||
| 524 | unsupported_ext.append("ARB_separate_shader_objects"); | ||
| 525 | if (!GLAD_GL_ARB_vertex_attrib_binding) | ||
| 526 | unsupported_ext.append("ARB_vertex_attrib_binding"); | ||
| 527 | if (!GLAD_GL_ARB_vertex_type_10f_11f_11f_rev) | 521 | if (!GLAD_GL_ARB_vertex_type_10f_11f_11f_rev) |
| 528 | unsupported_ext.append("ARB_vertex_type_10f_11f_11f_rev"); | 522 | unsupported_ext.append("ARB_vertex_type_10f_11f_11f_rev"); |
| 529 | if (!GLAD_GL_ARB_texture_mirror_clamp_to_edge) | 523 | if (!GLAD_GL_ARB_texture_mirror_clamp_to_edge) |
| 530 | unsupported_ext.append("ARB_texture_mirror_clamp_to_edge"); | 524 | unsupported_ext.append("ARB_texture_mirror_clamp_to_edge"); |
| 531 | if (!GLAD_GL_ARB_base_instance) | ||
| 532 | unsupported_ext.append("ARB_base_instance"); | ||
| 533 | if (!GLAD_GL_ARB_texture_storage) | ||
| 534 | unsupported_ext.append("ARB_texture_storage"); | ||
| 535 | if (!GLAD_GL_ARB_multi_bind) | 525 | if (!GLAD_GL_ARB_multi_bind) |
| 536 | unsupported_ext.append("ARB_multi_bind"); | 526 | unsupported_ext.append("ARB_multi_bind"); |
| 537 | if (!GLAD_GL_ARB_copy_image) | ||
| 538 | unsupported_ext.append("ARB_copy_image"); | ||
| 539 | 527 | ||
| 540 | // Extensions required to support some texture formats. | 528 | // Extensions required to support some texture formats. |
| 541 | if (!GLAD_GL_EXT_texture_compression_s3tc) | 529 | if (!GLAD_GL_EXT_texture_compression_s3tc) |
| 542 | unsupported_ext.append("EXT_texture_compression_s3tc"); | 530 | unsupported_ext.append("EXT_texture_compression_s3tc"); |
| 543 | if (!GLAD_GL_ARB_texture_compression_rgtc) | 531 | if (!GLAD_GL_ARB_texture_compression_rgtc) |
| 544 | unsupported_ext.append("ARB_texture_compression_rgtc"); | 532 | unsupported_ext.append("ARB_texture_compression_rgtc"); |
| 545 | if (!GLAD_GL_ARB_texture_compression_bptc) | ||
| 546 | unsupported_ext.append("ARB_texture_compression_bptc"); | ||
| 547 | if (!GLAD_GL_ARB_depth_buffer_float) | 533 | if (!GLAD_GL_ARB_depth_buffer_float) |
| 548 | unsupported_ext.append("ARB_depth_buffer_float"); | 534 | unsupported_ext.append("ARB_depth_buffer_float"); |
| 549 | 535 | ||
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp index d53d2e3ce..2d6f8cced 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | |||
| @@ -111,32 +111,18 @@ void EmuWindow_SDL2::Fullscreen() { | |||
| 111 | bool EmuWindow_SDL2::SupportsRequiredGLExtensions() { | 111 | bool EmuWindow_SDL2::SupportsRequiredGLExtensions() { |
| 112 | std::vector<std::string> unsupported_ext; | 112 | std::vector<std::string> unsupported_ext; |
| 113 | 113 | ||
| 114 | if (!GLAD_GL_ARB_program_interface_query) | ||
| 115 | unsupported_ext.push_back("ARB_program_interface_query"); | ||
| 116 | if (!GLAD_GL_ARB_separate_shader_objects) | ||
| 117 | unsupported_ext.push_back("ARB_separate_shader_objects"); | ||
| 118 | if (!GLAD_GL_ARB_vertex_attrib_binding) | ||
| 119 | unsupported_ext.push_back("ARB_vertex_attrib_binding"); | ||
| 120 | if (!GLAD_GL_ARB_vertex_type_10f_11f_11f_rev) | 114 | if (!GLAD_GL_ARB_vertex_type_10f_11f_11f_rev) |
| 121 | unsupported_ext.push_back("ARB_vertex_type_10f_11f_11f_rev"); | 115 | unsupported_ext.push_back("ARB_vertex_type_10f_11f_11f_rev"); |
| 122 | if (!GLAD_GL_ARB_texture_mirror_clamp_to_edge) | 116 | if (!GLAD_GL_ARB_texture_mirror_clamp_to_edge) |
| 123 | unsupported_ext.push_back("ARB_texture_mirror_clamp_to_edge"); | 117 | unsupported_ext.push_back("ARB_texture_mirror_clamp_to_edge"); |
| 124 | if (!GLAD_GL_ARB_base_instance) | ||
| 125 | unsupported_ext.push_back("ARB_base_instance"); | ||
| 126 | if (!GLAD_GL_ARB_texture_storage) | ||
| 127 | unsupported_ext.push_back("ARB_texture_storage"); | ||
| 128 | if (!GLAD_GL_ARB_multi_bind) | 118 | if (!GLAD_GL_ARB_multi_bind) |
| 129 | unsupported_ext.push_back("ARB_multi_bind"); | 119 | unsupported_ext.push_back("ARB_multi_bind"); |
| 130 | if (!GLAD_GL_ARB_copy_image) | ||
| 131 | unsupported_ext.push_back("ARB_copy_image"); | ||
| 132 | 120 | ||
| 133 | // Extensions required to support some texture formats. | 121 | // Extensions required to support some texture formats. |
| 134 | if (!GLAD_GL_EXT_texture_compression_s3tc) | 122 | if (!GLAD_GL_EXT_texture_compression_s3tc) |
| 135 | unsupported_ext.push_back("EXT_texture_compression_s3tc"); | 123 | unsupported_ext.push_back("EXT_texture_compression_s3tc"); |
| 136 | if (!GLAD_GL_ARB_texture_compression_rgtc) | 124 | if (!GLAD_GL_ARB_texture_compression_rgtc) |
| 137 | unsupported_ext.push_back("ARB_texture_compression_rgtc"); | 125 | unsupported_ext.push_back("ARB_texture_compression_rgtc"); |
| 138 | if (!GLAD_GL_ARB_texture_compression_bptc) | ||
| 139 | unsupported_ext.push_back("ARB_texture_compression_bptc"); | ||
| 140 | if (!GLAD_GL_ARB_depth_buffer_float) | 126 | if (!GLAD_GL_ARB_depth_buffer_float) |
| 141 | unsupported_ext.push_back("ARB_depth_buffer_float"); | 127 | unsupported_ext.push_back("ARB_depth_buffer_float"); |
| 142 | 128 | ||