gallium: add flags parameter to pipe_screen::context_create
[mesa.git] / src / gallium / drivers / svga / svga_context.h
index 71a8eea3fe1ff1004965c0826e8dc74d1b9893e9..2726346bc50653430c01b9d345492425cf49d90c 100644 (file)
@@ -32,7 +32,7 @@
 #include "pipe/p_state.h"
 
 #include "util/u_blitter.h"
-#include "util/u_double_list.h"
+#include "util/list.h"
 
 #include "tgsi/tgsi_scan.h"
 
@@ -200,6 +200,10 @@ struct svga_sampler_state {
 struct svga_velems_state {
    unsigned count;
    struct pipe_vertex_element velem[PIPE_MAX_ATTRIBS];
+   SVGA3dDeclType decl_type[PIPE_MAX_ATTRIBS]; /**< vertex attrib formats */
+   unsigned adjust_attrib_range; /* bitmask of attrs needing range adjustment */
+   unsigned adjust_attrib_w_1;   /* bitmask of attrs needing w = 1 */
+   boolean need_swvfetch;
 };
 
 /* Use to calculate differences between state emitted to hardware and
@@ -304,8 +308,6 @@ struct svga_hw_draw_state
  */
 struct svga_sw_state
 {
-   unsigned ve_format[PIPE_MAX_ATTRIBS]; /* NEW_VELEMENT */
-
    /* which parts we need */
    boolean need_swvfetch;
    boolean need_pipeline;
@@ -374,6 +376,8 @@ struct svga_context
    struct {
       unsigned rendertargets:1;
       unsigned texture_samplers:1;
+      unsigned vs:1;
+      unsigned fs:1;
    } rebind;
 
    struct svga_hwtnl *hwtnl;
@@ -474,27 +478,27 @@ void svga_surfaces_flush(struct svga_context *svga);
 
 struct pipe_context *
 svga_context_create(struct pipe_screen *screen,
-                   void *priv);
+                   void *priv, unsigned flags);
 
 
 /***********************************************************************
  * Inline conversion functions.  These are better-typed than the
  * macros used previously:
  */
-static INLINE struct svga_context *
+static inline struct svga_context *
 svga_context( struct pipe_context *pipe )
 {
    return (struct svga_context *)pipe;
 }
 
 
-static INLINE boolean
+static inline boolean
 svga_have_gb_objects(const struct svga_context *svga)
 {
    return svga_screen(svga->pipe.screen)->sws->have_gb_objects;
 }
 
-static INLINE boolean
+static inline boolean
 svga_have_gb_dma(const struct svga_context *svga)
 {
    return svga_screen(svga->pipe.screen)->sws->have_gb_dma;