diff options
author | Samuel Pitoiset <[email protected]> | 2017-12-06 12:06:43 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-12-08 11:22:35 +0100 |
commit | 33b329f7699c4f92fbceedea9032ea275f522a50 (patch) | |
tree | d356af4b85592e4f67d5c573cb6bd8092ff0b5f8 /src/amd/vulkan/radv_radeon_winsys.h | |
parent | c202119286080bdd6c83893128c7d92bd8a0dfa8 (diff) |
radv/winsys: implement query_value()
Might be useful to know the VRAM/GTT usage, the number of VRAM
CPU page faults, etc. Nothing is currently using that new
interface, but it's a first step.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_radeon_winsys.h')
-rw-r--r-- | src/amd/vulkan/radv_radeon_winsys.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_radeon_winsys.h b/src/amd/vulkan/radv_radeon_winsys.h index 66a2bcccb4d..2b815d9c5a9 100644 --- a/src/amd/vulkan/radv_radeon_winsys.h +++ b/src/amd/vulkan/radv_radeon_winsys.h @@ -80,6 +80,19 @@ enum radeon_ctx_priority { RADEON_CTX_PRIORITY_REALTIME, }; +enum radeon_value_id { + RADEON_TIMESTAMP, + RADEON_NUM_BYTES_MOVED, + RADEON_NUM_EVICTIONS, + RADEON_NUM_VRAM_CPU_PAGE_FAULTS, + RADEON_VRAM_USAGE, + RADEON_VRAM_VIS_USAGE, + RADEON_GTT_USAGE, + RADEON_GPU_TEMPERATURE, + RADEON_CURRENT_SCLK, + RADEON_CURRENT_MCLK, +}; + struct radeon_winsys_cs { unsigned cdw; /* Number of used dwords. */ unsigned max_dw; /* Maximum number of dwords. */ @@ -169,6 +182,9 @@ struct radeon_winsys { void (*query_info)(struct radeon_winsys *ws, struct radeon_info *info); + uint64_t (*query_value)(struct radeon_winsys *ws, + enum radeon_value_id value); + bool (*read_registers)(struct radeon_winsys *ws, unsigned reg_offset, unsigned num_registers, uint32_t *out); |