tgsi: add negate parameter to tgsi_transform_kill_inst()
[mesa.git] / src / gallium / auxiliary / draw / draw_private.h
index bbc22dc091e63b683f25cdba956b05228984c3b6..0ad94bb031f3d094559ae13a7002ae57556d3831 100644 (file)
@@ -47,7 +47,6 @@
 #include "tgsi/tgsi_scan.h"
 
 #ifdef HAVE_LLVM
-struct draw_llvm;
 struct gallivm_state;
 #endif
 
@@ -69,6 +68,7 @@ struct tgsi_exec_machine;
 struct tgsi_sampler;
 struct draw_pt_front_end;
 struct draw_assembler;
+struct draw_llvm;
 
 
 /**
@@ -232,7 +232,7 @@ struct draw_context
    boolean clip_z;
    boolean clip_user;
    boolean guard_band_xy;
-   boolean clip_points_xy;
+   boolean guard_band_points_xy;
 
    boolean force_passthrough; /**< never clip or shade */
 
@@ -252,6 +252,7 @@ struct draw_context
 
    struct pipe_viewport_state viewports[PIPE_MAX_VIEWPORTS];
    boolean identity_viewport;
+   boolean bypass_viewport;
 
    /** Vertex shader state */
    struct {
@@ -318,9 +319,7 @@ struct draw_context
    unsigned start_instance;
    unsigned start_index;
 
-#ifdef HAVE_LLVM
    struct draw_llvm *llvm;
-#endif
 
    /** Texture sampler and sampler view state.
     * Note that we have arrays indexed by shader type.  At this time
@@ -480,6 +479,9 @@ void
 draw_stats_clipper_primitives(struct draw_context *draw,
                               const struct draw_prim_info *prim_info);
 
+void draw_update_clip_flags(struct draw_context *draw);
+void draw_update_viewport_flags(struct draw_context *draw);
+
 /** 
  * Return index i from the index buffer.
  * If the index buffer would overflow we return the
@@ -492,18 +494,18 @@ draw_stats_clipper_primitives(struct draw_context *draw,
  * Return index of the given viewport clamping it
  * to be between 0 <= and < PIPE_MAX_VIEWPORTS
  */
-static INLINE unsigned
+static inline unsigned
 draw_clamp_viewport_idx(int idx)
 {
-   return ((PIPE_MAX_VIEWPORTS > idx || idx < 0) ? idx : 0);
+   return ((PIPE_MAX_VIEWPORTS > idx && idx >= 0) ? idx : 0);
 }
 
 /**
  * Adds two unsigned integers and if the addition
  * overflows then it returns the value from
- * from the overflow_value variable.
+ * the overflow_value variable.
  */
-static INLINE unsigned
+static inline unsigned
 draw_overflow_uadd(unsigned a, unsigned b,
                    unsigned overflow_value)
 {