Vulkan: make fragment shading rate depend on renderpass2

The extension depends on renderpass2 and will raise a VVL failure if
it's not available and enabled.

Note that this doesn't yet work as intended if you only override
supportsRenderpass2=false. A subsequent commit will fix this.

Bug: angleproject:8291
Change-Id: I6843b342909fb9000ebdcea80e006670c865f858
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4763095
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Auto-Submit: Steven Noonan <steven@uplinklabs.net>
Commit-Queue: Steven Noonan <steven@uplinklabs.net>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
This commit is contained in:
Steven Noonan
2023-08-09 10:48:36 -07:00
committed by Angle LUCI CQ
parent 32aecfcce7
commit fa3ecccba7

View File

@@ -3824,6 +3824,12 @@ uint32_t RendererVk::getDeviceVersion()
bool RendererVk::canSupportFragmentShadingRate(const vk::ExtensionNameList &deviceExtensionNames)
{
// VK_KHR_create_renderpass2 is required for VK_KHR_fragment_shading_rate
if (!mFeatures.supportsRenderpass2.enabled)
{
return false;
}
// Device needs to support VK_KHR_fragment_shading_rate and specifically
// pipeline fragment shading rate.
if (mFragmentShadingRateFeatures.pipelineFragmentShadingRate != VK_TRUE)