Commit bff32703 by Geoff Lang Committed by Commit Bot

D3D11: Disable B5G6R5 on AMD drivers.

Texture data corruption has been seen with this format, specifically on AMD Radeon R7 240 cards with the 15.201.1301.0 driver. BUG=941620 Change-Id: I42d0d86a8319afdfaf17b44e142c6414092c647d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1610681Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent a32a0bef
...@@ -119,10 +119,13 @@ struct WorkaroundsD3D : angle::FeatureSetBase ...@@ -119,10 +119,13 @@ struct WorkaroundsD3D : angle::FeatureSetBase
// In Intel driver, the data with format DXGI_FORMAT_B5G6R5_UNORM will be parsed incorrectly. // In Intel driver, the data with format DXGI_FORMAT_B5G6R5_UNORM will be parsed incorrectly.
// This workaroud will disable B5G6R5 support when it's Intel driver. By default, it will use // This workaroud will disable B5G6R5 support when it's Intel driver. By default, it will use
// R8G8B8A8 format. This bug is fixed in version 4539 on Intel drivers. // R8G8B8A8 format. This bug is fixed in version 4539 on Intel drivers.
angle::Feature disableB5G6R5Support = { // On older AMD drivers, the data in DXGI_FORMAT_B5G6R5_UNORM becomes corrupted for unknown
"disable_b5g6r5_support", angle::FeatureCategory::D3DWorkarounds, // reasons.
"In Intel driver, the data with format DXGI_FORMAT_B5G6R5_UNORM will be parsed incorrectly", angle::Feature disableB5G6R5Support = {"disable_b5g6r5_support",
&members}; angle::FeatureCategory::D3DWorkarounds,
"On Intel and AMD drivers, textures with the format "
"DXGI_FORMAT_B5G6R5_UNORM have incorrect data",
&members};
// On some Intel drivers, evaluating unary minus operator on integer may get wrong answer in // On some Intel drivers, evaluating unary minus operator on integer may get wrong answer in
// vertex shaders. To work around this bug, we translate -(int) into ~(int)+1. // vertex shaders. To work around this bug, we translate -(int) into ~(int)+1.
......
...@@ -2419,6 +2419,11 @@ void GenerateWorkarounds(const Renderer11DeviceCaps &deviceCaps, ...@@ -2419,6 +2419,11 @@ void GenerateWorkarounds(const Renderer11DeviceCaps &deviceCaps,
} }
} }
if (IsAMD(adapterDesc.VendorId))
{
workarounds->disableB5G6R5Support.enabled = true;
}
// TODO(jmadill): Disable when we have a fixed driver version. // TODO(jmadill): Disable when we have a fixed driver version.
workarounds->emulateTinyStencilTextures.enabled = IsAMD(adapterDesc.VendorId); workarounds->emulateTinyStencilTextures.enabled = IsAMD(adapterDesc.VendorId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment