diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2022-02-24 01:57:18 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2022-02-24 01:57:18 +0000 |
commit | b24b5b9049e889ee4eb39b565bcc8d48bd45ab48 (patch) | |
tree | 658ca4e6b41655f49463c85edbaeda48979c394c /lib/mesa/src/gallium/drivers/zink/zink_render_pass.h | |
parent | 57768bbb154c2879d34ec20e401b19472e77aaf7 (diff) |
Import Mesa 21.3.7
Diffstat (limited to 'lib/mesa/src/gallium/drivers/zink/zink_render_pass.h')
-rw-r--r-- | lib/mesa/src/gallium/drivers/zink/zink_render_pass.h | 41 |
1 files changed, 35 insertions, 6 deletions
diff --git a/lib/mesa/src/gallium/drivers/zink/zink_render_pass.h b/lib/mesa/src/gallium/drivers/zink/zink_render_pass.h index 02dc21194..2e02f1566 100644 --- a/lib/mesa/src/gallium/drivers/zink/zink_render_pass.h +++ b/lib/mesa/src/gallium/drivers/zink/zink_render_pass.h @@ -35,30 +35,59 @@ struct zink_rt_attrib { VkFormat format; VkSampleCountFlagBits samples; bool clear_color; - bool clear_stencil; + union { + bool clear_stencil; + bool fbfetch; + }; + union { + bool swapchain; + bool needs_write; + }; + bool resolve; }; struct zink_render_pass_state { - uint8_t num_cbufs : 4; /* PIPE_MAX_COLOR_BUFS = 8 */ + uint8_t num_cbufs : 5; /* PIPE_MAX_COLOR_BUFS = 8 */ uint8_t have_zsbuf : 1; + uint8_t samples:1; //for fs samplemask + uint8_t swapchain_init:1; + uint32_t num_zsresolves : 1; + uint32_t num_cresolves : 23; /* PIPE_MAX_COLOR_BUFS, but this is a struct hole */ struct zink_rt_attrib rts[PIPE_MAX_COLOR_BUFS + 1]; unsigned num_rts; -#ifndef NDEBUG - uint32_t clears; //for extra verification -#endif + uint32_t clears; //for extra verification and update flagging + uint32_t msaa_expand_mask; +}; + +struct zink_pipeline_rt { + VkFormat format; + VkSampleCountFlagBits samples; +}; + +struct zink_render_pass_pipeline_state { + uint32_t num_attachments:26; + uint32_t num_cresolves:4; + uint32_t num_zsresolves:1; + bool samples:1; //for fs samplemask + struct zink_pipeline_rt attachments[PIPE_MAX_COLOR_BUFS + 1]; + unsigned id; }; struct zink_render_pass { VkRenderPass render_pass; struct zink_render_pass_state state; + unsigned pipeline_state; }; struct zink_render_pass * zink_create_render_pass(struct zink_screen *screen, - struct zink_render_pass_state *state); + struct zink_render_pass_state *state, + struct zink_render_pass_pipeline_state *pstate); void zink_destroy_render_pass(struct zink_screen *screen, struct zink_render_pass *rp); +VkImageLayout +zink_render_pass_attachment_get_barrier_info(const struct zink_render_pass *rp, unsigned idx, VkPipelineStageFlags *pipeline, VkAccessFlags *access); #endif |