diff options
author | Tianhao Ni <tianhao.ni@samsung.com> | 2021-11-23 09:29:36 +0800 |
---|---|---|
committer | Xuelian Bai <xuelian.bai@samsung.com> | 2024-01-18 09:31:56 +0800 |
commit | 35a523f7b5d2a9b30255e00b2ca3d231aa7011a4 (patch) | |
tree | b977e815e78a97850640297b14979dccd927eb0e | |
parent | dca581a6ac7dc43689d5ce61d1e3fbb228051232 (diff) | |
download | mesa-35a523f7b5d2a9b30255e00b2ca3d231aa7011a4.tar.gz mesa-35a523f7b5d2a9b30255e00b2ca3d231aa7011a4.tar.bz2 mesa-35a523f7b5d2a9b30255e00b2ca3d231aa7011a4.zip |
1.Update spec file
2.Fix GLES31 eglSwapBuffers issue:
- GLES31 CTS, TC will call eglSwapBuffers without any draw call,
in this case tbm_surface will be NULL, but this should not be
an error.
Change-Id: I2eeda60f9581c40158ebec328024cb8f107dc646
Signed-off-by: Tianhao Ni <tianhao.ni@samsung.com>
-rw-r--r-- | packaging/mesa.spec | 68 | ||||
-rwxr-xr-x | src/egl/drivers/dri2/platform_tizen.c | 18 |
2 files changed, 52 insertions, 34 deletions
diff --git a/packaging/mesa.spec b/packaging/mesa.spec index d7d54f01b59..85c068ea608 100644 --- a/packaging/mesa.spec +++ b/packaging/mesa.spec @@ -1,5 +1,5 @@ Name: mesa -Version: 19.3.0 +Version: 21.2.3 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 @@ -39,10 +39,32 @@ BuildRequires: pkgconfig(libdrm_intel) >= 2.4.24 ExclusiveArch: %endif +%define USE_LLVM 0 +%define USE_GBM 0 %define USE_VULKAN 0 %define VULKAN_DRIVER broadcom -%define USE_GBM 0 +%define enable_driver() %{expand:%%{?!enable_%{1}: %%global enable_%{1} 1}} + +%ifarch %ix86 x86_64 +%define gallium_drivers "i915,swrast" +%define vulkan_drivers "" +%define dri_drivers "" +%else +%if %{USE_LLVM} == 1 +%enable_driver llvm +%endif +%if %{USE_GBM} == 1 +%enable_driver gbm +%endif +%if %{USE_VULKAN} == 1 +%enable_driver vulkan +%endif +%define gallium_drivers "vc4,v3d,kmsro%{?!enable_llvm:,swrast}" +%define vulkan_drivers "%{?enable_vulkan:%{VULKAN_DRIVER}}" +%define dri_drivers "auto" +%endif + %description Mesa is a 3-D graphics library with an API which is very similar to @@ -69,32 +91,22 @@ cp %{SOURCE1002} . mkdir build meson --prefix %{_hal_prefix} build/ \ - -Dc_link_args="-lttrace" \ - -Dcpp_link_args="-lttrace" \ - -Dlibdir=%{_hal_libdir} \ - -Dgallium-va=false \ - -Dgallium-vdpau=false \ - -Dgallium-xa=false \ - -Dgallium-xvmc=false \ - -Dglx=disabled \ - -Ddri3=false \ - -Dllvm=enabled \ -%if "%{USE_GBM}" == "1" - -Dgbm=true \ -%else - -Dgbm=false \ -%endif - -Dplatforms="tizen" \ -%ifarch %ix86 x86_64 - -Dgallium-drivers="i915,swrast" \ - -Ddri-drivers="" \ - -Dvulkan-drivers="" -%else -%if "%{USE_VULKAN}" == "1" - -Dvulkan-drivers="%{VULKAN_DRIVER}" \ -%endif - -Dgallium-drivers="vc4,v3d,kmsro,swrast" -%endif + -Dc_link_args="-lttrace" \ + -Dcpp_link_args="-lttrace" \ + -Dlibdir=%{_hal_libdir} \ + -Dgallium-va=false \ + -Dgallium-vdpau=false \ + -Dgallium-xa=false \ + -Dgallium-xvmc=false \ + -Dglx=disabled \ + -Ddri3=false \ + -Dllvm=%{?enable_llvm:enabled}%{?!enable_llvm:disabled} \ + -Dgbm=%{?enable_gbm:enabled}%{?!enable_gbm:disabled} \ + -Dplatforms="tizen" \ + -Dgallium-drivers=%{gallium_drivers} \ + -Ddri-drivers=%{dri_drivers} \ + -Dvulkan-drivers=%{vulkan_drivers} + ninja -C build/ diff --git a/src/egl/drivers/dri2/platform_tizen.c b/src/egl/drivers/dri2/platform_tizen.c index 30ac4a252a9..9bf72a52363 100755 --- a/src/egl/drivers/dri2/platform_tizen.c +++ b/src/egl/drivers/dri2/platform_tizen.c @@ -773,14 +773,20 @@ tizen_swap_buffers_with_damage(_EGLDisplay *disp, dri2_surf->color_buffers[i].age++; } - /* Make sure we have a back buffer in case we're swapping without - * ever rendering. */ - if (get_back_bo(dri2_surf, 0) < 0) { - _eglError(EGL_BAD_ALLOC, "dri2_swap_buffers"); - return EGL_FALSE; + /* In case that application didn't draw anything before swapbuffer, + * dri2_surf->tbm_surface will be NULL here, but this should not be + * an error */ + if (dri2_surf->tbm_surface) { + /* Make sure we have a back buffer in case we're swapping without + * ever rendering. */ + if (get_back_bo(dri2_surf, 0) < 0) { + _eglError(EGL_BAD_ALLOC, "dri2_swap_buffers"); + return EGL_FALSE; + } } - dri2_surf->back->age = 1; + if (dri2_surf->back) + dri2_surf->back->age = 1; TRACE_BEGIN("DRI2_SWAP_BUFERS"); /* The buffer to enqueue should be the buffer in which |