[Mesa-dev] [PATCH] anv/device: initialize the list of enabled extensions properly

Jason Ekstrand jason at jlekstrand.net
Mon Feb 5 16:17:54 UTC 2018


Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

On Mon, Feb 5, 2018 at 3:08 AM, Lionel Landwerlin <
lionel.g.landwerlin at intel.com> wrote:

> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
> Fixes: abc62282b5c "anv: Add a per-device table of enabled extensions"
>
> We want it in 18.0 too I think.
>
> Thanks a lot!
>
> On 05/02/18 09:46, Iago Toral Quiroga wrote:
>
>> The loop goes through the list of enabled extensions marking them as
>> enabled in the list, but this relies on every other extension being
>> initialized to false by default.
>>
>> This bug would make us, for example, advertise certain device extension
>> entry points as available even when the corresponding extensions had
>> not been enabled.
>> ---
>>   src/intel/vulkan/anv_device.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.
>> c
>> index 90e0fcfc46..7b151ebb5d 100644
>> --- a/src/intel/vulkan/anv_device.c
>> +++ b/src/intel/vulkan/anv_device.c
>> @@ -1412,7 +1412,7 @@ VkResult anv_CreateDevice(
>>        assert(pCreateInfo->sType == VK_STRUCTURE_TYPE_DEVICE_CREAT
>> E_INFO);
>>   -   struct anv_device_extension_table enabled_extensions;
>> +   struct anv_device_extension_table enabled_extensions = { };
>>      for (uint32_t i = 0; i < pCreateInfo->enabledExtensionCount; i++) {
>>         int idx;
>>         for (idx = 0; idx < ANV_DEVICE_EXTENSION_COUNT; idx++) {
>>
>
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180205/5f5a654f/attachment.html>


More information about the mesa-dev mailing list