this will enable direct calling of the right function without the overhead
of having conditionals in the barrier functions themselves
eventually, the '2' variants will be widely enough deployed that
this can be deleted
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18628>
screen->base.vertex_state_destroy = zink_cache_vertex_state_destroy;
glsl_type_singleton_init_or_ref();
+ if (screen->info.have_vulkan13 || screen->info.have_KHR_synchronization2) {
+ screen->image_barrier = zink_resource_image_barrier2;
+ screen->buffer_barrier = zink_resource_buffer_barrier2;
+ } else {
+ screen->image_barrier = zink_resource_image_barrier;
+ screen->buffer_barrier = zink_resource_buffer_barrier;
+ }
+
screen->copy_context = zink_context(screen->base.context_create(&screen->base, NULL, ZINK_CONTEXT_COPY_ONLY));
if (!screen->copy_context) {
mesa_loge("zink: failed to create copy context");
struct vk_dispatch_table vk;
+ void (*buffer_barrier)(struct zink_context *ctx, struct zink_resource *res, VkAccessFlags flags, VkPipelineStageFlags pipeline);
+ void (*image_barrier)(struct zink_context *ctx, struct zink_resource *res, VkImageLayout new_layout, VkAccessFlags flags, VkPipelineStageFlags pipeline);
+
bool compact_descriptors;
uint8_t desc_set_id[ZINK_MAX_DESCRIPTOR_SETS];