From 81f8b82fc866aeadcbedce12395605918c105317 Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Mon, 19 Oct 2015 08:44:38 -0700 Subject: [PATCH] vk/meta: Add required renderpass to pipeline The Vulkan spec (20 Oct 2015, git-aa308cb) requires that VkGraphicsPipelineCreateInfo::renderPass be a valid handle. To satisfy that, define a static dummy render pass used for all meta operations. --- src/vulkan/anv_meta.c | 6 ++++++ src/vulkan/anv_private.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/vulkan/anv_meta.c b/src/vulkan/anv_meta.c index c280ea0ef42..09d035b0b07 100644 --- a/src/vulkan/anv_meta.c +++ b/src/vulkan/anv_meta.c @@ -30,6 +30,8 @@ #include "anv_private.h" #include "anv_nir_builder.h" +struct anv_render_pass anv_meta_dummy_renderpass = {0}; + static nir_shader * build_nir_vertex_shader(bool attr_flat) { @@ -293,6 +295,8 @@ anv_device_init_meta_clear_state(struct anv_device *device) }, }, .flags = 0, + .renderPass = anv_render_pass_to_handle(&anv_meta_dummy_renderpass), + .subpass = 0, }, &(struct anv_graphics_pipeline_create_info) { .use_repclear = true, @@ -698,6 +702,8 @@ anv_device_init_meta_blit_state(struct anv_device *device) }, .flags = 0, .layout = device->meta_state.blit.pipeline_layout, + .renderPass = anv_render_pass_to_handle(&anv_meta_dummy_renderpass), + .subpass = 0, }; const struct anv_graphics_pipeline_create_info anv_pipeline_info = { diff --git a/src/vulkan/anv_private.h b/src/vulkan/anv_private.h index 5f9a3ce5c12..68598a9dd49 100644 --- a/src/vulkan/anv_private.h +++ b/src/vulkan/anv_private.h @@ -1395,6 +1395,8 @@ struct anv_render_pass { struct anv_subpass subpasses[0]; }; +extern struct anv_render_pass anv_meta_dummy_renderpass; + struct anv_query_pool_slot { uint64_t begin; uint64_t end; -- 2.30.2