+ /** performance / info queries for HUD */
+ struct {
+ uint64_t num_draw_calls; /**< SVGA_QUERY_DRAW_CALLS */
+ uint64_t num_fallbacks; /**< SVGA_QUERY_NUM_FALLBACKS */
+ uint64_t num_flushes; /**< SVGA_QUERY_NUM_FLUSHES */
+ uint64_t num_validations; /**< SVGA_QUERY_NUM_VALIDATIONS */
+ uint64_t map_buffer_time; /**< SVGA_QUERY_MAP_BUFFER_TIME */
+ uint64_t num_buffers_mapped; /**< SVGA_QUERY_NUM_BUFFERS_MAPPED */
+ uint64_t num_textures_mapped; /**< SVGA_QUERY_NUM_TEXTURES_MAPPED */
+ uint64_t command_buffer_size; /**< SVGA_QUERY_COMMAND_BUFFER_SIZE */
+ uint64_t flush_time; /**< SVGA_QUERY_FLUSH_TIME */
+ uint64_t surface_write_flushes; /**< SVGA_QUERY_SURFACE_WRITE_FLUSHES */
+ uint64_t num_readbacks; /**< SVGA_QUERY_NUM_READBACKS */
+ uint64_t num_resource_updates; /**< SVGA_QUERY_NUM_RESOURCE_UPDATES */
+ uint64_t num_buffer_uploads; /**< SVGA_QUERY_NUM_BUFFER_UPLOADS */
+ uint64_t num_const_buf_updates; /**< SVGA_QUERY_NUM_CONST_BUF_UPDATES */
+ uint64_t num_const_updates; /**< SVGA_QUERY_NUM_CONST_UPDATES */
+ uint64_t num_shaders; /**< SVGA_QUERY_NUM_SHADERS */
+
+ /** The following are summed for SVGA_QUERY_NUM_STATE_OBJECTS */
+ uint64_t num_blend_objects;
+ uint64_t num_depthstencil_objects;
+ uint64_t num_rasterizer_objects;
+ uint64_t num_sampler_objects;
+ uint64_t num_samplerview_objects;
+ uint64_t num_vertexelement_objects;
+
+ uint64_t num_surface_views; /**< SVGA_QUERY_NUM_SURFACE_VIEWS */
+ uint64_t num_bytes_uploaded; /**< SVGA_QUERY_NUM_BYTES_UPLOADED */
+ uint64_t num_generate_mipmap; /**< SVGA_QUERY_NUM_GENERATE_MIPMAP */
+
+ boolean uses_time; /**< os_time_get() calls needed? */
+ } hud;
+
+ /** The currently bound stream output targets */
+ unsigned num_so_targets;
+ struct svga_winsys_surface *so_surfaces[SVGA3D_DX_MAX_SOTARGETS];
+ struct pipe_stream_output_target *so_targets[SVGA3D_DX_MAX_SOTARGETS];
+ struct svga_stream_output *current_so;
+
+ /** A blend state with blending disabled, for falling back to when blending
+ * is illegal (e.g. an integer texture is bound)
+ */
+ struct svga_blend_state *noop_blend;
+
+ struct {
+ struct pipe_resource *texture;
+ struct svga_pipe_sampler_view *sampler_view;
+ void *sampler;
+ } polygon_stipple;
+
+ /** Alternate rasterizer states created for point sprite */
+ struct svga_rasterizer_state *rasterizer_no_cull[2];
+
+ /** Current conditional rendering predicate */
+ struct {
+ SVGA3dQueryId query_id;
+ boolean cond;
+ } pred;
+
+ boolean render_condition;