freedreno/ir3: Fix assertion failures dumping CS high full regs.
[mesa.git] / src / freedreno / vulkan / tu_descriptor_set.h
index 3a24822eb6736ce8d43b7cd8acc83d50a969fa29..ba0e57d7faa5df56b9ad09750c85aef43515e7c5 100644 (file)
@@ -54,16 +54,22 @@ struct tu_descriptor_set_binding_layout
     */
    uint32_t dynamic_offset_offset;
 
-   /* Index into the array of dynamic input attachment descriptors */
-   uint32_t input_attachment_offset;
-
    /* Offset in the tu_descriptor_set_layout of the immutable samplers, or 0
     * if there are no immutable samplers. */
    uint32_t immutable_samplers_offset;
+
+   /* Offset in the tu_descriptor_set_layout of the ycbcr samplers, or 0
+    * if there are no immutable samplers. */
+   uint32_t ycbcr_samplers_offset;
+
+   /* Shader stages that use this binding */
+   uint32_t shader_stages;
 };
 
 struct tu_descriptor_set_layout
 {
+   struct vk_object_base base;
+
    /* The create flags for this descriptor set layout */
    VkDescriptorSetLayoutCreateFlags flags;
 
@@ -79,9 +85,6 @@ struct tu_descriptor_set_layout
    /* Number of dynamic offsets used by this descriptor set */
    uint16_t dynamic_offset_count;
 
-   /* Number of input attachments used by the descriptor set */
-   uint16_t input_attachment_count;
-
    /* A bitfield of which dynamic buffers are ubo's, to make the
     * descriptor-binding-time patching easier.
     */
@@ -98,18 +101,18 @@ struct tu_descriptor_set_layout
 
 struct tu_pipeline_layout
 {
+   struct vk_object_base base;
+
    struct
    {
       struct tu_descriptor_set_layout *layout;
       uint32_t size;
       uint32_t dynamic_offset_start;
-      uint32_t input_attachment_start;
    } set[MAX_SETS];
 
    uint32_t num_sets;
    uint32_t push_constant_size;
    uint32_t dynamic_offset_count;
-   uint32_t input_attachment_count;
 
    unsigned char sha1[20];
 };
@@ -120,4 +123,15 @@ tu_immutable_samplers(const struct tu_descriptor_set_layout *set,
 {
    return (void *) ((const char *) set + binding->immutable_samplers_offset);
 }
+
+static inline const struct tu_sampler_ycbcr_conversion *
+tu_immutable_ycbcr_samplers(const struct tu_descriptor_set_layout *set,
+                            const struct tu_descriptor_set_binding_layout *binding)
+{
+   if (!binding->ycbcr_samplers_offset)
+      return NULL;
+
+   return (void *) ((const char *) set + binding->ycbcr_samplers_offset);
+}
+
 #endif /* TU_DESCRIPTOR_SET_H */