intel/assembler: Add labels support
[mesa.git] / src / intel / vulkan / anv_nir.h
index 606fd1c0565e3d2e3bfced1743d8cd0c5a90aa66..9095f2d58d3b23fc4616c8a25f9c086f3f2870b3 100644 (file)
@@ -21,7 +21,8 @@
  * IN THE SOFTWARE.
  */
 
-#pragma once
+#ifndef ANV_NIR_H
+#define ANV_NIR_H
 
 #include "nir/nir.h"
 #include "anv_private.h"
 extern "C" {
 #endif
 
-void anv_nir_lower_push_constants(nir_shader *shader, bool is_scalar);
+bool anv_check_for_primitive_replication(nir_shader **shaders,
+                                         struct anv_graphics_pipeline *pipeline);
 
-void anv_nir_apply_dynamic_offsets(struct anv_pipeline *pipeline,
-                                   nir_shader *shader,
-                                   struct brw_stage_prog_data *prog_data);
-void anv_nir_apply_pipeline_layout(struct anv_pipeline *pipeline,
+bool anv_nir_lower_multiview(nir_shader *shader,
+                             struct anv_graphics_pipeline *pipeline);
+
+bool anv_nir_lower_ycbcr_textures(nir_shader *shader,
+                                  const struct anv_pipeline_layout *layout);
+
+static inline nir_address_format
+anv_nir_ssbo_addr_format(const struct anv_physical_device *pdevice,
+                         bool robust_buffer_access)
+{
+   if (pdevice->has_a64_buffer_access) {
+      if (robust_buffer_access)
+         return nir_address_format_64bit_bounded_global;
+      else
+         return nir_address_format_64bit_global;
+   } else {
+      return nir_address_format_32bit_index_offset;
+   }
+}
+
+void anv_nir_apply_pipeline_layout(const struct anv_physical_device *pdevice,
+                                   bool robust_buffer_access,
+                                   const struct anv_pipeline_layout *layout,
                                    nir_shader *shader,
-                                   struct brw_stage_prog_data *prog_data,
                                    struct anv_pipeline_bind_map *map);
 
+void anv_nir_compute_push_layout(const struct anv_physical_device *pdevice,
+                                 bool robust_buffer_access,
+                                 nir_shader *nir,
+                                 struct brw_stage_prog_data *prog_data,
+                                 struct anv_pipeline_bind_map *map,
+                                 void *mem_ctx);
+
+void anv_nir_validate_push_layout(struct brw_stage_prog_data *prog_data,
+                                  struct anv_pipeline_bind_map *map);
+
+bool anv_nir_add_base_work_group_id(nir_shader *shader);
+
 #ifdef __cplusplus
 }
 #endif
+
+#endif /* ANV_NIR_H */