diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-06-23 07:41:00 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:39 +0200 |
commit | 395bed3a0af90a53be44e81eadd06f4931c8e933 (patch) | |
tree | 9c9b45a5d3c4cd72957d0bc5631c3e71106344d1 /src/video_core/renderer_opengl/gl_device.cpp | |
parent | lower_int64_to_int32: Add missing include (diff) | |
download | yuzu-395bed3a0af90a53be44e81eadd06f4931c8e933.tar yuzu-395bed3a0af90a53be44e81eadd06f4931c8e933.tar.gz yuzu-395bed3a0af90a53be44e81eadd06f4931c8e933.tar.bz2 yuzu-395bed3a0af90a53be44e81eadd06f4931c8e933.tar.lz yuzu-395bed3a0af90a53be44e81eadd06f4931c8e933.tar.xz yuzu-395bed3a0af90a53be44e81eadd06f4931c8e933.tar.zst yuzu-395bed3a0af90a53be44e81eadd06f4931c8e933.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_device.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_device.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/video_core/renderer_opengl/gl_device.cpp b/src/video_core/renderer_opengl/gl_device.cpp index b1b5ba1ab..27be347e6 100644 --- a/src/video_core/renderer_opengl/gl_device.cpp +++ b/src/video_core/renderer_opengl/gl_device.cpp @@ -17,6 +17,7 @@ #include "common/logging/log.h" #include "common/scope_exit.h" #include "common/settings.h" +#include "shader_recompiler/stage.h" #include "video_core/renderer_opengl/gl_device.h" #include "video_core/renderer_opengl/gl_resource_manager.h" @@ -59,16 +60,18 @@ bool HasExtension(std::span<const std::string_view> extensions, std::string_view return std::ranges::find(extensions, extension) != extensions.end(); } -std::array<u32, Tegra::Engines::MaxShaderTypes> BuildMaxUniformBuffers() noexcept { - std::array<u32, Tegra::Engines::MaxShaderTypes> max; - std::ranges::transform(LIMIT_UBOS, max.begin(), - [](GLenum pname) { return GetInteger<u32>(pname); }); +std::array<u32, Shader::MaxStageTypes> BuildMaxUniformBuffers() noexcept { + std::array<u32, Shader::MaxStageTypes> max; + std::ranges::transform(LIMIT_UBOS, max.begin(), &GetInteger<u32>); return max; } bool IsASTCSupported() { - static constexpr std::array targets = {GL_TEXTURE_2D, GL_TEXTURE_2D_ARRAY}; - static constexpr std::array formats = { + static constexpr std::array targets{ + GL_TEXTURE_2D, + GL_TEXTURE_2D_ARRAY, + }; + static constexpr std::array formats{ GL_COMPRESSED_RGBA_ASTC_4x4_KHR, GL_COMPRESSED_RGBA_ASTC_5x4_KHR, GL_COMPRESSED_RGBA_ASTC_5x5_KHR, GL_COMPRESSED_RGBA_ASTC_6x5_KHR, GL_COMPRESSED_RGBA_ASTC_6x6_KHR, GL_COMPRESSED_RGBA_ASTC_8x5_KHR, @@ -84,11 +87,10 @@ bool IsASTCSupported() { GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR, }; - static constexpr std::array required_support = { + static constexpr std::array required_support{ GL_VERTEX_TEXTURE, GL_TESS_CONTROL_TEXTURE, GL_TESS_EVALUATION_TEXTURE, GL_GEOMETRY_TEXTURE, GL_FRAGMENT_TEXTURE, GL_COMPUTE_TEXTURE, }; - for (const GLenum target : targets) { for (const GLenum format : formats) { for (const GLenum support : required_support) { |