diff options
author | Bas Nieuwenhuizen <[email protected]> | 2019-01-28 00:28:05 +0100 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2019-01-29 15:56:41 +0100 |
commit | ead54d4a427bdd36e073a9302c2b363585c8ec29 (patch) | |
tree | c9eb90d6583c1bf6193dfd982d261a105d87a571 /src/amd/vulkan/radv_radeon_winsys.h | |
parent | 3a8d6c0880891cf9ccbae8160932bb4cbd2c2ead (diff) |
radv/winsys: Set winsys bo priority on creation.
Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_radeon_winsys.h')
-rw-r--r-- | src/amd/vulkan/radv_radeon_winsys.h | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_radeon_winsys.h b/src/amd/vulkan/radv_radeon_winsys.h index d9b46d89cf3..2684aadc81f 100644 --- a/src/amd/vulkan/radv_radeon_winsys.h +++ b/src/amd/vulkan/radv_radeon_winsys.h @@ -188,6 +188,29 @@ struct radv_winsys_bo_list { unsigned count; }; +/* Kernel effectively allows 0-31. This sets some priorities for fixed + * functionality buffers */ +enum { + RADV_BO_PRIORITY_DEFAULT = 14, + + RADV_BO_PRIORITY_APPLICATION_MAX = 28, + + /* virtual buffers have 0 priority since the priority is not used. */ + RADV_BO_PRIORITY_VIRTUAL = 0, + + /* This should be considerably lower than most of the stuff below, + * but how much lower is hard to say since we don't know application + * assignments. Put it pretty high since it is GTT anyway. */ + RADV_BO_PRIORITY_QUERY_POOL = 29, + + RADV_BO_PRIORITY_DESCRIPTOR = 30, + RADV_BO_PRIORITY_UPLOAD_BUFFER = 30, + RADV_BO_PRIORITY_FENCE = 30, + RADV_BO_PRIORITY_SHADER = 31, + RADV_BO_PRIORITY_SCRATCH = 31, + RADV_BO_PRIORITY_CS = 31, +}; + struct radeon_winsys { void (*destroy)(struct radeon_winsys *ws); @@ -206,17 +229,20 @@ struct radeon_winsys { uint64_t size, unsigned alignment, enum radeon_bo_domain domain, - enum radeon_bo_flag flags); + enum radeon_bo_flag flags, + unsigned priority); void (*buffer_destroy)(struct radeon_winsys_bo *bo); void *(*buffer_map)(struct radeon_winsys_bo *bo); struct radeon_winsys_bo *(*buffer_from_ptr)(struct radeon_winsys *ws, void *pointer, - uint64_t size); + uint64_t size, + unsigned priority); struct radeon_winsys_bo *(*buffer_from_fd)(struct radeon_winsys *ws, int fd, + unsigned priority, unsigned *stride, unsigned *offset); bool (*buffer_get_fd)(struct radeon_winsys *ws, |