Hash :
ec308b35
Author :
Date :
2023-05-15T15:03:10
Vulkan: Add feature to limit sample count to 2
This CL adds a feature called `limitSampleCountTo2`. Using it will
have the Vulkan backend limit max samples to 2.
Why 2? That's the minimum required in Vulkan to multisample without
error. Here's an example validation error:
vkCmdResolveImage: srcImage sample count is VK_SAMPLE_COUNT_1_BIT.
The Vulkan spec states: srcImage must have a sample count equal to
any valid sample count value other than VK_SAMPLE_COUNT_1_BIT.
https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdResolveImage-srcImage-00257
Using a limit as opposed to forcing a value allows non-multisampling
(sample count of 1) to continue working.
To see how tests fare when the feature is set, see the following test
results that force the value on:
https://chromium-review.googlesource.com/c/angle/angle/+/4534098/4
Test: adb shell setprop debug.angle.feature_overrides_enabled limitSampleCountTo2
Bug: b/279498079
Bug: angleproject:8162
Change-Id: I1df2822709151e6084c32055b5aff444e0b10db5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4518562
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Greg Schlomoff <gregschlom@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>