On Tue 28 Nov 2017, Jason Ekstrand wrote: > This uses the mock extension created in a previous commit to tell the > driver that the image it's just been asked to create is, in fact, a > window system image with whatever assumptions that implies. There was a > lot of redundant code between the two drivers to do basically exactly > the same thing. > --- > src/amd/vulkan/radv_wsi.c | 124 > +----------------------------------- > src/intel/vulkan/anv_wsi.c | 122 +---------------------------------- > src/vulkan/wsi/wsi_common.c | 117 +++++++++++++++++++++++++++++++++- > src/vulkan/wsi/wsi_common.h | 28 +------- > src/vulkan/wsi/wsi_common_private.h | 25 +++++++- > src/vulkan/wsi/wsi_common_wayland.c | 13 +--- > src/vulkan/wsi/wsi_common_x11.c | 20 +----- > 7 files changed, 146 insertions(+), 303 deletions(-)
This patch is Reviewed-by: Chad Versace <chadvers...@chromium.org> This series is a good improvement over the old code :) But I found some nits: - The Vulkan spec, iirc, requires that vkCreateFoo not modify its output parameter on failure. The memset in this patch breaks that requirement. I'm sure we're breaking that elsewhere too. We should probably do a cleanup one day to fix that. - wsi_destroy_image neither assets that image->fd == -1 nor closes it. I believe there is no fd leakage because anv_wsi* does the right thing. But that's a small cleanup we could do later. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev