#define MAX_IMAGES 8
#define ANV_SVGS_VB_INDEX MAX_VBS
+#define ANV_DRAWID_VB_INDEX (MAX_VBS + 1)
#define anv_printflike(a, b) __attribute__((__format__(__printf__, a, b)))
/* Input attachment index (relative to the subpass) */
uint8_t input_attachment_index;
+
+ /* For a storage image, whether it is write-only */
+ bool write_only;
};
struct anv_pipeline_layout {
struct anv_dynamic_state dynamic;
bool need_query_wa;
+ /**
+ * Whether or not the gen8 PMA fix is enabled. We ensure that, at the top
+ * of any command buffer it is disabled by disabling it in EndCommandBuffer
+ * and before invoking the secondary in ExecuteCommands.
+ */
+ bool pma_fix_enabled;
+
+ /**
+ * Whether or not we know for certain that HiZ is enabled for the current
+ * subpass. If, for whatever reason, we are unsure as to whether HiZ is
+ * enabled or not, this will be false.
+ */
+ bool hiz_enabled;
+
/**
* Array length is anv_cmd_state::pass::attachment_count. Array content is
* valid only when recording a render pass instance.
uint32_t cs_right_mask;
+ bool writes_depth;
+ bool depth_test_enable;
+ bool writes_stencil;
+ bool stencil_test_enable;
bool depth_clamp_enable;
+ bool kill_pixel;
struct {
uint32_t sf[7];
/**
* For color images, this is the aux usage for this image when not used as a
* color attachment.
- *
+ *
* For depth/stencil images, this is set to ISL_AUX_USAGE_HIZ if the image
* has a HiZ buffer.
*/
/** RENDER_SURFACE_STATE when using image as a sampler surface. */
struct anv_state sampler_surface_state;
- /** RENDER_SURFACE_STATE when using image as a storage image. */
+ /**
+ * RENDER_SURFACE_STATE when using image as a storage image. Separate states
+ * for write-only and readable, using the real format for write-only and the
+ * lowered format for readable.
+ */
struct anv_state storage_surface_state;
+ struct anv_state writeonly_storage_surface_state;
struct brw_image_param storage_image_param;
};
struct anv_state surface_state;
struct anv_state storage_surface_state;
+ struct anv_state writeonly_storage_surface_state;
struct brw_image_param storage_image_param;
};
void anv_dump_add_framebuffer(struct anv_cmd_buffer *cmd_buffer,
struct anv_framebuffer *fb);
-struct anv_common {
- VkStructureType sType;
- struct anv_common *pNext;
-};
-
#define ANV_DEFINE_HANDLE_CASTS(__anv_type, __VkType) \
\
static inline struct __anv_type * \