Date: Thu, 15 Jul 2021 00:49:38 GMT From: Jan Beich <jbeich@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org Subject: git: 1ccef81aa28e - 2021Q3 - graphics/mesa-devel: update to 21.2.b.24 Message-ID: <202107150049.16F0nc2d092356@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch 2021Q3 has been updated by jbeich: URL: https://cgit.FreeBSD.org/ports/commit/?id=1ccef81aa28e7da37622bf96e5165b5c8cd25224 commit 1ccef81aa28e7da37622bf96e5165b5c8cd25224 Author: Jan Beich <jbeich@FreeBSD.org> AuthorDate: 2021-07-14 19:20:09 +0000 Commit: Jan Beich <jbeich@FreeBSD.org> CommitDate: 2021-07-15 00:49:17 +0000 graphics/mesa-devel: update to 21.2.b.24 Changes: https://gitlab.freedesktop.org/mesa/mesa/-/compare/24d2459b022...f144d914966 (cherry picked from commit e6ad4091162161cfef0fda71356e1f060a118665) --- graphics/mesa-devel/Makefile | 4 +- graphics/mesa-devel/distinfo | 6 +- graphics/mesa-devel/files/patch-revert | 350 +++++++++++++++++++++++++++++++++ 3 files changed, 355 insertions(+), 5 deletions(-) diff --git a/graphics/mesa-devel/Makefile b/graphics/mesa-devel/Makefile index d486773efbd5..87a4ed3532fe 100644 --- a/graphics/mesa-devel/Makefile +++ b/graphics/mesa-devel/Makefile @@ -1,6 +1,6 @@ PORTNAME= mesa -DISTVERSION= 21.1-branchpoint-4344 -DISTVERSIONSUFFIX= -g24d2459b022 +DISTVERSION= 21.2-branchpoint-24 +DISTVERSIONSUFFIX= -gf144d914966 CATEGORIES= graphics PKGNAMESUFFIX= -devel diff --git a/graphics/mesa-devel/distinfo b/graphics/mesa-devel/distinfo index 6db2d43818af..4f4a92c36839 100644 --- a/graphics/mesa-devel/distinfo +++ b/graphics/mesa-devel/distinfo @@ -1,6 +1,6 @@ -TIMESTAMP = 1626133534 -SHA256 (mesa3d-mesa-21.1-branchpoint-4344-g24d2459b022_GH0.tar.gz) = dfa1fbe8f08992297f2838e7a12e5e7fa14433ba85025d8455d4f492d233ee53 -SIZE (mesa3d-mesa-21.1-branchpoint-4344-g24d2459b022_GH0.tar.gz) = 24295838 +TIMESTAMP = 1626306007 +SHA256 (mesa3d-mesa-21.2-branchpoint-24-gf144d914966_GH0.tar.gz) = 2ab91d8ac8dd060f256d3f3f452e6dd65723d8849ddad29b37857f098e0daf38 +SIZE (mesa3d-mesa-21.2-branchpoint-24-gf144d914966_GH0.tar.gz) = 24321508 SHA256 (55822330540d.patch) = fc776fee1d59f743a060ad1f78e1d9eba8826beb1fe7abef1734a407734b6109 SIZE (55822330540d.patch) = 1278 SHA256 (f6c7569ad9ea.patch) = 481784ca37e35549bf265e21eee1b9a29d2b0b8d3294de1d5b6b83a84f3d7a9b diff --git a/graphics/mesa-devel/files/patch-revert b/graphics/mesa-devel/files/patch-revert new file mode 100644 index 000000000000..c4ecfec6127b --- /dev/null +++ b/graphics/mesa-devel/files/patch-revert @@ -0,0 +1,350 @@ +Revert https://gitlab.freedesktop.org/mesa/mesa/-/commit/6b36f35734a9 +due to https://gitlab.freedesktop.org/mesa/mesa/-/issues/5063 + +--- src/vulkan/wsi/wsi_common_wayland.c.orig 2021-07-14 23:40:07 UTC ++++ src/vulkan/wsi/wsi_common_wayland.c +@@ -31,7 +31,6 @@ + #include <string.h> + #include <pthread.h> + #include <poll.h> +-#include <sys/mman.h> + + #include "drm-uapi/drm_fourcc.h" + +@@ -45,15 +44,9 @@ + #include <util/hash_table.h> + #include <util/timespec.h> + #include <util/u_vector.h> +-#include <util/anon_file.h> + + struct wsi_wayland; + +-struct wsi_wl_display_swrast { +- struct wl_shm * wl_shm; +- struct u_vector formats; +-}; +- + struct wsi_wl_display_drm { + struct wl_drm * wl_drm; + struct u_vector formats; +@@ -76,7 +69,6 @@ struct wsi_wl_display { + struct wl_display * wl_display_wrapper; + struct wl_event_queue * queue; + +- struct wsi_wl_display_swrast swrast; + struct wsi_wl_display_drm drm; + struct wsi_wl_display_dmabuf dmabuf; + +@@ -87,8 +79,6 @@ struct wsi_wl_display { + + /* Only used for displays created by wsi_wl_display_create */ + uint32_t refcount; +- +- bool sw; + }; + + struct wsi_wayland { +@@ -229,40 +219,6 @@ wsi_wl_display_add_wl_format(struct wsi_wl_display *di + } + + static void +-wsi_wl_display_add_wl_shm_format(struct wsi_wl_display *display, +- struct u_vector *formats, +- uint32_t wl_shm_format) +-{ +- switch (wl_shm_format) { +- case WL_SHM_FORMAT_XBGR8888: +- wsi_wl_display_add_vk_format(display, formats, +- VK_FORMAT_R8G8B8_SRGB); +- wsi_wl_display_add_vk_format(display, formats, +- VK_FORMAT_R8G8B8_UNORM); +- FALLTHROUGH; +- case WL_SHM_FORMAT_ABGR8888: +- wsi_wl_display_add_vk_format(display, formats, +- VK_FORMAT_R8G8B8A8_SRGB); +- wsi_wl_display_add_vk_format(display, formats, +- VK_FORMAT_R8G8B8A8_UNORM); +- break; +- case WL_SHM_FORMAT_XRGB8888: +- wsi_wl_display_add_vk_format(display, formats, +- VK_FORMAT_B8G8R8_SRGB); +- wsi_wl_display_add_vk_format(display, formats, +- VK_FORMAT_B8G8R8_UNORM); +- FALLTHROUGH; +- case WL_SHM_FORMAT_ARGB8888: +- wsi_wl_display_add_vk_format(display, formats, +- VK_FORMAT_B8G8R8A8_SRGB); +- wsi_wl_display_add_vk_format(display, formats, +- VK_FORMAT_B8G8R8A8_UNORM); +- break; +- } +-} +- +- +-static void + drm_handle_device(void *data, struct wl_drm *drm, const char *name) + { + } +@@ -316,23 +272,6 @@ wl_drm_format_for_vk_format(VkFormat vk_format, bool a + } + } + +-static uint32_t +-wl_shm_format_for_vk_format(VkFormat vk_format, bool alpha) +-{ +- switch (vk_format) { +- case VK_FORMAT_R8G8B8A8_UNORM: +- case VK_FORMAT_R8G8B8A8_SRGB: +- return alpha ? WL_SHM_FORMAT_ABGR8888 : WL_SHM_FORMAT_XBGR8888; +- case VK_FORMAT_B8G8R8A8_UNORM: +- case VK_FORMAT_B8G8R8A8_SRGB: +- return alpha ? WL_SHM_FORMAT_ARGB8888 : WL_SHM_FORMAT_XRGB8888; +- +- default: +- assert(!"Unsupported Vulkan format"); +- return 0; +- } +-} +- + static void + drm_handle_format(void *data, struct wl_drm *drm, uint32_t wl_format) + { +@@ -415,30 +354,11 @@ static const struct zwp_linux_dmabuf_v1_listener dmabu + }; + + static void +-shm_handle_format(void *data, struct wl_shm *shm, uint32_t format) +-{ +- struct wsi_wl_display *display = data; +- wsi_wl_display_add_wl_shm_format(display, &display->swrast.formats, format); +-} +- +-static const struct wl_shm_listener shm_listener = { +- .format = shm_handle_format +-}; +- +-static void + registry_handle_global(void *data, struct wl_registry *registry, + uint32_t name, const char *interface, uint32_t version) + { + struct wsi_wl_display *display = data; + +- if (display->sw) { +- if (strcmp(interface, "wl_shm") == 0) { +- display->swrast.wl_shm = wl_registry_bind(registry, name, &wl_shm_interface, 1); +- wl_shm_add_listener(display->swrast.wl_shm, &shm_listener, display); +- } +- return; +- } +- + if (strcmp(interface, "wl_drm") == 0) { + assert(display->drm.wl_drm == NULL); + +@@ -469,13 +389,10 @@ wsi_wl_display_finish(struct wsi_wl_display *display) + { + assert(display->refcount == 0); + +- u_vector_finish(&display->swrast.formats); + u_vector_finish(&display->drm.formats); + u_vector_finish(&display->dmabuf.formats); + u_vector_finish(&display->dmabuf.modifiers.argb8888); + u_vector_finish(&display->dmabuf.modifiers.xrgb8888); +- if (display->swrast.wl_shm) +- wl_shm_destroy(display->swrast.wl_shm); + if (display->drm.wl_drm) + wl_drm_destroy(display->drm.wl_drm); + if (display->dmabuf.wl_dmabuf) +@@ -490,18 +407,16 @@ static VkResult + wsi_wl_display_init(struct wsi_wayland *wsi_wl, + struct wsi_wl_display *display, + struct wl_display *wl_display, +- bool get_format_list, bool sw) ++ bool get_format_list) + { + VkResult result = VK_SUCCESS; + memset(display, 0, sizeof(*display)); + + display->wsi_wl = wsi_wl; + display->wl_display = wl_display; +- display->sw = sw; + + if (get_format_list) { +- if (!u_vector_init(&display->swrast.formats, sizeof(VkFormat), 8) || +- !u_vector_init(&display->drm.formats, sizeof(VkFormat), 8) || ++ if (!u_vector_init(&display->drm.formats, sizeof(VkFormat), 8) || + !u_vector_init(&display->dmabuf.formats, sizeof(VkFormat), 8) || + !u_vector_init(&display->dmabuf.modifiers.argb8888, + sizeof(uint64_t), 32) || +@@ -540,7 +455,7 @@ wsi_wl_display_init(struct wsi_wayland *wsi_wl, + wl_display_roundtrip_queue(display->wl_display, display->queue); + + /* Round-trip again to get formats, modifiers and capabilities */ +- if (display->drm.wl_drm || display->dmabuf.wl_dmabuf || display->swrast.wl_shm) ++ if (display->drm.wl_drm || display->dmabuf.wl_dmabuf) + wl_display_roundtrip_queue(display->wl_display, display->queue); + + if (wsi_wl->wsi->force_bgra8_unorm_first) { +@@ -559,9 +474,7 @@ wsi_wl_display_init(struct wsi_wayland *wsi_wl, + } + + /* Prefer the linux-dmabuf protocol if available */ +- if (display->sw) +- display->formats = &display->swrast.formats; +- else if (display->dmabuf.wl_dmabuf) { ++ if (display->dmabuf.wl_dmabuf) { + display->formats = &display->dmabuf.formats; + } else if (display->drm.wl_drm && + (display->drm.capabilities & WL_DRM_CAPABILITY_PRIME)) { +@@ -592,7 +505,6 @@ fail: + + static VkResult + wsi_wl_display_create(struct wsi_wayland *wsi, struct wl_display *wl_display, +- bool sw, + struct wsi_wl_display **display_out) + { + struct wsi_wl_display *display = +@@ -601,8 +513,7 @@ wsi_wl_display_create(struct wsi_wayland *wsi, struct + if (!display) + return VK_ERROR_OUT_OF_HOST_MEMORY; + +- VkResult result = wsi_wl_display_init(wsi, display, wl_display, true, +- sw); ++ VkResult result = wsi_wl_display_init(wsi, display, wl_display, true); + if (result != VK_SUCCESS) { + vk_free(wsi->alloc, display); + return result; +@@ -640,8 +551,7 @@ wsi_wl_get_presentation_support(struct wsi_device *wsi + (struct wsi_wayland *)wsi_device->wsi[VK_ICD_WSI_PLATFORM_WAYLAND]; + + struct wsi_wl_display display; +- VkResult ret = wsi_wl_display_init(wsi, &display, wl_display, false, +- wsi_device->sw); ++ VkResult ret = wsi_wl_display_init(wsi, &display, wl_display, false); + if (ret == VK_SUCCESS) + wsi_wl_display_finish(&display); + +@@ -744,8 +654,7 @@ wsi_wl_surface_get_formats(VkIcdSurfaceBase *icd_surfa + (struct wsi_wayland *)wsi_device->wsi[VK_ICD_WSI_PLATFORM_WAYLAND]; + + struct wsi_wl_display display; +- if (wsi_wl_display_init(wsi, &display, surface->display, true, +- wsi_device->sw)) ++ if (wsi_wl_display_init(wsi, &display, surface->display, true)) + return VK_ERROR_SURFACE_LOST_KHR; + + VK_OUTARRAY_MAKE(out, pSurfaceFormats, pSurfaceFormatCount); +@@ -775,8 +684,7 @@ wsi_wl_surface_get_formats2(VkIcdSurfaceBase *icd_surf + (struct wsi_wayland *)wsi_device->wsi[VK_ICD_WSI_PLATFORM_WAYLAND]; + + struct wsi_wl_display display; +- if (wsi_wl_display_init(wsi, &display, surface->display, true, +- wsi_device->sw)) ++ if (wsi_wl_display_init(wsi, &display, surface->display, true)) + return VK_ERROR_SURFACE_LOST_KHR; + + VK_OUTARRAY_MAKE(out, pSurfaceFormats, pSurfaceFormatCount); +@@ -856,8 +764,6 @@ struct wsi_wl_image { + struct wsi_image base; + struct wl_buffer * buffer; + bool busy; +- void *data_ptr; +- uint32_t data_size; + }; + + struct wsi_wl_swapchain { +@@ -872,7 +778,6 @@ struct wsi_wl_swapchain { + VkExtent2D extent; + VkFormat vk_format; + uint32_t drm_format; +- uint32_t shm_format; + + uint32_t num_drm_modifiers; + const uint64_t * drm_modifiers; +@@ -990,23 +895,6 @@ wsi_wl_swapchain_queue_present(struct wsi_swapchain *w + { + struct wsi_wl_swapchain *chain = (struct wsi_wl_swapchain *)wsi_chain; + +- if (chain->display->sw) { +- struct wsi_wl_image *image = &chain->images[image_index]; +- void *dptr = image->data_ptr; +- void *sptr; +- chain->base.wsi->MapMemory(chain->base.device, +- image->base.memory, +- 0, 0, 0, &sptr); +- +- for (unsigned r = 0; r < chain->extent.height; r++) { +- memcpy(dptr, sptr, image->base.row_pitches[0]); +- dptr += image->base.row_pitches[0]; +- sptr += image->base.row_pitches[0]; +- } +- chain->base.wsi->UnmapMemory(chain->base.device, +- image->base.memory); +- +- } + if (chain->base.present_mode == VK_PRESENT_MODE_FIFO_KHR) { + while (!chain->fifo_ready) { + int ret = wl_display_dispatch_queue(chain->display->wl_display, +@@ -1076,31 +964,7 @@ wsi_wl_image_init(struct wsi_wl_swapchain *chain, + if (result != VK_SUCCESS) + return result; + +- if (display->sw) { +- int fd, stride; +- +- stride = image->base.row_pitches[0]; +- image->data_size = stride * chain->extent.height; +- +- /* Create a shareable buffer */ +- fd = os_create_anonymous_file(image->data_size, NULL); +- if (fd < 0) +- goto fail_image; +- +- image->data_ptr = mmap(NULL, image->data_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); +- if (image->data_ptr == MAP_FAILED) { +- close(fd); +- goto fail_image; +- } +- /* Share it in a wl_buffer */ +- struct wl_shm_pool *pool = wl_shm_create_pool(display->swrast.wl_shm, fd, image->data_size); +- wl_proxy_set_queue((struct wl_proxy *)pool, display->queue); +- image->buffer = wl_shm_pool_create_buffer(pool, 0, chain->extent.width, +- chain->extent.height, stride, +- chain->shm_format); +- wl_shm_pool_destroy(pool); +- close(fd); +- } else if (display->dmabuf.wl_dmabuf) { ++ if (display->dmabuf.wl_dmabuf) { + struct zwp_linux_buffer_params_v1 *params = + zwp_linux_dmabuf_v1_create_params(display->dmabuf.wl_dmabuf); + if (!params) +@@ -1164,8 +1028,6 @@ wsi_wl_swapchain_destroy(struct wsi_swapchain *wsi_cha + if (chain->images[i].buffer) { + wl_buffer_destroy(chain->images[i].buffer); + wsi_destroy_image(&chain->base, &chain->images[i].base); +- if (chain->images[i].data_ptr) +- munmap(chain->images[i].data_ptr, chain->images[i].data_size); + } + } + +@@ -1234,10 +1096,7 @@ wsi_wl_surface_create_swapchain(VkIcdSurfaceBase *icd_ + chain->base.image_count = num_images; + chain->extent = pCreateInfo->imageExtent; + chain->vk_format = pCreateInfo->imageFormat; +- if (wsi_device->sw) +- chain->shm_format = wl_shm_format_for_vk_format(chain->vk_format, alpha); +- else +- chain->drm_format = wl_drm_format_for_vk_format(chain->vk_format, alpha); ++ chain->drm_format = wl_drm_format_for_vk_format(chain->vk_format, alpha); + + if (pCreateInfo->oldSwapchain) { + /* If we have an oldSwapchain parameter, copy the display struct over +@@ -1247,8 +1106,7 @@ wsi_wl_surface_create_swapchain(VkIcdSurfaceBase *icd_ + chain->display = wsi_wl_display_ref(old_chain->display); + } else { + chain->display = NULL; +- result = wsi_wl_display_create(wsi, surface->display, +- wsi_device->sw, &chain->display); ++ result = wsi_wl_display_create(wsi, surface->display, &chain->display); + if (result != VK_SUCCESS) + goto fail; + }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107150049.16F0nc2d092356>