Skip to content

Commit

Permalink
igl | vulkan | Enable dualSrcBlend
Browse files Browse the repository at this point in the history
Summary:
Fix a validation error:

```
VUID-VkPipelineColorBlendAttachmentState-dstAlphaBlendFactor-00611(ERROR / SPEC): msgNum: -643335502 - Validation Error: [ VUID-VkPipelineColorBlendAttachmentState-dstAlphaBlendFactor-00611 ] Object 0: handle = 0x270a8eafda0, name = Device: VulkanContext::device_, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xd9a77ab2 | vkCreateGraphicsPipelines(): pCreateInfo[0].pColorBlendState.pAttachments[0].dstAlphaBlendFactor uses a dual-source blend factor (18), but this device feature is not enabled. The Vulkan spec states: If the dualSrcBlend feature is not enabled, dstAlphaBlendFactor must not be VK_BLEND_FACTOR_SRC1_COLOR, VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR, VK_BLEND_FACTOR_SRC1_ALPHA, or VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA (https://vulkan.lunarg.com/doc/view/1.3.243.0/windows/1.3-extensions/vkspec.html#VUID-VkPipelineColorBlendAttachmentState-dstAlphaBlendFactor-00611)
```

Reviewed By: pixelperfect3

Differential Revision: D49335474

fbshipit-source-id: b331816c0b28d8d06875e5cc4d861a17c7b1bd8b
  • Loading branch information
corporateshark authored and facebook-github-bot committed Sep 17, 2023
1 parent c1e29af commit 3e5e3f1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/igl/vulkan/VulkanHelpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ VkResult ivkCreateDevice(VkPhysicalDevice physicalDevice,
VkDevice* outDevice) {
assert(numQueueCreateInfos >= 1);
const VkPhysicalDeviceFeatures deviceFeatures = {
.dualSrcBlend = VK_TRUE,
.multiDrawIndirect = VK_TRUE,
.drawIndirectFirstInstance = VK_TRUE,
.depthBiasClamp = VK_TRUE,
Expand Down

0 comments on commit 3e5e3f1

Please sign in to comment.