summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-05-26 01:55:40 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:36 +0200
commitbd24fa97138ff1e33a7f8d3c30a4f4482a6482a8 (patch)
tree5ae0c1d535a258dbe45d7aecccf925f6d1ab62f5 /src/video_core
parentglsl: Simply FP storage atomics (diff)
downloadyuzu-bd24fa97138ff1e33a7f8d3c30a4f4482a6482a8.tar
yuzu-bd24fa97138ff1e33a7f8d3c30a4f4482a6482a8.tar.gz
yuzu-bd24fa97138ff1e33a7f8d3c30a4f4482a6482a8.tar.bz2
yuzu-bd24fa97138ff1e33a7f8d3c30a4f4482a6482a8.tar.lz
yuzu-bd24fa97138ff1e33a7f8d3c30a4f4482a6482a8.tar.xz
yuzu-bd24fa97138ff1e33a7f8d3c30a4f4482a6482a8.tar.zst
yuzu-bd24fa97138ff1e33a7f8d3c30a4f4482a6482a8.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_opengl/gl_device.cpp2
-rw-r--r--src/video_core/renderer_opengl/gl_device.h10
-rw-r--r--src/video_core/renderer_opengl/gl_shader_cache.cpp2
3 files changed, 14 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_device.cpp b/src/video_core/renderer_opengl/gl_device.cpp
index 3f7929f9e..071133781 100644
--- a/src/video_core/renderer_opengl/gl_device.cpp
+++ b/src/video_core/renderer_opengl/gl_device.cpp
@@ -158,6 +158,8 @@ Device::Device() {
has_vertex_buffer_unified_memory = GLAD_GL_NV_vertex_buffer_unified_memory;
has_debugging_tool_attached = IsDebugToolAttached(extensions);
has_depth_buffer_float = HasExtension(extensions, "GL_NV_depth_buffer_float");
+ has_nv_gpu_shader_5 = GLAD_GL_NV_gpu_shader5;
+ has_amd_shader_half_float = GLAD_GL_AMD_gpu_shader_half_float;
// At the moment of writing this, only Nvidia's driver optimizes BufferSubData on exclusive
// uniform buffers as "push constants"
diff --git a/src/video_core/renderer_opengl/gl_device.h b/src/video_core/renderer_opengl/gl_device.h
index 1ffd24883..9b9402c29 100644
--- a/src/video_core/renderer_opengl/gl_device.h
+++ b/src/video_core/renderer_opengl/gl_device.h
@@ -120,6 +120,14 @@ public:
return has_depth_buffer_float;
}
+ bool HasNvGpuShader5() const {
+ return has_nv_gpu_shader_5;
+ }
+
+ bool HasAmdShaderHalfFloat() const {
+ return has_amd_shader_half_float;
+ }
+
private:
static bool TestVariableAoffi();
static bool TestPreciseBug();
@@ -151,6 +159,8 @@ private:
bool use_asynchronous_shaders{};
bool use_driver_cache{};
bool has_depth_buffer_float{};
+ bool has_nv_gpu_shader_5{};
+ bool has_amd_shader_half_float{};
};
} // namespace OpenGL
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp
index 602cf025b..e00d01e34 100644
--- a/src/video_core/renderer_opengl/gl_shader_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp
@@ -217,6 +217,8 @@ ShaderCache::ShaderCache(RasterizerOpenGL& rasterizer_, Core::Frontend::EmuWindo
.support_demote_to_helper_invocation = false,
.support_int64_atomics = false,
.support_derivative_control = device.HasDerivativeControl(),
+ .support_gl_nv_gpu_shader_5 = device.HasNvGpuShader5(),
+ .support_gl_amd_gpu_shader_half_float = device.HasAmdShaderHalfFloat(),
.warp_size_potentially_larger_than_guest = true,