diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-08-26 06:03:18 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-08-26 06:03:18 +0000 |
commit | af5e8f5366b05c3d4f8521f318c143a5c5dc3ea9 (patch) | |
tree | c5691445908b1beca9facf0e5e3c5d7f35f74228 /lib/mesa/src/gallium/state_trackers/dri | |
parent | 27c93456b58343162f7c4ad20ca6bea0c9a91646 (diff) |
Merge Mesa 20.1.6
Diffstat (limited to 'lib/mesa/src/gallium/state_trackers/dri')
-rw-r--r-- | lib/mesa/src/gallium/state_trackers/dri/Makefile.am | 54 | ||||
-rw-r--r-- | lib/mesa/src/gallium/state_trackers/dri/Makefile.in | 905 | ||||
-rw-r--r-- | lib/mesa/src/gallium/state_trackers/dri/SConscript | 34 | ||||
-rw-r--r-- | lib/mesa/src/gallium/state_trackers/dri/dri2.c | 118 | ||||
-rw-r--r-- | lib/mesa/src/gallium/state_trackers/dri/dri_context.c | 4 | ||||
-rw-r--r-- | lib/mesa/src/gallium/state_trackers/dri/dri_drawable.c | 214 | ||||
-rw-r--r-- | lib/mesa/src/gallium/state_trackers/dri/dri_screen.c | 60 | ||||
-rw-r--r-- | lib/mesa/src/gallium/state_trackers/dri/dri_screen.h | 3 | ||||
-rw-r--r-- | lib/mesa/src/gallium/state_trackers/dri/drisw.c | 11 |
9 files changed, 208 insertions, 1195 deletions
diff --git a/lib/mesa/src/gallium/state_trackers/dri/Makefile.am b/lib/mesa/src/gallium/state_trackers/dri/Makefile.am deleted file mode 100644 index d66e585b1..000000000 --- a/lib/mesa/src/gallium/state_trackers/dri/Makefile.am +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright © 2012 Intel Corporation -# Copyright © 2014 Emil Velikov -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. - -include Makefile.sources -include $(top_srcdir)/src/gallium/Automake.inc - -AM_CPPFLAGS = \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/src/mapi \ - -I$(top_srcdir)/src/mesa \ - -I$(top_builddir)/src/util \ - -I$(top_srcdir)/src/mesa/drivers/dri/common \ - $(GALLIUM_CFLAGS) \ - $(LIBDRM_CFLAGS) \ - $(VISIBILITY_CFLAGS) - -if HAVE_GALLIUM_SOFTPIPE -AM_CPPFLAGS += \ - -DGALLIUM_SOFTPIPE -endif # HAVE_GALLIUM_SOFTPIPE - -noinst_LTLIBRARIES = libdri.la -libdri_la_SOURCES = $(common_SOURCES) - -if HAVE_DRISW -libdri_la_SOURCES += $(drisw_SOURCES) -endif - - -if HAVE_DRI2 -libdri_la_SOURCES += $(dri2_SOURCES) -endif - -EXTRA_DIST = SConscript meson.build diff --git a/lib/mesa/src/gallium/state_trackers/dri/Makefile.in b/lib/mesa/src/gallium/state_trackers/dri/Makefile.in deleted file mode 100644 index 9a3f60d0e..000000000 --- a/lib/mesa/src/gallium/state_trackers/dri/Makefile.in +++ /dev/null @@ -1,905 +0,0 @@ -# Makefile.in generated by automake 1.12.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2012 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Copyright © 2012 Intel Corporation -# Copyright © 2014 Emil Velikov -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. - -VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -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_LIBDRM_TRUE@am__append_1 = \ -@HAVE_LIBDRM_TRUE@ $(LIBDRM_LIBS) - -@HAVE_PLATFORM_ANDROID_TRUE@am__append_2 = \ -@HAVE_PLATFORM_ANDROID_TRUE@ $(ANDROID_LIBS) \ -@HAVE_PLATFORM_ANDROID_TRUE@ $(BACKTRACE_LIBS) - -@HAVE_DRISW_TRUE@am__append_3 = \ -@HAVE_DRISW_TRUE@ $(top_builddir)/src/gallium/winsys/sw/dri/libswdri.la - -@HAVE_DRISW_KMS_TRUE@am__append_4 = \ -@HAVE_DRISW_KMS_TRUE@ $(top_builddir)/src/gallium/winsys/sw/kms-dri/libswkmsdri.la \ -@HAVE_DRISW_KMS_TRUE@ $(LIBDRM_LIBS) - -@HAVE_GALLIUM_SOFTPIPE_TRUE@am__append_5 = \ -@HAVE_GALLIUM_SOFTPIPE_TRUE@ -DGALLIUM_SOFTPIPE - -@HAVE_DRISW_TRUE@am__append_6 = $(drisw_SOURCES) -@HAVE_DRI2_TRUE@am__append_7 = $(dri2_SOURCES) -subdir = src/gallium/state_trackers/dri -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compile_flag.m4 \ - $(top_srcdir)/m4/ax_check_gnu_make.m4 \ - $(top_srcdir)/m4/ax_check_python_mako_module.m4 \ - $(top_srcdir)/m4/ax_gcc_builtin.m4 \ - $(top_srcdir)/m4/ax_gcc_func_attribute.m4 \ - $(top_srcdir)/m4/ax_prog_bison.m4 \ - $(top_srcdir)/m4/ax_prog_flex.m4 \ - $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/VERSION $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -libdri_la_LIBADD = -am__libdri_la_SOURCES_DIST = dri_context.c dri_context.h \ - dri_drawable.c dri_drawable.h dri_helpers.c dri_helpers.h \ - dri_query_renderer.c dri_query_renderer.h dri_screen.c \ - dri_screen.h drisw.c dri2.c -am__objects_1 = dri_context.lo dri_drawable.lo dri_helpers.lo \ - dri_query_renderer.lo dri_screen.lo -am__objects_2 = drisw.lo -@HAVE_DRISW_TRUE@am__objects_3 = $(am__objects_2) -am__objects_4 = dri2.lo -@HAVE_DRI2_TRUE@am__objects_5 = $(am__objects_4) -am_libdri_la_OBJECTS = $(am__objects_1) $(am__objects_3) \ - $(am__objects_5) -libdri_la_OBJECTS = $(am_libdri_la_OBJECTS) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/bin/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = $(libdri_la_SOURCES) -DIST_SOURCES = $(am__libdri_la_SOURCES_DIST) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -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@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BACKTRACE_CFLAGS = @BACKTRACE_CFLAGS@ -BACKTRACE_LIBS = @BACKTRACE_LIBS@ -BSYMBOLIC = @BSYMBOLIC@ -CC = @CC@ -CCAS = @CCAS@ -CCASDEPMODE = @CCASDEPMODE@ -CCASFLAGS = @CCASFLAGS@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CLANG_RESOURCE_DIR = @CLANG_RESOURCE_DIR@ -CLOCK_LIB = @CLOCK_LIB@ -CLOVER_STD_OVERRIDE = @CLOVER_STD_OVERRIDE@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXX11_CXXFLAGS = @CXX11_CXXFLAGS@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -D3D_DRIVER_INSTALL_DIR = @D3D_DRIVER_INSTALL_DIR@ -DEFINES = @DEFINES@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DLOPEN_LIBS = @DLOPEN_LIBS@ -DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ -DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ -DRIGL_CFLAGS = @DRIGL_CFLAGS@ -DRIGL_LIBS = @DRIGL_LIBS@ -DRI_DRIVER_INSTALL_DIR = @DRI_DRIVER_INSTALL_DIR@ -DRI_DRIVER_SEARCH_DIR = @DRI_DRIVER_SEARCH_DIR@ -DRI_LIB_DEPS = @DRI_LIB_DEPS@ -DRI_PC_REQ_PRIV = @DRI_PC_REQ_PRIV@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGL_CFLAGS = @EGL_CFLAGS@ -EGL_LIB_DEPS = @EGL_LIB_DEPS@ -EGL_LIB_SUFFIX = @EGL_LIB_SUFFIX@ -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@ -FGREP = @FGREP@ -GALLIUM_PIPE_LOADER_DEFINES = @GALLIUM_PIPE_LOADER_DEFINES@ -GBM_PC_LIB_PRIV = @GBM_PC_LIB_PRIV@ -GBM_PC_REQ_PRIV = @GBM_PC_REQ_PRIV@ -GC_SECTIONS = @GC_SECTIONS@ -GLES_LIB_SUFFIX = @GLES_LIB_SUFFIX@ -GLESv1_CM_LIB_DEPS = @GLESv1_CM_LIB_DEPS@ -GLESv1_CM_PC_LIB_PRIV = @GLESv1_CM_PC_LIB_PRIV@ -GLESv2_LIB_DEPS = @GLESv2_LIB_DEPS@ -GLESv2_PC_LIB_PRIV = @GLESv2_PC_LIB_PRIV@ -GLPROTO_CFLAGS = @GLPROTO_CFLAGS@ -GLPROTO_LIBS = @GLPROTO_LIBS@ -GLVND_CFLAGS = @GLVND_CFLAGS@ -GLVND_LIBS = @GLVND_LIBS@ -GLX_TLS = @GLX_TLS@ -GL_LIB = @GL_LIB@ -GL_LIB_DEPS = @GL_LIB_DEPS@ -GL_PC_CFLAGS = @GL_PC_CFLAGS@ -GL_PC_LIB_PRIV = @GL_PC_LIB_PRIV@ -GL_PC_REQ_PRIV = @GL_PC_REQ_PRIV@ -GL_PKGCONF_LIB = @GL_PKGCONF_LIB@ -GREP = @GREP@ -I915_CFLAGS = @I915_CFLAGS@ -I915_LIBS = @I915_LIBS@ -INDENT = @INDENT@ -INDENT_FLAGS = @INDENT_FLAGS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LD_BUILD_ID = @LD_BUILD_ID@ -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_LIBS = @LIBSENSORS_LIBS@ -LIBTOOL = @LIBTOOL@ -LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ -LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ -LIB_DIR = @LIB_DIR@ -LIB_EXT = @LIB_EXT@ -LIPO = @LIPO@ -LLVM_CFLAGS = @LLVM_CFLAGS@ -LLVM_CONFIG = @LLVM_CONFIG@ -LLVM_CXXFLAGS = @LLVM_CXXFLAGS@ -LLVM_INCLUDEDIR = @LLVM_INCLUDEDIR@ -LLVM_LDFLAGS = @LLVM_LDFLAGS@ -LLVM_LIBS = @LLVM_LIBS@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MSVC2013_COMPAT_CFLAGS = @MSVC2013_COMPAT_CFLAGS@ -MSVC2013_COMPAT_CXXFLAGS = @MSVC2013_COMPAT_CXXFLAGS@ -NINE_MAJOR = @NINE_MAJOR@ -NINE_MINOR = @NINE_MINOR@ -NINE_PATCH = @NINE_PATCH@ -NINE_VERSION = @NINE_VERSION@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NOUVEAU_CFLAGS = @NOUVEAU_CFLAGS@ -NOUVEAU_LIBS = @NOUVEAU_LIBS@ -NVVIEUX_CFLAGS = @NVVIEUX_CFLAGS@ -NVVIEUX_LIBS = @NVVIEUX_LIBS@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OMX_BELLAGIO_CFLAGS = @OMX_BELLAGIO_CFLAGS@ -OMX_BELLAGIO_LIBS = @OMX_BELLAGIO_LIBS@ -OMX_BELLAGIO_LIB_INSTALL_DIR = @OMX_BELLAGIO_LIB_INSTALL_DIR@ -OMX_TIZONIA_CFLAGS = @OMX_TIZONIA_CFLAGS@ -OMX_TIZONIA_LIBS = @OMX_TIZONIA_LIBS@ -OMX_TIZONIA_LIB_INSTALL_DIR = @OMX_TIZONIA_LIB_INSTALL_DIR@ -OPENCL_LIBNAME = @OPENCL_LIBNAME@ -OPENCL_VERSION = @OPENCL_VERSION@ -OSMESA_LIB = @OSMESA_LIB@ -OSMESA_LIB_DEPS = @OSMESA_LIB_DEPS@ -OSMESA_PC_LIB_PRIV = @OSMESA_PC_LIB_PRIV@ -OSMESA_PC_REQ = @OSMESA_PC_REQ@ -OSMESA_VERSION = @OSMESA_VERSION@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -POSIX_SHELL = @POSIX_SHELL@ -PTHREADSTUBS_CFLAGS = @PTHREADSTUBS_CFLAGS@ -PTHREADSTUBS_LIBS = @PTHREADSTUBS_LIBS@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -PWR8_CFLAGS = @PWR8_CFLAGS@ -PYTHON = @PYTHON@ -PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ -PYTHON_PLATFORM = @PYTHON_PLATFORM@ -PYTHON_PREFIX = @PYTHON_PREFIX@ -PYTHON_VERSION = @PYTHON_VERSION@ -RADEON_CFLAGS = @RADEON_CFLAGS@ -RADEON_LIBS = @RADEON_LIBS@ -RANLIB = @RANLIB@ -RM = @RM@ -SCANNER_ARG = @SCANNER_ARG@ -SED = @SED@ -SELINUX_CFLAGS = @SELINUX_CFLAGS@ -SELINUX_LIBS = @SELINUX_LIBS@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SIMPENROSE_CFLAGS = @SIMPENROSE_CFLAGS@ -SIMPENROSE_LIBS = @SIMPENROSE_LIBS@ -SSE41_CFLAGS = @SSE41_CFLAGS@ -STRIP = @STRIP@ -SWR_AVX2_CXXFLAGS = @SWR_AVX2_CXXFLAGS@ -SWR_AVX_CXXFLAGS = @SWR_AVX_CXXFLAGS@ -SWR_KNL_CXXFLAGS = @SWR_KNL_CXXFLAGS@ -SWR_SKX_CXXFLAGS = @SWR_SKX_CXXFLAGS@ -V3D_SIMULATOR_CFLAGS = @V3D_SIMULATOR_CFLAGS@ -V3D_SIMULATOR_LIBS = @V3D_SIMULATOR_LIBS@ -VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ -VALGRIND_LIBS = @VALGRIND_LIBS@ -VA_CFLAGS = @VA_CFLAGS@ -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@ -VISIBILITY_CFLAGS = @VISIBILITY_CFLAGS@ -VISIBILITY_CXXFLAGS = @VISIBILITY_CXXFLAGS@ -VL_CFLAGS = @VL_CFLAGS@ -VL_LIBS = @VL_LIBS@ -VULKAN_ICD_INSTALL_DIR = @VULKAN_ICD_INSTALL_DIR@ -WAYLAND_CLIENT_CFLAGS = @WAYLAND_CLIENT_CFLAGS@ -WAYLAND_CLIENT_LIBS = @WAYLAND_CLIENT_LIBS@ -WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ -WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ -WAYLAND_PROTOCOLS_CFLAGS = @WAYLAND_PROTOCOLS_CFLAGS@ -WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@ -WAYLAND_PROTOCOLS_LIBS = @WAYLAND_PROTOCOLS_LIBS@ -WAYLAND_SCANNER = @WAYLAND_SCANNER@ -WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@ -WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@ -WAYLAND_SERVER_CFLAGS = @WAYLAND_SERVER_CFLAGS@ -WAYLAND_SERVER_LIBS = @WAYLAND_SERVER_LIBS@ -WNO_OVERRIDE_INIT = @WNO_OVERRIDE_INIT@ -X11_INCLUDES = @X11_INCLUDES@ -XA_MAJOR = @XA_MAJOR@ -XA_MINOR = @XA_MINOR@ -XA_PATCH = @XA_PATCH@ -XA_VERSION = @XA_VERSION@ -XCB_DRI2_CFLAGS = @XCB_DRI2_CFLAGS@ -XCB_DRI2_LIBS = @XCB_DRI2_LIBS@ -XCB_DRI3_CFLAGS = @XCB_DRI3_CFLAGS@ -XCB_DRI3_LIBS = @XCB_DRI3_LIBS@ -XCB_DRI3_MODIFIERS_CFLAGS = @XCB_DRI3_MODIFIERS_CFLAGS@ -XCB_DRI3_MODIFIERS_LIBS = @XCB_DRI3_MODIFIERS_LIBS@ -XCB_RANDR_CFLAGS = @XCB_RANDR_CFLAGS@ -XCB_RANDR_LIBS = @XCB_RANDR_LIBS@ -XLIBGL_CFLAGS = @XLIBGL_CFLAGS@ -XLIBGL_LIBS = @XLIBGL_LIBS@ -XLIB_RANDR_CFLAGS = @XLIB_RANDR_CFLAGS@ -XLIB_RANDR_LIBS = @XLIB_RANDR_LIBS@ -XVMC_CFLAGS = @XVMC_CFLAGS@ -XVMC_LIBS = @XVMC_LIBS@ -XVMC_LIB_INSTALL_DIR = @XVMC_LIB_INSTALL_DIR@ -XVMC_MAJOR = @XVMC_MAJOR@ -XVMC_MINOR = @XVMC_MINOR@ -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@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -acv_mako_found = @acv_mako_found@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -ax_pthread_config = @ax_pthread_config@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -ifGNUmake = @ifGNUmake@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgpyexecdir = @pkgpyexecdir@ -pkgpythondir = @pkgpythondir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pyexecdir = @pyexecdir@ -pythondir = @pythondir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -common_SOURCES := \ - dri_context.c \ - dri_context.h \ - dri_drawable.c \ - dri_drawable.h \ - dri_helpers.c \ - dri_helpers.h \ - dri_query_renderer.c \ - dri_query_renderer.h \ - dri_screen.c \ - dri_screen.h - -dri2_SOURCES := \ - dri2.c - -drisw_SOURCES := \ - drisw.c - -GALLIUM_CFLAGS = \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/gallium/include \ - -I$(top_srcdir)/src/gallium/auxiliary \ - $(DEFINES) - - -# src/gallium/auxiliary must appear before src/gallium/drivers -# because there are stupidly two rbug_context.h files in -# different directories, and which one is included by the -# preprocessor is determined by the ordering of the -I flags. -GALLIUM_DRIVER_CFLAGS = \ - -I$(srcdir)/include \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/src/gallium/include \ - -I$(top_srcdir)/src/gallium/auxiliary \ - -I$(top_srcdir)/src/gallium/drivers \ - -I$(top_srcdir)/src/gallium/winsys \ - $(DEFINES) \ - $(VISIBILITY_CFLAGS) - -GALLIUM_DRIVER_CXXFLAGS = \ - -I$(srcdir)/include \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/src/gallium/include \ - -I$(top_srcdir)/src/gallium/auxiliary \ - -I$(top_srcdir)/src/gallium/drivers \ - -I$(top_srcdir)/src/gallium/winsys \ - $(DEFINES) \ - $(VISIBILITY_CXXFLAGS) - -GALLIUM_TARGET_CFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/src/loader \ - -I$(top_srcdir)/src/gallium/include \ - -I$(top_srcdir)/src/gallium/auxiliary \ - -I$(top_srcdir)/src/gallium/drivers \ - -I$(top_srcdir)/src/gallium/winsys \ - -I$(top_builddir)/src/util/ \ - -I$(top_builddir)/src/gallium/drivers/ \ - $(DEFINES) \ - $(PTHREAD_CFLAGS) \ - $(LIBDRM_CFLAGS) \ - $(VISIBILITY_CFLAGS) - -GALLIUM_COMMON_LIB_DEPS = -lm $(LIBUNWIND_LIBS) $(LIBSENSORS_LIBS) \ - $(CLOCK_LIB) $(PTHREAD_LIBS) $(DLOPEN_LIBS) $(am__append_1) \ - $(am__append_2) -GALLIUM_WINSYS_CFLAGS = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/src/gallium/include \ - -I$(top_srcdir)/src/gallium/auxiliary \ - $(DEFINES) \ - $(VISIBILITY_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_3) $(am__append_4) -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src/mapi \ - -I$(top_srcdir)/src/mesa -I$(top_builddir)/src/util \ - -I$(top_srcdir)/src/mesa/drivers/dri/common $(GALLIUM_CFLAGS) \ - $(LIBDRM_CFLAGS) $(VISIBILITY_CFLAGS) $(am__append_5) -noinst_LTLIBRARIES = libdri.la -libdri_la_SOURCES = $(common_SOURCES) $(am__append_6) $(am__append_7) -EXTRA_DIST = SConscript meson.build -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Makefile.sources $(top_srcdir)/src/gallium/Automake.inc $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/gallium/state_trackers/dri/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/gallium/state_trackers/dri/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; -$(srcdir)/Makefile.sources $(top_srcdir)/src/gallium/Automake.inc: - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; \ - locs=`for p in $$list; do echo $$p; done | \ - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ - sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } -libdri.la: $(libdri_la_OBJECTS) $(libdri_la_DEPENDENCIES) $(EXTRA_libdri_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) $(libdri_la_OBJECTS) $(libdri_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dri2.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dri_context.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dri_drawable.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dri_helpers.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dri_query_renderer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dri_screen.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drisw.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ -@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -cscopelist: $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLTLIBRARIES cscopelist ctags \ - distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/lib/mesa/src/gallium/state_trackers/dri/SConscript b/lib/mesa/src/gallium/state_trackers/dri/SConscript deleted file mode 100644 index 657300baf..000000000 --- a/lib/mesa/src/gallium/state_trackers/dri/SConscript +++ /dev/null @@ -1,34 +0,0 @@ -####################################################################### -# SConscript for dri state_tracker - -Import('*') - -env = env.Clone() - -env.PkgUseModules(['DRM']) - -env.Append(CPPPATH = [ - '#/src', - '#/src/mapi', - '#/src/mesa', - '#/src/mesa/drivers/dri/common', - xmlpool_options.dir.dir, # Dir to generated xmlpool/options.h -]) - -env.Append(CPPDEFINES = [ - ('GALLIUM_STATIC_TARGETS', '1'), -]) - -sources = env.ParseSourceList('Makefile.sources', 'common_SOURCES') - -# XXX: if HAVE_DRISW -sources.append(env.ParseSourceList('Makefile.sources', 'drisw_SOURCES')) - -# XXX: if HAVE_DRI2 -sources.append(env.ParseSourceList('Makefile.sources', 'dri2_SOURCES')) - -st_dri = env.ConvenienceLibrary( - target = 'st_dri', - source = sources -) -Export('st_dri') diff --git a/lib/mesa/src/gallium/state_trackers/dri/dri2.c b/lib/mesa/src/gallium/state_trackers/dri/dri2.c index 6c8361660..ec78d0985 100644 --- a/lib/mesa/src/gallium/state_trackers/dri/dri2.c +++ b/lib/mesa/src/gallium/state_trackers/dri/dri2.c @@ -33,7 +33,7 @@ #include "util/disk_cache.h" #include "util/u_memory.h" #include "util/u_inlines.h" -#include "util/u_format.h" +#include "util/format/u_format.h" #include "util/u_debug.h" #include "state_tracker/drm_driver.h" #include "state_tracker/st_cb_bufferobjects.h" @@ -153,6 +153,12 @@ dri2_drawable_get_buffers(struct dri_drawable *drawable, * may occur as the stvis->color_format. */ switch(format) { + case PIPE_FORMAT_R16G16B16A16_FLOAT: + depth = 64; + break; + case PIPE_FORMAT_R16G16B16X16_FLOAT: + depth = 48; + break; case PIPE_FORMAT_B10G10R10A2_UNORM: case PIPE_FORMAT_R10G10B10A2_UNORM: case PIPE_FORMAT_BGRA8888_UNORM: @@ -231,6 +237,12 @@ dri_image_drawable_get_buffers(struct dri_drawable *drawable, } switch (pf) { + case PIPE_FORMAT_R16G16B16A16_FLOAT: + image_format = __DRI_IMAGE_FORMAT_ABGR16161616F; + break; + case PIPE_FORMAT_R16G16B16X16_FLOAT: + image_format = __DRI_IMAGE_FORMAT_XBGR16161616F; + break; case PIPE_FORMAT_B5G5R5A1_UNORM: image_format = __DRI_IMAGE_FORMAT_ARGB1555; break; @@ -304,6 +316,12 @@ dri2_allocate_buffer(__DRIscreen *sPriv, bind |= PIPE_BIND_SHARED; switch (format) { + case 64: + pf = PIPE_FORMAT_R16G16B16A16_FLOAT; + break; + case 48: + pf = PIPE_FORMAT_R16G16B16X16_FLOAT; + break; case 32: pf = PIPE_FORMAT_BGRA8888_UNORM; break; @@ -720,7 +738,7 @@ dri2_create_image_from_winsys(__DRIscreen *_screen, struct pipe_resource templ; unsigned tex_usage = 0; int i; - bool is_yuv = util_format_is_yuv(map->pipe_format); + bool use_lowered = false; if (pscreen->is_format_supported(pscreen, map->pipe_format, screen->target, 0, 0, PIPE_BIND_RENDER_TARGET)) @@ -729,17 +747,15 @@ dri2_create_image_from_winsys(__DRIscreen *_screen, PIPE_BIND_SAMPLER_VIEW)) tex_usage |= PIPE_BIND_SAMPLER_VIEW; - if (!tex_usage && is_yuv) { + if (!tex_usage && util_format_is_yuv(map->pipe_format)) { /* YUV format sampling can be emulated by the Mesa state tracker by * using multiple samplers of varying formats. * If no tex_usage is set and we detect a YUV format, - * test for support of the first plane's sampler format and + * test for support of all planes' sampler formats and * add sampler view usage. */ - if (pscreen->is_format_supported(pscreen, - dri2_get_pipe_format_for_dri_format(map->planes[0].dri_format), - screen->target, 0, 0, - PIPE_BIND_SAMPLER_VIEW)) + use_lowered = true; + if (dri2_yuv_dma_buf_supported(screen, map)) tex_usage |= PIPE_BIND_SAMPLER_VIEW; } @@ -757,26 +773,27 @@ dri2_create_image_from_winsys(__DRIscreen *_screen, templ.depth0 = 1; templ.array_size = 1; - for (i = num_handles - 1; i >= 0; i--) { + for (i = (use_lowered ? map->nplanes : num_handles) - 1; i >= 0; i--) { struct pipe_resource *tex; + templ.next = img->texture; templ.width0 = width >> map->planes[i].width_shift; templ.height0 = height >> map->planes[i].height_shift; - if (is_yuv) + if (use_lowered) templ.format = dri2_get_pipe_format_for_dri_format(map->planes[i].dri_format); else templ.format = map->pipe_format; assert(templ.format != PIPE_FORMAT_NONE); tex = pscreen->resource_from_handle(pscreen, - &templ, &whandle[i], PIPE_HANDLE_USAGE_FRAMEBUFFER_WRITE); + &templ, &whandle[use_lowered ? map->planes[i].buffer_index : i], + PIPE_HANDLE_USAGE_FRAMEBUFFER_WRITE); if (!tex) { pipe_resource_reference(&img->texture, NULL); FREE(img); return NULL; } - tex->next = img->texture; img->texture = tex; } @@ -877,8 +894,8 @@ dri2_create_image_from_fd(__DRIscreen *_screen, } switch (fourcc) { - case __DRI_IMAGE_FOURCC_YUYV: - case __DRI_IMAGE_FOURCC_UYVY: + case DRM_FORMAT_YUYV: + case DRM_FORMAT_UYVY: expected_num_fds = 1; break; default: @@ -893,25 +910,23 @@ dri2_create_image_from_fd(__DRIscreen *_screen, memset(whandles, 0, sizeof(whandles)); - for (i = 0; i < num_handles; i++) { - int fdnum = i >= num_fds ? 0 : i; - int index = i >= map->nplanes ? i : map->planes[i].buffer_index; - if (fds[fdnum] < 0) { + for (i = 0; i < num_fds; i++) { + if (fds[i] < 0) { err = __DRI_IMAGE_ERROR_BAD_ALLOC; goto exit; } whandles[i].type = WINSYS_HANDLE_TYPE_FD; - whandles[i].handle = (unsigned)fds[fdnum]; - whandles[i].stride = (unsigned)strides[index]; - whandles[i].offset = (unsigned)offsets[index]; + whandles[i].handle = (unsigned)fds[i]; + whandles[i].stride = (unsigned)strides[i]; + whandles[i].offset = (unsigned)offsets[i]; whandles[i].format = map->pipe_format; whandles[i].modifier = modifier; - whandles[i].plane = index; + whandles[i].plane = i; } img = dri2_create_image_from_winsys(_screen, width, height, map, - num_handles, whandles, loaderPrivate); + num_fds, whandles, loaderPrivate); if(img == NULL) { err = __DRI_IMAGE_ERROR_BAD_ALLOC; goto exit; @@ -920,6 +935,7 @@ dri2_create_image_from_fd(__DRIscreen *_screen, img->dri_components = map->dri_components; img->dri_fourcc = fourcc; img->dri_format = map->dri_format; + img->imported_dmabuf = TRUE; exit: if (error) @@ -1090,10 +1106,10 @@ dri2_query_image_by_resource_handle(__DRIimage *image, int attrib, int *value) return false; } + usage = PIPE_HANDLE_USAGE_FRAMEBUFFER_WRITE; + if (image->use & __DRI_IMAGE_USE_BACKBUFFER) - usage = PIPE_HANDLE_USAGE_EXPLICIT_FLUSH; - else - usage = PIPE_HANDLE_USAGE_FRAMEBUFFER_WRITE; + usage |= PIPE_HANDLE_USAGE_EXPLICIT_FLUSH; if (!pscreen->resource_get_handle(pscreen, NULL, image->texture, &whandle, usage)) @@ -1176,10 +1192,10 @@ dri2_query_image_by_resource_param(__DRIimage *image, int attrib, int *value) return false; } + handle_usage = PIPE_HANDLE_USAGE_FRAMEBUFFER_WRITE; + if (image->use & __DRI_IMAGE_USE_BACKBUFFER) - handle_usage = PIPE_HANDLE_USAGE_EXPLICIT_FLUSH; - else - handle_usage = PIPE_HANDLE_USAGE_FRAMEBUFFER_WRITE; + handle_usage |= PIPE_HANDLE_USAGE_EXPLICIT_FLUSH; if (!dri2_resource_get_param(image, param, handle_usage, &res_param)) return false; @@ -1375,13 +1391,16 @@ dri2_query_dma_buf_modifiers(__DRIscreen *_screen, int fourcc, int max, format = map->pipe_format; - if (pscreen->query_dmabuf_modifiers != NULL && - (pscreen->is_format_supported(pscreen, format, screen->target, 0, 0, + if (pscreen->is_format_supported(pscreen, format, screen->target, 0, 0, PIPE_BIND_RENDER_TARGET) || pscreen->is_format_supported(pscreen, format, screen->target, 0, 0, - PIPE_BIND_SAMPLER_VIEW))) { - pscreen->query_dmabuf_modifiers(pscreen, format, max, modifiers, - external_only, count); + PIPE_BIND_SAMPLER_VIEW) || + dri2_yuv_dma_buf_supported(screen, map)) { + if (pscreen->query_dmabuf_modifiers != NULL) + pscreen->query_dmabuf_modifiers(pscreen, format, max, modifiers, + external_only, count); + else + *count = 0; return true; } return false; @@ -1392,6 +1411,12 @@ dri2_query_dma_buf_format_modifier_attribs(__DRIscreen *_screen, uint32_t fourcc, uint64_t modifier, int attrib, uint64_t *value) { + struct dri_screen *screen = dri_screen(_screen); + struct pipe_screen *pscreen = screen->base.screen; + + if (!pscreen->query_dmabuf_modifiers) + return false; + switch (attrib) { case __DRI_IMAGE_FORMAT_MODIFIER_ATTRIB_PLANE_COUNT: { uint64_t mod_planes = dri2_get_modifier_num_planes(modifier, fourcc); @@ -1499,11 +1524,11 @@ dri2_blit_image(__DRIcontext *context, __DRIimage *dst, __DRIimage *src, if (flush_flag == __BLIT_FLAG_FLUSH) { pipe->flush_resource(pipe, dst->texture); - ctx->st->flush(ctx->st, 0, NULL); + ctx->st->flush(ctx->st, 0, NULL, NULL, NULL); } else if (flush_flag == __BLIT_FLAG_FINISH) { screen = dri_screen(ctx->sPriv)->base.screen; pipe->flush_resource(pipe, dst->texture); - ctx->st->flush(ctx->st, 0, &fence); + ctx->st->flush(ctx->st, 0, &fence, NULL, NULL); (void) screen->fence_finish(screen, NULL, fence, PIPE_TIMEOUT_INFINITE); screen->fence_reference(screen, &fence, NULL); } @@ -2055,8 +2080,7 @@ dri2_init_screen(__DRIscreen * sPriv) if (!pscreen) goto release_pipe; - screen->default_throttle_frames = - pscreen->get_param(pscreen, PIPE_CAP_MAX_FRAMES_IN_FLIGHT); + screen->throttle = pscreen->get_param(pscreen, PIPE_CAP_THROTTLE); if (pscreen->resource_create_with_modifiers) dri2ImageExtension.createImageWithModifiers = @@ -2070,13 +2094,11 @@ dri2_init_screen(__DRIscreen * sPriv) dri2ImageExtension.createImageFromFds = dri2_from_fds; dri2ImageExtension.createImageFromDmaBufs = dri2_from_dma_bufs; dri2ImageExtension.createImageFromDmaBufs2 = dri2_from_dma_bufs2; - if (pscreen->query_dmabuf_modifiers) { - dri2ImageExtension.queryDmaBufFormats = dri2_query_dma_buf_formats; - dri2ImageExtension.queryDmaBufModifiers = - dri2_query_dma_buf_modifiers; - dri2ImageExtension.queryDmaBufFormatModifierAttribs = - dri2_query_dma_buf_format_modifier_attribs; - } + dri2ImageExtension.queryDmaBufFormats = dri2_query_dma_buf_formats; + dri2ImageExtension.queryDmaBufModifiers = + dri2_query_dma_buf_modifiers; + dri2ImageExtension.queryDmaBufFormatModifierAttribs = + dri2_query_dma_buf_format_modifier_attribs; } } @@ -2152,10 +2174,8 @@ dri_kms_init_screen(__DRIscreen * sPriv) dri2ImageExtension.createImageFromFds = dri2_from_fds; dri2ImageExtension.createImageFromDmaBufs = dri2_from_dma_bufs; dri2ImageExtension.createImageFromDmaBufs2 = dri2_from_dma_bufs2; - if (pscreen->query_dmabuf_modifiers) { - dri2ImageExtension.queryDmaBufFormats = dri2_query_dma_buf_formats; - dri2ImageExtension.queryDmaBufModifiers = dri2_query_dma_buf_modifiers; - } + dri2ImageExtension.queryDmaBufFormats = dri2_query_dma_buf_formats; + dri2ImageExtension.queryDmaBufModifiers = dri2_query_dma_buf_modifiers; } sPriv->extensions = dri_screen_extensions; diff --git a/lib/mesa/src/gallium/state_trackers/dri/dri_context.c b/lib/mesa/src/gallium/state_trackers/dri/dri_context.c index af9e3325f..082a9ced9 100644 --- a/lib/mesa/src/gallium/state_trackers/dri/dri_context.c +++ b/lib/mesa/src/gallium/state_trackers/dri/dri_context.c @@ -40,6 +40,8 @@ #include "pipe-loader/pipe_loader.h" #include "state_tracker/st_context.h" +#include "util/u_memory.h" + GLboolean dri_create_context(gl_api api, const struct gl_config * visual, __DRIcontext * cPriv, @@ -241,7 +243,7 @@ dri_destroy_context(__DRIcontext * cPriv) * to avoid having to add code elsewhere to cope with flushing a * partially destroyed context. */ - ctx->st->flush(ctx->st, 0, NULL); + ctx->st->flush(ctx->st, 0, NULL, NULL, NULL); ctx->st->destroy(ctx->st); free(ctx); } diff --git a/lib/mesa/src/gallium/state_trackers/dri/dri_drawable.c b/lib/mesa/src/gallium/state_trackers/dri/dri_drawable.c index c5eb633fc..2ee4f1855 100644 --- a/lib/mesa/src/gallium/state_trackers/dri/dri_drawable.c +++ b/lib/mesa/src/gallium/state_trackers/dri/dri_drawable.c @@ -34,15 +34,12 @@ #include "dri_drawable.h" #include "pipe/p_screen.h" -#include "util/u_format.h" +#include "util/format/u_format.h" #include "util/u_memory.h" #include "util/u_inlines.h" static uint32_t drifb_ID = 0; -static void -swap_fences_unref(struct dri_drawable *draw); - static bool dri_st_framebuffer_validate(struct st_context_iface *stctx, struct st_framebuffer_iface *stfbi, @@ -179,9 +176,6 @@ dri_create_buffer(__DRIscreen * sPriv, drawable->screen = screen; drawable->sPriv = sPriv; drawable->dPriv = dPriv; - drawable->desired_fences = screen->default_throttle_frames; - if (drawable->desired_fences > DRI_SWAP_FENCES_MAX) - drawable->desired_fences = DRI_SWAP_FENCES_MAX; dPriv->driverPrivate = (void *)drawable; p_atomic_set(&drawable->base.stamp, 1); @@ -209,7 +203,8 @@ dri_destroy_buffer(__DRIdrawable * dPriv) for (i = 0; i < ST_ATTACHMENT_COUNT; i++) pipe_resource_reference(&drawable->msaa_textures[i], NULL); - swap_fences_unref(drawable); + screen->base.screen->fence_reference(screen->base.screen, + &drawable->throttle_fence, NULL); /* Notify the st manager that this drawable is no longer valid */ stapi->destroy_drawable(stapi, &drawable->base); @@ -273,6 +268,9 @@ dri_set_tex_buffer2(__DRIcontext *pDRICtx, GLint target, if (format == __DRI_TEXTURE_FORMAT_RGB) { /* only need to cover the formats recognized by dri_fill_st_visual */ switch (internal_format) { + case PIPE_FORMAT_R16G16B16A16_FLOAT: + internal_format = PIPE_FORMAT_R16G16B16X16_FLOAT; + break; case PIPE_FORMAT_B10G10R10A2_UNORM: internal_format = PIPE_FORMAT_B10G10R10X2_UNORM; break; @@ -346,75 +344,6 @@ dri_drawable_get_format(struct dri_drawable *drawable, } } - -/** - * swap_fences_pop_front - pull a fence from the throttle queue - * - * If the throttle queue is filled to the desired number of fences, - * pull fences off the queue until the number is less than the desired - * number of fences, and return the last fence pulled. - */ -static struct pipe_fence_handle * -swap_fences_pop_front(struct dri_drawable *draw) -{ - struct pipe_screen *screen = draw->screen->base.screen; - struct pipe_fence_handle *fence = NULL; - - if (draw->desired_fences == 0) - return NULL; - - if (draw->cur_fences >= draw->desired_fences) { - screen->fence_reference(screen, &fence, draw->swap_fences[draw->tail]); - screen->fence_reference(screen, &draw->swap_fences[draw->tail++], NULL); - draw->tail &= DRI_SWAP_FENCES_MASK; - --draw->cur_fences; - } - return fence; -} - - -/** - * swap_fences_push_back - push a fence onto the throttle queue - * - * push a fence onto the throttle queue and pull fences of the queue - * so that the desired number of fences are on the queue. - */ -static void -swap_fences_push_back(struct dri_drawable *draw, - struct pipe_fence_handle *fence) -{ - struct pipe_screen *screen = draw->screen->base.screen; - - if (!fence || draw->desired_fences == 0) - return; - - while(draw->cur_fences == draw->desired_fences) - swap_fences_pop_front(draw); - - draw->cur_fences++; - screen->fence_reference(screen, &draw->swap_fences[draw->head++], - fence); - draw->head &= DRI_SWAP_FENCES_MASK; -} - - -/** - * swap_fences_unref - empty the throttle queue - * - * pulls fences of the throttle queue until it is empty. - */ -static void -swap_fences_unref(struct dri_drawable *draw) -{ - struct pipe_screen *screen = draw->screen->base.screen; - - while(draw->cur_fences) { - screen->fence_reference(screen, &draw->swap_fences[draw->tail++], NULL); - draw->tail &= DRI_SWAP_FENCES_MASK; - --draw->cur_fences; - } -} - void dri_pipe_blit(struct pipe_context *pipe, struct pipe_resource *dst, @@ -475,6 +404,56 @@ dri_postprocessing(struct dri_context *ctx, pp_run(ctx->pp, src, src, zsbuf); } +struct notify_before_flush_cb_args { + struct dri_context *ctx; + struct dri_drawable *drawable; + unsigned flags; + enum __DRI2throttleReason reason; + bool swap_msaa_buffers; +}; + +static void +notify_before_flush_cb(void* _args) +{ + struct notify_before_flush_cb_args *args = (struct notify_before_flush_cb_args *) _args; + struct st_context_iface *st = args->ctx->st; + struct pipe_context *pipe = st->pipe; + + if (args->drawable->stvis.samples > 1 && + (args->reason == __DRI2_THROTTLE_SWAPBUFFER || + args->reason == __DRI2_THROTTLE_COPYSUBBUFFER)) { + /* Resolve the MSAA back buffer. */ + dri_pipe_blit(st->pipe, + args->drawable->textures[ST_ATTACHMENT_BACK_LEFT], + args->drawable->msaa_textures[ST_ATTACHMENT_BACK_LEFT]); + + if (args->reason == __DRI2_THROTTLE_SWAPBUFFER && + args->drawable->msaa_textures[ST_ATTACHMENT_FRONT_LEFT] && + args->drawable->msaa_textures[ST_ATTACHMENT_BACK_LEFT]) { + args->swap_msaa_buffers = true; + } + + /* FRONT_LEFT is resolved in drawable->flush_frontbuffer. */ + } + + dri_postprocessing(args->ctx, args->drawable, ST_ATTACHMENT_BACK_LEFT); + + if (pipe->invalidate_resource && + (args->flags & __DRI2_FLUSH_INVALIDATE_ANCILLARY)) { + if (args->drawable->textures[ST_ATTACHMENT_DEPTH_STENCIL]) + pipe->invalidate_resource(pipe, args->drawable->textures[ST_ATTACHMENT_DEPTH_STENCIL]); + if (args->drawable->msaa_textures[ST_ATTACHMENT_DEPTH_STENCIL]) + pipe->invalidate_resource(pipe, args->drawable->msaa_textures[ST_ATTACHMENT_DEPTH_STENCIL]); + } + + if (args->ctx->hud) { + hud_run(args->ctx->hud, args->ctx->st->cso_context, + args->drawable->textures[ST_ATTACHMENT_BACK_LEFT]); + } + + pipe->flush_resource(pipe, args->drawable->textures[ST_ATTACHMENT_BACK_LEFT]); +} + /** * DRI2 flush extension, the flush_with_flags function. * @@ -493,7 +472,7 @@ dri_flush(__DRIcontext *cPriv, struct dri_drawable *drawable = dri_drawable(dPriv); struct st_context_iface *st; unsigned flush_flags; - bool swap_msaa_buffers = false; + struct notify_before_flush_cb_args args = { 0 }; if (!ctx) { assert(0); @@ -515,42 +494,18 @@ dri_flush(__DRIcontext *cPriv, flags &= ~__DRI2_FLUSH_DRAWABLE; } - /* Flush the drawable. */ if ((flags & __DRI2_FLUSH_DRAWABLE) && drawable->textures[ST_ATTACHMENT_BACK_LEFT]) { - struct pipe_context *pipe = st->pipe; - - if (drawable->stvis.samples > 1 && - reason == __DRI2_THROTTLE_SWAPBUFFER) { - /* Resolve the MSAA back buffer. */ - dri_pipe_blit(st->pipe, - drawable->textures[ST_ATTACHMENT_BACK_LEFT], - drawable->msaa_textures[ST_ATTACHMENT_BACK_LEFT]); - - if (drawable->msaa_textures[ST_ATTACHMENT_FRONT_LEFT] && - drawable->msaa_textures[ST_ATTACHMENT_BACK_LEFT]) { - swap_msaa_buffers = true; - } - - /* FRONT_LEFT is resolved in drawable->flush_frontbuffer. */ - } - - dri_postprocessing(ctx, drawable, ST_ATTACHMENT_BACK_LEFT); - - if (pipe->invalidate_resource && - (flags & __DRI2_FLUSH_INVALIDATE_ANCILLARY)) { - if (drawable->textures[ST_ATTACHMENT_DEPTH_STENCIL]) - pipe->invalidate_resource(pipe, drawable->textures[ST_ATTACHMENT_DEPTH_STENCIL]); - if (drawable->msaa_textures[ST_ATTACHMENT_DEPTH_STENCIL]) - pipe->invalidate_resource(pipe, drawable->msaa_textures[ST_ATTACHMENT_DEPTH_STENCIL]); - } - - if (ctx->hud) { - hud_run(ctx->hud, ctx->st->cso_context, - drawable->textures[ST_ATTACHMENT_BACK_LEFT]); - } - - pipe->flush_resource(pipe, drawable->textures[ST_ATTACHMENT_BACK_LEFT]); + /* We can't do operations on the back buffer here, because there + * may be some pending operations that will get flushed by the + * call to st->flush (eg: FLUSH_VERTICES). + * Instead we register a callback to be notified when all operations + * have been submitted but before the call to st_flush. + */ + args.ctx = ctx; + args.drawable = drawable; + args.flags = flags; + args.reason = reason; } flush_flags = 0; @@ -560,38 +515,25 @@ dri_flush(__DRIcontext *cPriv, flush_flags |= ST_FLUSH_END_OF_FRAME; /* Flush the context and throttle if needed. */ - if (dri_screen(ctx->sPriv)->default_throttle_frames && + if (dri_screen(ctx->sPriv)->throttle && drawable && (reason == __DRI2_THROTTLE_SWAPBUFFER || reason == __DRI2_THROTTLE_FLUSHFRONT)) { - /* Throttle. - * - * This pulls a fence off the throttling queue and waits for it if the - * number of fences on the throttling queue has reached the desired - * number. - * - * Then flushes to insert a fence at the current rendering position, and - * pushes that fence on the queue. This requires that the st_context_iface - * flush method returns a fence even if there are no commands to flush. - */ - struct pipe_screen *screen = drawable->screen->base.screen; - struct pipe_fence_handle *oldest_fence, *new_fence = NULL; - st->flush(st, flush_flags, &new_fence); + struct pipe_screen *screen = drawable->screen->base.screen; + struct pipe_fence_handle *new_fence = NULL; - oldest_fence = swap_fences_pop_front(drawable); - if (oldest_fence) { - screen->fence_finish(screen, NULL, oldest_fence, PIPE_TIMEOUT_INFINITE); - screen->fence_reference(screen, &oldest_fence, NULL); - } + st->flush(st, flush_flags, &new_fence, args.ctx ? notify_before_flush_cb : NULL, &args); - if (new_fence) { - swap_fences_push_back(drawable, new_fence); - screen->fence_reference(screen, &new_fence, NULL); + /* throttle on the previous fence */ + if (drawable->throttle_fence) { + screen->fence_finish(screen, NULL, drawable->throttle_fence, PIPE_TIMEOUT_INFINITE); + screen->fence_reference(screen, &drawable->throttle_fence, NULL); } + drawable->throttle_fence = new_fence; } else if (flags & (__DRI2_FLUSH_DRAWABLE | __DRI2_FLUSH_CONTEXT)) { - st->flush(st, flush_flags, NULL); + st->flush(st, flush_flags, NULL, args.ctx ? notify_before_flush_cb : NULL, &args); } if (drawable) { @@ -602,7 +544,7 @@ dri_flush(__DRIcontext *cPriv, * from the front buffer after SwapBuffers returns what was * in the back buffer. */ - if (swap_msaa_buffers) { + if (args.swap_msaa_buffers) { struct pipe_resource *tmp = drawable->msaa_textures[ST_ATTACHMENT_FRONT_LEFT]; diff --git a/lib/mesa/src/gallium/state_trackers/dri/dri_screen.c b/lib/mesa/src/gallium/state_trackers/dri/dri_screen.c index 2ee7c92cb..4f1bf1661 100644 --- a/lib/mesa/src/gallium/state_trackers/dri/dri_screen.c +++ b/lib/mesa/src/gallium/state_trackers/dri/dri_screen.c @@ -43,7 +43,7 @@ #include "state_tracker/drm_driver.h" #include "util/u_debug.h" -#include "util/u_format_s3tc.h" +#include "util/format/u_format_s3tc.h" #define MSAA_VISUAL_MAX_SAMPLES 32 @@ -84,12 +84,18 @@ dri_fill_st_options(struct dri_screen *screen) options->allow_higher_compat_version = driQueryOptionb(optionCache, "allow_higher_compat_version"); options->glsl_zero_init = driQueryOptionb(optionCache, "glsl_zero_init"); + options->force_integer_tex_nearest = + driQueryOptionb(optionCache, "force_integer_tex_nearest"); + options->vs_position_always_invariant = + driQueryOptionb(optionCache, "vs_position_always_invariant"); options->force_glsl_abs_sqrt = driQueryOptionb(optionCache, "force_glsl_abs_sqrt"); options->allow_glsl_cross_stage_interpolation_mismatch = driQueryOptionb(optionCache, "allow_glsl_cross_stage_interpolation_mismatch"); options->allow_glsl_layout_qualifier_on_function_parameters = driQueryOptionb(optionCache, "allow_glsl_layout_qualifier_on_function_parameters"); + options->allow_draw_out_of_order = + driQueryOptionb(optionCache, "allow_draw_out_of_order"); char *vendor_str = driQueryOptionstr(optionCache, "force_gl_vendor"); /* not an empty string */ @@ -129,6 +135,8 @@ dri_fill_in_modes(struct dri_screen *screen) MESA_FORMAT_B8G8R8A8_SRGB, MESA_FORMAT_B8G8R8X8_SRGB, MESA_FORMAT_B5G6R5_UNORM, + MESA_FORMAT_RGBA_FLOAT16, + MESA_FORMAT_RGBX_FLOAT16, /* The 32-bit RGBA format must not precede the 32-bit BGRA format. * Likewise for RGBX and BGRX. Otherwise, the GLX client and the GLX @@ -161,6 +169,8 @@ dri_fill_in_modes(struct dri_screen *screen) PIPE_FORMAT_BGRA8888_SRGB, PIPE_FORMAT_BGRX8888_SRGB, PIPE_FORMAT_B5G6R5_UNORM, + PIPE_FORMAT_R16G16B16A16_FLOAT, + PIPE_FORMAT_R16G16B16X16_FLOAT, PIPE_FORMAT_RGBA8888_UNORM, PIPE_FORMAT_RGBX8888_UNORM, }; @@ -174,7 +184,9 @@ dri_fill_in_modes(struct dri_screen *screen) struct pipe_screen *p_screen = screen->base.screen; bool pf_z16, pf_x8z24, pf_z24x8, pf_s8z24, pf_z24s8, pf_z32; bool mixed_color_depth; + bool allow_rgba_ordering; bool allow_rgb10; + bool allow_fp16; static const GLenum back_buffer_modes[] = { __DRI_ATTRIB_SWAP_NONE, __DRI_ATTRIB_SWAP_UNDEFINED, @@ -191,7 +203,10 @@ dri_fill_in_modes(struct dri_screen *screen) depth_buffer_factor = 1; } + allow_rgba_ordering = dri_loader_get_cap(screen, DRI_LOADER_CAP_RGBA_ORDERING); allow_rgb10 = driQueryOptionb(&screen->dev->option_cache, "allow_rgb10_configs"); + allow_fp16 = driQueryOptionb(&screen->dev->option_cache, "allow_fp16_configs"); + allow_fp16 &= dri_loader_get_cap(screen, DRI_LOADER_CAP_FP16); msaa_samples_max = (screen->st_api->feature_mask & ST_API_FEATURE_MS_VISUALS_MASK) ? MSAA_VISUAL_MAX_SAMPLES : 1; @@ -239,19 +254,18 @@ dri_fill_in_modes(struct dri_screen *screen) assert(ARRAY_SIZE(mesa_formats) == ARRAY_SIZE(pipe_formats)); - /* Expose only BGRA ordering if the loader doesn't support RGBA ordering. */ - unsigned num_formats; - if (dri_loader_get_cap(screen, DRI_LOADER_CAP_RGBA_ORDERING)) - num_formats = ARRAY_SIZE(mesa_formats); - else - num_formats = ARRAY_SIZE(mesa_formats) - 2; /* all - RGBA_ORDERING formats */ - /* Add configs. */ - for (format = 0; format < num_formats; format++) { + for (format = 0; format < ARRAY_SIZE(mesa_formats); format++) { __DRIconfig **new_configs = NULL; unsigned num_msaa_modes = 0; /* includes a single-sample mode */ uint8_t msaa_modes[MSAA_VISUAL_MAX_SAMPLES]; + /* Expose only BGRA ordering if the loader doesn't support RGBA ordering. */ + if (!allow_rgba_ordering && + (mesa_formats[format] == MESA_FORMAT_R8G8B8A8_UNORM || + mesa_formats[format] == MESA_FORMAT_R8G8B8X8_UNORM)) + continue; + if (!allow_rgb10 && (mesa_formats[format] == MESA_FORMAT_B10G10R10A2_UNORM || mesa_formats[format] == MESA_FORMAT_B10G10R10X2_UNORM || @@ -259,6 +273,11 @@ dri_fill_in_modes(struct dri_screen *screen) mesa_formats[format] == MESA_FORMAT_R10G10B10X2_UNORM)) continue; + if (!allow_fp16 && + (mesa_formats[format] == MESA_FORMAT_RGBA_FLOAT16 || + mesa_formats[format] == MESA_FORMAT_RGBX_FLOAT16)) + continue; + if (!p_screen->is_format_supported(p_screen, pipe_formats[format], PIPE_TEXTURE_2D, 0, 0, PIPE_BIND_RENDER_TARGET | @@ -323,6 +342,17 @@ dri_fill_st_visual(struct st_visual *stvis, /* Deduce the color format. */ switch (mode->redMask) { + case 0: + /* Formats > 32 bpp */ + assert(mode->floatMode); + if (mode->alphaShift > -1) { + assert(mode->alphaShift == 48); + stvis->color_format = PIPE_FORMAT_R16G16B16A16_FLOAT; + } else { + stvis->color_format = PIPE_FORMAT_R16G16B16X16_FLOAT; + } + break; + case 0x3FF00000: if (mode->alphaMask) { assert(mode->alphaMask == 0xC0000000); @@ -404,7 +434,7 @@ dri_fill_st_visual(struct st_visual *stvis, break; } - stvis->accum_format = (mode->haveAccumBuffer) ? + stvis->accum_format = (mode->accumRedBits > 0) ? PIPE_FORMAT_R16G16B16A16_SNORM : PIPE_FORMAT_NONE; stvis->buffer_mask |= ST_ATTACHMENT_FRONT_LEFT_MASK; @@ -419,7 +449,7 @@ dri_fill_st_visual(struct st_visual *stvis, stvis->buffer_mask |= ST_ATTACHMENT_BACK_RIGHT_MASK; } - if (mode->haveDepthBuffer || mode->haveStencilBuffer) + if (mode->depthBits > 0 || mode->stencilBits > 0) stvis->buffer_mask |= ST_ATTACHMENT_DEPTH_STENCIL_MASK; /* let the state tracker allocate the accum buffer */ } @@ -447,6 +477,14 @@ dri_get_egl_image(struct st_manager *smapi, stimg->level = img->level; stimg->layer = img->layer; + if (img->imported_dmabuf && map) { + /* Guess sized internal format for dma-bufs. Could be used + * by EXT_EGL_image_storage. + */ + mesa_format mesa_format = driImageFormatToGLFormat(map->dri_format); + stimg->internalformat = driGLFormatToSizedInternalGLFormat(mesa_format); + } + return TRUE; } diff --git a/lib/mesa/src/gallium/state_trackers/dri/dri_screen.h b/lib/mesa/src/gallium/state_trackers/dri/dri_screen.h index f16715dee..1586439bb 100644 --- a/lib/mesa/src/gallium/state_trackers/dri/dri_screen.h +++ b/lib/mesa/src/gallium/state_trackers/dri/dri_screen.h @@ -57,7 +57,7 @@ struct dri_screen /* dri */ __DRIscreen *sPriv; - unsigned default_throttle_frames; + boolean throttle; struct st_config_options options; @@ -109,6 +109,7 @@ struct __DRIimageRec { void *loader_private; + boolean imported_dmabuf; /** * Provided by EGL_EXT_image_dma_buf_import. */ diff --git a/lib/mesa/src/gallium/state_trackers/dri/drisw.c b/lib/mesa/src/gallium/state_trackers/dri/drisw.c index cf1e662f0..1c0f56e04 100644 --- a/lib/mesa/src/gallium/state_trackers/dri/drisw.c +++ b/lib/mesa/src/gallium/state_trackers/dri/drisw.c @@ -26,7 +26,7 @@ * **************************************************************************/ -#include "util/u_format.h" +#include "util/format/u_format.h" #include "util/u_memory.h" #include "util/u_inlines.h" #include "util/u_box.h" @@ -138,6 +138,9 @@ get_image_shm(__DRIdrawable *dPriv, int x, int y, int width, int height, if (!res->screen->resource_get_handle(res->screen, NULL, res, &whandle, PIPE_HANDLE_USAGE_FRAMEBUFFER_WRITE)) return FALSE; + if (loader->base.version > 5 && loader->getImageShm2) + return loader->getImageShm2(dPriv, x, y, width, height, whandle.handle, dPriv->loaderPrivate); + loader->getImageShm(dPriv, x, y, width, height, whandle.handle, dPriv->loaderPrivate); return TRUE; } @@ -249,7 +252,7 @@ drisw_swap_buffers(__DRIdrawable *dPriv) if (ctx->hud) hud_run(ctx->hud, ctx->st->cso_context, ptex); - ctx->st->flush(ctx->st, ST_FLUSH_FRONT, NULL); + ctx->st->flush(ctx->st, ST_FLUSH_FRONT, NULL, NULL, NULL); drisw_copy_to_front(dPriv, ptex); } @@ -272,7 +275,7 @@ drisw_copy_sub_buffer(__DRIdrawable *dPriv, int x, int y, if (ctx->pp && drawable->textures[ST_ATTACHMENT_DEPTH_STENCIL]) pp_run(ctx->pp, ptex, ptex, drawable->textures[ST_ATTACHMENT_DEPTH_STENCIL]); - ctx->st->flush(ctx->st, ST_FLUSH_FRONT, NULL); + ctx->st->flush(ctx->st, ST_FLUSH_FRONT, NULL, NULL, NULL); u_box_2d(x, dPriv->h - y - h, w, h, &box); drisw_present_texture(dPriv, ptex, &box); @@ -348,7 +351,7 @@ drisw_allocate_textures(struct dri_context *stctx, /* if we don't do any present, no need for display targets */ if (statts[i] != ST_ATTACHMENT_DEPTH_STENCIL && !screen->swrast_no_present) - bind |= PIPE_BIND_DISPLAY_TARGET; + bind |= PIPE_BIND_DISPLAY_TARGET | PIPE_BIND_LINEAR; if (format == PIPE_FORMAT_NONE) continue; |