[Mesa-dev] [PATCH mesa] anv: don't crash on vkDestroyDevice(NULL)

Chema Casanova jmcasanova at igalia.com
Wed Jul 25 19:58:53 UTC 2018


Reviewed-by: Jose Maria Casanova Crespo <jmcasanova at igalia.com>

El 25/07/18 a las 21:25, Eric Engestrom escribió:
> On Wednesday, 2018-07-25 19:45:56 +0100, Eric Engestrom wrote:
>> CovID: 1438132
>> Signed-off-by: Eric Engestrom <eric.engestrom at intel.com>
> 
> Forgot to check before sending:
> 
> Fixes: a99c9e63a07477634ab73 "anv: finish the binding_table_pool on
>                               destroyDevice when use_softpin"
> Cc: Jose Maria Casanova Crespo <jmcasanova at igalia.com>
> 
>> ---
>>  src/intel/vulkan/anv_device.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
>> index 04fd6a829ed60081abc4..3664f80c24dc34955196 100644
>> --- a/src/intel/vulkan/anv_device.c
>> +++ b/src/intel/vulkan/anv_device.c
>> @@ -1832,11 +1832,13 @@ void anv_DestroyDevice(
>>      const VkAllocationCallbacks*                pAllocator)
>>  {
>>     ANV_FROM_HANDLE(anv_device, device, _device);
>> -   struct anv_physical_device *physical_device = &device->instance->physicalDevice;
>> +   struct anv_physical_device *physical_device;
>>  
>>     if (!device)
>>        return;
>>  
>> +   physical_device = &device->instance->physicalDevice;>>     anv_device_finish_blorp(device);
>>  
>>     anv_pipeline_cache_finish(&device->default_pipeline_cache);
>> -- 
>> Cheers,
>>   Eric
>>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 


More information about the mesa-dev mailing list