glsl: Add boolean reference workaround

This commit is contained in:
ameerj 2021-12-29 18:55:42 -05:00
parent b84d429c2e
commit 8c907c620d
6 changed files with 15 additions and 2 deletions

View file

@ -188,6 +188,7 @@ Device::Device() {
std::atoi(driver_version.substr(0, driver_version.find(".")).data());
if (version_major >= 495) {
has_cbuf_ftou_bug = true;
has_bool_ref_bug = true;
}
}

View file

@ -156,6 +156,10 @@ public:
return has_cbuf_ftou_bug;
}
bool HasBoolRefBug() const {
return has_bool_ref_bug;
}
Settings::ShaderBackend GetShaderBackend() const {
return shader_backend;
}
@ -205,6 +209,7 @@ private:
bool warp_size_potentially_larger_than_guest{};
bool need_fastmath_off{};
bool has_cbuf_ftou_bug{};
bool has_bool_ref_bug{};
std::string vendor_name;
};

View file

@ -215,6 +215,7 @@ ShaderCache::ShaderCache(RasterizerOpenGL& rasterizer_, Core::Frontend::EmuWindo
.has_gl_component_indexing_bug = device.HasComponentIndexingBug(),
.has_gl_precise_bug = device.HasPreciseBug(),
.has_gl_cbuf_ftou_bug = device.HasCbufFtouBug(),
.has_gl_bool_ref_bug = device.HasBoolRefBug(),
.ignore_nan_fp_comparisons = true,
.gl_max_compute_smem_size = device.GetMaxComputeSharedMemorySize(),
},