summaryrefslogtreecommitdiff
path: root/libdrm/radeon/radeon_cs.h
diff options
context:
space:
mode:
authorJerome Glisse <glisse@freedesktop.org>2008-11-12 15:56:40 +0100
committerJerome Glisse <glisse@freedesktop.org>2008-11-12 16:57:09 +0100
commita7457915f5775137436f3b16a640eb8bd6424ca6 (patch)
tree1276c211e5a72ace371bd85df0ffefd56f14d55b /libdrm/radeon/radeon_cs.h
parent6d59bad8e9cab6170e1af3d67597b6f5f145c33f (diff)
radeon+libdrm-radeon: change relocation informations
Relocation now consist of the following informations (in this order) : handle buffer object handle identifier start_offset start offset of first data of the buffer object used by the cs end_offset end offset of last data of the buffer object used by the cs read_domain read domain (either VRAM, or GTT as GPU is invalid for CS) write_domain write domain (either VRAM, or GTT as GPU is invalid for CS) flags flags used for further optimization (like discard previous buffer content or forget buffer content after cs which can help in avoiding moving content in or out)
Diffstat (limited to 'libdrm/radeon/radeon_cs.h')
-rw-r--r--libdrm/radeon/radeon_cs.h33
1 files changed, 22 insertions, 11 deletions
diff --git a/libdrm/radeon/radeon_cs.h b/libdrm/radeon/radeon_cs.h
index 347e9f35..63f104b6 100644
--- a/libdrm/radeon/radeon_cs.h
+++ b/libdrm/radeon/radeon_cs.h
@@ -37,10 +37,11 @@
struct radeon_cs_reloc {
struct radeon_bo *bo;
- uint32_t soffset;
- uint32_t eoffset;
- uint32_t size;
- uint32_t domains;
+ uint32_t start_offset;
+ uint32_t end_offset;
+ uint32_t read_domain;
+ uint32_t write_domain;
+ uint32_t flags;
};
struct radeon_cs_manager;
@@ -68,9 +69,11 @@ struct radeon_cs_funcs {
int (*cs_write_dword)(struct radeon_cs *cs, uint32_t dword);
int (*cs_write_reloc)(struct radeon_cs *cs,
struct radeon_bo *bo,
- uint32_t soffset,
- uint32_t eoffset,
- uint32_t domains);
+ uint32_t start_offset,
+ uint32_t end_offset,
+ uint32_t read_domain,
+ uint32_t write_domain,
+ uint32_t flags);
int (*cs_begin)(struct radeon_cs *cs,
uint32_t ndw,
const char *file,
@@ -104,11 +107,19 @@ static inline int radeon_cs_write_dword(struct radeon_cs *cs, uint32_t dword)
static inline int radeon_cs_write_reloc(struct radeon_cs *cs,
struct radeon_bo *bo,
- uint32_t soffset,
- uint32_t eoffset,
- uint32_t domains)
+ uint32_t start_offset,
+ uint32_t end_offset,
+ uint32_t read_domain,
+ uint32_t write_domain,
+ uint32_t flags)
{
- return cs->csm->funcs->cs_write_reloc(cs, bo, soffset, eoffset, domains);
+ return cs->csm->funcs->cs_write_reloc(cs,
+ bo,
+ start_offset,
+ end_offset,
+ read_domain,
+ write_domain,
+ flags);
}
static inline int radeon_cs_begin(struct radeon_cs *cs,