venus: enable VK_EXT_color_write_enable
authorJuston Li <justonli@google.com>
Wed, 7 Jun 2023 23:05:18 +0000 (16:05 -0700)
committerMarge Bot <emma+marge@anholt.net>
Thu, 8 Jun 2023 21:08:13 +0000 (21:08 +0000)
Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23510>

src/virtio/vulkan/vn_command_buffer.c
src/virtio/vulkan/vn_physical_device.c
src/virtio/vulkan/vn_physical_device.h

index 428d78d..822c049 100644 (file)
@@ -1971,6 +1971,15 @@ vn_CmdSetLogicOpEXT(VkCommandBuffer commandBuffer, VkLogicOp logicOp)
 }
 
 void
+vn_CmdSetColorWriteEnableEXT(VkCommandBuffer commandBuffer,
+                             uint32_t attachmentCount,
+                             const VkBool32 *pColorWriteEnables)
+{
+   VN_CMD_ENQUEUE(vkCmdSetColorWriteEnableEXT, commandBuffer, attachmentCount,
+                  pColorWriteEnables);
+}
+
+void
 vn_CmdSetPatchControlPointsEXT(VkCommandBuffer commandBuffer,
                                uint32_t patchControlPoints)
 {
index 484c9d3..bc7a428 100644 (file)
@@ -192,6 +192,7 @@ vn_physical_device_init_features(struct vn_physical_device *physical_dev)
 
    /* EXT */
    VN_ADD_PNEXT_EXT(feats2, BORDER_COLOR_SWIZZLE_FEATURES_EXT, feats->border_color_swizzle, exts->EXT_border_color_swizzle);
+   VN_ADD_PNEXT_EXT(feats2, COLOR_WRITE_ENABLE_FEATURES_EXT, feats->color_write_enable, exts->EXT_color_write_enable);
    VN_ADD_PNEXT_EXT(feats2, CONDITIONAL_RENDERING_FEATURES_EXT, feats->conditional_rendering, exts->EXT_conditional_rendering);
    VN_ADD_PNEXT_EXT(feats2, CUSTOM_BORDER_COLOR_FEATURES_EXT, feats->custom_border_color, exts->EXT_custom_border_color);
    VN_ADD_PNEXT_EXT(feats2, DEPTH_CLIP_CONTROL_FEATURES_EXT, feats->depth_clip_control, exts->EXT_depth_clip_control);
@@ -1153,6 +1154,7 @@ vn_physical_device_get_passthrough_extensions(
       /* EXT */
       .EXT_border_color_swizzle = true,
       .EXT_calibrated_timestamps = true,
+      .EXT_color_write_enable = true,
       .EXT_conditional_rendering = true,
       .EXT_conservative_rasterization = true,
       .EXT_custom_border_color = true,
@@ -1805,6 +1807,7 @@ vn_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
 
       /* EXT */
       CASE(BORDER_COLOR_SWIZZLE_FEATURES_EXT, border_color_swizzle);
+      CASE(COLOR_WRITE_ENABLE_FEATURES_EXT, color_write_enable);
       CASE(CONDITIONAL_RENDERING_FEATURES_EXT, conditional_rendering);
       CASE(CUSTOM_BORDER_COLOR_FEATURES_EXT, custom_border_color);
       CASE(DEPTH_CLIP_CONTROL_FEATURES_EXT, depth_clip_control);
index fb957fb..729bd18 100644 (file)
@@ -37,6 +37,7 @@ struct vn_physical_device_features {
 
    /* EXT */
    VkPhysicalDeviceBorderColorSwizzleFeaturesEXT border_color_swizzle;
+   VkPhysicalDeviceColorWriteEnableFeaturesEXT color_write_enable;
    VkPhysicalDeviceConditionalRenderingFeaturesEXT conditional_rendering;
    VkPhysicalDeviceCustomBorderColorFeaturesEXT custom_border_color;
    VkPhysicalDeviceDepthClipControlFeaturesEXT depth_clip_control;