diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2017-12-31 07:12:27 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2017-12-31 07:12:27 +0000 |
commit | 051645c92924bf915d82bf219f2ed67309b5577a (patch) | |
tree | 4aae126dd8e5a18c6a9926a5468d1561e6038a07 /lib/mesa/src/gallium/winsys/virgl | |
parent | 2dae6fe6f74cf7fb9fd65285302c0331d9786b00 (diff) |
Merge Mesa 17.2.8
Diffstat (limited to 'lib/mesa/src/gallium/winsys/virgl')
6 files changed, 98 insertions, 106 deletions
diff --git a/lib/mesa/src/gallium/winsys/virgl/drm/Makefile.in b/lib/mesa/src/gallium/winsys/virgl/drm/Makefile.in index 95d0f02b0..14f29208e 100644 --- a/lib/mesa/src/gallium/winsys/virgl/drm/Makefile.in +++ b/lib/mesa/src/gallium/winsys/virgl/drm/Makefile.in @@ -76,10 +76,13 @@ target_triplet = @target@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/Makefile.sources $(top_srcdir)/bin/depcomp \ $(top_srcdir)/src/gallium/Automake.inc -@HAVE_DRISW_TRUE@am__append_1 = \ +@HAVE_LIBDRM_TRUE@am__append_1 = \ +@HAVE_LIBDRM_TRUE@ $(LIBDRM_LIBS) + +@HAVE_DRISW_TRUE@am__append_2 = \ @HAVE_DRISW_TRUE@ $(top_builddir)/src/gallium/winsys/sw/dri/libswdri.la -@HAVE_DRISW_KMS_TRUE@am__append_2 = \ +@HAVE_DRISW_KMS_TRUE@am__append_3 = \ @HAVE_DRISW_KMS_TRUE@ $(top_builddir)/src/gallium/winsys/sw/kms-dri/libswkmsdri.la \ @HAVE_DRISW_KMS_TRUE@ $(LIBDRM_LIBS) @@ -158,6 +161,8 @@ AMDGPU_CFLAGS = @AMDGPU_CFLAGS@ AMDGPU_LIBS = @AMDGPU_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +ANDROID_CFLAGS = @ANDROID_CFLAGS@ +ANDROID_LIBS = @ANDROID_LIBS@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -188,8 +193,6 @@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ -DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ -DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIGL_CFLAGS = @DRIGL_CFLAGS@ DRIGL_LIBS = @DRIGL_LIBS@ DRI_DRIVER_INSTALL_DIR = @DRI_DRIVER_INSTALL_DIR@ @@ -202,10 +205,11 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ -EGL_CLIENT_APIS = @EGL_CLIENT_APIS@ EGL_LIB_DEPS = @EGL_LIB_DEPS@ EGL_NATIVE_PLATFORM = @EGL_NATIVE_PLATFORM@ EGREP = @EGREP@ +ETNAVIV_CFLAGS = @ETNAVIV_CFLAGS@ +ETNAVIV_LIBS = @ETNAVIV_LIBS@ EXEEXT = @EXEEXT@ EXPAT_CFLAGS = @EXPAT_CFLAGS@ EXPAT_LIBS = @EXPAT_LIBS@ @@ -232,6 +236,8 @@ GL_PC_LIB_PRIV = @GL_PC_LIB_PRIV@ GL_PC_REQ_PRIV = @GL_PC_REQ_PRIV@ GREP = @GREP@ HAVE_XF86VIDMODE = @HAVE_XF86VIDMODE@ +I915_CFLAGS = @I915_CFLAGS@ +I915_LIBS = @I915_LIBS@ INDENT = @INDENT@ INDENT_FLAGS = @INDENT_FLAGS@ INSTALL = @INSTALL@ @@ -239,45 +245,40 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INTEL_CFLAGS = @INTEL_CFLAGS@ -INTEL_LIBS = @INTEL_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_NO_UNDEFINED = @LD_NO_UNDEFINED@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBATOMIC_LIBS = @LIBATOMIC_LIBS@ LIBCLC_INCLUDEDIR = @LIBCLC_INCLUDEDIR@ LIBCLC_LIBEXECDIR = @LIBCLC_LIBEXECDIR@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBELF_CFLAGS = @LIBELF_CFLAGS@ LIBELF_LIBS = @LIBELF_LIBS@ +LIBGLVND_DATADIR = @LIBGLVND_DATADIR@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ -LIBSENSORS_LDFLAGS = @LIBSENSORS_LDFLAGS@ -LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ -LIBSHA1_LIBS = @LIBSHA1_LIBS@ +LIBSENSORS_LIBS = @LIBSENSORS_LIBS@ LIBTOOL = @LIBTOOL@ +LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ +LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIB_DIR = @LIB_DIR@ LIB_EXT = @LIB_EXT@ LIPO = @LIPO@ -LLVM_BINDIR = @LLVM_BINDIR@ LLVM_CFLAGS = @LLVM_CFLAGS@ LLVM_CONFIG = @LLVM_CONFIG@ -LLVM_CPPFLAGS = @LLVM_CPPFLAGS@ LLVM_CXXFLAGS = @LLVM_CXXFLAGS@ LLVM_INCLUDEDIR = @LLVM_INCLUDEDIR@ LLVM_LDFLAGS = @LLVM_LDFLAGS@ -LLVM_LIBDIR = @LLVM_LIBDIR@ LLVM_LIBS = @LLVM_LIBS@ -LLVM_VERSION = @LLVM_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ -MESA_LLVM = @MESA_LLVM@ MKDIR_P = @MKDIR_P@ MSVC2013_COMPAT_CFLAGS = @MSVC2013_COMPAT_CFLAGS@ MSVC2013_COMPAT_CXXFLAGS = @MSVC2013_COMPAT_CXXFLAGS@ @@ -298,8 +299,6 @@ OMX_LIBS = @OMX_LIBS@ OMX_LIB_INSTALL_DIR = @OMX_LIB_INSTALL_DIR@ OPENCL_LIBNAME = @OPENCL_LIBNAME@ OPENCL_VERSION = @OPENCL_VERSION@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ OSMESA_LIB = @OSMESA_LIB@ OSMESA_LIB_DEPS = @OSMESA_LIB_DEPS@ OSMESA_PC_LIB_PRIV = @OSMESA_PC_LIB_PRIV@ @@ -319,8 +318,6 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSIX_SHELL = @POSIX_SHELL@ -PRESENTPROTO_CFLAGS = @PRESENTPROTO_CFLAGS@ -PRESENTPROTO_LIBS = @PRESENTPROTO_LIBS@ PTHREADSTUBS_CFLAGS = @PTHREADSTUBS_CFLAGS@ PTHREADSTUBS_LIBS = @PTHREADSTUBS_LIBS@ PTHREAD_CC = @PTHREAD_CC@ @@ -336,8 +333,6 @@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SET_MAKE = @SET_MAKE@ -SHA1_CFLAGS = @SHA1_CFLAGS@ -SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SIMPENROSE_CFLAGS = @SIMPENROSE_CFLAGS@ SIMPENROSE_LIBS = @SIMPENROSE_LIBS@ @@ -346,7 +341,8 @@ STRIP = @STRIP@ SWR_AVX2_CXXFLAGS = @SWR_AVX2_CXXFLAGS@ SWR_AVX_CXXFLAGS = @SWR_AVX_CXXFLAGS@ SWR_CXX11_CXXFLAGS = @SWR_CXX11_CXXFLAGS@ -TIMESTAMP_CMD = @TIMESTAMP_CMD@ +SWR_KNL_CXXFLAGS = @SWR_KNL_CXXFLAGS@ +SWR_SKX_CXXFLAGS = @SWR_SKX_CXXFLAGS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VA_CFLAGS = @VA_CFLAGS@ @@ -354,15 +350,12 @@ VA_LIBS = @VA_LIBS@ VA_LIB_INSTALL_DIR = @VA_LIB_INSTALL_DIR@ VA_MAJOR = @VA_MAJOR@ VA_MINOR = @VA_MINOR@ -VC4_CFLAGS = @VC4_CFLAGS@ -VC4_LIBS = @VC4_LIBS@ VDPAU_CFLAGS = @VDPAU_CFLAGS@ VDPAU_LIBS = @VDPAU_LIBS@ VDPAU_LIB_INSTALL_DIR = @VDPAU_LIB_INSTALL_DIR@ VDPAU_MAJOR = @VDPAU_MAJOR@ VDPAU_MINOR = @VDPAU_MINOR@ VERSION = @VERSION@ -VG_LIB_DEPS = @VG_LIB_DEPS@ VISIBILITY_CFLAGS = @VISIBILITY_CFLAGS@ VISIBILITY_CXXFLAGS = @VISIBILITY_CXXFLAGS@ VL_CFLAGS = @VL_CFLAGS@ @@ -370,6 +363,7 @@ VL_LIBS = @VL_LIBS@ VULKAN_ICD_INSTALL_DIR = @VULKAN_ICD_INSTALL_DIR@ WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ WAYLAND_LIBS = @WAYLAND_LIBS@ +WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@ WAYLAND_SCANNER = @WAYLAND_SCANNER@ WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@ WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@ @@ -391,9 +385,10 @@ XVMC_LIBS = @XVMC_LIBS@ XVMC_LIB_INSTALL_DIR = @XVMC_LIB_INSTALL_DIR@ XVMC_MAJOR = @XVMC_MAJOR@ XVMC_MINOR = @XVMC_MINOR@ -XXD = @XXD@ YACC = @YACC@ YFLAGS = @YFLAGS@ +ZLIB_CFLAGS = @ZLIB_CFLAGS@ +ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -507,12 +502,8 @@ GALLIUM_TARGET_CFLAGS = \ $(LIBDRM_CFLAGS) \ $(VISIBILITY_CFLAGS) -GALLIUM_COMMON_LIB_DEPS = \ - -lm \ - $(CLOCK_LIB) \ - $(PTHREAD_LIBS) \ - $(DLOPEN_LIBS) - +GALLIUM_COMMON_LIB_DEPS = -lm $(LIBUNWIND_LIBS) $(LIBSENSORS_LIBS) \ + $(CLOCK_LIB) $(PTHREAD_LIBS) $(DLOPEN_LIBS) $(am__append_1) GALLIUM_WINSYS_CFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/include \ @@ -524,7 +515,7 @@ GALLIUM_WINSYS_CFLAGS = \ GALLIUM_PIPE_LOADER_WINSYS_LIBS = \ $(top_builddir)/src/gallium/winsys/sw/null/libws_null.la \ $(top_builddir)/src/gallium/winsys/sw/wrapper/libwsw.la \ - $(am__append_1) $(am__append_2) + $(am__append_2) $(am__append_3) AM_CFLAGS = \ -I$(top_srcdir)/src/gallium/drivers \ $(GALLIUM_WINSYS_CFLAGS) \ diff --git a/lib/mesa/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c b/lib/mesa/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c index 86e0470e6..7f542e7f1 100644 --- a/lib/mesa/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c +++ b/lib/mesa/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c @@ -54,17 +54,17 @@ static void virgl_hw_res_destroy(struct virgl_drm_winsys *qdws, struct drm_gem_close args; if (res->flinked) { - pipe_mutex_lock(qdws->bo_handles_mutex); + mtx_lock(&qdws->bo_handles_mutex); util_hash_table_remove(qdws->bo_names, (void *)(uintptr_t)res->flink); - pipe_mutex_unlock(qdws->bo_handles_mutex); + mtx_unlock(&qdws->bo_handles_mutex); } if (res->bo_handle) { - pipe_mutex_lock(qdws->bo_handles_mutex); + mtx_lock(&qdws->bo_handles_mutex); util_hash_table_remove(qdws->bo_handles, (void *)(uintptr_t)res->bo_handle); - pipe_mutex_unlock(qdws->bo_handles_mutex); + mtx_unlock(&qdws->bo_handles_mutex); } if (res->ptr) @@ -98,7 +98,7 @@ virgl_cache_flush(struct virgl_drm_winsys *qdws) struct list_head *curr, *next; struct virgl_hw_res *res; - pipe_mutex_lock(qdws->mutex); + mtx_lock(&qdws->mutex); curr = qdws->delayed.next; next = curr->next; @@ -109,7 +109,7 @@ virgl_cache_flush(struct virgl_drm_winsys *qdws) curr = next; next = curr->next; } - pipe_mutex_unlock(qdws->mutex); + mtx_unlock(&qdws->mutex); } static void virgl_drm_winsys_destroy(struct virgl_winsys *qws) @@ -120,8 +120,8 @@ virgl_drm_winsys_destroy(struct virgl_winsys *qws) util_hash_table_destroy(qdws->bo_handles); util_hash_table_destroy(qdws->bo_names); - pipe_mutex_destroy(qdws->bo_handles_mutex); - pipe_mutex_destroy(qdws->mutex); + mtx_destroy(&qdws->bo_handles_mutex); + mtx_destroy(&qdws->mutex); FREE(qdws); } @@ -158,14 +158,14 @@ static void virgl_drm_resource_reference(struct virgl_drm_winsys *qdws, if (!can_cache_resource(old)) { virgl_hw_res_destroy(qdws, old); } else { - pipe_mutex_lock(qdws->mutex); + mtx_lock(&qdws->mutex); virgl_cache_list_check_free(qdws); old->start = os_time_get(); old->end = old->start + qdws->usecs; LIST_ADDTAIL(&old->head, &qdws->delayed); qdws->num_delayed++; - pipe_mutex_unlock(qdws->mutex); + mtx_unlock(&qdws->mutex); } } *dres = sres; @@ -258,7 +258,12 @@ virgl_bo_transfer_put(struct virgl_winsys *vws, memset(&tohostcmd, 0, sizeof(tohostcmd)); tohostcmd.bo_handle = res->bo_handle; - tohostcmd.box = *(struct drm_virtgpu_3d_box *)box; + tohostcmd.box.x = box->x; + tohostcmd.box.y = box->y; + tohostcmd.box.z = box->z; + tohostcmd.box.w = box->width; + tohostcmd.box.h = box->height; + tohostcmd.box.d = box->depth; tohostcmd.offset = buf_offset; tohostcmd.level = level; // tohostcmd.stride = stride; @@ -282,7 +287,12 @@ virgl_bo_transfer_get(struct virgl_winsys *vws, fromhostcmd.offset = buf_offset; // fromhostcmd.stride = stride; // fromhostcmd.layer_stride = layer_stride; - fromhostcmd.box = *(struct drm_virtgpu_3d_box *)box; + fromhostcmd.box.x = box->x; + fromhostcmd.box.y = box->y; + fromhostcmd.box.z = box->z; + fromhostcmd.box.w = box->width; + fromhostcmd.box.h = box->height; + fromhostcmd.box.d = box->depth; return drmIoctl(vdws->fd, DRM_IOCTL_VIRTGPU_TRANSFER_FROM_HOST, &fromhostcmd); } @@ -310,7 +320,7 @@ virgl_drm_winsys_resource_cache_create(struct virgl_winsys *qws, bind != VIRGL_BIND_VERTEX_BUFFER && bind != VIRGL_BIND_CUSTOM) goto alloc; - pipe_mutex_lock(qdws->mutex); + mtx_lock(&qdws->mutex); res = NULL; curr = qdws->delayed.next; @@ -353,12 +363,12 @@ virgl_drm_winsys_resource_cache_create(struct virgl_winsys *qws, if (res) { LIST_DEL(&res->head); --qdws->num_delayed; - pipe_mutex_unlock(qdws->mutex); + mtx_unlock(&qdws->mutex); pipe_reference_init(&res->reference, 1); return res; } - pipe_mutex_unlock(qdws->mutex); + mtx_unlock(&qdws->mutex); alloc: res = virgl_drm_winsys_resource_create(qws, target, format, bind, @@ -386,7 +396,7 @@ virgl_drm_winsys_resource_create_handle(struct virgl_winsys *qws, return NULL; } - pipe_mutex_lock(qdws->bo_handles_mutex); + mtx_lock(&qdws->bo_handles_mutex); if (whandle->type == DRM_API_HANDLE_TYPE_SHARED) { res = util_hash_table_get(qdws->bo_names, (void*)(uintptr_t)handle); @@ -453,7 +463,7 @@ virgl_drm_winsys_resource_create_handle(struct virgl_winsys *qws, util_hash_table_set(qdws->bo_handles, (void *)(uintptr_t)handle, res); done: - pipe_mutex_unlock(qdws->bo_handles_mutex); + mtx_unlock(&qdws->bo_handles_mutex); return res; } @@ -479,9 +489,9 @@ static boolean virgl_drm_winsys_resource_get_handle(struct virgl_winsys *qws, res->flinked = TRUE; res->flink = flink.name; - pipe_mutex_lock(qdws->bo_handles_mutex); + mtx_lock(&qdws->bo_handles_mutex); util_hash_table_set(qdws->bo_names, (void *)(uintptr_t)res->flink, res); - pipe_mutex_unlock(qdws->bo_handles_mutex); + mtx_unlock(&qdws->bo_handles_mutex); } whandle->handle = res->flink; } else if (whandle->type == DRM_API_HANDLE_TYPE_KMS) { @@ -489,9 +499,9 @@ static boolean virgl_drm_winsys_resource_get_handle(struct virgl_winsys *qws, } else if (whandle->type == DRM_API_HANDLE_TYPE_FD) { if (drmPrimeHandleToFD(qdws->fd, res->bo_handle, DRM_CLOEXEC, (int*)&whandle->handle)) return FALSE; - pipe_mutex_lock(qdws->bo_handles_mutex); + mtx_lock(&qdws->bo_handles_mutex); util_hash_table_set(qdws->bo_handles, (void *)(uintptr_t)res->bo_handle, res); - pipe_mutex_unlock(qdws->bo_handles_mutex); + mtx_unlock(&qdws->bo_handles_mutex); } whandle->stride = stride; return TRUE; @@ -776,8 +786,8 @@ virgl_drm_winsys_create(int drmFD) qdws->num_delayed = 0; qdws->usecs = 1000000; LIST_INITHEAD(&qdws->delayed); - pipe_mutex_init(qdws->mutex); - pipe_mutex_init(qdws->bo_handles_mutex); + (void) mtx_init(&qdws->mutex, mtx_plain); + (void) mtx_init(&qdws->bo_handles_mutex, mtx_plain); qdws->bo_handles = util_hash_table_create(handle_hash, handle_compare); qdws->bo_names = util_hash_table_create(handle_hash, handle_compare); qdws->base.destroy = virgl_drm_winsys_destroy; @@ -806,7 +816,7 @@ virgl_drm_winsys_create(int drmFD) } static struct util_hash_table *fd_tab = NULL; -pipe_static_mutex(virgl_screen_mutex); +static mtx_t virgl_screen_mutex = _MTX_INITIALIZER_NP; static void virgl_drm_screen_destroy(struct pipe_screen *pscreen) @@ -814,13 +824,13 @@ virgl_drm_screen_destroy(struct pipe_screen *pscreen) struct virgl_screen *screen = virgl_screen(pscreen); boolean destroy; - pipe_mutex_lock(virgl_screen_mutex); + mtx_lock(&virgl_screen_mutex); destroy = --screen->refcnt == 0; if (destroy) { int fd = virgl_drm_winsys(screen->vws)->fd; util_hash_table_remove(fd_tab, intptr_to_pointer(fd)); } - pipe_mutex_unlock(virgl_screen_mutex); + mtx_unlock(&virgl_screen_mutex); if (destroy) { pscreen->destroy = screen->winsys_priv; @@ -855,7 +865,7 @@ virgl_drm_screen_create(int fd) { struct pipe_screen *pscreen = NULL; - pipe_mutex_lock(virgl_screen_mutex); + mtx_lock(&virgl_screen_mutex); if (!fd_tab) { fd_tab = util_hash_table_create(hash_fd, compare_fd); if (!fd_tab) @@ -885,6 +895,6 @@ virgl_drm_screen_create(int fd) } unlock: - pipe_mutex_unlock(virgl_screen_mutex); + mtx_unlock(&virgl_screen_mutex); return pscreen; } diff --git a/lib/mesa/src/gallium/winsys/virgl/drm/virgl_drm_winsys.h b/lib/mesa/src/gallium/winsys/virgl/drm/virgl_drm_winsys.h index ffd7658ca..f6772153a 100644 --- a/lib/mesa/src/gallium/winsys/virgl/drm/virgl_drm_winsys.h +++ b/lib/mesa/src/gallium/winsys/virgl/drm/virgl_drm_winsys.h @@ -59,11 +59,11 @@ struct virgl_drm_winsys struct list_head delayed; int num_delayed; unsigned usecs; - pipe_mutex mutex; + mtx_t mutex; struct util_hash_table *bo_handles; struct util_hash_table *bo_names; - pipe_mutex bo_handles_mutex; + mtx_t bo_handles_mutex; }; struct virgl_drm_cmd_buf { diff --git a/lib/mesa/src/gallium/winsys/virgl/vtest/Makefile.in b/lib/mesa/src/gallium/winsys/virgl/vtest/Makefile.in index 9c62086be..d782320fe 100644 --- a/lib/mesa/src/gallium/winsys/virgl/vtest/Makefile.in +++ b/lib/mesa/src/gallium/winsys/virgl/vtest/Makefile.in @@ -76,10 +76,13 @@ target_triplet = @target@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/Makefile.sources $(top_srcdir)/bin/depcomp \ $(top_srcdir)/src/gallium/Automake.inc -@HAVE_DRISW_TRUE@am__append_1 = \ +@HAVE_LIBDRM_TRUE@am__append_1 = \ +@HAVE_LIBDRM_TRUE@ $(LIBDRM_LIBS) + +@HAVE_DRISW_TRUE@am__append_2 = \ @HAVE_DRISW_TRUE@ $(top_builddir)/src/gallium/winsys/sw/dri/libswdri.la -@HAVE_DRISW_KMS_TRUE@am__append_2 = \ +@HAVE_DRISW_KMS_TRUE@am__append_3 = \ @HAVE_DRISW_KMS_TRUE@ $(top_builddir)/src/gallium/winsys/sw/kms-dri/libswkmsdri.la \ @HAVE_DRISW_KMS_TRUE@ $(LIBDRM_LIBS) @@ -158,6 +161,8 @@ AMDGPU_CFLAGS = @AMDGPU_CFLAGS@ AMDGPU_LIBS = @AMDGPU_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +ANDROID_CFLAGS = @ANDROID_CFLAGS@ +ANDROID_LIBS = @ANDROID_LIBS@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -188,8 +193,6 @@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ -DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ -DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIGL_CFLAGS = @DRIGL_CFLAGS@ DRIGL_LIBS = @DRIGL_LIBS@ DRI_DRIVER_INSTALL_DIR = @DRI_DRIVER_INSTALL_DIR@ @@ -202,10 +205,11 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ -EGL_CLIENT_APIS = @EGL_CLIENT_APIS@ EGL_LIB_DEPS = @EGL_LIB_DEPS@ EGL_NATIVE_PLATFORM = @EGL_NATIVE_PLATFORM@ EGREP = @EGREP@ +ETNAVIV_CFLAGS = @ETNAVIV_CFLAGS@ +ETNAVIV_LIBS = @ETNAVIV_LIBS@ EXEEXT = @EXEEXT@ EXPAT_CFLAGS = @EXPAT_CFLAGS@ EXPAT_LIBS = @EXPAT_LIBS@ @@ -232,6 +236,8 @@ GL_PC_LIB_PRIV = @GL_PC_LIB_PRIV@ GL_PC_REQ_PRIV = @GL_PC_REQ_PRIV@ GREP = @GREP@ HAVE_XF86VIDMODE = @HAVE_XF86VIDMODE@ +I915_CFLAGS = @I915_CFLAGS@ +I915_LIBS = @I915_LIBS@ INDENT = @INDENT@ INDENT_FLAGS = @INDENT_FLAGS@ INSTALL = @INSTALL@ @@ -239,45 +245,40 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INTEL_CFLAGS = @INTEL_CFLAGS@ -INTEL_LIBS = @INTEL_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_NO_UNDEFINED = @LD_NO_UNDEFINED@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBATOMIC_LIBS = @LIBATOMIC_LIBS@ LIBCLC_INCLUDEDIR = @LIBCLC_INCLUDEDIR@ LIBCLC_LIBEXECDIR = @LIBCLC_LIBEXECDIR@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBELF_CFLAGS = @LIBELF_CFLAGS@ LIBELF_LIBS = @LIBELF_LIBS@ +LIBGLVND_DATADIR = @LIBGLVND_DATADIR@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ -LIBSENSORS_LDFLAGS = @LIBSENSORS_LDFLAGS@ -LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ -LIBSHA1_LIBS = @LIBSHA1_LIBS@ +LIBSENSORS_LIBS = @LIBSENSORS_LIBS@ LIBTOOL = @LIBTOOL@ +LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ +LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIB_DIR = @LIB_DIR@ LIB_EXT = @LIB_EXT@ LIPO = @LIPO@ -LLVM_BINDIR = @LLVM_BINDIR@ LLVM_CFLAGS = @LLVM_CFLAGS@ LLVM_CONFIG = @LLVM_CONFIG@ -LLVM_CPPFLAGS = @LLVM_CPPFLAGS@ LLVM_CXXFLAGS = @LLVM_CXXFLAGS@ LLVM_INCLUDEDIR = @LLVM_INCLUDEDIR@ LLVM_LDFLAGS = @LLVM_LDFLAGS@ -LLVM_LIBDIR = @LLVM_LIBDIR@ LLVM_LIBS = @LLVM_LIBS@ -LLVM_VERSION = @LLVM_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ -MESA_LLVM = @MESA_LLVM@ MKDIR_P = @MKDIR_P@ MSVC2013_COMPAT_CFLAGS = @MSVC2013_COMPAT_CFLAGS@ MSVC2013_COMPAT_CXXFLAGS = @MSVC2013_COMPAT_CXXFLAGS@ @@ -298,8 +299,6 @@ OMX_LIBS = @OMX_LIBS@ OMX_LIB_INSTALL_DIR = @OMX_LIB_INSTALL_DIR@ OPENCL_LIBNAME = @OPENCL_LIBNAME@ OPENCL_VERSION = @OPENCL_VERSION@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ OSMESA_LIB = @OSMESA_LIB@ OSMESA_LIB_DEPS = @OSMESA_LIB_DEPS@ OSMESA_PC_LIB_PRIV = @OSMESA_PC_LIB_PRIV@ @@ -319,8 +318,6 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSIX_SHELL = @POSIX_SHELL@ -PRESENTPROTO_CFLAGS = @PRESENTPROTO_CFLAGS@ -PRESENTPROTO_LIBS = @PRESENTPROTO_LIBS@ PTHREADSTUBS_CFLAGS = @PTHREADSTUBS_CFLAGS@ PTHREADSTUBS_LIBS = @PTHREADSTUBS_LIBS@ PTHREAD_CC = @PTHREAD_CC@ @@ -336,8 +333,6 @@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SET_MAKE = @SET_MAKE@ -SHA1_CFLAGS = @SHA1_CFLAGS@ -SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SIMPENROSE_CFLAGS = @SIMPENROSE_CFLAGS@ SIMPENROSE_LIBS = @SIMPENROSE_LIBS@ @@ -346,7 +341,8 @@ STRIP = @STRIP@ SWR_AVX2_CXXFLAGS = @SWR_AVX2_CXXFLAGS@ SWR_AVX_CXXFLAGS = @SWR_AVX_CXXFLAGS@ SWR_CXX11_CXXFLAGS = @SWR_CXX11_CXXFLAGS@ -TIMESTAMP_CMD = @TIMESTAMP_CMD@ +SWR_KNL_CXXFLAGS = @SWR_KNL_CXXFLAGS@ +SWR_SKX_CXXFLAGS = @SWR_SKX_CXXFLAGS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VA_CFLAGS = @VA_CFLAGS@ @@ -354,15 +350,12 @@ VA_LIBS = @VA_LIBS@ VA_LIB_INSTALL_DIR = @VA_LIB_INSTALL_DIR@ VA_MAJOR = @VA_MAJOR@ VA_MINOR = @VA_MINOR@ -VC4_CFLAGS = @VC4_CFLAGS@ -VC4_LIBS = @VC4_LIBS@ VDPAU_CFLAGS = @VDPAU_CFLAGS@ VDPAU_LIBS = @VDPAU_LIBS@ VDPAU_LIB_INSTALL_DIR = @VDPAU_LIB_INSTALL_DIR@ VDPAU_MAJOR = @VDPAU_MAJOR@ VDPAU_MINOR = @VDPAU_MINOR@ VERSION = @VERSION@ -VG_LIB_DEPS = @VG_LIB_DEPS@ VISIBILITY_CFLAGS = @VISIBILITY_CFLAGS@ VISIBILITY_CXXFLAGS = @VISIBILITY_CXXFLAGS@ VL_CFLAGS = @VL_CFLAGS@ @@ -370,6 +363,7 @@ VL_LIBS = @VL_LIBS@ VULKAN_ICD_INSTALL_DIR = @VULKAN_ICD_INSTALL_DIR@ WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ WAYLAND_LIBS = @WAYLAND_LIBS@ +WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@ WAYLAND_SCANNER = @WAYLAND_SCANNER@ WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@ WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@ @@ -391,9 +385,10 @@ XVMC_LIBS = @XVMC_LIBS@ XVMC_LIB_INSTALL_DIR = @XVMC_LIB_INSTALL_DIR@ XVMC_MAJOR = @XVMC_MAJOR@ XVMC_MINOR = @XVMC_MINOR@ -XXD = @XXD@ YACC = @YACC@ YFLAGS = @YFLAGS@ +ZLIB_CFLAGS = @ZLIB_CFLAGS@ +ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -508,12 +503,8 @@ GALLIUM_TARGET_CFLAGS = \ $(LIBDRM_CFLAGS) \ $(VISIBILITY_CFLAGS) -GALLIUM_COMMON_LIB_DEPS = \ - -lm \ - $(CLOCK_LIB) \ - $(PTHREAD_LIBS) \ - $(DLOPEN_LIBS) - +GALLIUM_COMMON_LIB_DEPS = -lm $(LIBUNWIND_LIBS) $(LIBSENSORS_LIBS) \ + $(CLOCK_LIB) $(PTHREAD_LIBS) $(DLOPEN_LIBS) $(am__append_1) GALLIUM_WINSYS_CFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/include \ @@ -525,7 +516,7 @@ GALLIUM_WINSYS_CFLAGS = \ GALLIUM_PIPE_LOADER_WINSYS_LIBS = \ $(top_builddir)/src/gallium/winsys/sw/null/libws_null.la \ $(top_builddir)/src/gallium/winsys/sw/wrapper/libwsw.la \ - $(am__append_1) $(am__append_2) + $(am__append_2) $(am__append_3) AM_CFLAGS = \ -I$(top_srcdir)/src/gallium/drivers \ $(GALLIUM_WINSYS_CFLAGS) diff --git a/lib/mesa/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c b/lib/mesa/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c index ce8ac9775..404ba58b0 100644 --- a/lib/mesa/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c +++ b/lib/mesa/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c @@ -144,7 +144,7 @@ virgl_cache_flush(struct virgl_vtest_winsys *vtws) struct list_head *curr, *next; struct virgl_hw_res *res; - pipe_mutex_lock(vtws->mutex); + mtx_lock(&vtws->mutex); curr = vtws->delayed.next; next = curr->next; @@ -155,7 +155,7 @@ virgl_cache_flush(struct virgl_vtest_winsys *vtws) curr = next; next = curr->next; } - pipe_mutex_unlock(vtws->mutex); + mtx_unlock(&vtws->mutex); } static void @@ -189,14 +189,14 @@ static void virgl_vtest_resource_reference(struct virgl_vtest_winsys *vtws, if (!can_cache_resource(old)) { virgl_hw_res_destroy(vtws, old); } else { - pipe_mutex_lock(vtws->mutex); + mtx_lock(&vtws->mutex); virgl_cache_list_check_free(vtws); old->start = os_time_get(); old->end = old->start + vtws->usecs; LIST_ADDTAIL(&old->head, &vtws->delayed); vtws->num_delayed++; - pipe_mutex_unlock(vtws->mutex); + mtx_unlock(&vtws->mutex); } } *dres = sres; @@ -333,7 +333,7 @@ virgl_vtest_winsys_resource_cache_create(struct virgl_winsys *vws, bind != VIRGL_BIND_VERTEX_BUFFER && bind != VIRGL_BIND_CUSTOM) goto alloc; - pipe_mutex_lock(vtws->mutex); + mtx_lock(&vtws->mutex); res = NULL; curr = vtws->delayed.next; @@ -376,12 +376,12 @@ virgl_vtest_winsys_resource_cache_create(struct virgl_winsys *vws, if (res) { LIST_DEL(&res->head); --vtws->num_delayed; - pipe_mutex_unlock(vtws->mutex); + mtx_unlock(&vtws->mutex); pipe_reference_init(&res->reference, 1); return res; } - pipe_mutex_unlock(vtws->mutex); + mtx_unlock(&vtws->mutex); alloc: res = virgl_vtest_winsys_resource_create(vws, target, format, bind, @@ -619,7 +619,7 @@ virgl_vtest_winsys_destroy(struct virgl_winsys *vws) virgl_cache_flush(vtws); - pipe_mutex_destroy(vtws->mutex); + mtx_destroy(&vtws->mutex); FREE(vtws); } @@ -637,7 +637,7 @@ virgl_vtest_winsys_wrap(struct sw_winsys *sws) vtws->usecs = 1000000; LIST_INITHEAD(&vtws->delayed); - pipe_mutex_init(vtws->mutex); + (void) mtx_init(&vtws->mutex, mtx_plain); vtws->base.destroy = virgl_vtest_winsys_destroy; diff --git a/lib/mesa/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.h b/lib/mesa/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.h index b4faa70b6..031037b6b 100644 --- a/lib/mesa/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.h +++ b/lib/mesa/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.h @@ -48,7 +48,7 @@ struct virgl_vtest_winsys { struct list_head delayed; int num_delayed; unsigned usecs; - pipe_mutex mutex; + mtx_t mutex; }; struct virgl_hw_res { |