summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_resource.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-09-11 18:46:54 +0200
committerMarek Olšák <[email protected]>2011-09-12 22:03:03 +0200
commit9f0dc855b274cb2591fc6896149f9a9cabcbcab5 (patch)
tree1d6e925a3e99e398bd0c102e49f332261fea2498 /src/gallium/drivers/r600/r600_resource.h
parentac028b20e5431ed3c78b6a4a9192e84f6873c9fd (diff)
r600g: remove r600_resource_buffer struct
This subclass of r600_resource doesn't contain any useful members, so let's just use r600_resource.
Diffstat (limited to 'src/gallium/drivers/r600/r600_resource.h')
-rw-r--r--src/gallium/drivers/r600/r600_resource.h19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/gallium/drivers/r600/r600_resource.h b/src/gallium/drivers/r600/r600_resource.h
index d9d29db7968..632fbf19516 100644
--- a/src/gallium/drivers/r600/r600_resource.h
+++ b/src/gallium/drivers/r600/r600_resource.h
@@ -79,14 +79,6 @@ struct r600_resource_texture {
#define R600_TEX_IS_TILED(tex, level) ((tex)->array_mode[level] != V_038000_ARRAY_LINEAR_GENERAL && (tex)->array_mode[level] != V_038000_ARRAY_LINEAR_ALIGNED)
-#define R600_BUFFER_MAGIC 0xabcd1600
-
-/* XXX this could be removed */
-struct r600_resource_buffer {
- struct r600_resource r;
- uint32_t magic;
-};
-
struct r600_surface {
struct pipe_surface base;
unsigned aligned_height;
@@ -101,14 +93,9 @@ struct pipe_resource *r600_texture_from_handle(struct pipe_screen *screen,
const struct pipe_resource *base,
struct winsys_handle *whandle);
-/* r600_buffer */
-static INLINE struct r600_resource_buffer *r600_buffer(struct pipe_resource *buffer)
+static INLINE struct r600_resource *r600_resource(struct pipe_resource *r)
{
- if (buffer) {
- assert(((struct r600_resource_buffer *)buffer)->magic == R600_BUFFER_MAGIC);
- return (struct r600_resource_buffer *)buffer;
- }
- return NULL;
+ return (struct r600_resource*)r;
}
int r600_texture_depth_flush(struct pipe_context *ctx, struct pipe_resource *texture, boolean just_create);
@@ -128,6 +115,6 @@ void r600_texture_transfer_unmap(struct pipe_context *ctx,
struct r600_pipe_context;
-void r600_upload_const_buffer(struct r600_pipe_context *rctx, struct r600_resource_buffer **rbuffer, uint32_t *offset);
+void r600_upload_const_buffer(struct r600_pipe_context *rctx, struct r600_resource **rbuffer, uint32_t *offset);
#endif