opengl: disable ClearTexture on Intel drivers (#6879)

This commit is contained in:
Vitor K 2023-08-17 17:16:51 -03:00 committed by GitHub
parent bc0bf4d3d2
commit 1a6860f35c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1 deletions

View file

@ -188,6 +188,10 @@ void Driver::FindBugs() {
if (vendor == Vendor::AMD || (vendor == Vendor::Intel && !is_linux)) {
bugs |= DriverBug::BrokenTextureView;
}
if (vendor == Vendor::Intel && !is_linux) {
bugs |= DriverBug::BrokenClearTexture;
}
}
} // namespace OpenGL

View file

@ -38,6 +38,8 @@ enum class DriverBug {
VertexArrayOutOfBound = 1 << 1,
// On AMD and Intel drivers on Windows glTextureView produces incorrect results
BrokenTextureView = 1 << 2,
// On Haswell and Broadwell Intel drivers glClearTexSubImage produces a black screen
BrokenClearTexture = 1 << 3,
};
/**

View file

@ -189,7 +189,7 @@ bool TextureRuntime::Reinterpret(Surface& source, Surface& dest,
bool TextureRuntime::ClearTextureWithoutFbo(Surface& surface,
const VideoCore::TextureClear& clear) {
if (!driver.HasArbClearTexture()) {
if (!driver.HasArbClearTexture() || driver.HasBug(DriverBug::BrokenClearTexture)) {
return false;
}
GLenum format{};