[Mesa-dev] [PATCH 2/3] anv: Copy the appliation info into the instance
Jason Ekstrand
jason at jlekstrand.net
Wed Aug 29 16:25:47 UTC 2018
I just pushed a fix:
commit cdea5d996edaaf59ab0acf3e758c3d9a4c22c335 (public/master)
Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date: Wed Aug 29 10:06:56 2018 -0500
anv: Free the app and engine name
Fixes: 8c048af5890d4 "anv: Copy the appliation info into the instance"
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
On Wed, Aug 29, 2018 at 10:08 AM Jason Ekstrand <jason at jlekstrand.net>
wrote:
> Thanks for the heads up. I just sent a patch which should fix it. Hooray
> for the CTS catching memory leaks.
>
> --Jason
>
> On Wed, Aug 29, 2018 at 9:32 AM Andres Gomez <agomez at igalia.com> wrote:
>
>> Jason, this series (specifically, the patch 2/3), is causing
>> regressions in VK-GL-CTS with mesa's 18.2 stable queue. I don't know if
>> this is happening also in master, but it's quite possible.
>>
>> I've checked with the x11_egl target and the "vulkan-cts-1.1.2" branch:
>> https://github.com/KhronosGroup/VK-GL-CTS/tree/vulkan-cts-1.1.2
>>
>> --
>>
>> $ ./deqp-vk --deqp-case="dEQP-VK.wsi.xlib.surface*"
>> Writing test log into TestResults.qpa
>> dEQP Core git-6140c85a76b7866db94aaf77bcd5dca80490e19b (0x6140c85a)
>> starting..
>> target implementation = 'X11 EGL'
>>
>> Test case 'dEQP-VK.wsi.xlib.surface.create'..
>> Test case duration in microseconds = 5425 us
>> Pass (Creating surface succeeded)
>>
>> Test case 'dEQP-VK.wsi.xlib.surface.create_custom_allocator'..
>> Test case duration in microseconds = 6497 us
>> Fail (Detected invalid system allocation callback)
>>
>> Test case 'dEQP-VK.wsi.xlib.surface.create_simulate_oom'..
>> Test case duration in microseconds = 4048 us
>> Fail (Detected invalid system allocation callback)
>>
>> Test case 'dEQP-VK.wsi.xlib.surface.query_support'..
>> Test case duration in microseconds = 6105 us
>> Pass (Pass)
>>
>> Test case 'dEQP-VK.wsi.xlib.surface.query_capabilities'..
>> Test case duration in microseconds = 4290 us
>> Pass (Pass)
>>
>> Test case 'dEQP-VK.wsi.xlib.surface.query_capabilities2'..
>> Test case duration in microseconds = 4052 us
>> Pass (Pass)
>>
>> Test case 'dEQP-VK.wsi.xlib.surface.query_formats'..
>> Test case duration in microseconds = 4615 us
>> Pass (Pass)
>>
>> Test case 'dEQP-VK.wsi.xlib.surface.query_formats2'..
>> Test case duration in microseconds = 4125 us
>> Pass (Pass)
>>
>> Test case 'dEQP-VK.wsi.xlib.surface.query_present_modes'..
>> Test case duration in microseconds = 3999 us
>> Pass (Pass)
>>
>> Test case 'dEQP-VK.wsi.xlib.surface.destroy_null_handle'..
>> Test case duration in microseconds = 533 us
>> Pass (Destroying a VK_NULL_HANDLE surface has no effect)
>>
>> Test case 'dEQP-VK.wsi.xlib.surface.initial_size'..
>> Test case duration in microseconds = 4339 us
>> Pass (Pass)
>>
>> Test case 'dEQP-VK.wsi.xlib.surface.resize'..
>> Test case duration in microseconds = 4323 us
>> Pass (Pass)
>>
>> DONE!
>>
>>
>> Test run totals:
>> Passed: 10/12 (83.3%)
>> Failed: 2/12 (16.7%)
>> Not supported: 0/12 (0.0%)
>> Warnings: 0/12 (0.0%)
>>
>> --
>>
>> $ ./deqp-vk --deqp-case="dEQP-VK.wsi.xlib.swapchain.simulate_oom*"
>> Writing test log into TestResults.qpa
>> dEQP Core git-6140c85a76b7866db94aaf77bcd5dca80490e19b (0x6140c85a)
>> starting..
>> target implementation = 'X11 EGL'
>>
>> Test case 'dEQP-VK.wsi.xlib.swapchain.simulate_oom.min_image_count'..
>> Test case duration in microseconds = 208603 us
>> Fail (Detected invalid system allocation callback)
>>
>> Test case 'dEQP-VK.wsi.xlib.swapchain.simulate_oom.image_format'..
>> Test case duration in microseconds = 8237 us
>> Fail (Detected invalid system allocation callback)
>>
>> Test case 'dEQP-VK.wsi.xlib.swapchain.simulate_oom.image_extent'..
>> Test case duration in microseconds = 7118 us
>> Fail (Detected invalid system allocation callback)
>>
>> Test case 'dEQP-VK.wsi.xlib.swapchain.simulate_oom.image_array_layers'..
>> Test case duration in microseconds = 7230 us
>> Fail (Detected invalid system allocation callback)
>>
>> Test case 'dEQP-VK.wsi.xlib.swapchain.simulate_oom.image_usage'..
>> Test case duration in microseconds = 19784 us
>> Fail (Detected invalid system allocation callback)
>>
>> Test case 'dEQP-VK.wsi.xlib.swapchain.simulate_oom.image_sharing_mode'..
>> Test case duration in microseconds = 7921 us
>> Fail (Detected invalid system allocation callback)
>>
>> Test case 'dEQP-VK.wsi.xlib.swapchain.simulate_oom.pre_transform'..
>> Test case duration in microseconds = 6936 us
>> Fail (Detected invalid system allocation callback)
>>
>> Test case 'dEQP-VK.wsi.xlib.swapchain.simulate_oom.composite_alpha'..
>> Test case duration in microseconds = 8021 us
>> Fail (Detected invalid system allocation callback)
>>
>> Test case 'dEQP-VK.wsi.xlib.swapchain.simulate_oom.present_mode'..
>> Test case duration in microseconds = 8615 us
>> Fail (Detected invalid system allocation callback)
>>
>> Test case 'dEQP-VK.wsi.xlib.swapchain.simulate_oom.clipped'..
>> Test case duration in microseconds = 8362 us
>> Fail (Detected invalid system allocation callback)
>>
>> DONE!
>>
>> Test run totals:
>> Passed: 0/10 (0.0%)
>> Failed: 10/10 (100.0%)
>> Not supported: 0/10 (0.0%)
>> Warnings: 0/10 (0.0%)
>>
>> --
>>
>> Therefore, although it is marked for the 18.2 stable queue, I'm leaving
>> it out by now.
>>
>>
>> On Thu, 2018-08-23 at 10:13 -0500, Jason Ekstrand wrote:
>> > ---
>> > src/intel/vulkan/anv_device.c | 27 ++++++++++++++++++++-------
>> > src/intel/vulkan/anv_private.h | 11 ++++++++++-
>> > 2 files changed, 30 insertions(+), 8 deletions(-)
>> >
>> > diff --git a/src/intel/vulkan/anv_device.c
>> b/src/intel/vulkan/anv_device.c
>> > index d85615caaed..0357fc7c0ea 100644
>> > --- a/src/intel/vulkan/anv_device.c
>> > +++ b/src/intel/vulkan/anv_device.c
>> > @@ -610,20 +610,33 @@ VkResult anv_CreateInstance(
>> > else
>> > instance->alloc = default_alloc;
>> >
>> > - if (pCreateInfo->pApplicationInfo &&
>> > - pCreateInfo->pApplicationInfo->apiVersion != 0) {
>> > - instance->apiVersion = pCreateInfo->pApplicationInfo->apiVersion;
>> > - } else {
>> > - anv_EnumerateInstanceVersion(&instance->apiVersion);
>> > + instance->app_info = (struct anv_app_info) { .api_version = 0 };
>> > + if (pCreateInfo->pApplicationInfo) {
>> > + const VkApplicationInfo *app = pCreateInfo->pApplicationInfo;
>> > +
>> > + instance->app_info.app_name =
>> > + vk_strdup(&instance->alloc, app->pApplicationName,
>> > + VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
>> > + instance->app_info.app_version = app->applicationVersion;
>> > +
>> > + instance->app_info.engine_name =
>> > + vk_strdup(&instance->alloc, app->pEngineName,
>> > + VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
>> > + instance->app_info.engine_version = app->engineVersion;
>> > +
>> > + instance->app_info.api_version = app->apiVersion;
>> > }
>> >
>> > + if (instance->app_info.api_version == 0)
>> > + anv_EnumerateInstanceVersion(&instance->app_info.api_version);
>> > +
>> > instance->enabled_extensions = enabled_extensions;
>> >
>> > for (unsigned i = 0; i <
>> ARRAY_SIZE(instance->dispatch.entrypoints); i++) {
>> > /* Vulkan requires that entrypoints for extensions which have
>> not been
>> > * enabled must not be advertised.
>> > */
>> > - if (!anv_entrypoint_is_enabled(i, instance->apiVersion,
>> > + if (!anv_entrypoint_is_enabled(i, instance->app_info.api_version,
>> > &instance->enabled_extensions,
>> NULL)) {
>> > instance->dispatch.entrypoints[i] = NULL;
>> > } else if (anv_dispatch_table.entrypoints[i] != NULL) {
>> > @@ -1496,7 +1509,7 @@ anv_device_init_dispatch(struct anv_device
>> *device)
>> > /* Vulkan requires that entrypoints for extensions which have
>> not been
>> > * enabled must not be advertised.
>> > */
>> > - if (!anv_entrypoint_is_enabled(i, device->instance->apiVersion,
>> > + if (!anv_entrypoint_is_enabled(i,
>> device->instance->app_info.api_version,
>> >
>> &device->instance->enabled_extensions,
>> > &device->enabled_extensions)) {
>> > device->dispatch.entrypoints[i] = NULL;
>> > diff --git a/src/intel/vulkan/anv_private.h
>> b/src/intel/vulkan/anv_private.h
>> > index 2ced8afcabe..5537c8cab57 100644
>> > --- a/src/intel/vulkan/anv_private.h
>> > +++ b/src/intel/vulkan/anv_private.h
>> > @@ -882,12 +882,21 @@ struct anv_physical_device {
>> > int master_fd;
>> > };
>> >
>> > +struct anv_app_info {
>> > + const char* app_name;
>> > + uint32_t app_version;
>> > + const char* engine_name;
>> > + uint32_t engine_version;
>> > + uint32_t api_version;
>> > +};
>> > +
>> > struct anv_instance {
>> > VK_LOADER_DATA _loader_data;
>> >
>> > VkAllocationCallbacks alloc;
>> >
>> > - uint32_t apiVersion;
>> > + struct anv_app_info app_info;
>> > +
>> > struct anv_instance_extension_table enabled_extensions;
>> > struct anv_dispatch_table dispatch;
>> >
>> --
>> Br,
>>
>> Andres
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180829/e4e80a46/attachment-0001.html>
More information about the mesa-dev
mailing list