summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo/ilo_transfer.h
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2013-06-07 13:11:49 +0800
committerChia-I Wu <[email protected]>2013-06-07 13:23:43 +0800
commit7142da6dd1b12f203a7daaa7d79235da8b5bc721 (patch)
tree938892e0fef57d277b38307f337b71d33210d113 /src/gallium/drivers/ilo/ilo_transfer.h
parent09f62a13fcddd237e7a3aef6185377f9a585a332 (diff)
ilo: use slab allocator for transfers
Slab allocator is perfect for transfer. Improved OpenArena performance by 1% with several casual runs.
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_transfer.h')
-rw-r--r--src/gallium/drivers/ilo/ilo_transfer.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/gallium/drivers/ilo/ilo_transfer.h b/src/gallium/drivers/ilo/ilo_transfer.h
index 25bcc442ffc..3ba4bacf749 100644
--- a/src/gallium/drivers/ilo/ilo_transfer.h
+++ b/src/gallium/drivers/ilo/ilo_transfer.h
@@ -28,10 +28,38 @@
#ifndef ILO_TRANSFER_H
#define ILO_TRANSFER_H
+#include "pipe/p_state.h"
+
#include "ilo_common.h"
+enum ilo_transfer_map_method {
+ /* map() / map_gtt() / map_unsynchronized() */
+ ILO_TRANSFER_MAP_CPU,
+ ILO_TRANSFER_MAP_GTT,
+ ILO_TRANSFER_MAP_UNSYNC,
+
+ /* use staging system buffer */
+ ILO_TRANSFER_MAP_SW_CONVERT,
+ ILO_TRANSFER_MAP_SW_ZS,
+};
+
+struct ilo_transfer {
+ struct pipe_transfer base;
+
+ enum ilo_transfer_map_method method;
+ void *ptr;
+
+ void *staging_sys;
+};
+
struct ilo_context;
+static inline struct ilo_transfer *
+ilo_transfer(struct pipe_transfer *transfer)
+{
+ return (struct ilo_transfer *) transfer;
+}
+
void
ilo_init_transfer_functions(struct ilo_context *ilo);