summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2010-02-07 00:13:03 +0800
committerChia-I Wu <olvaffe@gmail.com>2010-02-07 00:13:48 +0800
commit3067481e92d64694c7272442498a442924d55828 (patch)
tree8d5644f34089bc7e1d68ce4c15617cf579d982c4
parentfcceafbcb67f97264d3e880ac4389770a2799454 (diff)
Suffix st_context and st_framebuffer with _iface.
-rw-r--r--st_api.h54
1 files changed, 28 insertions, 26 deletions
diff --git a/st_api.h b/st_api.h
index 8feaade..5a47b63 100644
--- a/st_api.h
+++ b/st_api.h
@@ -63,7 +63,7 @@ enum st_api_type {
};
/**
- * Used in st_context->teximage.
+ * Used in st_context_iface->teximage.
*/
enum st_texture_type {
ST_TEXTURE_1D,
@@ -175,7 +175,7 @@ struct st_visual
* The thread syncronisation is put inside the framebuffer
* and only called once the framebuffer has become dirty.
*/
-struct st_framebuffer
+struct st_framebuffer_iface
{
/**
* Available for the state tracker manager to use.
@@ -195,7 +195,7 @@ struct st_framebuffer
*
* @att is one of the front buffer attachments.
*/
- boolean (*flush_front)(struct st_framebuffer *stfb,
+ boolean (*flush_front)(struct st_framebuffer_iface *stfbi,
enum st_attachment_type statt);
/**
@@ -215,7 +215,7 @@ struct st_framebuffer
* the last call might be destroyed. This behavior might change in the
* future.
*/
- boolean (*validate)(struct st_framebuffer *stfb,
+ boolean (*validate)(struct st_framebuffer_iface *stfbi,
const enum st_attachment_type *statts,
unsigned count,
struct pipe_texture **out);
@@ -226,7 +226,7 @@ struct st_framebuffer
*
* This entity is created from st_api and used by the state tracker manager.
*/
-struct st_context
+struct st_context_iface
{
/**
* The API of the context.
@@ -241,7 +241,7 @@ struct st_context
/**
* Destroy the context.
*/
- void (*destroy)(struct st_context *stctx);
+ void (*destroy)(struct st_context_iface *stctxi);
/**
* Lock and unlock a state tracker context resource.
@@ -251,9 +251,9 @@ struct st_context
* can lengthen the lifetime of the data structure, it is valid only until
* unlocked.
*/
- void *(*lock_resource)(struct st_context *stctx,
+ void *(*lock_resource)(struct st_context_iface *stctxi,
enum st_context_resource_type type, void *res);
- void (*unlock_resource)(struct st_context *stctx,
+ void (*unlock_resource)(struct st_context_iface *stctxi,
enum st_context_resource_type type, void *res);
/**
@@ -261,7 +261,7 @@ struct st_context
*
* The state tracker manager calls this function to let the rendering
* context know that it should update the textures it got from
- * st_framebuffer::validate. It should do so at the latest time possible.
+ * st_framebuffer_iface::validate. It should do so at the latest time possible.
* Possible right before sending triangles to the pipe context.
*
* For certain platforms this function might be called from a thread other
@@ -272,13 +272,13 @@ struct st_context
*
* Thus reducing the sync primitive needed to a single atomic flag.
*/
- void (*notify_invalid_framebuffer)(struct st_context *stctx,
- struct st_framebuffer *stfb);
+ void (*notify_invalid_framebuffer)(struct st_context_iface *stctxi,
+ struct st_framebuffer_iface *stfbi);
/**
* Flush all drawing from context to the pipe also flushes the pipe.
*/
- void (*flush)(struct st_context *stctx, unsigned flags,
+ void (*flush)(struct st_context_iface *stctxi, unsigned flags,
struct pipe_fence_handle **fence);
/**
@@ -286,15 +286,15 @@ struct st_context
*
* This function is optional.
*/
- boolean (*teximage)(struct st_context *stctx, enum st_texture_type target,
+ boolean (*teximage)(struct st_context_iface *stctxi, enum st_texture_type target,
int level, enum pipe_format internal_format,
struct pipe_texture *tex, boolean mipmap);
/**
* Used to implement glXCopyContext.
*/
- void (*copy)(struct st_context *stctx, struct st_context *stsrc,
- unsigned mask);
+ void (*copy)(struct st_context_iface *stctxi,
+ struct st_context_iface *stsrci, unsigned mask);
};
@@ -314,9 +314,11 @@ struct st_manager
* can lengthen the lifetime of the data structure, it is valid only until
* unlocked.
*/
- void *(*lock_resource)(struct st_manager *smapi, struct st_context *stctx,
+ void *(*lock_resource)(struct st_manager *smapi,
+ struct st_context_iface *stctxi,
enum st_manager_resource_type type, void *res);
- void (*unlock_resource)(struct st_manager *smapi, struct st_context *stctx,
+ void (*unlock_resource)(struct st_manager *smapi,
+ struct st_context_iface *stctxi,
enum st_manager_resource_type type, void *res);
};
@@ -352,24 +354,24 @@ struct st_api
* the pipe_screen can create contexts.
* XXX: Is visual needed?
*/
- struct st_context *(*create_context)(struct st_api *stapi,
- struct st_manager *smapi,
- struct pipe_context *pipe,
- const struct st_visual *visual,
- struct st_context *stshare);
+ struct st_context_iface *(*create_context)(struct st_api *stapi,
+ struct st_manager *smapi,
+ struct pipe_context *pipe,
+ const struct st_visual *visual,
+ struct st_context_iface *stsharei);
/**
* Bind the context to the calling thread with draw and read as drawables.
*/
boolean (*make_current)(struct st_api *stapi,
- struct st_context *stctx,
- struct st_framebuffer *stdraw,
- struct st_framebuffer *stread);
+ struct st_context_iface *stctxi,
+ struct st_framebuffer_iface *stdrawi,
+ struct st_framebuffer_iface *streadi);
/**
* Get the currently bound context in the calling thread.
*/
- struct st_context *(*get_current)(struct st_api *stapi);
+ struct st_context_iface *(*get_current)(struct st_api *stapi);
};
/**