aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2020-05-02 10:58:46 -0400
committerMarge Bot <[email protected]>2020-05-07 20:13:41 +0000
commit7691de0dcefd7a518ee1ecc4d2cd3803e42cc803 (patch)
tree99218fe9da192c595c81977e317d818a5ed4c107 /src/gallium/drivers/radeon
parent56e37374ddbc3b66bcfa4d0dadcb1fd53074c822 (diff)
ac/surface,radeonsi: move the set/get_bo_metadata code to ac_surface.c
The indentation is on purpose. The whole file will be reindented to this code style some other time. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4863>
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r--src/gallium/drivers/radeon/radeon_winsys.h23
1 files changed, 6 insertions, 17 deletions
diff --git a/src/gallium/drivers/radeon/radeon_winsys.h b/src/gallium/drivers/radeon/radeon_winsys.h
index e3bb9c3f369..f9fb5a58426 100644
--- a/src/gallium/drivers/radeon/radeon_winsys.h
+++ b/src/gallium/drivers/radeon/radeon_winsys.h
@@ -217,23 +217,10 @@ struct radeon_bo_metadata {
unsigned stride;
bool scanout;
} legacy;
-
- struct {
- /* surface flags */
- unsigned swizzle_mode : 5;
-
- /* DCC flags */
- /* [31:8]: max offset = 4GB - 256; 0 = DCC disabled */
- unsigned dcc_offset_256B : 24;
- unsigned dcc_pitch_max : 14; /* (mip chain pitch - 1) for DCN */
- unsigned dcc_independent_64B : 1;
- unsigned dcc_independent_128B : 1;
- unsigned dcc_max_compressed_block_size : 2;
-
- bool scanout;
- } gfx9;
} u;
+ enum radeon_surf_mode mode; /* Output from buffer_get_metadata */
+
/* Additional metadata associated with the buffer, in bytes.
* The maximum size is 64 * 4. This is opaque for the winsys & kernel.
* Supported by amdgpu only.
@@ -351,7 +338,8 @@ struct radeon_winsys {
* \param buf A winsys buffer object to get the flags from.
* \param md Metadata
*/
- void (*buffer_get_metadata)(struct pb_buffer *buf, struct radeon_bo_metadata *md);
+ void (*buffer_get_metadata)(struct pb_buffer *buf, struct radeon_bo_metadata *md,
+ struct radeon_surf *surf);
/**
* Set buffer metadata.
@@ -360,7 +348,8 @@ struct radeon_winsys {
* \param buf A winsys buffer object to set the flags for.
* \param md Metadata
*/
- void (*buffer_set_metadata)(struct pb_buffer *buf, struct radeon_bo_metadata *md);
+ void (*buffer_set_metadata)(struct pb_buffer *buf, struct radeon_bo_metadata *md,
+ struct radeon_surf *surf);
/**
* Get a winsys buffer from a winsys handle. The internal structure