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>
{
"include/platform/FeaturesD3D_autogen.h":
"bdce5cac5c70e04fd39e9cf8c6969292",
"include/platform/FeaturesGL_autogen.h":
"7bddde89cdccb708ae42fc148bd93cd3",
"include/platform/FeaturesMtl_autogen.h":
"3e289fc47a96eb963b9b86acbcacee96",
"include/platform/FeaturesVk_autogen.h":
"040753ca98ef7c4912f17cdef3b131a3",
"include/platform/FrontendFeatures_autogen.h":
"391ebdb90344949e7060cb867a456511",
"include/platform/d3d_features.json":
"c3f7694511855304b3f678a6ad461d1e",
"include/platform/frontend_features.json":
"db98716ec9e23fc17f32bf9bc53cc331",
"include/platform/gen_features.py":
"062989f7a8f3ff3b383f98fc8908dc33",
"include/platform/gl_features.json":
"5b51cb804156bd0c6858d3558cb8e073",
"include/platform/mtl_features.json":
"c5a0946c7e9c1b0b3f6df42c511faa7b",
"include/platform/vk_features.json":
"c3a5da1379f60c0f2b4f0049158b13d9",
"util/angle_features_autogen.cpp":
"597fa9102010aa1b412291ed9e9ad380",
"util/angle_features_autogen.h":
"cc88b9011fedc40f378c704dc046e7dc"
}