diff options
| author | 2021-05-30 00:53:26 -0400 | |
|---|---|---|
| committer | 2021-07-22 21:51:36 -0400 | |
| commit | e35ffbbeb0f85f676416fcb8f0bb0207671f379d (patch) | |
| tree | d33fca2f27f8c680c43dfb34da8abd738b0a5705 /src/video_core | |
| parent | glsl: Implement VOTE (diff) | |
| download | yuzu-e35ffbbeb0f85f676416fcb8f0bb0207671f379d.tar.gz yuzu-e35ffbbeb0f85f676416fcb8f0bb0207671f379d.tar.xz yuzu-e35ffbbeb0f85f676416fcb8f0bb0207671f379d.zip | |
glsl: Implement VOTE for subgroup size potentially larger
Diffstat (limited to 'src/video_core')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_device.cpp | 1 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_device.h | 5 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_cache.cpp | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_device.cpp b/src/video_core/renderer_opengl/gl_device.cpp index 071133781..20ea42cff 100644 --- a/src/video_core/renderer_opengl/gl_device.cpp +++ b/src/video_core/renderer_opengl/gl_device.cpp | |||
| @@ -160,6 +160,7 @@ Device::Device() { | |||
| 160 | has_depth_buffer_float = HasExtension(extensions, "GL_NV_depth_buffer_float"); | 160 | has_depth_buffer_float = HasExtension(extensions, "GL_NV_depth_buffer_float"); |
| 161 | has_nv_gpu_shader_5 = GLAD_GL_NV_gpu_shader5; | 161 | has_nv_gpu_shader_5 = GLAD_GL_NV_gpu_shader5; |
| 162 | has_amd_shader_half_float = GLAD_GL_AMD_gpu_shader_half_float; | 162 | has_amd_shader_half_float = GLAD_GL_AMD_gpu_shader_half_float; |
| 163 | warp_size_potentially_larger_than_guest = !is_nvidia && !is_intel; | ||
| 163 | 164 | ||
| 164 | // At the moment of writing this, only Nvidia's driver optimizes BufferSubData on exclusive | 165 | // At the moment of writing this, only Nvidia's driver optimizes BufferSubData on exclusive |
| 165 | // uniform buffers as "push constants" | 166 | // 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 9b9402c29..ff0ff2b08 100644 --- a/src/video_core/renderer_opengl/gl_device.h +++ b/src/video_core/renderer_opengl/gl_device.h | |||
| @@ -128,6 +128,10 @@ public: | |||
| 128 | return has_amd_shader_half_float; | 128 | return has_amd_shader_half_float; |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | bool IsWarpSizePotentiallyLargerThanGuest() const { | ||
| 132 | return warp_size_potentially_larger_than_guest; | ||
| 133 | } | ||
| 134 | |||
| 131 | private: | 135 | private: |
| 132 | static bool TestVariableAoffi(); | 136 | static bool TestVariableAoffi(); |
| 133 | static bool TestPreciseBug(); | 137 | static bool TestPreciseBug(); |
| @@ -161,6 +165,7 @@ private: | |||
| 161 | bool has_depth_buffer_float{}; | 165 | bool has_depth_buffer_float{}; |
| 162 | bool has_nv_gpu_shader_5{}; | 166 | bool has_nv_gpu_shader_5{}; |
| 163 | bool has_amd_shader_half_float{}; | 167 | bool has_amd_shader_half_float{}; |
| 168 | bool warp_size_potentially_larger_than_guest{}; | ||
| 164 | }; | 169 | }; |
| 165 | 170 | ||
| 166 | } // namespace OpenGL | 171 | } // 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 8a052851b..cd11ff653 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp | |||
| @@ -220,7 +220,7 @@ ShaderCache::ShaderCache(RasterizerOpenGL& rasterizer_, Core::Frontend::EmuWindo | |||
| 220 | .support_gl_nv_gpu_shader_5 = device.HasNvGpuShader5(), | 220 | .support_gl_nv_gpu_shader_5 = device.HasNvGpuShader5(), |
| 221 | .support_gl_amd_gpu_shader_half_float = device.HasAmdShaderHalfFloat(), | 221 | .support_gl_amd_gpu_shader_half_float = device.HasAmdShaderHalfFloat(), |
| 222 | 222 | ||
| 223 | .warp_size_potentially_larger_than_guest = true, | 223 | .warp_size_potentially_larger_than_guest = device.IsWarpSizePotentiallyLargerThanGuest(), |
| 224 | 224 | ||
| 225 | .lower_left_origin_mode = true, | 225 | .lower_left_origin_mode = true, |
| 226 | .need_declared_frag_colors = true, | 226 | .need_declared_frag_colors = true, |