Commit a8d5a6de by Alexis Hetu Committed by Alexis Hétu

Enable blending for 32FP formats

In order for SwANGLE to expose GL_EXT_float_blend, R32F, RG32F and RGBA32F must all allow blending. The code already supports this, we just need to expose the VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT bit for these formats. Bug: b/146340613 Tests: dEQP-VK.pipeline.blend.*32_sfloat* Change-Id: I39fc67fa8c26e8296f5e837a8b228a71df9149f1 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/39631 Presubmit-Ready: Alexis Hétu <sugoi@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarChris Forbes <chrisforbes@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 53f2a7a5
...@@ -603,6 +603,9 @@ void PhysicalDevice::getFormatProperties(Format format, VkFormatProperties* pFor ...@@ -603,6 +603,9 @@ void PhysicalDevice::getFormatProperties(Format format, VkFormatProperties* pFor
case VK_FORMAT_R16_SFLOAT: case VK_FORMAT_R16_SFLOAT:
case VK_FORMAT_R16G16_SFLOAT: case VK_FORMAT_R16G16_SFLOAT:
case VK_FORMAT_R16G16B16A16_SFLOAT: case VK_FORMAT_R16G16B16A16_SFLOAT:
case VK_FORMAT_R32_SFLOAT:
case VK_FORMAT_R32G32_SFLOAT:
case VK_FORMAT_R32G32B32A32_SFLOAT:
pFormatProperties->optimalTilingFeatures |= pFormatProperties->optimalTilingFeatures |=
VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT; VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT;
// Fall through // Fall through
...@@ -623,13 +626,10 @@ void PhysicalDevice::getFormatProperties(Format format, VkFormatProperties* pFor ...@@ -623,13 +626,10 @@ void PhysicalDevice::getFormatProperties(Format format, VkFormatProperties* pFor
case VK_FORMAT_R16G16B16A16_SINT: case VK_FORMAT_R16G16B16A16_SINT:
case VK_FORMAT_R32_UINT: case VK_FORMAT_R32_UINT:
case VK_FORMAT_R32_SINT: case VK_FORMAT_R32_SINT:
case VK_FORMAT_R32_SFLOAT:
case VK_FORMAT_R32G32_UINT: case VK_FORMAT_R32G32_UINT:
case VK_FORMAT_R32G32_SINT: case VK_FORMAT_R32G32_SINT:
case VK_FORMAT_R32G32_SFLOAT:
case VK_FORMAT_R32G32B32A32_UINT: case VK_FORMAT_R32G32B32A32_UINT:
case VK_FORMAT_R32G32B32A32_SINT: case VK_FORMAT_R32G32B32A32_SINT:
case VK_FORMAT_R32G32B32A32_SFLOAT:
case VK_FORMAT_B10G11R11_UFLOAT_PACK32: case VK_FORMAT_B10G11R11_UFLOAT_PACK32:
pFormatProperties->optimalTilingFeatures |= pFormatProperties->optimalTilingFeatures |=
VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT |
......
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