svga: adapt to stencil ref changes
[mesa.git] / src / gallium / drivers / svga / svga_context.h
index fa7f6cb3bb9becd3cfdf835c0e3074e852635089..03302e2a6ec12175b84d3fd6d6b996d7a626b494 100644 (file)
@@ -37,6 +37,7 @@
 
 
 #define SVGA_TEX_UNITS 8
+#define SVGA_MAX_POINTSIZE 80.0
 
 struct draw_vertex_shader;
 struct svga_shader_result;
@@ -115,7 +116,6 @@ struct svga_depth_stencil_state {
    /* SVGA3D has one ref/mask/writemask triple shared between front &
     * back face stencil.  We really need two:
     */
-   unsigned stencil_ref:8;
    unsigned stencil_mask:8;
    unsigned stencil_writemask:8;
 
@@ -145,8 +145,6 @@ struct svga_rasterizer_state {
    float slopescaledepthbias;
    float depthbias;
    float pointsize;
-   float pointsize_min;
-   float pointsize_max;
    
    unsigned hw_unfilled:16;         /* PIPE_POLYGON_MODE_x */
    unsigned need_pipeline:16;    /* which prims do we need help for? */
@@ -200,6 +198,7 @@ struct svga_state
    struct pipe_poly_stipple poly_stipple;
    struct pipe_scissor_state scissor;
    struct pipe_blend_color blend_color;
+   struct pipe_stencil_ref stencil_ref;
    struct pipe_clip_state clip;
    struct pipe_viewport_state viewport;
 
@@ -266,8 +265,6 @@ struct svga_hw_draw_state
    unsigned ts[16][TS_MAX];
    float cb[PIPE_SHADER_TYPES][CB_MAX][4];
 
-   unsigned shader_id[PIPE_SHADER_TYPES];
-   
    struct svga_shader_result *fs;
    struct svga_shader_result *vs;
    struct svga_hw_view_state views[PIPE_MAX_SAMPLERS];
@@ -329,10 +326,6 @@ struct svga_context
 
       unsigned texture_timestamp;
 
-      /* Internally generated shaders:
-       */
-      unsigned white_fs_id;
-
       /* 
        */
       struct svga_sw_state          sw;
@@ -383,6 +376,7 @@ struct svga_context
 #define SVGA_NEW_VS_RESULT           0x1000000
 #define SVGA_NEW_ZERO_STRIDE         0x2000000
 #define SVGA_NEW_TEXTURE_FLAGS       0x4000000
+#define SVGA_NEW_STENCIL_REF         0x8000000
 
 
 
@@ -432,6 +426,10 @@ void svga_context_flush( struct svga_context *svga,
 
 void svga_hwtnl_flush_retry( struct svga_context *svga );
 
+struct pipe_context *
+svga_context_create(struct pipe_screen *screen,
+                   void *priv);
+
 
 /***********************************************************************
  * Inline conversion functions.  These are better-typed than the