diff options
author | Dave Airlie <[email protected]> | 2017-02-13 04:00:24 +0000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2017-02-13 20:02:45 +0000 |
commit | 592069c1fbccf55e26d2822337dfab40edf6948e (patch) | |
tree | 1dcc156dba67e9f0fb250a506b0ca3161baab948 /src/amd/vulkan/radv_device.c | |
parent | b26253b34d53a7b8235bf301b68889ba6c3a19a6 (diff) |
radv: use indirect buffer for initial gfx state.
This puts the common gfx state for the device into an
indirect buffer, and just calls out to it, on CIK and above.
This is taken from what radeonsi does.
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_device.c')
-rw-r--r-- | src/amd/vulkan/radv_device.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 9be09af1795..7a84f5cc7da 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -949,6 +949,9 @@ VkResult radv_CreateDevice( goto fail; } + if (device->physical_device->rad_info.chip_class >= CIK) + cik_create_gfx_config(device); + *pDevice = radv_device_to_handle(device); return VK_SUCCESS; @@ -956,6 +959,9 @@ fail: if (device->trace_bo) device->ws->buffer_destroy(device->trace_bo); + if (device->gfx_init) + device->ws->buffer_destroy(device->gfx_init); + for (unsigned i = 0; i < RADV_MAX_QUEUE_FAMILIES; i++) { for (unsigned q = 0; q < device->queue_count[i]; q++) radv_queue_finish(&device->queues[i][q]); @@ -976,6 +982,9 @@ void radv_DestroyDevice( if (device->trace_bo) device->ws->buffer_destroy(device->trace_bo); + if (device->gfx_init) + device->ws->buffer_destroy(device->gfx_init); + for (unsigned i = 0; i < RADV_MAX_QUEUE_FAMILIES; i++) { for (unsigned q = 0; q < device->queue_count[i]; q++) radv_queue_finish(&device->queues[i][q]); |