diff options
-rw-r--r-- | include/vulkan/vulkan.h | 18 | ||||
-rw-r--r-- | src/vulkan/anv_meta.c | 7 | ||||
-rw-r--r-- | src/vulkan/anv_meta_clear.c | 8 | ||||
-rw-r--r-- | src/vulkan/gen7_pipeline.c | 8 | ||||
-rw-r--r-- | src/vulkan/gen8_pipeline.c | 8 |
5 files changed, 26 insertions, 23 deletions
diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h index 93c9bb488e7..921c3bca830 100644 --- a/include/vulkan/vulkan.h +++ b/include/vulkan/vulkan.h @@ -949,14 +949,6 @@ typedef VkFlags VkShaderModuleCreateFlags; typedef VkFlags VkPipelineCacheCreateFlags; typedef VkFlags VkShaderCreateFlags; -typedef enum { - VK_CHANNEL_R_BIT = 0x00000001, - VK_CHANNEL_G_BIT = 0x00000002, - VK_CHANNEL_B_BIT = 0x00000004, - VK_CHANNEL_A_BIT = 0x00000008, -} VkChannelFlagBits; -typedef VkFlags VkChannelFlags; - typedef enum VkPipelineCreateFlagBits { VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001, VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002, @@ -991,6 +983,14 @@ typedef VkFlags VkCullModeFlags; typedef VkFlags VkPipelineMultisampleStateCreateFlags; typedef VkFlags VkPipelineDepthStencilStateCreateFlags; typedef VkFlags VkPipelineColorBlendStateCreateFlags; + +typedef enum VkColorComponentFlagBits { + VK_COLOR_COMPONENT_R_BIT = 0x00000001, + VK_COLOR_COMPONENT_G_BIT = 0x00000002, + VK_COLOR_COMPONENT_B_BIT = 0x00000004, + VK_COLOR_COMPONENT_A_BIT = 0x00000008, +} VkColorComponentFlagBits; +typedef VkFlags VkColorComponentFlags; typedef VkFlags VkPipelineDynamicStateCreateFlags; typedef VkFlags VkPipelineLayoutCreateFlags; typedef VkFlags VkShaderStageFlags; @@ -1757,7 +1757,7 @@ typedef struct VkPipelineColorBlendAttachmentState { VkBlendFactor srcAlphaBlendFactor; VkBlendFactor dstAlphaBlendFactor; VkBlendOp alphaBlendOp; - VkChannelFlags channelWriteMask; + VkColorComponentFlags colorWriteMask; } VkPipelineColorBlendAttachmentState; typedef struct VkPipelineColorBlendStateCreateInfo { diff --git a/src/vulkan/anv_meta.c b/src/vulkan/anv_meta.c index f9b40004b23..a3f5733e122 100644 --- a/src/vulkan/anv_meta.c +++ b/src/vulkan/anv_meta.c @@ -371,8 +371,11 @@ anv_device_init_meta_blit_state(struct anv_device *device) .sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO, .attachmentCount = 1, .pAttachments = (VkPipelineColorBlendAttachmentState []) { - { .channelWriteMask = VK_CHANNEL_A_BIT | - VK_CHANNEL_R_BIT | VK_CHANNEL_G_BIT | VK_CHANNEL_B_BIT }, + { .colorWriteMask = + VK_COLOR_COMPONENT_A_BIT | + VK_COLOR_COMPONENT_R_BIT | + VK_COLOR_COMPONENT_G_BIT | + VK_COLOR_COMPONENT_B_BIT }, } }, .pDynamicState = &(VkPipelineDynamicStateCreateInfo) { diff --git a/src/vulkan/anv_meta_clear.c b/src/vulkan/anv_meta_clear.c index 010323180e8..27c6a291967 100644 --- a/src/vulkan/anv_meta_clear.c +++ b/src/vulkan/anv_meta_clear.c @@ -292,10 +292,10 @@ init_color_pipeline(struct anv_device *device) .pAttachments = (VkPipelineColorBlendAttachmentState []) { { .blendEnable = false, - .channelWriteMask = VK_CHANNEL_A_BIT | - VK_CHANNEL_R_BIT | - VK_CHANNEL_G_BIT | - VK_CHANNEL_B_BIT, + .colorWriteMask = VK_COLOR_COMPONENT_A_BIT | + VK_COLOR_COMPONENT_R_BIT | + VK_COLOR_COMPONENT_G_BIT | + VK_COLOR_COMPONENT_B_BIT, }, }, }; diff --git a/src/vulkan/gen7_pipeline.c b/src/vulkan/gen7_pipeline.c index 9126eb9b363..80c5f1a99a1 100644 --- a/src/vulkan/gen7_pipeline.c +++ b/src/vulkan/gen7_pipeline.c @@ -291,10 +291,10 @@ gen7_emit_cb_state(struct anv_pipeline *pipeline, bool AlphaToCoverageDitherEnable; # endif - .WriteDisableAlpha = !(a->channelWriteMask & VK_CHANNEL_A_BIT), - .WriteDisableRed = !(a->channelWriteMask & VK_CHANNEL_R_BIT), - .WriteDisableGreen = !(a->channelWriteMask & VK_CHANNEL_G_BIT), - .WriteDisableBlue = !(a->channelWriteMask & VK_CHANNEL_B_BIT), + .WriteDisableAlpha = !(a->colorWriteMask & VK_COLOR_COMPONENT_A_BIT), + .WriteDisableRed = !(a->colorWriteMask & VK_COLOR_COMPONENT_R_BIT), + .WriteDisableGreen = !(a->colorWriteMask & VK_COLOR_COMPONENT_G_BIT), + .WriteDisableBlue = !(a->colorWriteMask & VK_COLOR_COMPONENT_B_BIT), .LogicOpEnable = info->logicOpEnable, .LogicOpFunction = vk_to_gen_logic_op[info->logicOp], diff --git a/src/vulkan/gen8_pipeline.c b/src/vulkan/gen8_pipeline.c index 0adb0c39c03..c2bbdb72829 100644 --- a/src/vulkan/gen8_pipeline.c +++ b/src/vulkan/gen8_pipeline.c @@ -234,10 +234,10 @@ emit_cb_state(struct anv_pipeline *pipeline, .SourceAlphaBlendFactor = vk_to_gen_blend[a->srcAlphaBlendFactor], .DestinationAlphaBlendFactor = vk_to_gen_blend[a->dstAlphaBlendFactor], .AlphaBlendFunction = vk_to_gen_blend_op[a->alphaBlendOp], - .WriteDisableAlpha = !(a->channelWriteMask & VK_CHANNEL_A_BIT), - .WriteDisableRed = !(a->channelWriteMask & VK_CHANNEL_R_BIT), - .WriteDisableGreen = !(a->channelWriteMask & VK_CHANNEL_G_BIT), - .WriteDisableBlue = !(a->channelWriteMask & VK_CHANNEL_B_BIT), + .WriteDisableAlpha = !(a->colorWriteMask & VK_COLOR_COMPONENT_A_BIT), + .WriteDisableRed = !(a->colorWriteMask & VK_COLOR_COMPONENT_R_BIT), + .WriteDisableGreen = !(a->colorWriteMask & VK_COLOR_COMPONENT_G_BIT), + .WriteDisableBlue = !(a->colorWriteMask & VK_COLOR_COMPONENT_B_BIT), }; /* Our hardware applies the blend factor prior to the blend function |