summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo/ilo_resource.h
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2015-05-01 15:07:13 +0800
committerChia-I Wu <[email protected]>2015-05-02 22:14:06 +0800
commit8ab18262c5984736b11b28a30a7facda0d6c65e8 (patch)
treebfe0279205784550a50d0d034a10ce20351b7944 /src/gallium/drivers/ilo/ilo_resource.h
parent3afbeb115ab19164fb2e5bf8df88b6d03d39254b (diff)
ilo: add ilo_buffer.h to core
Rename the original ilo_buffer to ilo_buffer_resource to avoid name conflict.
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_resource.h')
-rw-r--r--src/gallium/drivers/ilo/ilo_resource.h23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/gallium/drivers/ilo/ilo_resource.h b/src/gallium/drivers/ilo/ilo_resource.h
index b5be9b5300d..f78f9495233 100644
--- a/src/gallium/drivers/ilo/ilo_resource.h
+++ b/src/gallium/drivers/ilo/ilo_resource.h
@@ -29,6 +29,7 @@
#define ILO_RESOURCE_H
#include "core/intel_winsys.h"
+#include "core/ilo_buffer.h"
#include "core/ilo_image.h"
#include "ilo_common.h"
@@ -77,13 +78,6 @@ enum ilo_texture_flags {
ILO_TEXTURE_HIZ = 1 << 7,
};
-struct ilo_buffer {
- struct pipe_resource base;
-
- struct intel_bo *bo;
- unsigned bo_size;
-};
-
/**
* A 3D image slice, cube face, or array layer.
*/
@@ -116,11 +110,17 @@ struct ilo_texture {
struct ilo_texture *separate_s8;
};
+struct ilo_buffer_resource {
+ struct pipe_resource base;
+
+ struct ilo_buffer buffer;
+};
+
static inline struct ilo_buffer *
ilo_buffer(struct pipe_resource *res)
{
- return (struct ilo_buffer *)
- ((res && res->target == PIPE_BUFFER) ? res : NULL);
+ return (res && res->target == PIPE_BUFFER) ?
+ &((struct ilo_buffer_resource *) res)->buffer : NULL;
}
static inline struct ilo_texture *
@@ -134,10 +134,7 @@ void
ilo_init_resource_functions(struct ilo_screen *is);
bool
-ilo_buffer_rename_bo(struct ilo_buffer *buf);
-
-bool
-ilo_texture_rename_bo(struct ilo_texture *tex);
+ilo_resource_rename_bo(struct pipe_resource *res);
/**
* Return the bo of the resource.