summaryrefslogtreecommitdiff
path: root/src/gallium/include/pipe
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/include/pipe')
-rw-r--r--src/gallium/include/pipe/p_compiler.h5
-rw-r--r--src/gallium/include/pipe/p_context.h9
-rw-r--r--src/gallium/include/pipe/p_defines.h5
-rw-r--r--src/gallium/include/pipe/p_screen.h49
-rw-r--r--src/gallium/include/pipe/p_state.h11
5 files changed, 36 insertions, 43 deletions
diff --git a/src/gallium/include/pipe/p_compiler.h b/src/gallium/include/pipe/p_compiler.h
index b93b38310a..e2766d15cd 100644
--- a/src/gallium/include/pipe/p_compiler.h
+++ b/src/gallium/include/pipe/p_compiler.h
@@ -31,13 +31,8 @@
#include "p_config.h"
-#ifndef XFree86Server
#include <stdlib.h>
#include <string.h>
-#else
-#include "xf86_ansic.h"
-#include "xf86_libc.h"
-#endif
#include <stddef.h>
#include <stdarg.h>
diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h
index f82b77903e..376b01aa69 100644
--- a/src/gallium/include/pipe/p_context.h
+++ b/src/gallium/include/pipe/p_context.h
@@ -177,6 +177,12 @@ struct pipe_context {
void (*bind_gs_state)(struct pipe_context *, void *);
void (*delete_gs_state)(struct pipe_context *, void *);
+ void * (*create_vertex_elements_state)(struct pipe_context *,
+ unsigned num_elements,
+ const struct pipe_vertex_element *);
+ void (*bind_vertex_elements_state)(struct pipe_context *, void *);
+ void (*delete_vertex_elements_state)(struct pipe_context *, void *);
+
/*@}*/
/**
@@ -220,9 +226,6 @@ struct pipe_context {
unsigned num_buffers,
const struct pipe_vertex_buffer * );
- void (*set_vertex_elements)( struct pipe_context *,
- unsigned num_elements,
- const struct pipe_vertex_element * );
/*@}*/
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index 5cebd43ace..5c97dc87e8 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -176,11 +176,12 @@ enum pipe_texture_target {
#define PIPE_TEX_COMPARE_R_TO_TEXTURE 1
#define PIPE_TEXTURE_USAGE_RENDER_TARGET 0x1
-#define PIPE_TEXTURE_USAGE_DISPLAY_TARGET 0x2 /* ie a backbuffer */
-#define PIPE_TEXTURE_USAGE_PRIMARY 0x4 /* ie a frontbuffer */
+#define PIPE_TEXTURE_USAGE_DISPLAY_TARGET 0x2 /* windows presentable buffer, ie a backbuffer */
+#define PIPE_TEXTURE_USAGE_SCANOUT 0x4 /* ie a frontbuffer */
#define PIPE_TEXTURE_USAGE_DEPTH_STENCIL 0x8
#define PIPE_TEXTURE_USAGE_SAMPLER 0x10
#define PIPE_TEXTURE_USAGE_DYNAMIC 0x20
+#define PIPE_TEXTURE_USAGE_SHARED 0x40
/** Pipe driver custom usage flags should be greater or equal to this value */
#define PIPE_TEXTURE_USAGE_CUSTOM (1 << 16)
diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h
index e4a9222809..b771bfe85e 100644
--- a/src/gallium/include/pipe/p_screen.h
+++ b/src/gallium/include/pipe/p_screen.h
@@ -50,6 +50,8 @@ extern "C" {
/** Opaque type */
+struct winsys_handle;
+/** Opaque type */
struct pipe_fence_handle;
struct pipe_winsys;
struct pipe_buffer;
@@ -108,16 +110,23 @@ struct pipe_screen {
const struct pipe_texture *templat);
/**
- * Create a new texture object, using the given template info, but on top of
- * existing memory.
- *
- * It is assumed that the buffer data is layed out according to the expected
- * by the hardware. NULL will be returned if any inconsistency is found.
+ * Create a texture from a winsys_handle. The handle is often created in
+ * another process by first creating a pipe texture and then calling
+ * texture_get_handle.
+ */
+ struct pipe_texture * (*texture_from_handle)(struct pipe_screen *,
+ const struct pipe_texture *templat,
+ struct winsys_handle *handle);
+
+ /**
+ * Get a winsys_handle from a texture. Some platforms/winsys requires
+ * that the texture is created with a special usage flag like
+ * DISPLAYTARGET or PRIMARY.
*/
- struct pipe_texture * (*texture_blanket)(struct pipe_screen *,
- const struct pipe_texture *templat,
- const unsigned *stride,
- struct pipe_buffer *buffer);
+ boolean (*texture_get_handle)(struct pipe_screen *,
+ struct pipe_texture *tex,
+ struct winsys_handle *handle);
+
void (*texture_destroy)(struct pipe_texture *pt);
@@ -187,23 +196,6 @@ struct pipe_screen {
void *ptr,
unsigned bytes);
- /**
- * Allocate storage for a display target surface.
- *
- * Often surfaces which are meant to be blitted to the front screen (i.e.,
- * display targets) must be allocated with special characteristics, memory
- * pools, or obtained directly from the windowing system.
- *
- * This callback is invoked by the pipe_screenwhen creating a texture marked
- * with the PIPE_TEXTURE_USAGE_DISPLAY_TARGET flag to get the underlying
- * buffer storage.
- */
- struct pipe_buffer *(*surface_buffer_create)(struct pipe_screen *screen,
- unsigned width, unsigned height,
- enum pipe_format format,
- unsigned usage,
- unsigned tex_usage,
- unsigned *stride);
/**
@@ -273,6 +265,7 @@ struct pipe_screen {
/**
* Do any special operations to ensure buffer size is correct
+ * \param context_private the private data of the calling context
*/
void (*update_buffer)( struct pipe_screen *ws,
void *context_private );
@@ -280,10 +273,12 @@ struct pipe_screen {
/**
* Do any special operations to ensure frontbuffer contents are
* displayed, eg copy fake frontbuffer.
+ * \param winsys_drawable_handle an opaque handle that the calling context
+ * gets out-of-band
*/
void (*flush_frontbuffer)( struct pipe_screen *screen,
struct pipe_surface *surf,
- void *context_private );
+ void *winsys_drawable_handle );
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
index 02558520bf..3a97d888ce 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -249,7 +249,7 @@ struct pipe_framebuffer_state
{
unsigned width, height;
- /** multiple colorbuffers for multiple render targets */
+ /** multiple color buffers for multiple render targets */
unsigned nr_cbufs;
struct pipe_surface *cbufs[PIPE_MAX_COLOR_BUFS];
@@ -285,12 +285,12 @@ struct pipe_sampler_state
struct pipe_surface
{
struct pipe_reference reference;
- enum pipe_format format; /**< PIPE_FORMAT_x */
+ enum pipe_format format;
unsigned width; /**< logical width in pixels */
unsigned height; /**< logical height in pixels */
unsigned layout; /**< PIPE_SURFACE_LAYOUT_x */
unsigned offset; /**< offset from start of buffer, in bytes */
- unsigned usage; /**< PIPE_BUFFER_USAGE_* */
+ unsigned usage; /**< bitmask of PIPE_BUFFER_USAGE_x */
unsigned zslice;
struct pipe_texture *texture; /**< texture into which this is a view */
@@ -336,7 +336,7 @@ struct pipe_texture
unsigned nr_samples:8; /**< for multisampled surfaces, nr of samples */
- unsigned tex_usage; /* PIPE_TEXTURE_USAGE_* */
+ unsigned tex_usage; /**< bitmask of PIPE_TEXTURE_USAGE_* */
struct pipe_screen *screen; /**< screen that this texture belongs to */
};
@@ -373,9 +373,8 @@ struct pipe_vertex_element
* this attribute live in?
*/
unsigned vertex_buffer_index:8;
- unsigned nr_components:8;
- enum pipe_format src_format; /**< PIPE_FORMAT_* */
+ enum pipe_format src_format;
};