nir: nir_shader_compiler_options: drop native_integers
[mesa.git] / src / gallium / drivers / svga / svga_context.h
index a268635d6af4d9ee1bc57ee7776e762c5240b161..fc63ec34670632bca0457a1d17955ebdb8a644ee 100644 (file)
@@ -31,7 +31,7 @@
 #include "pipe/p_defines.h"
 #include "pipe/p_state.h"
 
-#include "os/os_time.h"
+#include "util/os_time.h"
 
 #include "util/u_blitter.h"
 #include "util/list.h"
@@ -72,6 +72,8 @@ enum svga_hud {
    SVGA_QUERY_NUM_STATE_OBJECTS,
    SVGA_QUERY_NUM_SURFACE_VIEWS,
    SVGA_QUERY_NUM_GENERATE_MIPMAP,
+   SVGA_QUERY_NUM_FAILED_ALLOCATIONS,
+   SVGA_QUERY_NUM_COMMANDS_PER_DRAW,
 
 /*SVGA_QUERY_MAX has to be last because it is size of an array*/
    SVGA_QUERY_MAX
@@ -105,6 +107,7 @@ struct svga_blend_state {
    unsigned need_white_fragments:1;
    unsigned independent_blend_enable:1;
    unsigned alpha_to_coverage:1;
+   unsigned alpha_to_one:1;
    unsigned blend_color_alpha:1;  /**< set blend color to alpha value */
 
    /** Per-render target state */
@@ -209,7 +212,7 @@ struct svga_sampler_state {
    unsigned view_min_lod;
    unsigned view_max_lod;
 
-   SVGA3dSamplerId id;
+   SVGA3dSamplerId id[2];
 };
 
 
@@ -297,8 +300,6 @@ struct svga_state
    struct {
       unsigned flag_1d;
       unsigned flag_srgb;
-      unsigned flag_rect;  /* sampler views with rectangular texture target */
-      unsigned flag_buf;   /* sampler views with texture buffer target */
    } tex_flags;
 
    unsigned sample_mask;
@@ -347,9 +348,12 @@ struct svga_hw_draw_state
    unsigned rs[SVGA3D_RS_MAX];
    /** VGPU9 texture sampler and bindings state */
    unsigned ts[SVGA3D_PIXEL_SAMPLERREG_MAX][SVGA3D_TS_MAX];
+
    /** VGPU9 texture views */
    unsigned num_views;
+   unsigned num_backed_views; /* views with backing copy of texture */
    struct svga_hw_view_state views[PIPE_MAX_SAMPLERS];
+
    /** VGPU9 constant buffer values */
    float cb[PIPE_SHADER_TYPES][SVGA3D_CONSTREG_MAX][4];
 
@@ -675,6 +679,9 @@ struct pipe_context *
 svga_context_create(struct pipe_screen *screen,
                     void *priv, unsigned flags);
 
+void svga_toggle_render_condition(struct svga_context *svga,
+                                  boolean render_condition_enabled,
+                                  boolean on);
 
 /***********************************************************************
  * Inline conversion functions.  These are better-typed than the
@@ -710,6 +717,12 @@ svga_have_vgpu10(const struct svga_context *svga)
    return svga_screen(svga->pipe.screen)->sws->have_vgpu10;
 }
 
+static inline boolean
+svga_have_sm4_1(const struct svga_context *svga)
+{
+   return svga_screen(svga->pipe.screen)->sws->have_sm4_1;
+}
+
 static inline boolean
 svga_need_to_rebind_resources(const struct svga_context *svga)
 {