summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_context.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2010-06-14 02:28:44 +0200
committerMarek Olšák <[email protected]>2010-06-14 12:46:37 +0200
commit8874c9d7a3e59789843fa1b857e5318af17d146f (patch)
tree1452f9f247f8ab1a7b065c9bd3da0a6a5d07b22c /src/gallium/drivers/r300/r300_context.h
parent39826a2036315ccf8190b9e4c8c40d58bfdbfee9 (diff)
r300g: subclass pipe_surface
Diffstat (limited to 'src/gallium/drivers/r300/r300_context.h')
-rw-r--r--src/gallium/drivers/r300/r300_context.h27
1 files changed, 20 insertions, 7 deletions
diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h
index 05948f9ada6..48690838372 100644
--- a/src/gallium/drivers/r300/r300_context.h
+++ b/src/gallium/drivers/r300/r300_context.h
@@ -173,13 +173,8 @@ struct r300_sampler_view {
};
struct r300_texture_fb_state {
- /* Colorbuffer. */
- uint32_t colorpitch[R300_MAX_TEXTURE_LEVELS]; /* R300_RB3D_COLORPITCH[0-3]*/
- uint32_t us_out_fmt; /* R300_US_OUT_FMT[0-3] */
-
- /* Zbuffer. */
- uint32_t depthpitch[R300_MAX_TEXTURE_LEVELS]; /* R300_RB3D_DEPTHPITCH */
- uint32_t zb_format; /* R300_ZB_FORMAT */
+ uint32_t pitch[R300_MAX_TEXTURE_LEVELS]; /* COLORPITCH or DEPTHPITCH. */
+ uint32_t format; /* US_OUT_FMT or R300_ZB_FORMAT */
};
struct r300_texture_sampler_state {
@@ -275,6 +270,19 @@ struct r300_fence {
boolean signalled;
};
+struct r300_surface {
+ struct pipe_surface base;
+
+ /* Winsys buffer backing the texture. */
+ struct r300_winsys_buffer *buffer;
+
+ enum r300_buffer_domain domain;
+
+ uint32_t offset;
+ uint32_t pitch; /* COLORPITCH or DEPTHPITCH. */
+ uint32_t format; /* US_OUT_FMT or R300_ZB_FORMAT. */
+};
+
struct r300_texture {
/* Parent class */
struct u_resource b;
@@ -479,6 +487,11 @@ static INLINE struct r300_query* r300_query(struct pipe_query* q)
return (struct r300_query*)q;
}
+static INLINE struct r300_surface* r300_surface(struct pipe_surface* surf)
+{
+ return (struct r300_surface*)surf;
+}
+
static INLINE struct r300_texture* r300_texture(struct pipe_resource* tex)
{
return (struct r300_texture*)tex;