diff options
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_transfer.h')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_transfer.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/gallium/drivers/ilo/ilo_transfer.h b/src/gallium/drivers/ilo/ilo_transfer.h index b346f457159..d7f4838d384 100644 --- a/src/gallium/drivers/ilo/ilo_transfer.h +++ b/src/gallium/drivers/ilo/ilo_transfer.h @@ -32,12 +32,21 @@ #include "ilo_common.h" +/* + * Direct mappings are always page aligned, but ILO_TRANSFER_MAP_STAGING is + * not. + */ +#define ILO_TRANSFER_MAP_BUFFER_ALIGNMENT 64 + enum ilo_transfer_map_method { /* map() / map_gtt() / map_unsynchronized() */ ILO_TRANSFER_MAP_CPU, ILO_TRANSFER_MAP_GTT, ILO_TRANSFER_MAP_GTT_UNSYNC, + /* use staging resource */ + ILO_TRANSFER_MAP_STAGING, + /* use staging system buffer */ ILO_TRANSFER_MAP_SW_CONVERT, ILO_TRANSFER_MAP_SW_ZS, @@ -47,7 +56,11 @@ struct ilo_transfer { struct pipe_transfer base; enum ilo_transfer_map_method method; - void *staging_sys; + /* pipe_resource, system memory, or garbage depending on the method */ + union { + struct pipe_resource *res; + void *sys; + } staging; }; struct ilo_context; |