vk/0.210.0: Rename ChannelFlags to ColorComponentFlags
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 1 Dec 2015 02:12:55 +0000 (18:12 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 3 Dec 2015 21:43:52 +0000 (13:43 -0800)
include/vulkan/vulkan.h
src/vulkan/anv_meta.c
src/vulkan/anv_meta_clear.c
src/vulkan/gen7_pipeline.c
src/vulkan/gen8_pipeline.c

index 93c9bb488e700053770c69246a75f177821fa6cf..921c3bca830088399eb08140c07c7577b618e9a6 100644 (file)
@@ -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 {
index f9b40004b2334d52192d82713fb6218847e514e2..a3f5733e1229f189807f94e196ed72adca96c19e 100644 (file)
@@ -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) {
index 010323180e8d11135c3c3d321232446a508a0a58..27c6a2919679998855acb9373e038f9197ed97e0 100644 (file)
@@ -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,
          },
       },
    };
index 9126eb9b3635a80c3d3371ef7c565107d27ed16c..80c5f1a99a14a599f5b5b9afb1215afa7879ff37 100644 (file)
@@ -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],
index 0adb0c39c03df7ddb08372e013f3f428475f36f9..c2bbdb728295177be24e45484abd7c09fa134ac3 100644 (file)
@@ -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