summaryrefslogtreecommitdiffstats
path: root/src/gallium/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/include')
-rw-r--r--src/gallium/include/pipe/p_config.h5
-rw-r--r--src/gallium/include/pipe/p_context.h28
-rw-r--r--src/gallium/include/pipe/p_defines.h21
-rw-r--r--src/gallium/include/pipe/p_shader_tokens.h28
-rw-r--r--src/gallium/include/pipe/p_state.h17
-rw-r--r--src/gallium/include/state_tracker/graw.h3
6 files changed, 86 insertions, 16 deletions
diff --git a/src/gallium/include/pipe/p_config.h b/src/gallium/include/pipe/p_config.h
index b81702a4fac..c6ea198dbb4 100644
--- a/src/gallium/include/pipe/p_config.h
+++ b/src/gallium/include/pipe/p_config.h
@@ -146,6 +146,11 @@
#define PIPE_OS_UNIX
#endif
+#if defined(__GNU__)
+#define PIPE_OS_HURD
+#define PIPE_OS_UNIX
+#endif
+
#if defined(__sun)
#define PIPE_OS_SOLARIS
#define PIPE_OS_UNIX
diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h
index 3e082bef2ff..7ec3d63a3fd 100644
--- a/src/gallium/include/pipe/p_context.h
+++ b/src/gallium/include/pipe/p_context.h
@@ -101,6 +101,11 @@ struct pipe_context {
unsigned mode,
unsigned start,
unsigned count);
+
+ /**
+ * Draw the stream output buffer at index 0
+ */
+ void (*draw_stream_output)( struct pipe_context *pipe, unsigned mode );
/*@}*/
/**
@@ -130,10 +135,10 @@ struct pipe_context {
* \param wait if true, this query will block until the result is ready
* \return TRUE if results are ready, FALSE otherwise
*/
- boolean (*get_query_result)(struct pipe_context *pipe,
+ boolean (*get_query_result)(struct pipe_context *pipe,
struct pipe_query *q,
boolean wait,
- uint64_t *result);
+ void *result);
/*@}*/
/**
@@ -153,6 +158,9 @@ struct pipe_context {
void (*bind_vertex_sampler_states)(struct pipe_context *,
unsigned num_samplers,
void **samplers);
+ void (*bind_geometry_sampler_states)(struct pipe_context *,
+ unsigned num_samplers,
+ void **samplers);
void (*delete_sampler_state)(struct pipe_context *, void *);
void * (*create_rasterizer_state)(struct pipe_context *,
@@ -186,6 +194,11 @@ struct pipe_context {
void (*bind_vertex_elements_state)(struct pipe_context *, void *);
void (*delete_vertex_elements_state)(struct pipe_context *, void *);
+ void * (*create_stream_output_state)(struct pipe_context *,
+ const struct pipe_stream_output_state *);
+ void (*bind_stream_output_state)(struct pipe_context *, void *);
+ void (*delete_stream_output_state)(struct pipe_context*, void*);
+
/*@}*/
/**
@@ -228,10 +241,21 @@ struct pipe_context {
unsigned num_views,
struct pipe_sampler_view **);
+ void (*set_geometry_sampler_views)(struct pipe_context *,
+ unsigned num_views,
+ struct pipe_sampler_view **);
+
void (*set_vertex_buffers)( struct pipe_context *,
unsigned num_buffers,
const struct pipe_vertex_buffer * );
+ void (*set_stream_output_buffers)(struct pipe_context *,
+ struct pipe_resource **buffers,
+ int *offsets, /*array of offsets
+ from the start of each
+ of the buffers */
+ int num_buffers);
+
/*@}*/
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index b00677425ce..3b87d998ceb 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -288,6 +288,7 @@ enum pipe_transfer_usage {
#define PIPE_BIND_DISPLAY_TARGET (1 << 8) /* flush_front_buffer */
#define PIPE_BIND_TRANSFER_WRITE (1 << 9) /* get_transfer */
#define PIPE_BIND_TRANSFER_READ (1 << 10) /* get_transfer */
+#define PIPE_BIND_STREAM_OUTPUT (1 << 11) /* set_stream_output_buffers */
#define PIPE_BIND_CUSTOM (1 << 16) /* state-tracker/winsys usages */
/* The first two flags above were previously part of the amorphous
@@ -322,6 +323,7 @@ enum pipe_transfer_usage {
#define PIPE_USAGE_STATIC 2 /* same as immutable?? */
#define PIPE_USAGE_IMMUTABLE 3 /* no change after first upload */
#define PIPE_USAGE_STREAM 4 /* upload, draw, upload, draw */
+#define PIPE_USAGE_STAGING 5 /* supports data transfers from the GPU to the CPU */
/* These are intended to be used in calls to is_format_supported, but
@@ -379,7 +381,10 @@ enum pipe_transfer_usage {
#define PIPE_QUERY_PRIMITIVES_GENERATED 1
#define PIPE_QUERY_PRIMITIVES_EMITTED 2
#define PIPE_QUERY_TIME_ELAPSED 3
-#define PIPE_QUERY_TYPES 4
+#define PIPE_QUERY_SO_STATISTICS 5
+#define PIPE_QUERY_GPU_FINISHED 6
+#define PIPE_QUERY_TIMESTAMP_DISJOINT 7
+#define PIPE_QUERY_TYPES 8
/**
@@ -445,6 +450,7 @@ enum pipe_cap {
PIPE_CAP_TGSI_CONT_SUPPORTED,
PIPE_CAP_BLEND_EQUATION_SEPARATE,
PIPE_CAP_SM3, /*< Shader Model, supported */
+ PIPE_CAP_STREAM_OUTPUT,
PIPE_CAP_MAX_PREDICATE_REGISTERS,
/** Maximum texture image units accessible from vertex and fragment shaders
* combined */
@@ -495,6 +501,19 @@ enum pipe_cap {
#define PIPE_REFERENCED_FOR_READ (1 << 0)
#define PIPE_REFERENCED_FOR_WRITE (1 << 1)
+/**
+ * Composite query types
+ */
+struct pipe_query_data_so_statistics
+{
+ uint64_t num_primitives_written;
+ uint64_t primitives_storage_needed;
+};
+struct pipe_query_data_timestamp_disjoint
+{
+ uint64_t frequency;
+ boolean disjoint;
+};
#ifdef __cplusplus
}
diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h
index 0a70237f260..9df20ea8581 100644
--- a/src/gallium/include/pipe/p_shader_tokens.h
+++ b/src/gallium/include/pipe/p_shader_tokens.h
@@ -65,16 +65,18 @@ struct tgsi_token
};
enum tgsi_file_type {
- TGSI_FILE_NULL =0,
- TGSI_FILE_CONSTANT =1,
- TGSI_FILE_INPUT =2,
- TGSI_FILE_OUTPUT =3,
- TGSI_FILE_TEMPORARY =4,
- TGSI_FILE_SAMPLER =5,
- TGSI_FILE_ADDRESS =6,
- TGSI_FILE_IMMEDIATE =7,
- TGSI_FILE_PREDICATE =8,
- TGSI_FILE_SYSTEM_VALUE =9,
+ TGSI_FILE_NULL =0,
+ TGSI_FILE_CONSTANT =1,
+ TGSI_FILE_INPUT =2,
+ TGSI_FILE_OUTPUT =3,
+ TGSI_FILE_TEMPORARY =4,
+ TGSI_FILE_SAMPLER =5,
+ TGSI_FILE_ADDRESS =6,
+ TGSI_FILE_IMMEDIATE =7,
+ TGSI_FILE_PREDICATE =8,
+ TGSI_FILE_SYSTEM_VALUE =9,
+ TGSI_FILE_IMMEDIATE_ARRAY =10,
+ TGSI_FILE_TEMPORARY_ARRAY =11,
TGSI_FILE_COUNT /**< how many TGSI_FILE_ types */
};
@@ -159,9 +161,9 @@ struct tgsi_declaration_semantic
struct tgsi_immediate
{
unsigned Type : 4; /**< TGSI_TOKEN_TYPE_IMMEDIATE */
- unsigned NrTokens : 8; /**< UINT */
+ unsigned NrTokens : 14; /**< UINT */
unsigned DataType : 4; /**< one of TGSI_IMM_x */
- unsigned Padding : 16;
+ unsigned Padding : 10;
};
union tgsi_immediate_data
@@ -173,7 +175,7 @@ union tgsi_immediate_data
#define TGSI_PROPERTY_GS_INPUT_PRIM 0
#define TGSI_PROPERTY_GS_OUTPUT_PRIM 1
-#define TGSI_PROPERTY_GS_MAX_VERTICES 2
+#define TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES 2
#define TGSI_PROPERTY_FS_COORD_ORIGIN 3
#define TGSI_PROPERTY_FS_COORD_PIXEL_CENTER 4
#define TGSI_PROPERTY_COUNT 5
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
index 5255b2003f8..6231f06ec71 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -60,9 +60,11 @@ extern "C" {
#define PIPE_MAX_CONSTANT_BUFFERS 32
#define PIPE_MAX_SAMPLERS 16
#define PIPE_MAX_VERTEX_SAMPLERS 16
+#define PIPE_MAX_GEOMETRY_SAMPLERS 16
#define PIPE_MAX_SHADER_INPUTS 16
#define PIPE_MAX_SHADER_OUTPUTS 16
#define PIPE_MAX_TEXTURE_LEVELS 16
+#define PIPE_MAX_SO_BUFFERS 4
struct pipe_reference
@@ -345,6 +347,21 @@ struct pipe_resource
unsigned flags; /**< bitmask of PIPE_RESOURCE_FLAG_x */
};
+struct pipe_stream_output_state
+{
+ /**< number of the output buffer to insert each element into */
+ int output_buffer[PIPE_MAX_SHADER_OUTPUTS];
+ /**< which register to grab each output from */
+ int register_index[PIPE_MAX_SHADER_OUTPUTS];
+ /**< TGSI_WRITEMASK signifying which components to output */
+ ubyte register_mask[PIPE_MAX_SHADER_OUTPUTS];
+ /**< number of outputs */
+ int num_outputs;
+
+ /**< stride for an entire vertex, only used if all output_buffers
+ * are 0 */
+ unsigned stride;
+};
/**
* Extra indexing info for (cube) texture resources.
diff --git a/src/gallium/include/state_tracker/graw.h b/src/gallium/include/state_tracker/graw.h
index e5b298e03d9..59b0e337c92 100644
--- a/src/gallium/include/state_tracker/graw.h
+++ b/src/gallium/include/state_tracker/graw.h
@@ -34,6 +34,9 @@ PUBLIC struct pipe_screen *graw_create_window_and_screen( int x,
PUBLIC void graw_set_display_func( void (*func)( void ) );
PUBLIC void graw_main_loop( void );
+PUBLIC void *graw_parse_geometry_shader( struct pipe_context *pipe,
+ const char *text );
+
PUBLIC void *graw_parse_vertex_shader( struct pipe_context *pipe,
const char *text );