radv: Emit a BATCH_BREAK when changing pixel shaders or CB_TARGET_MASK.
[mesa.git] / src / amd / vulkan / radv_private.h
index 1e15de10924ebf84a3edd5afb4c48d9c21bdadfb..4dccf23acc7a3a4f63708d638bf968c06c4b24e6 100644 (file)
@@ -270,7 +270,7 @@ void radv_logi_v(const char *format, va_list va);
                                fprintf(stderr, "%s:%d ASSERT: %s\n", __FILE__, __LINE__, #x); \
                })
 #else
-#define radv_assert(x)
+#define radv_assert(x) do {} while(0)
 #endif
 
 #define stub_return(v)                                 \
@@ -1195,6 +1195,7 @@ struct radv_attachment_state {
        uint32_t                                     cleared_views;
        VkClearValue                                 clear_value;
        VkImageLayout                                current_layout;
+       VkImageLayout                                current_stencil_layout;
        bool                                         current_in_render_loop;
        struct radv_sample_locations_state           sample_location;
 
@@ -1684,6 +1685,15 @@ radv_graphics_pipeline_create(VkDevice device,
                              const VkAllocationCallbacks *alloc,
                              VkPipeline *pPipeline);
 
+struct radv_binning_settings {
+       unsigned context_states_per_bin; /* allowed range: [1, 6] */
+       unsigned persistent_states_per_bin; /* allowed range: [1, 32] */
+       unsigned fpovs_per_batch; /* allowed range: [0, 255], 0 = unlimited */
+};
+
+struct radv_binning_settings
+radv_get_binning_settings(const struct radv_physical_device *pdev);
+
 struct vk_format_description;
 uint32_t radv_translate_buffer_dataformat(const struct vk_format_description *desc,
                                          int first_non_void);
@@ -2128,6 +2138,7 @@ void radv_subpass_barrier(struct radv_cmd_buffer *cmd_buffer,
 struct radv_subpass_attachment {
        uint32_t         attachment;
        VkImageLayout    layout;
+       VkImageLayout    stencil_layout;
        bool             in_render_loop;
 };
 
@@ -2154,6 +2165,9 @@ struct radv_subpass {
        struct radv_subpass_barrier                  start_barrier;
 
        uint32_t                                     view_mask;
+
+       VkSampleCountFlagBits                        color_sample_count;
+       VkSampleCountFlagBits                        depth_sample_count;
        VkSampleCountFlagBits                        max_sample_count;
 };
 
@@ -2167,6 +2181,8 @@ struct radv_render_pass_attachment {
        VkAttachmentLoadOp                           stencil_load_op;
        VkImageLayout                                initial_layout;
        VkImageLayout                                final_layout;
+       VkImageLayout                                stencil_initial_layout;
+       VkImageLayout                                stencil_final_layout;
 
        /* The subpass id in which the attachment will be used first/last. */
        uint32_t                                     first_subpass_idx;