zink: clamp PIPE_SHADER_CAP_MAX_SHADER_BUFFERS to PIPE_MAX_SHADER_BUFFERS
[mesa.git] / src / gallium / drivers / zink / zink_framebuffer.h
index 4e7e5cad41eb95abdb5af4bf88e4f09c9bb9add4..ca3fd4fb2314d310437388c6bee0911a69373f8b 100644 (file)
 
 #include "util/u_inlines.h"
 
+struct zink_context;
 struct zink_screen;
 struct zink_render_pass;
 
+struct zink_framebuffer_state {
+   struct zink_render_pass *rp;
+   uint32_t width;
+   uint16_t height, layers;
+   uint8_t samples;
+   uint8_t num_attachments;
+   struct zink_surface *attachments[PIPE_MAX_COLOR_BUFS + 1];
+   bool has_null_attachments;
+};
+
 struct zink_framebuffer {
    struct pipe_reference reference;
    VkFramebuffer fb;
 
    struct pipe_surface *surfaces[PIPE_MAX_COLOR_BUFS + 1];
    struct zink_render_pass *rp;
+   struct pipe_surface *null_surface; /* for use with unbound attachments */
 };
 
 struct zink_framebuffer *
-zink_create_framebuffer(struct zink_screen *screen,
-                        const struct pipe_framebuffer_state *fb,
-                        struct zink_render_pass *rp);
+zink_create_framebuffer(struct zink_context *ctx, struct zink_screen *screen,
+                        struct zink_framebuffer_state *fb);
 
 void
 zink_destroy_framebuffer(struct zink_screen *screen,