summaryrefslogtreecommitdiff
path: root/src/gallium/include/pipe/p_screen.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/include/pipe/p_screen.h')
-rw-r--r--src/gallium/include/pipe/p_screen.h60
1 files changed, 46 insertions, 14 deletions
diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h
index 17d1548253b..ed3a026023b 100644
--- a/src/gallium/include/pipe/p_screen.h
+++ b/src/gallium/include/pipe/p_screen.h
@@ -55,6 +55,7 @@ struct pipe_winsys;
struct pipe_buffer;
+
/**
* Gallium screen/adapter context. Basically everything
* hardware-specific that doesn't actually require a rendering
@@ -112,8 +113,7 @@ struct pipe_screen {
const unsigned *stride,
struct pipe_buffer *buffer);
- void (*texture_release)(struct pipe_screen *,
- struct pipe_texture **pt);
+ void (*texture_destroy)(struct pipe_texture *pt);
/** Get a surface which is a "view" into a texture */
struct pipe_surface *(*get_tex_surface)(struct pipe_screen *,
@@ -122,18 +122,25 @@ struct pipe_screen {
unsigned zslice,
unsigned usage );
- /* Surfaces allocated by the above must be released here:
- */
- void (*tex_surface_release)( struct pipe_screen *,
- struct pipe_surface ** );
+ void (*tex_surface_destroy)(struct pipe_surface *);
- void *(*surface_map)( struct pipe_screen *,
- struct pipe_surface *surface,
- unsigned flags );
+ /** Get a transfer object for transferring data to/from a texture */
+ struct pipe_transfer *(*get_tex_transfer)(struct pipe_screen *,
+ struct pipe_texture *texture,
+ unsigned face, unsigned level,
+ unsigned zslice,
+ enum pipe_transfer_usage usage,
+ unsigned x, unsigned y,
+ unsigned w, unsigned h);
+
+ void (*tex_transfer_destroy)(struct pipe_transfer *);
+
+ void *(*transfer_map)( struct pipe_screen *,
+ struct pipe_transfer *transfer );
- void (*surface_unmap)( struct pipe_screen *,
- struct pipe_surface *surface );
+ void (*transfer_unmap)( struct pipe_screen *,
+ struct pipe_transfer *transfer );
/**
@@ -195,12 +202,37 @@ struct pipe_screen {
void *(*buffer_map)( struct pipe_screen *screen,
struct pipe_buffer *buf,
unsigned usage );
+ /**
+ * Map a subrange of the buffer data store into the client's address space.
+ *
+ * The returned pointer is always relative to buffer start, regardless of
+ * the specified range. This is different from the ARB_map_buffer_range
+ * semantics because we don't forbid multiple mappings of the same buffer
+ * (yet).
+ */
+ void *(*buffer_map_range)( struct pipe_screen *screen,
+ struct pipe_buffer *buf,
+ unsigned offset,
+ unsigned length,
+ unsigned usage);
+
+ /**
+ * Notify a range that was actually written into.
+ *
+ * The range is relative to the buffer start, regardless of the range
+ * specified to buffer_map_range. This is different from the
+ * ARB_map_buffer_range semantics because we don't forbid multiple mappings
+ * of the same buffer (yet).
+ */
+ void (*buffer_flush_mapped_range)( struct pipe_screen *screen,
+ struct pipe_buffer *buf,
+ unsigned offset,
+ unsigned length);
void (*buffer_unmap)( struct pipe_screen *screen,
- struct pipe_buffer *buf );
+ struct pipe_buffer *buf );
- void (*buffer_destroy)( struct pipe_screen *screen,
- struct pipe_buffer *buf );
+ void (*buffer_destroy)( struct pipe_buffer *buf );
/**