summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2019-12-14 16:04:31 -0500
committerGravatar GitHub2019-12-14 16:04:31 -0500
commit035ec7d9de1b9d839f2d538af73858540d533271 (patch)
treed3d6220099fd5386b89db897137ace98b4ead5ba /src
parentMerge pull request #3212 from ReinUsesLisp/fix-smem-lmem (diff)
parentgl_device: Enable compute shaders for Intel Mesa drivers (diff)
downloadyuzu-035ec7d9de1b9d839f2d538af73858540d533271.tar.gz
yuzu-035ec7d9de1b9d839f2d538af73858540d533271.tar.xz
yuzu-035ec7d9de1b9d839f2d538af73858540d533271.zip
Merge pull request #3213 from ReinUsesLisp/intel-mesa
gl_device: Enable compute shaders for Intel Mesa drivers
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_device.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_device.cpp b/src/video_core/renderer_opengl/gl_device.cpp
index 413d8546b..1a2e2a9f7 100644
--- a/src/video_core/renderer_opengl/gl_device.cpp
+++ b/src/video_core/renderer_opengl/gl_device.cpp
@@ -5,6 +5,7 @@
5#include <algorithm> 5#include <algorithm>
6#include <array> 6#include <array>
7#include <cstddef> 7#include <cstddef>
8#include <cstring>
8#include <optional> 9#include <optional>
9#include <vector> 10#include <vector>
10 11
@@ -134,11 +135,13 @@ std::array<Device::BaseBindings, Tegra::Engines::MaxShaderTypes> BuildBaseBindin
134 135
135Device::Device() : base_bindings{BuildBaseBindings()} { 136Device::Device() : base_bindings{BuildBaseBindings()} {
136 const std::string_view vendor = reinterpret_cast<const char*>(glGetString(GL_VENDOR)); 137 const std::string_view vendor = reinterpret_cast<const char*>(glGetString(GL_VENDOR));
138 const auto renderer = reinterpret_cast<const char*>(glGetString(GL_RENDERER));
137 const std::vector extensions = GetExtensions(); 139 const std::vector extensions = GetExtensions();
138 140
139 const bool is_nvidia = vendor == "NVIDIA Corporation"; 141 const bool is_nvidia = vendor == "NVIDIA Corporation";
140 const bool is_amd = vendor == "ATI Technologies Inc."; 142 const bool is_amd = vendor == "ATI Technologies Inc.";
141 const bool is_intel = vendor == "Intel"; 143 const bool is_intel = vendor == "Intel";
144 const bool is_intel_proprietary = is_intel && std::strstr(renderer, "Mesa") == nullptr;
142 145
143 uniform_buffer_alignment = GetInteger<std::size_t>(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT); 146 uniform_buffer_alignment = GetInteger<std::size_t>(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT);
144 shader_storage_alignment = GetInteger<std::size_t>(GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT); 147 shader_storage_alignment = GetInteger<std::size_t>(GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT);
@@ -152,7 +155,7 @@ Device::Device() : base_bindings{BuildBaseBindings()} {
152 has_variable_aoffi = TestVariableAoffi(); 155 has_variable_aoffi = TestVariableAoffi();
153 has_component_indexing_bug = is_amd; 156 has_component_indexing_bug = is_amd;
154 has_precise_bug = TestPreciseBug(); 157 has_precise_bug = TestPreciseBug();
155 has_broken_compute = is_intel; 158 has_broken_compute = is_intel_proprietary;
156 has_fast_buffer_sub_data = is_nvidia; 159 has_fast_buffer_sub_data = is_nvidia;
157 160
158 LOG_INFO(Render_OpenGL, "Renderer_VariableAOFFI: {}", has_variable_aoffi); 161 LOG_INFO(Render_OpenGL, "Renderer_VariableAOFFI: {}", has_variable_aoffi);