diff options
author | Xuelian Bai <xuelian.bai@samsung.com> | 2023-08-22 15:58:14 +0800 |
---|---|---|
committer | Xuelian Bai <xuelian.bai@samsung.com> | 2023-08-22 16:07:40 +0800 |
commit | a2ecc64bdf50afd4972c0f2cd1c93b08d8b52d35 (patch) | |
tree | 83946495a31097060aec760beaf881dff65c980b | |
parent | 0f63101d3031de9ee5adc6246b62889a9b1f7ef4 (diff) | |
download | mesa-a2ecc64bdf50afd4972c0f2cd1c93b08d8b52d35.tar.gz mesa-a2ecc64bdf50afd4972c0f2cd1c93b08d8b52d35.tar.bz2 mesa-a2ecc64bdf50afd4972c0f2cd1c93b08d8b52d35.zip |
Fix build issues and runtime issues for 23.1.5
Change-Id: Ib806455f5f754ce7912032d1a62c012c5f52e3f1
Signed-off-by: Xuelian Bai <xuelian.bai@samsung.com>
-rw-r--r-- | packaging/mesa.spec | 2 | ||||
-rw-r--r-- | src/broadcom/vulkan/v3dv_pipeline_cache.c | 25 | ||||
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.c | 3 | ||||
-rwxr-xr-x | src/egl/drivers/dri2/platform_tizen.c | 18 | ||||
-rw-r--r-- | src/egl/meson.build | 5 |
5 files changed, 35 insertions, 18 deletions
diff --git a/packaging/mesa.spec b/packaging/mesa.spec index 7c46c40c05a..5e85a496b62 100644 --- a/packaging/mesa.spec +++ b/packaging/mesa.spec @@ -1,5 +1,5 @@ Name: mesa -Version: 22.3.5 +Version: 23.1.5 Release: 0 License: MIT and Apache-2.0 and SGI Free Software License B v2.0 and BSD-3-Clause Summary: System for rendering interactive 3-D graphics diff --git a/src/broadcom/vulkan/v3dv_pipeline_cache.c b/src/broadcom/vulkan/v3dv_pipeline_cache.c index 6f504cd1947..bafa8d759fa 100644 --- a/src/broadcom/vulkan/v3dv_pipeline_cache.c +++ b/src/broadcom/vulkan/v3dv_pipeline_cache.c @@ -588,14 +588,14 @@ v3dv_pipeline_shared_data_create_from_blob(struct v3dv_pipeline_cache *cache, blob_read_bytes(blob, sizeof(struct v3dv_descriptor_maps)); if (blob->overrun) - return NULL; + goto fail; maps[stage] = vk_zalloc2(&cache->device->vk.alloc, NULL, sizeof(struct v3dv_descriptor_maps), 8, VK_SYSTEM_ALLOCATION_SCOPE_OBJECT); if (maps[stage] == NULL) - return NULL; + goto fail; memcpy(maps[stage], current_maps, sizeof(struct v3dv_descriptor_maps)); if (broadcom_shader_stage_is_render_with_binning(stage)) { @@ -619,10 +619,25 @@ v3dv_pipeline_shared_data_create_from_blob(struct v3dv_pipeline_cache *cache, blob_read_bytes(blob, total_assembly_size); if (blob->overrun) - return NULL; + goto fail; + + struct v3dv_pipeline_shared_data *data = + v3dv_pipeline_shared_data_new(cache, sha1_key, maps, variants, + total_assembly, total_assembly_size); + + if (!data) + goto fail; - return v3dv_pipeline_shared_data_new(cache, sha1_key, maps, variants, - total_assembly, total_assembly_size); + return data; + +fail: + for (int i = 0; i < BROADCOM_SHADER_STAGES; i++) { + if (maps[i]) + vk_free2(&cache->device->vk.alloc, NULL, maps[i]); + if (variants[i]) + v3dv_shader_variant_destroy(cache->device, variants[i]); + } + return NULL; } static void diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 7c52f16812a..1ec94b7fa7f 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -3512,8 +3512,7 @@ dri2_create_sync(_EGLDisplay *disp, EGLenum type, const EGLAttrib *attrib_list) } if (!dri2_sync->fence) { _eglError(EGL_BAD_ATTRIBUTE, "eglCreateSyncKHR"); - free(dri2_sync); - return NULL; + goto fail; } break; } diff --git a/src/egl/drivers/dri2/platform_tizen.c b/src/egl/drivers/dri2/platform_tizen.c index 3b0c8bdc029..d2666c2337b 100755 --- a/src/egl/drivers/dri2/platform_tizen.c +++ b/src/egl/drivers/dri2/platform_tizen.c @@ -301,7 +301,6 @@ tizen_window_enqueue_buffer_with_damage(_EGLDisplay *disp, * we enter tizen_window_enqueue_buffer() and re-acquire the mutex upon * return. */ - simple_mtx_unlock(&disp->Mutex); fence_fd = dri2_surf->out_fence_fd; @@ -325,7 +324,6 @@ tizen_window_enqueue_buffer_with_damage(_EGLDisplay *disp, dri2_surf->tbm_surface = NULL; dri2_surf->back = NULL; - simple_mtx_lock(&disp->Mutex); if (dri2_surf->dri_image_back) { dri2_dpy->image->destroyImage(dri2_surf->dri_image_back); @@ -1561,6 +1559,7 @@ dri2_initialize_tizen(_EGLDisplay *disp) loader_set_logger(_eglLog); + dri2_dpy = calloc(1, sizeof *dri2_dpy); if (!dri2_dpy) return _eglError(EGL_BAD_ALLOC, "eglInitialize"); @@ -1599,6 +1598,8 @@ dri2_initialize_tizen(_EGLDisplay *disp) err = "DRI2: failed to get tbm_bufmgr fd"; goto cleanup_device; } + loader_set_logger(_eglLog); + if (hw_accel) { #if 0//FOR REF: it's another way, to open v3d directly @@ -1627,31 +1628,34 @@ dri2_initialize_tizen(_EGLDisplay *disp) if (drmGetNodeTypeFromFd(tbm_bufmgr_fd) == DRM_NODE_RENDER) { tbm_bufmgr_device_name = loader_get_device_name_for_fd(tbm_bufmgr_fd); + + if (tbm_bufmgr_device_name == NULL) { err = "DRI2: failed to get tbm_bufmgr device name"; goto cleanup_device; } - dri2_dpy->fd = loader_open_device(tbm_bufmgr_device_name); + dri2_dpy->fd_render_gpu = loader_open_device(tbm_bufmgr_device_name); } else if ((master_fd = tbm_drm_helper_get_master_fd()) >= 0) { close(master_fd); // display server always has master_fd, // so tbm_bufmgr_fd is the master_fd if it can get the tbm_master_fd. tbm_bufmgr_device_name = loader_get_device_name_for_fd(tbm_bufmgr_fd); + + if (tbm_bufmgr_device_name == NULL) { err = "DRI2: failed to get tbm_bufmgr device name"; goto cleanup_device; } - dri2_dpy->fd = loader_open_device(tbm_bufmgr_device_name); + dri2_dpy->fd_render_gpu = loader_open_device(tbm_bufmgr_device_name); } else { - if (!tbm_drm_helper_get_auth_info(&dri2_dpy->fd, NULL, NULL)) { + if (!tbm_drm_helper_get_auth_info(&dri2_dpy->fd_render_gpu, NULL, NULL)) { err = "DRI2: failed to get fd from tbm_drm_helper_get_auth_info()"; goto cleanup_device; } } - dri2_dpy->driver_name = loader_get_driver_for_fd(dri2_dpy->fd); - + dri2_dpy->driver_name = loader_get_driver_for_fd(dri2_dpy->fd_render_gpu); if (dri2_dpy->driver_name == NULL) { err = "DRI2: failed to get driver name"; goto cleanup_device; diff --git a/src/egl/meson.build b/src/egl/meson.build index 917ac74729d..ac853e13e98 100644 --- a/src/egl/meson.build +++ b/src/egl/meson.build @@ -126,7 +126,7 @@ if with_dri2 deps_for_egl += dep_libdrm endif if with_platform_wayland - deps_for_egl += [dep_wayland_client, dep_wayland_server] + deps_for_egl += [dep_wayland_client, dep_wayland_server, dep_wayland_egl_headers] link_for_egl += libwayland_drm files_egl += files('drivers/dri2/platform_wayland.c') files_egl += [ @@ -134,8 +134,7 @@ if with_dri2 linux_dmabuf_unstable_v1_client_protocol_h, wayland_drm_client_protocol_h, ] - incs_for_egl += [include_directories('wayland/wayland-drm')] - incs_for_egl += [include_directories('wayland/wayland-egl')] + incs_for_egl += include_directories('wayland/wayland-drm') endif if with_platform_tizen files_egl += files('drivers/dri2/platform_tizen.c') |