llvmpipe: remove non-simple interpolation paths.
[mesa.git] / src / gallium / drivers / llvmpipe / lp_bld_interp.h
index 0a52642e3957160b4361585db2445697c058c5dc..8de1ae0912ed4416ff7e5a99e0c2723e3281832f 100644 (file)
@@ -63,8 +63,7 @@ enum lp_interp {
    LP_INTERP_LINEAR,
    LP_INTERP_PERSPECTIVE,
    LP_INTERP_POSITION,
-   LP_INTERP_FACING,
-   LP_INTERP_ZERO
+   LP_INTERP_FACING
 };
 
 struct lp_shader_input {
@@ -72,7 +71,8 @@ struct lp_shader_input {
    uint usage_mask:4;   /* bitmask of TGSI_WRITEMASK_x flags */
    uint src_index:8;    /* where to find values in incoming vertices */
    uint cyl_wrap:4;     /* TGSI_CYLINDRICAL_WRAP_x flags */
-   uint padding:12;
+   uint location:2;     /* TGSI_INTERPOLOATE_LOC_* */
+   uint padding:10;
 };
 
 
@@ -85,15 +85,17 @@ struct lp_build_interp_soa_context
    unsigned num_attribs;
    unsigned mask[1 + PIPE_MAX_SHADER_INPUTS]; /**< TGSI_WRITE_MASK_x */
    enum lp_interp interp[1 + PIPE_MAX_SHADER_INPUTS];
-   boolean simple_interp;
+   unsigned interp_loc[1 + PIPE_MAX_SHADER_INPUTS];
+   boolean depth_clamp;
 
    double pos_offset;
+   unsigned coverage_samples;
+   LLVMValueRef num_loop;
+   LLVMValueRef sample_pos_array;
 
    LLVMValueRef x;
    LLVMValueRef y;
 
-   LLVMValueRef a[1 + PIPE_MAX_SHADER_INPUTS][TGSI_NUM_CHANNELS];
-   LLVMValueRef dadq[1 + PIPE_MAX_SHADER_INPUTS][TGSI_NUM_CHANNELS];
    LLVMValueRef a0aos[1 + PIPE_MAX_SHADER_INPUTS];
    LLVMValueRef dadxaos[1 + PIPE_MAX_SHADER_INPUTS];
    LLVMValueRef dadyaos[1 + PIPE_MAX_SHADER_INPUTS];
@@ -117,6 +119,10 @@ lp_build_interp_soa_init(struct lp_build_interp_soa_context *bld,
                          unsigned num_inputs,
                          const struct lp_shader_input *inputs,
                          boolean pixel_center_integer,
+                         unsigned coverage_samples,
+                         LLVMValueRef sample_pos_array,
+                         LLVMValueRef num_loop,
+                         boolean depth_clamp,
                          LLVMBuilderRef builder,
                          struct lp_type type,
                          LLVMValueRef a0_ptr,
@@ -128,11 +134,14 @@ lp_build_interp_soa_init(struct lp_build_interp_soa_context *bld,
 void
 lp_build_interp_soa_update_inputs_dyn(struct lp_build_interp_soa_context *bld,
                                       struct gallivm_state *gallivm,
-                                      LLVMValueRef quad_start_index);
+                                      LLVMValueRef quad_start_index,
+                                      LLVMValueRef mask_store,
+                                      LLVMValueRef sample_id);
 
 void
 lp_build_interp_soa_update_pos_dyn(struct lp_build_interp_soa_context *bld,
                                    struct gallivm_state *gallivm,
-                                   LLVMValueRef quad_start_index);
+                                   LLVMValueRef quad_start_index,
+                                   LLVMValueRef sample_id);
 
 #endif /* LP_BLD_INTERP_H */