gallivm: rework lp_build_tgsi_soa to take a struct
[mesa.git] / src / gallium / auxiliary / gallivm / lp_bld_tgsi.h
index 824eff2af4180e824c20285fb0c7bf8e5dabdc24..26e8e405869b59cad8609a2ef39e91f0410a779b 100644 (file)
@@ -216,23 +216,27 @@ lp_build_tgsi_info(const struct tgsi_token *tokens,
                    struct lp_tgsi_info *info);
 
 
+struct lp_build_tgsi_params {
+   struct lp_type type;
+   struct lp_build_mask_context *mask;
+   LLVMValueRef consts_ptr;
+   LLVMValueRef const_sizes_ptr;
+   const struct lp_bld_tgsi_system_values *system_values;
+   const LLVMValueRef (*inputs)[4];
+   LLVMValueRef context_ptr;
+   LLVMValueRef thread_data_ptr;
+   const struct lp_build_sampler_soa *sampler;
+   const struct tgsi_shader_info *info;
+   const struct lp_build_tgsi_gs_iface *gs_iface;
+   LLVMValueRef ssbo_ptr;
+   LLVMValueRef ssbo_sizes_ptr;
+};
+
 void
 lp_build_tgsi_soa(struct gallivm_state *gallivm,
                   const struct tgsi_token *tokens,
-                  struct lp_type type,
-                  struct lp_build_mask_context *mask,
-                  LLVMValueRef consts_ptr,
-                  LLVMValueRef const_sizes_ptr,
-                  const struct lp_bld_tgsi_system_values *system_values,
-                  const LLVMValueRef (*inputs)[4],
-                  LLVMValueRef (*outputs)[4],
-                  LLVMValueRef context_ptr,
-                  LLVMValueRef thread_data_ptr,
-                  const struct lp_build_sampler_soa *sampler,
-                  const struct tgsi_shader_info *info,
-                  const struct lp_build_tgsi_gs_iface *gs_iface,
-                  LLVMValueRef ssbo_ptr,
-                  LLVMValueRef ssbo_sizes_ptr);
+                  const struct lp_build_tgsi_params *params,
+                  LLVMValueRef (*outputs)[4]);
 
 
 void
@@ -456,6 +460,8 @@ struct lp_build_tgsi_soa_context
 
    LLVMValueRef ssbo_ptr;
    LLVMValueRef ssbo_sizes_ptr;
+   LLVMValueRef ssbos[LP_MAX_TGSI_SHADER_BUFFERS];
+   LLVMValueRef ssbo_sizes[LP_MAX_TGSI_SHADER_BUFFERS];
 
    const struct lp_build_sampler_soa *sampler;