panfrost: add missing dependency on midgard_pack.h
[mesa.git] / src / gallium / auxiliary / gallivm / lp_bld_nir.h
index 0f13477c8563668b0b4f97cb56ee16c78e34acc5..7f29575bad553283310de5460df517c131943d10 100644 (file)
@@ -119,16 +119,20 @@ struct lp_build_nir_context
                     unsigned bit_size,
                     nir_variable *var,
                     unsigned vertex_index,
+                    LLVMValueRef indir_vertex_index,
                     unsigned const_index,
                     LLVMValueRef indir_index,
                     LLVMValueRef result[NIR_MAX_VEC_COMPONENTS]);
    void (*store_var)(struct lp_build_nir_context *bld_base,
                      nir_variable_mode deref_mode,
-                     unsigned bit_size,
                      unsigned num_components,
+                     unsigned bit_size,
+                     nir_variable *var,
                      unsigned writemask,
+                     LLVMValueRef indir_vertex_index,
                      unsigned const_index,
-                     nir_variable *var, LLVMValueRef dst);
+                     LLVMValueRef indir_index,
+                     LLVMValueRef dst);
 
    LLVMValueRef (*load_reg)(struct lp_build_nir_context *bld_base,
                             struct lp_build_context *reg_bld,
@@ -168,6 +172,17 @@ struct lp_build_nir_context
 
    void (*emit_vertex)(struct lp_build_nir_context *bld_base, uint32_t stream_id);
    void (*end_primitive)(struct lp_build_nir_context *bld_base, uint32_t stream_id);
+
+   void (*vote)(struct lp_build_nir_context *bld_base, LLVMValueRef src, nir_intrinsic_instr *instr, LLVMValueRef dst[4]);
+   void (*helper_invocation)(struct lp_build_nir_context *bld_base, LLVMValueRef *dst);
+
+   void (*interp_at)(struct lp_build_nir_context *bld_base,
+                     unsigned num_components,
+                     nir_variable *var,
+                     bool centroid, bool sample,
+                     unsigned const_index,
+                     LLVMValueRef indir_index,
+                     LLVMValueRef offsets[2], LLVMValueRef dst[4]);
 //   LLVMValueRef main_function
 };
 
@@ -201,9 +216,12 @@ struct lp_build_nir_soa_context
    const struct lp_build_image_soa *image;
 
    const struct lp_build_gs_iface *gs_iface;
-   LLVMValueRef emitted_prims_vec_ptr;
-   LLVMValueRef total_emitted_vertices_vec_ptr;
-   LLVMValueRef emitted_vertices_vec_ptr;
+   const struct lp_build_tcs_iface *tcs_iface;
+   const struct lp_build_tes_iface *tes_iface;
+   const struct lp_build_fs_iface *fs_iface;
+   LLVMValueRef emitted_prims_vec_ptr[PIPE_MAX_VERTEX_STREAMS];
+   LLVMValueRef total_emitted_vertices_vec_ptr[PIPE_MAX_VERTEX_STREAMS];
+   LLVMValueRef emitted_vertices_vec_ptr[PIPE_MAX_VERTEX_STREAMS];
    LLVMValueRef max_output_vertices_vec;
    struct lp_bld_tgsi_system_values system_values;
 
@@ -217,6 +235,7 @@ struct lp_build_nir_soa_context
    LLVMValueRef inputs_array;
 
    LLVMValueRef kernel_args_ptr;
+   unsigned gs_vertex_streams;
 };
 
 bool