Merge pull request #10699 from liamwhite/conditional-barrier

shader_recompiler: remove barriers in conditional control flow when device lacks support
This commit is contained in:
Matías Locatti 2023-06-12 16:50:59 -03:00 committed by GitHub
commit 42b2bc204f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 65 additions and 0 deletions

View file

@ -201,6 +201,7 @@ Device::Device(Core::Frontend::EmuWindow& emu_window) {
use_asynchronous_shaders = Settings::values.use_asynchronous_shaders.GetValue() &&
!(is_amd || (is_intel && !is_linux)) && !strict_context_required;
use_driver_cache = is_nvidia;
supports_conditional_barriers = !is_intel;
LOG_INFO(Render_OpenGL, "Renderer_VariableAOFFI: {}", has_variable_aoffi);
LOG_INFO(Render_OpenGL, "Renderer_ComponentIndexingBug: {}", has_component_indexing_bug);

View file

@ -188,6 +188,10 @@ public:
return strict_context_required;
}
bool SupportsConditionalBarriers() const {
return supports_conditional_barriers;
}
private:
static bool TestVariableAoffi();
static bool TestPreciseBug();
@ -233,6 +237,7 @@ private:
bool has_bool_ref_bug{};
bool can_report_memory{};
bool strict_context_required{};
bool supports_conditional_barriers{};
std::string vendor_name;
};

View file

@ -239,6 +239,7 @@ ShaderCache::ShaderCache(RasterizerOpenGL& rasterizer_, Core::Frontend::EmuWindo
.support_snorm_render_buffer = false,
.support_viewport_index_layer = device.HasVertexViewportLayer(),
.support_geometry_shader_passthrough = device.HasGeometryShaderPassthrough(),
.support_conditional_barrier = device.SupportsConditionalBarriers(),
} {
if (use_asynchronous_shaders) {
workers = CreateWorkers();