zink: support VK_EXT_blend_operation_advanced
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fri, 21 Aug 2020 12:37:13 +0000 (08:37 -0400)
committerMarge Bot <eric+marge@anholt.net>
Mon, 12 Oct 2020 18:26:56 +0000 (18:26 +0000)
just the screen bits

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7099>

src/gallium/drivers/zink/zink_device_info.py
src/gallium/drivers/zink/zink_screen.c

index afcabce..fe40617 100644 (file)
@@ -61,6 +61,7 @@ def EXTENSIONS():
         Extension("VK_EXT_vertex_attribute_divisor", alias="vdiv", properties=True, feature="vertexAttributeInstanceRateDivisor"),
         Extension("VK_EXT_calibrated_timestamps"),
         Extension("VK_EXT_custom_border_color",      alias="border_color", properties=True, feature="customBorderColors"),
+        Extension("VK_EXT_blend_operation_advanced", alias="blend", properties=True),
     ]
 
 # There exists some inconsistencies regarding the enum constants, fix them.
index 6951f39..5fa2a4b 100644 (file)
@@ -825,6 +825,11 @@ zink_internal_create_screen(struct sw_winsys *winsys, int fd, const struct pipe_
    qci.queueCount = 1;
    qci.pQueuePriorities = &dummy;
 
+   /* TODO: we can probably support non-premul here with some work? */
+   screen->info.have_EXT_blend_operation_advanced = screen->info.have_EXT_blend_operation_advanced &&
+                                                    screen->info.blend_props.advancedBlendNonPremultipliedSrcColor &&
+                                                    screen->info.blend_props.advancedBlendNonPremultipliedDstColor;
+
    VkDeviceCreateInfo dci = {};
    dci.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO;
    dci.queueCreateInfoCount = 1;