summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-09-02 02:36:26 +0200
committerGitHub <noreply@github.com>2021-09-02 02:36:26 +0200
commitb2572a56d3ab3c327f766d718bbdd16be6bc1635 (patch)
treec02a5e36766a4f94338c015f7c560e6bca63656f /src/video_core
parentMerge pull request #6951 from german77/log (diff)
parentstructured_control_flow: Skip reordering nested demote branches. (diff)
downloadyuzu-b2572a56d3ab3c327f766d718bbdd16be6bc1635.tar
yuzu-b2572a56d3ab3c327f766d718bbdd16be6bc1635.tar.gz
yuzu-b2572a56d3ab3c327f766d718bbdd16be6bc1635.tar.bz2
yuzu-b2572a56d3ab3c327f766d718bbdd16be6bc1635.tar.lz
yuzu-b2572a56d3ab3c327f766d718bbdd16be6bc1635.tar.xz
yuzu-b2572a56d3ab3c327f766d718bbdd16be6bc1635.tar.zst
yuzu-b2572a56d3ab3c327f766d718bbdd16be6bc1635.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_opengl/gl_device.h4
-rw-r--r--src/video_core/renderer_opengl/gl_shader_cache.cpp1
-rw-r--r--src/video_core/renderer_vulkan/vk_pipeline_cache.cpp2
3 files changed, 7 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_device.h b/src/video_core/renderer_opengl/gl_device.h
index ee992aed4..de9e41659 100644
--- a/src/video_core/renderer_opengl/gl_device.h
+++ b/src/video_core/renderer_opengl/gl_device.h
@@ -156,6 +156,10 @@ public:
return shader_backend;
}
+ bool IsAmd() const {
+ return vendor_name == "ATI Technologies Inc.";
+ }
+
private:
static bool TestVariableAoffi();
static bool TestPreciseBug();
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp
index 1f4dda17e..b0e14182e 100644
--- a/src/video_core/renderer_opengl/gl_shader_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp
@@ -219,6 +219,7 @@ ShaderCache::ShaderCache(RasterizerOpenGL& rasterizer_, Core::Frontend::EmuWindo
host_info{
.support_float16 = false,
.support_int64 = device.HasShaderInt64(),
+ .needs_demote_reorder = device.IsAmd(),
} {
if (use_asynchronous_shaders) {
workers = CreateWorkers();
diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
index f316c4f92..31bfbcb06 100644
--- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
@@ -325,6 +325,8 @@ PipelineCache::PipelineCache(RasterizerVulkan& rasterizer_, Tegra::Engines::Maxw
host_info = Shader::HostTranslateInfo{
.support_float16 = device.IsFloat16Supported(),
.support_int64 = device.IsShaderInt64Supported(),
+ .needs_demote_reorder = driver_id == VK_DRIVER_ID_AMD_PROPRIETARY_KHR ||
+ driver_id == VK_DRIVER_ID_AMD_OPEN_SOURCE_KHR,
};
}