Vulkan: add clear test for emulated stencil or depth formats
S8_UINT and D24_UNORM_X8_UINT are the only formats currently that are
single-aspect and are possibly emulated with a packed depth-stencil
format if it's not supported. A flag to FeaturesVk has been added as a
way to force this behavior for the sake of testing.
This test is added to ensure the correct clear algorithm is used for
this case. Additionally, this case is detected and the other aspect is
forcefully cleared to 0 whenever the original aspect is cleared.
Bug: angleproject:2815
Change-Id: Ief3039d66bbf46468213b9e3224f7cc7541c3a2e
Reviewed-on: https://chromium-review.googlesource.com/c/1312453
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/renderer/vulkan/RendererVk.cpp b/src/libANGLE/renderer/vulkan/RendererVk.cpp
index 09e8248..49cc121 100644
--- a/src/libANGLE/renderer/vulkan/RendererVk.cpp
+++ b/src/libANGLE/renderer/vulkan/RendererVk.cpp
@@ -531,7 +531,7 @@
GlslangWrapper::Initialize();
// Initialize the format table.
- mFormatTable.initialize(mPhysicalDevice, &mNativeTextureCaps,
+ mFormatTable.initialize(mPhysicalDevice, mFeatures, &mNativeTextureCaps,
&mNativeCaps.compressedTextureFormats);
return angle::Result::Continue();
@@ -751,6 +751,9 @@
// http://anglebug.com/2838
mFeatures.extraCopyBufferRegion = IsIntel(mPhysicalDeviceProperties.vendorID);
#endif
+
+ angle::PlatformMethods *platform = ANGLEPlatformCurrent();
+ platform->overrideFeaturesVk(platform, &mFeatures);
}
void RendererVk::initPipelineCacheVkKey()