summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_resource.h
diff options
context:
space:
mode:
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