Browse Source

radv: Properly handle destroying NULL devices and instances

Ported from anv:
3d33a23e anv: Properly handle destroying NULL devices and instances

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
tags/17.1-branchpoint
Dave Airlie 8 years ago
parent
commit
6bae1e44a9
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      src/amd/vulkan/radv_device.c

+ 6
- 0
src/amd/vulkan/radv_device.c View File

@@ -365,6 +365,9 @@ void radv_DestroyInstance(
{
RADV_FROM_HANDLE(radv_instance, instance, _instance);

if (!instance)
return;

for (int i = 0; i < instance->physicalDeviceCount; ++i) {
radv_physical_device_finish(instance->physicalDevices + i);
}
@@ -988,6 +991,9 @@ void radv_DestroyDevice(
{
RADV_FROM_HANDLE(radv_device, device, _device);

if (!device)
return;

if (device->trace_bo)
device->ws->buffer_destroy(device->trace_bo);


Loading…
Cancel
Save