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.
This commit is contained in:
Chad Versace 2015-10-19 08:44:38 -07:00
parent 0d84a0d58b
commit 81f8b82fc8
2 changed files with 8 additions and 0 deletions

View file

@ -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 = {

View file

@ -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;