aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-09-14 11:25:23 +0200
committerSamuel Pitoiset <[email protected]>2017-09-15 09:16:34 +0200
commit176c2ad10cfce40f3ee73588e8e5f82826b748b6 (patch)
treecf753510aafd9ff2a367290746f1b1f7bf64f96b /src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
parent1b163238f5b652d1c6c9e50ec36afe537f77411f (diff)
radv: add get_chip_name() callback
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c')
-rw-r--r--src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
index 9e9b1bf061d..003b2be5e6b 100644
--- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
+++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
@@ -82,6 +82,13 @@ static bool radv_amdgpu_winsys_read_registers(struct radeon_winsys *rws,
0xffffffff, 0, out) == 0;
}
+static const char *radv_amdgpu_winsys_get_chip_name(struct radeon_winsys *rws)
+{
+ amdgpu_device_handle dev = ((struct radv_amdgpu_winsys *)rws)->dev;
+
+ return amdgpu_get_marketing_name(dev);
+}
+
static void radv_amdgpu_winsys_destroy(struct radeon_winsys *rws)
{
struct radv_amdgpu_winsys *ws = (struct radv_amdgpu_winsys*)rws;
@@ -122,6 +129,7 @@ radv_amdgpu_winsys_create(int fd, uint64_t debug_flags, uint64_t perftest_flags)
pthread_mutex_init(&ws->global_bo_list_lock, NULL);
ws->base.query_info = radv_amdgpu_winsys_query_info;
ws->base.read_registers = radv_amdgpu_winsys_read_registers;
+ ws->base.get_chip_name = radv_amdgpu_winsys_get_chip_name;
ws->base.destroy = radv_amdgpu_winsys_destroy;
radv_amdgpu_bo_init_functions(ws);
radv_amdgpu_cs_init_functions(ws);