#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"
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
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 */
unsigned view_min_lod;
unsigned view_max_lod;
- SVGA3dSamplerId id;
+ SVGA3dSamplerId id[2];
};
struct svga_geometry_shader *gs; /* derived GS */
struct pipe_vertex_buffer vb[PIPE_MAX_ATTRIBS];
- struct pipe_index_buffer ib;
/** Constant buffers for each shader.
* The size should probably always match with that of
* svga_shader_emitter_v10.num_shader_consts.
struct pipe_framebuffer_state framebuffer;
struct svga_prescale prescale;
+
+ /* VGPU10 state */
+ unsigned num_rendertargets;
+ struct pipe_surface *rtv[SVGA3D_MAX_RENDER_TARGETS];
+ struct pipe_surface *dsv;
};
struct svga_hw_view_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];
struct pipe_sampler_view
*sampler_views[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS];
- unsigned num_rendertargets;
- struct pipe_surface *rtv[SVGA3D_MAX_RENDER_TARGETS];
- struct pipe_surface *dsv;
-
/* used for rebinding */
unsigned default_constbuf_size[PIPE_SHADER_TYPES];
+
+ boolean rasterizer_discard; /* set if rasterization is disabled */
+ boolean has_backed_views; /* set if any of the rtv/dsv is a backed surface view */
};
/** Alternate rasterizer states created for point sprite */
struct svga_rasterizer_state *rasterizer_no_cull[2];
+ /** Depth stencil state created to disable depth stencil test */
+ struct svga_depth_stencil_state *depthstencil_disable;
+
/** Current conditional rendering predicate */
struct {
SVGA3dQueryId query_id;
} pred;
boolean render_condition;
+ boolean disable_rasterizer; /* Set if to disable rasterization */
};
/* A flag for each state_tracker state object:
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