summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/p_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/p_context.h')
-rw-r--r--src/mesa/pipe/p_context.h44
1 files changed, 23 insertions, 21 deletions
diff --git a/src/mesa/pipe/p_context.h b/src/mesa/pipe/p_context.h
index 00379fbacf..92ca7dd8e3 100644
--- a/src/mesa/pipe/p_context.h
+++ b/src/mesa/pipe/p_context.h
@@ -29,9 +29,13 @@
#define PIPE_CONTEXT_H
#include "p_state.h"
+#include <stdint.h>
struct pipe_state_cache;
+/* Opaque driver handles:
+ */
+struct pipe_query;
/**
* Gallium rendering context. Basically:
@@ -81,9 +85,19 @@ struct pipe_context {
/**
* Query objects
*/
- void (*begin_query)(struct pipe_context *pipe, struct pipe_query_object *q);
- void (*end_query)(struct pipe_context *pipe, struct pipe_query_object *q);
- void (*wait_query)(struct pipe_context *pipe, struct pipe_query_object *q);
+ struct pipe_query *(*create_query)( struct pipe_context *pipe,
+ unsigned query_type );
+
+ void (*destroy_query)(struct pipe_context *pipe,
+ struct pipe_query *q);
+
+ void (*begin_query)(struct pipe_context *pipe, struct pipe_query *q);
+ void (*end_query)(struct pipe_context *pipe, struct pipe_query *q);
+
+ boolean (*get_query_result)(struct pipe_context *pipe,
+ struct pipe_query *q,
+ boolean wait,
+ uint64_t *result);
/*
* State functions
@@ -132,31 +146,25 @@ struct pipe_context {
void (*set_clip_state)( struct pipe_context *,
const struct pipe_clip_state * );
- void (*set_clear_color_state)( struct pipe_context *,
- const struct pipe_clear_color_state * );
-
void (*set_constant_buffer)( struct pipe_context *,
uint shader, uint index,
const struct pipe_constant_buffer *buf );
- void (*set_feedback_state)( struct pipe_context *,
- const struct pipe_feedback_state *);
-
void (*set_framebuffer_state)( struct pipe_context *,
const struct pipe_framebuffer_state * );
void (*set_polygon_stipple)( struct pipe_context *,
const struct pipe_poly_stipple * );
- void (*set_sampler_units)( struct pipe_context *,
- uint num_samplers, const uint *units );
-
void (*set_scissor_state)( struct pipe_context *,
const struct pipe_scissor_state * );
- void (*set_texture_state)( struct pipe_context *,
- unsigned unit,
- struct pipe_texture * );
+
+ /* Currently a sampler is constrained to sample from a single texture:
+ */
+ void (*set_sampler_texture)( struct pipe_context *,
+ unsigned sampler,
+ struct pipe_texture * );
void (*set_viewport_state)( struct pipe_context *,
const struct pipe_viewport_state * );
@@ -172,12 +180,6 @@ struct pipe_context {
unsigned index,
const struct pipe_vertex_element * );
- /*
- * Vertex feedback
- */
- void (*set_feedback_buffer)(struct pipe_context *,
- unsigned index,
- const struct pipe_feedback_buffer *);
/** Get a surface which is a "view" into a texture */
struct pipe_surface *(*get_tex_surface)(struct pipe_context *pipe,