<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Nov 17, 2017 at 2:18 PM, Grazvydas Ignotas <span dir="ltr"><<a href="mailto:notasas@gmail.com" target="_blank">notasas@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I've tested this branch (rx470 + hd530) and it's only partially working:<br>
- display on amd, radv: always fails with "offscreen:<br>
wsi/wsi_common.c:172: select_memory_type: Assertion `!"No memory type<br>
found"' failed."<br>
- display on amd, anv: misrenders. For SaschaWillems, only<br>
multisampling, subpasses and triangle renders, other demos show black<br>
window with only text (fps counter and help) visible<br>
- display on intel, radv: same "No memory type found"'<br>
- display on intel, anv: seems to be ok<br></blockquote><div><br></div><div>Thanks for testing!  I've got a HSW+radeon box at home.  I'll see if I can get it fixed early next week.  I did find a couple bugs by inspection when I was working on getting modifiers working today.  I've re-pushed if you feel like trying again.  Otherwise, I'll see if I can repro on my box.<br></div><div><br></div><div>--Jason<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Gražvydas<br>
<div><div class="h5"><br>
On Fri, Nov 17, 2017 at 4:44 AM, Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>> wrote:<br>
> I just force-pushed my branch with some changes as per Dave to more<br>
> explicitly enable implicit sync when allocating memory objects.<br>
><br>
> On Thu, Nov 16, 2017 at 1:28 PM, Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br>
> wrote:<br>
>><br>
>> This patch series is the combined brain-child of Dave and myself.  The<br>
>> objective is to rewrite Vulkan WSI to look as much like a layer as<br>
>> possible<br>
>> and to reduce the driver <-> WSI interface.  We try very hard to have as<br>
>> many of the WSI details as possible in common code and to use standard<br>
>> Vulkan interfaces for everything.  Among other things, this means that<br>
>> prime support is now implemented in an entirely driver-agnostic way and<br>
>> the<br>
>> driver doesn't even know it's happening.  As a side-effect anv now has<br>
>> prime support.<br>
>><br>
>> Eventually, someone could pull what's left out into a proper layer and we<br>
>> could drop WSI support from our drivers entirely.  There are a fiew pieces<br>
>> of work that would be required to do this:<br>
>><br>
>>  1) Write all of the annoying layer bits.  There are some short-cuts that<br>
>>     we can take because we're not in a layer and those will have to go.<br>
>><br>
>>  2) Define a VK_MESA_legacy_swapchain_image extension to replace the hack<br>
>>     introduced in patch 8.<br>
>><br>
>>  3) It looks like modifiers support will land before the official Vulkan<br>
>>     extensions get finished.  It will have to be ported to the official<br>
>>     extensions.<br>
>><br>
>>  4) Figure out what to do about the fence in AcquireNextImage. In a future<br>
>>     world of explicit synchronization, we can just import the sync_file<br>
>>     from X or the Wayland compositor, but with implicit sync like we have<br>
>>     today, it's a bit harder.  Right now, the helper in wsi_common does<br>
>>     nothing with it and trusts the caller to handle it.<br>
>><br>
>>     The two drivers handle this differently today.  In anv, we do a dummy<br>
>>     QueueSubmit to trigger the fence while radv triggers it a bit more<br>
>>     manually.  In both cases, we trigger the fence immediately and trust<br>
>> in<br>
>>     the GEM's implicit synchronization to sort things out for us.  We<br>
>> can't<br>
>>     use the anv method as directly with radv because no queue is passed in<br>
>>     so we don't know what queue to use in the dummy QueueSubmit.  (In ANV,<br>
>>     we only have the one queue so that isn't a problem.)<br>
>><br>
>><br>
>> Dave, I tried to pull patches from your series where practical but,<br>
>> because<br>
>> we did things in a different order, it frequently wasn't.  If you want to<br>
>> claim credit for any of these patches, just say so and I'll --reset-author<br>
>> on them.<br>
>><br>
>> The series can be found on <a href="http://freedesktop.org" rel="noreferrer" target="_blank">freedesktop.org</a> here:<br>
>><br>
>> <a href="https://cgit.freedesktop.org/~jekstrand/mesa/log/?h=wip/vulkan-wsi-prime" rel="noreferrer" target="_blank">https://cgit.freedesktop.org/~<wbr>jekstrand/mesa/log/?h=wip/<wbr>vulkan-wsi-prime</a><br>
>><br>
>><br>
>> Cc: Dave Airlie <<a href="mailto:airlied@redhat.com">airlied@redhat.com</a>><br>
>> Cc: Daniel Stone <<a href="mailto:daniels@collabora.com">daniels@collabora.com</a>><br>
>> Cc: Chad Versace <<a href="mailto:chadversary@chromium.org">chadversary@chromium.org</a>><br>
>> Cc: James Jones <<a href="mailto:jajones@nvidia.com">jajones@nvidia.com</a>><br>
>><br>
>> Daniel Stone (1):<br>
>>   vulkan/wsi: Add a wsi_image structure<br>
>><br>
>> Dave Airlie (4):<br>
>>   vulkan/wsi: use function ptr definitions from the spec.<br>
>>   radv/wsi: drop allocate memory special case<br>
>>   radv/wsi: Move the guts of QueuePresent to wsi common<br>
>>   vulkan/wsi: move swapchain create/destroy to common code<br>
>><br>
>> Jason Ekstrand (23):<br>
>>   vulkan/wsi/x11: Handle the geometry check earlier in create_swapchain<br>
>>   vulkan/wsi: Add a wsi_device_init function<br>
>>   vulkan/wsi: Add wsi_swapchain_init/finish functions<br>
>>   vulkan/wsi: Implement prime in a completely generic way<br>
>>   anv/image: Add a return value to bind_memory_plane<br>
>>   vulkan/wsi: Add a mock image creation extension<br>
>>   anv/image: Implement the wsi "extension"<br>
>>   radv/image: Implement the wsi "extension"<br>
>>   vulkan/wsi: Do image creation in common code<br>
>>   vulkan/wsi: Add a WSI_FROM_HANDLE macro<br>
>>   vulkan/wsi: Refactor result handling in queue_present<br>
>>   vulkan/wsi: Only wait on semaphores on the first swapchain<br>
>>   vulkan/wsi: Set a proper pWaitDstStageMask on the dummy submit<br>
>>   anv/wsi: Use the common QueuePresent code<br>
>>   anv/wsi: Enable prime support<br>
>>   vulkan/wsi: Move get_images into common code<br>
>>   vulkan/wsi: Move prime blitting into queue_present<br>
>>   vulkan/wsi: Add a helper for AcquireNextImage<br>
>>   vulkan/wsi: Move wsi_swapchain to wsi_common_private.h<br>
>>   vulkan/wsi: Drop the can_handle_different_gpu parameter from<br>
>>     get_support<br>
>>   vulkan/wsi: Add wrappers for all of the surface queries<br>
>>   vulkan/wsi: Drop some unneeded cruft from the API<br>
>>   vulkan/wsi: Initialize individual WSI interfaces in wsi_device_init<br>
>><br>
>>  src/amd/vulkan/radv_device.c        |  18 +-<br>
>>  src/amd/vulkan/radv_image.c         |  15 +-<br>
>>  src/amd/vulkan/radv_private.h       |  10 -<br>
>>  src/amd/vulkan/radv_wsi.c           | 472 +++-------------------<br>
>>  src/intel/vulkan/anv_image.c        |  71 +++-<br>
>>  src/intel/vulkan/anv_private.h      |   2 +<br>
>>  src/intel/vulkan/anv_wsi.c          | 347 +++-------------<br>
>>  src/vulkan/Makefile.sources         |   2 +<br>
>>  src/vulkan/wsi/meson.build          |   2 +<br>
>>  src/vulkan/wsi/wsi_common.c         | 763<br>
>> ++++++++++++++++++++++++++++++<wbr>++++++<br>
>>  src/vulkan/wsi/wsi_common.h         | 223 ++++++-----<br>
>>  src/vulkan/wsi/wsi_common_<wbr>private.h | 157 ++++++++<br>
>>  src/vulkan/wsi/wsi_common_<wbr>wayland.c |  90 ++---<br>
>>  src/vulkan/wsi/wsi_common_x11.<wbr>c     | 150 ++-----<br>
>>  14 files changed, 1310 insertions(+), 1012 deletions(-)<br>
>>  create mode 100644 src/vulkan/wsi/wsi_common.c<br>
>>  create mode 100644 src/vulkan/wsi/wsi_common_<wbr>private.h<br>
>><br>
>> --<br>
>> 2.5.0.400.gff86faf<br>
>><br>
><br>
><br>
</div></div>> ______________________________<wbr>_________________<br>
> mesa-dev mailing list<br>
> <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
><br>
</blockquote></div><br></div></div>