From e1a407256a5c1571d8f4871fd981a51cfbd46e37 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 22 Jun 2012 08:30:33 +0200 Subject: mesa xserver libxcb fontconfig --- mesalib/.emacs-dirvars | 10 - mesalib/Makefile.am | 1 - mesalib/configs/autoconf.in | 232 -------------------- mesalib/configs/current.in | 227 +++++++++++++++++++ mesalib/configs/default | 5 - mesalib/configure.ac | 61 ++---- mesalib/src/gallium/.gitignore | 1 + mesalib/src/gallium/Makefile | 12 - mesalib/src/gallium/Makefile.am | 22 ++ mesalib/src/mapi/glapi/gen/.gitignore | 1 + .../mapi/glapi/gen/ARB_uniform_buffer_object.xml | 97 +++++++++ mesalib/src/mapi/glapi/gen/Makefile | 241 --------------------- mesalib/src/mapi/glapi/gen/Makefile.am | 240 ++++++++++++++++++++ mesalib/src/mapi/glapi/gen/gl_API.xml | 4 +- mesalib/src/mesa/.gitignore | 6 +- mesalib/src/mesa/Makefile | 238 -------------------- mesalib/src/mesa/Makefile.am | 107 +++++++++ mesalib/src/mesa/Makefile.old | 82 +++++++ mesalib/src/mesa/drivers/.gitignore | 1 + mesalib/src/mesa/drivers/Makefile | 29 --- mesalib/src/mesa/drivers/Makefile.am | 22 ++ mesalib/src/mesa/drivers/dri/common/Makefile.am | 1 - mesalib/src/mesa/drivers/dri/swrast/Makefile.am | 1 - mesalib/src/mesa/gl.pc.in | 8 +- mesalib/src/mesa/main/api_exec.c | 12 +- mesalib/src/mesa/main/bufferobj.c | 240 ++++++++++++++++++++ mesalib/src/mesa/main/bufferobj.h | 10 + mesalib/src/mesa/main/context.c | 9 + mesalib/src/mesa/main/extensions.c | 2 +- mesalib/src/mesa/main/get.c | 60 +++++ mesalib/src/mesa/main/mtypes.h | 41 ++++ mesalib/src/mesa/main/transformfeedback.c | 66 +----- mesalib/src/mesa/main/transformfeedback.h | 15 +- mesalib/src/mesa/osmesa.pc.in | 8 +- mesalib/src/mesa/x86/.gitignore | 3 + mesalib/src/mesa/x86/Makefile | 46 ---- mesalib/src/mesa/x86/Makefile.am | 39 ++++ 37 files changed, 1261 insertions(+), 939 deletions(-) delete mode 100644 mesalib/.emacs-dirvars delete mode 100644 mesalib/configs/autoconf.in create mode 100644 mesalib/configs/current.in create mode 100644 mesalib/src/gallium/.gitignore delete mode 100644 mesalib/src/gallium/Makefile create mode 100644 mesalib/src/gallium/Makefile.am create mode 100644 mesalib/src/mapi/glapi/gen/.gitignore create mode 100644 mesalib/src/mapi/glapi/gen/ARB_uniform_buffer_object.xml delete mode 100644 mesalib/src/mapi/glapi/gen/Makefile create mode 100644 mesalib/src/mapi/glapi/gen/Makefile.am delete mode 100644 mesalib/src/mesa/Makefile create mode 100644 mesalib/src/mesa/Makefile.am create mode 100644 mesalib/src/mesa/Makefile.old create mode 100644 mesalib/src/mesa/drivers/.gitignore delete mode 100644 mesalib/src/mesa/drivers/Makefile create mode 100644 mesalib/src/mesa/drivers/Makefile.am create mode 100644 mesalib/src/mesa/x86/.gitignore delete mode 100644 mesalib/src/mesa/x86/Makefile create mode 100644 mesalib/src/mesa/x86/Makefile.am (limited to 'mesalib') diff --git a/mesalib/.emacs-dirvars b/mesalib/.emacs-dirvars deleted file mode 100644 index 33945f91e..000000000 --- a/mesalib/.emacs-dirvars +++ /dev/null @@ -1,10 +0,0 @@ -;; -*- emacs-lisp -*- -;; -;; This file is processed by the dirvars emacs package. Each variable -;; setting below is performed when this dirvars file is loaded. -;; -indent-tabs-mode: nil -tab-width: 8 -c-basic-offset: 3 -kde-emacs-after-parent-string: "" -evaluate: (c-set-offset 'inline-open '0) diff --git a/mesalib/Makefile.am b/mesalib/Makefile.am index 9c9e9f6cf..8210fccd4 100644 --- a/mesalib/Makefile.am +++ b/mesalib/Makefile.am @@ -44,7 +44,6 @@ clean-local: distclean-local: -rm -rf lib* -rm -f $(top_builddir)/configs/current - -rm -f $(top_builddir)/configs/autoconf -find . '(' -name '*.o' -o -name '*.a' -o -name '*.so' -o \ -name depend -o -name depend.bak ')' -exec rm -f '{}' ';' diff --git a/mesalib/configs/autoconf.in b/mesalib/configs/autoconf.in deleted file mode 100644 index 48f4504a2..000000000 --- a/mesalib/configs/autoconf.in +++ /dev/null @@ -1,232 +0,0 @@ -# Autoconf configuration - -# Pull in the defaults -include $(TOP)/configs/default - -# This is generated by configure -CONFIG_NAME = autoconf - -# Compiler and flags -CC = @CC@ -CXX = @CXX@ -OPT_FLAGS = @OPT_FLAGS@ -ARCH_FLAGS = @ARCH_FLAGS@ -ASM_FLAGS = @ASM_FLAGS@ -PIC_FLAGS = @PIC_FLAGS@ -DEFINES = @DEFINES@ -API_DEFINES = @API_DEFINES@ -SHARED_GLAPI = @SHARED_GLAPI@ -CFLAGS_NOVISIBILITY = @CPPFLAGS@ @CFLAGS@ \ - $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES) -CXXFLAGS_NOVISIBILITY = @CPPFLAGS@ @CXXFLAGS@ \ - $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) -CFLAGS = $(CFLAGS_NOVISIBILITY) @VISIBILITY_CFLAGS@ -CXXFLAGS = $(CXXFLAGS_NOVISIBILITY) @VISIBILITY_CXXFLAGS@ -LDFLAGS = @LDFLAGS@ -EXTRA_LIB_PATH = @EXTRA_LIB_PATH@ -RADEON_CFLAGS = @RADEON_CFLAGS@ -RADEON_LIBS = @RADEON_LIBS@ -NOUVEAU_CFLAGS = @NOUVEAU_CFLAGS@ -NOUVEAU_LIBS = @NOUVEAU_LIBS@ -INTEL_LIBS = @INTEL_LIBS@ -INTEL_CFLAGS = @INTEL_CFLAGS@ -X11_LIBS = @X11_LIBS@ -X11_CFLAGS = @X11_CFLAGS@ -LLVM_BINDIR = @LLVM_BINDIR@ -LLVM_CFLAGS = @LLVM_CFLAGS@ -LLVM_CPPFLAGS = @LLVM_CPPFLAGS@ -LLVM_CXXFLAGS = @LLVM_CXXFLAGS@ -LLVM_LDFLAGS = @LLVM_LDFLAGS@ -LLVM_LIBDIR = @LLVM_LIBDIR@ -LLVM_LIBS = @LLVM_LIBS@ -LLVM_INCLUDEDIR = @LLVM_INCLUDEDIR@ -GLW_CFLAGS = @GLW_CFLAGS@ -GLX_TLS = @GLX_TLS@ -DRI_CFLAGS = @DRI_CFLAGS@ -DRI_CXXFLAGS = @DRI_CXXFLAGS@ - -# dlopen -DLOPEN_LIBS = @DLOPEN_LIBS@ - -# Source selection -MESA_ASM_FILES = @MESA_ASM_FILES@ -GLAPI_ASM_SOURCES = @GLAPI_ASM_SOURCES@ - -# Misc tools and flags -MAKE = @MAKE@ -SHELL = @SHELL@ -MKLIB_OPTIONS = @MKLIB_OPTIONS@ -MKDEP = @MKDEP@ -MKDEP_OPTIONS = @MKDEP_OPTIONS@ -INSTALL = @INSTALL@ -AWK = @AWK@ -GREP = @GREP@ -NM = @NM@ - -# Perl -PERL = @PERL@ - -# Indent (used for generating dispatch tables) -INDENT = @INDENT@ -INDENT_FLAGS = @INDENT_FLAGS@ - -# Python and flags (generally only needed by the developers) -PYTHON2 = @PYTHON2@ -PYTHON_FLAGS = -t -O -O - -# Flex and Bison for GLSL compiler -FLEX = @LEX@ -BISON = @YACC@ - -# Library names (base name) -GL_LIB = @GL_LIB@ -GLU_LIB = @GLU_LIB@ -GLW_LIB = GLw -OSMESA_LIB = @OSMESA_LIB@ -GLESv1_CM_LIB = GLESv1_CM -GLESv2_LIB = GLESv2 -VG_LIB = OpenVG -GLAPI_LIB = glapi - -# Library names (actual file names) -GL_LIB_NAME = @GL_LIB_NAME@ -GLU_LIB_NAME = @GLU_LIB_NAME@ -GLW_LIB_NAME = @GLW_LIB_NAME@ -OSMESA_LIB_NAME = @OSMESA_LIB_NAME@ -EGL_LIB_NAME = @EGL_LIB_NAME@ -GLESv1_CM_LIB_NAME = @GLESv1_CM_LIB_NAME@ -GLESv2_LIB_NAME = @GLESv2_LIB_NAME@ -VG_LIB_NAME = @VG_LIB_NAME@ -GLAPI_LIB_NAME = @GLAPI_LIB_NAME@ - -# Globs used to install the lib and all symlinks -GL_LIB_GLOB = @GL_LIB_GLOB@ -GLU_LIB_GLOB = @GLU_LIB_GLOB@ -GLW_LIB_GLOB = @GLW_LIB_GLOB@ -OSMESA_LIB_GLOB = @OSMESA_LIB_GLOB@ -EGL_LIB_GLOB = @EGL_LIB_GLOB@ -GLESv1_CM_LIB_GLOB = @GLESv1_CM_LIB_GLOB@ -GLESv2_LIB_GLOB = @GLESv2_LIB_GLOB@ -VG_LIB_GLOB = @VG_LIB_GLOB@ -GLAPI_LIB_GLOB = @GLAPI_LIB_GLOB@ - -# Directories to build -LIB_DIR = @LIB_DIR@ -SRC_DIRS = @SRC_DIRS@ -GLU_DIRS = @GLU_DIRS@ -DRIVER_DIRS = @DRIVER_DIRS@ -GALLIUM_DIRS = @GALLIUM_DIRS@ -GALLIUM_DRIVERS_DIRS = @GALLIUM_DRIVERS_DIRS@ -GALLIUM_WINSYS_DIRS = @GALLIUM_WINSYS_DIRS@ -GALLIUM_TARGET_DIRS = @GALLIUM_TARGET_DIRS@ -GALLIUM_STATE_TRACKERS_DIRS = @GALLIUM_STATE_TRACKERS_DIRS@ -GALLIUM_AUXILIARIES = $(TOP)/src/gallium/auxiliary/libgallium.a -GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a) - -# Driver specific build vars -DRI_DIRS = @DRI_DIRS@ -DRICORE_LIBS = @DRICORE_LIBS@ -DRICORE_LIB_DEPS = @DRICORE_LIB_DEPS@ -EGL_PLATFORMS = @EGL_PLATFORMS@ -EGL_CLIENT_APIS = @EGL_CLIENT_APIS@ - -# Dependencies -X11_INCLUDES = @X11_INCLUDES@ - -# GLw motif setup -GLW_SOURCES = @GLW_SOURCES@ -MOTIF_CFLAGS = @MOTIF_CFLAGS@ - -# Library/program dependencies -GL_LIB_DEPS = $(EXTRA_LIB_PATH) @GL_LIB_DEPS@ -OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @OSMESA_MESA_DEPS@ \ - $(EXTRA_LIB_PATH) @OSMESA_LIB_DEPS@ -EGL_LIB_DEPS = $(EXTRA_LIB_PATH) @EGL_LIB_DEPS@ -GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @GLU_MESA_DEPS@ \ - $(EXTRA_LIB_PATH) @GLU_LIB_DEPS@ -GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @GLW_MESA_DEPS@ \ - $(EXTRA_LIB_PATH) @GLW_LIB_DEPS@ -GLESv1_CM_LIB_DEPS = $(EXTRA_LIB_PATH) @GLESv1_CM_LIB_DEPS@ -GLESv2_LIB_DEPS = $(EXTRA_LIB_PATH) @GLESv2_LIB_DEPS@ -VG_LIB_DEPS = $(EXTRA_LIB_PATH) @VG_LIB_DEPS@ -GLAPI_LIB_DEPS = $(EXTRA_LIB_PATH) @GLAPI_LIB_DEPS@ - -# DRI dependencies -MESA_MODULES = @MESA_MODULES@ -DRI_LIB_DEPS = $(EXTRA_LIB_PATH) @DRI_LIB_DEPS@ -LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ -LIBDRM_LIB = @LIBDRM_LIBS@ -DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ -GLPROTO_CFLAGS = @GLPROTO_CFLAGS@ -EXPAT_INCLUDES = @EXPAT_INCLUDES@ - -# Autoconf directories -prefix = @prefix@ -exec_prefix = @exec_prefix@ -libdir = @libdir@ -includedir = @includedir@ - -# Installation directories (for make install) -INSTALL_DIR = $(prefix) -INSTALL_LIB_DIR = $(libdir) -INSTALL_INC_DIR = $(includedir) - -# DRI installation directories -DRI_DRIVER_INSTALL_DIR = @DRI_DRIVER_INSTALL_DIR@ - -# Where libGL will look for DRI hardware drivers -DRI_DRIVER_SEARCH_DIR = @DRI_DRIVER_SEARCH_DIR@ - -# EGL driver install directory -EGL_DRIVER_INSTALL_DIR = @EGL_DRIVER_INSTALL_DIR@ - -# XVMC library install directory -XVMC_LIB_INSTALL_DIR=@XVMC_LIB_INSTALL_DIR@ - -# VDPAU library install directory -VDPAU_LIB_INSTALL_DIR=@VDPAU_LIB_INSTALL_DIR@ - -# VA library install directory -VA_LIB_INSTALL_DIR=@VA_LIB_INSTALL_DIR@ - -# Xorg driver install directory (for xorg state-tracker) -XORG_DRIVER_INSTALL_DIR = @XORG_DRIVER_INSTALL_DIR@ - -# Path to OpenCL C library libclc -LIBCLC_PATH = @LIBCLC_PATH@ - -# pkg-config substitutions -GL_PC_REQ_PRIV = @GL_PC_REQ_PRIV@ -GL_PC_LIB_PRIV = @GL_PC_LIB_PRIV@ -GL_PC_CFLAGS = @GL_PC_CFLAGS@ -DRI_PC_REQ_PRIV = @DRI_PC_REQ_PRIV@ -GLU_PC_REQ = @GLU_PC_REQ@ -GLU_PC_REQ_PRIV = @GLU_PC_REQ_PRIV@ -GLU_PC_LIB_PRIV = @GLU_PC_LIB_PRIV@ -GLU_PC_CFLAGS = @GLU_PC_CFLAGS@ -GLW_PC_REQ_PRIV = @GLW_PC_REQ_PRIV@ -GLW_PC_LIB_PRIV = @GLW_PC_LIB_PRIV@ -GLW_PC_CFLAGS = @GLW_PC_CFLAGS@ -OSMESA_PC_REQ = @OSMESA_PC_REQ@ -OSMESA_PC_LIB_PRIV = @OSMESA_PC_LIB_PRIV@ -GLESv1_CM_PC_LIB_PRIV = @GLESv1_CM_PC_LIB_PRIV@ -GLESv2_PC_LIB_PRIV = @GLESv2_PC_LIB_PRIV@ -EGL_PC_REQ_PRIV = @GL_PC_REQ_PRIV@ -EGL_PC_LIB_PRIV = @GL_PC_LIB_PRIV@ -EGL_PC_CFLAGS = @GL_PC_CFLAGS@ - -XCB_DRI2_CFLAGS = @XCB_DRI2_CFLAGS@ -XCB_DRI2_LIBS = @XCB_DRI2_LIBS@ -LIBUDEV_CFLAGS = @LIBUDEV_CFLAGS@ -LIBUDEV_LIBS = @LIBUDEV_LIBS@ -WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ -WAYLAND_LIBS = @WAYLAND_LIBS@ - -MESA_LLVM = @MESA_LLVM@ - -LLVM_VERSION = @LLVM_VERSION@ - -HAVE_XF86VIDMODE = @HAVE_XF86VIDMODE@ - -GALLIUM_PIPE_LOADER_DEFINES = @GALLIUM_PIPE_LOADER_DEFINES@ -GALLIUM_PIPE_LOADER_LIBS = @GALLIUM_PIPE_LOADER_LIBS@ diff --git a/mesalib/configs/current.in b/mesalib/configs/current.in new file mode 100644 index 000000000..f4858bdfa --- /dev/null +++ b/mesalib/configs/current.in @@ -0,0 +1,227 @@ +# Autoconf configuration + +# Pull in the defaults +include $(TOP)/configs/default + +# This is generated by configure +CONFIG_NAME = autoconf + +# Compiler and flags +CC = @CC@ +CXX = @CXX@ +OPT_FLAGS = @OPT_FLAGS@ +ARCH_FLAGS = @ARCH_FLAGS@ +PIC_FLAGS = @PIC_FLAGS@ +DEFINES = @DEFINES@ +API_DEFINES = @API_DEFINES@ +SHARED_GLAPI = @SHARED_GLAPI@ +CFLAGS_NOVISIBILITY = @CPPFLAGS@ @CFLAGS@ \ + $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) +CXXFLAGS_NOVISIBILITY = @CPPFLAGS@ @CXXFLAGS@ \ + $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) +CFLAGS = $(CFLAGS_NOVISIBILITY) @VISIBILITY_CFLAGS@ +CXXFLAGS = $(CXXFLAGS_NOVISIBILITY) @VISIBILITY_CXXFLAGS@ +LDFLAGS = @LDFLAGS@ +EXTRA_LIB_PATH = @EXTRA_LIB_PATH@ +RADEON_CFLAGS = @RADEON_CFLAGS@ +RADEON_LIBS = @RADEON_LIBS@ +NOUVEAU_CFLAGS = @NOUVEAU_CFLAGS@ +NOUVEAU_LIBS = @NOUVEAU_LIBS@ +INTEL_LIBS = @INTEL_LIBS@ +INTEL_CFLAGS = @INTEL_CFLAGS@ +X11_LIBS = @X11_LIBS@ +X11_CFLAGS = @X11_CFLAGS@ +LLVM_BINDIR = @LLVM_BINDIR@ +LLVM_CFLAGS = @LLVM_CFLAGS@ +LLVM_CPPFLAGS = @LLVM_CPPFLAGS@ +LLVM_CXXFLAGS = @LLVM_CXXFLAGS@ +LLVM_LDFLAGS = @LLVM_LDFLAGS@ +LLVM_LIBDIR = @LLVM_LIBDIR@ +LLVM_LIBS = @LLVM_LIBS@ +LLVM_INCLUDEDIR = @LLVM_INCLUDEDIR@ +GLW_CFLAGS = @GLW_CFLAGS@ +GLX_TLS = @GLX_TLS@ + +# dlopen +DLOPEN_LIBS = @DLOPEN_LIBS@ + +# Source selection +MESA_ASM_FILES = @MESA_ASM_FILES@ +GLAPI_ASM_SOURCES = @GLAPI_ASM_SOURCES@ + +# Misc tools and flags +MAKE = @MAKE@ +SHELL = @SHELL@ +MKLIB_OPTIONS = @MKLIB_OPTIONS@ +MKDEP = @MKDEP@ +MKDEP_OPTIONS = @MKDEP_OPTIONS@ +INSTALL = @INSTALL@ +AWK = @AWK@ +GREP = @GREP@ +NM = @NM@ + +# Perl +PERL = @PERL@ + +# Indent (used for generating dispatch tables) +INDENT = @INDENT@ +INDENT_FLAGS = @INDENT_FLAGS@ + +# Python and flags (generally only needed by the developers) +PYTHON2 = @PYTHON2@ +PYTHON_FLAGS = -t -O -O + +# Flex and Bison for GLSL compiler +FLEX = @LEX@ +BISON = @YACC@ + +# Library names (base name) +GL_LIB = @GL_LIB@ +GLU_LIB = @GLU_LIB@ +GLW_LIB = GLw +OSMESA_LIB = @OSMESA_LIB@ +GLESv1_CM_LIB = GLESv1_CM +GLESv2_LIB = GLESv2 +VG_LIB = OpenVG +GLAPI_LIB = glapi + +# Library names (actual file names) +GL_LIB_NAME = @GL_LIB_NAME@ +GLU_LIB_NAME = @GLU_LIB_NAME@ +GLW_LIB_NAME = @GLW_LIB_NAME@ +OSMESA_LIB_NAME = @OSMESA_LIB_NAME@ +EGL_LIB_NAME = @EGL_LIB_NAME@ +GLESv1_CM_LIB_NAME = @GLESv1_CM_LIB_NAME@ +GLESv2_LIB_NAME = @GLESv2_LIB_NAME@ +VG_LIB_NAME = @VG_LIB_NAME@ +GLAPI_LIB_NAME = @GLAPI_LIB_NAME@ + +# Globs used to install the lib and all symlinks +GL_LIB_GLOB = @GL_LIB_GLOB@ +GLU_LIB_GLOB = @GLU_LIB_GLOB@ +GLW_LIB_GLOB = @GLW_LIB_GLOB@ +OSMESA_LIB_GLOB = @OSMESA_LIB_GLOB@ +EGL_LIB_GLOB = @EGL_LIB_GLOB@ +GLESv1_CM_LIB_GLOB = @GLESv1_CM_LIB_GLOB@ +GLESv2_LIB_GLOB = @GLESv2_LIB_GLOB@ +VG_LIB_GLOB = @VG_LIB_GLOB@ +GLAPI_LIB_GLOB = @GLAPI_LIB_GLOB@ + +# Directories to build +LIB_DIR = @LIB_DIR@ +SRC_DIRS = @SRC_DIRS@ +GLU_DIRS = @GLU_DIRS@ +DRIVER_DIRS = @DRIVER_DIRS@ +GALLIUM_DIRS = @GALLIUM_DIRS@ +GALLIUM_DRIVERS_DIRS = @GALLIUM_DRIVERS_DIRS@ +GALLIUM_WINSYS_DIRS = @GALLIUM_WINSYS_DIRS@ +GALLIUM_TARGET_DIRS = @GALLIUM_TARGET_DIRS@ +GALLIUM_STATE_TRACKERS_DIRS = @GALLIUM_STATE_TRACKERS_DIRS@ +GALLIUM_AUXILIARIES = $(TOP)/src/gallium/auxiliary/libgallium.a +GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a) + +# Driver specific build vars +DRI_DIRS = @DRI_DIRS@ +EGL_PLATFORMS = @EGL_PLATFORMS@ +EGL_CLIENT_APIS = @EGL_CLIENT_APIS@ + +# Dependencies +X11_INCLUDES = @X11_INCLUDES@ + +# GLw motif setup +GLW_SOURCES = @GLW_SOURCES@ +MOTIF_CFLAGS = @MOTIF_CFLAGS@ + +# Library/program dependencies +GL_LIB_DEPS = $(EXTRA_LIB_PATH) @GL_LIB_DEPS@ +OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @OSMESA_MESA_DEPS@ \ + $(EXTRA_LIB_PATH) @OSMESA_LIB_DEPS@ +EGL_LIB_DEPS = $(EXTRA_LIB_PATH) @EGL_LIB_DEPS@ +GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @GLU_MESA_DEPS@ \ + $(EXTRA_LIB_PATH) @GLU_LIB_DEPS@ +GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @GLW_MESA_DEPS@ \ + $(EXTRA_LIB_PATH) @GLW_LIB_DEPS@ +GLESv1_CM_LIB_DEPS = $(EXTRA_LIB_PATH) @GLESv1_CM_LIB_DEPS@ +GLESv2_LIB_DEPS = $(EXTRA_LIB_PATH) @GLESv2_LIB_DEPS@ +VG_LIB_DEPS = $(EXTRA_LIB_PATH) @VG_LIB_DEPS@ +GLAPI_LIB_DEPS = $(EXTRA_LIB_PATH) @GLAPI_LIB_DEPS@ + +# DRI dependencies +MESA_MODULES = @MESA_MODULES@ +DRI_LIB_DEPS = $(EXTRA_LIB_PATH) @DRI_LIB_DEPS@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIB = @LIBDRM_LIBS@ +DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ +GLPROTO_CFLAGS = @GLPROTO_CFLAGS@ +EXPAT_INCLUDES = @EXPAT_INCLUDES@ + +# Autoconf directories +prefix = @prefix@ +exec_prefix = @exec_prefix@ +libdir = @libdir@ +includedir = @includedir@ + +# Installation directories (for make install) +INSTALL_DIR = $(prefix) +INSTALL_LIB_DIR = $(libdir) +INSTALL_INC_DIR = $(includedir) + +# DRI installation directories +DRI_DRIVER_INSTALL_DIR = @DRI_DRIVER_INSTALL_DIR@ + +# Where libGL will look for DRI hardware drivers +DRI_DRIVER_SEARCH_DIR = @DRI_DRIVER_SEARCH_DIR@ + +# EGL driver install directory +EGL_DRIVER_INSTALL_DIR = @EGL_DRIVER_INSTALL_DIR@ + +# XVMC library install directory +XVMC_LIB_INSTALL_DIR=@XVMC_LIB_INSTALL_DIR@ + +# VDPAU library install directory +VDPAU_LIB_INSTALL_DIR=@VDPAU_LIB_INSTALL_DIR@ + +# VA library install directory +VA_LIB_INSTALL_DIR=@VA_LIB_INSTALL_DIR@ + +# Xorg driver install directory (for xorg state-tracker) +XORG_DRIVER_INSTALL_DIR = @XORG_DRIVER_INSTALL_DIR@ + +# Path to OpenCL C library libclc +LIBCLC_PATH = @LIBCLC_PATH@ + +# pkg-config substitutions +GL_PC_REQ_PRIV = @GL_PC_REQ_PRIV@ +GL_PC_LIB_PRIV = @GL_PC_LIB_PRIV@ +GL_PC_CFLAGS = @GL_PC_CFLAGS@ +DRI_PC_REQ_PRIV = @DRI_PC_REQ_PRIV@ +GLU_PC_REQ = @GLU_PC_REQ@ +GLU_PC_REQ_PRIV = @GLU_PC_REQ_PRIV@ +GLU_PC_LIB_PRIV = @GLU_PC_LIB_PRIV@ +GLU_PC_CFLAGS = @GLU_PC_CFLAGS@ +GLW_PC_REQ_PRIV = @GLW_PC_REQ_PRIV@ +GLW_PC_LIB_PRIV = @GLW_PC_LIB_PRIV@ +GLW_PC_CFLAGS = @GLW_PC_CFLAGS@ +OSMESA_PC_REQ = @OSMESA_PC_REQ@ +OSMESA_PC_LIB_PRIV = @OSMESA_PC_LIB_PRIV@ +GLESv1_CM_PC_LIB_PRIV = @GLESv1_CM_PC_LIB_PRIV@ +GLESv2_PC_LIB_PRIV = @GLESv2_PC_LIB_PRIV@ +EGL_PC_REQ_PRIV = @GL_PC_REQ_PRIV@ +EGL_PC_LIB_PRIV = @GL_PC_LIB_PRIV@ +EGL_PC_CFLAGS = @GL_PC_CFLAGS@ + +XCB_DRI2_CFLAGS = @XCB_DRI2_CFLAGS@ +XCB_DRI2_LIBS = @XCB_DRI2_LIBS@ +LIBUDEV_CFLAGS = @LIBUDEV_CFLAGS@ +LIBUDEV_LIBS = @LIBUDEV_LIBS@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ + +MESA_LLVM = @MESA_LLVM@ + +LLVM_VERSION = @LLVM_VERSION@ + +HAVE_XF86VIDMODE = @HAVE_XF86VIDMODE@ + +GALLIUM_PIPE_LOADER_DEFINES = @GALLIUM_PIPE_LOADER_DEFINES@ +GALLIUM_PIPE_LOADER_LIBS = @GALLIUM_PIPE_LOADER_LIBS@ diff --git a/mesalib/configs/default b/mesalib/configs/default index 20ba79642..734b2f62e 100644 --- a/mesalib/configs/default +++ b/mesalib/configs/default @@ -19,11 +19,9 @@ DRM_SOURCE_PATH=$(TOP)/../drm # Compiler and flags CC = cc CXX = CC -HOST_CC = $(CC) CFLAGS = -O CXXFLAGS = -O LDFLAGS = -HOST_CFLAGS = $(CFLAGS) GLU_CFLAGS = GLX_TLS = no @@ -85,9 +83,6 @@ GLESv2_LIB_GLOB = $(GLESv2_LIB_NAME)* VG_LIB_GLOB = $(VG_LIB_NAME)* GLAPI_LIB_GLOB = $(GLAPI_LIB_NAME)* -DRI_CFLAGS = $(CFLAGS) -DRI_CXXFLAGS = $(CXXFLAGS) - # Optional assembly language optimization files for libGL MESA_ASM_FILES = diff --git a/mesalib/configure.ac b/mesalib/configure.ac index d5f8cd719..b78eb1555 100644 --- a/mesalib/configure.ac +++ b/mesalib/configure.ac @@ -10,7 +10,7 @@ AC_INIT([Mesa], [8.1.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa]) AC_CONFIG_AUX_DIR([bin]) AC_CANONICAL_HOST -AM_INIT_AUTOMAKE([foreign -Wall]) +AM_INIT_AUTOMAKE([foreign]) dnl http://people.gnome.org/~walters/docs/build-api.txt dnl We don't support srcdir != builddir. @@ -453,7 +453,6 @@ AC_ARG_ENABLE([asm], [enable_asm=yes] ) asm_arch="" -ASM_FLAGS="" MESA_ASM_FILES="" GLAPI_ASM_SOURCES="" AC_MSG_CHECKING([whether to enable assembly]) @@ -502,19 +501,19 @@ if test "x$enable_asm" = xyes; then case "$asm_arch" in x86) - ASM_FLAGS="-DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM" + DEFINES="$DEFINES -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM" MESA_ASM_FILES='$(X86_FILES)' GLAPI_ASM_SOURCES='$(X86_API)' AC_MSG_RESULT([yes, x86]) ;; x86_64) - ASM_FLAGS="-DUSE_X86_64_ASM" + DEFINES="$DEFINES -DUSE_X86_64_ASM" MESA_ASM_FILES='$(X86_64_FILES)' GLAPI_ASM_SOURCES='$(X86-64_API)' AC_MSG_RESULT([yes, x86_64]) ;; sparc) - ASM_FLAGS="-DUSE_SPARC_ASM" + DEFINES="$DEFINES -DUSE_SPARC_ASM" MESA_ASM_FILES='$(SPARC_FILES)' GLAPI_ASM_SOURCES='$(SPARC_API)' AC_MSG_RESULT([yes, sparc]) @@ -524,7 +523,6 @@ if test "x$enable_asm" = xyes; then ;; esac fi -AC_SUBST([ASM_FLAGS]) AC_SUBST([MESA_ASM_FILES]) AC_SUBST([GLAPI_ASM_SOURCES]) @@ -881,12 +879,7 @@ if test "x$enable_dri" = xyes; then fi if test "x$enable_osmesa" = xyes; then - # the empty space matters for osmesa... (see src/mesa/Makefile) - if test -n "$DRIVER_DIRS"; then - DRIVER_DIRS="$DRIVER_DIRS osmesa" - else - DRIVER_DIRS="osmesa" - fi + DRIVER_DIRS="$DRIVER_DIRS osmesa" fi AC_SUBST([SRC_DIRS]) @@ -1092,25 +1085,15 @@ AC_SUBST([GLAPI_LIB_DEPS]) dnl Setup default DRI CFLAGS -DRI_CFLAGS='$(CFLAGS)' -DRI_CXXFLAGS='$(CXXFLAGS)' DRI_LIB_DEPS='$(TOP)/src/mesa/libmesa.a' MESA_MODULES='$(TOP)/src/mesa/libmesa.a' if test "x$enable_dri" = xyes && test "x$driglx_direct" = xyes ; then - DRICORE_LIBS='$(TOP)/$(LIB_DIR)/libdricore.so' - DRICORE_LIB_DEPS='-L$(TOP)/$(LIB_DIR) -Wl,-R$(DRI_DRIVER_INSTALL_DIR)' - DRI_LIB_DEPS='-L$(TOP)/$(LIB_DIR) -Wl,-R$(DRI_DRIVER_INSTALL_DIR) -ldricore' - DRI_CFLAGS='$(CFLAGS_NOVISIBILITY) -DUSE_DRICORE' - DRI_CXXFLAGS='$(CXXFLAGS_NOVISIBILITY) -DUSE_DRICORE' - MESA_MODULES='$(DRICORE_LIBS)' + DRI_LIB_DEPS="-L\$(TOP)/\$(LIB_DIR) -ldricore$VERSION" + MESA_MODULES="\$(TOP)/\$(LIB_DIR)/libdricore$VERSION.so" HAVE_DRICORE=yes fi AM_CONDITIONAL(HAVE_DRICORE, test x$HAVE_DRICORE = xyes) -AC_SUBST([DRICORE_LIBS]) -AC_SUBST([DRICORE_LIB_DEPS]) -AC_SUBST([DRI_CXXFLAGS]) -AC_SUBST([DRI_CFLAGS]) AC_SUBST([MESA_MODULES]) AC_SUBST([HAVE_XF86VIDMODE]) @@ -2128,9 +2111,9 @@ AM_CONDITIONAL(HAVE_X11_DRIVER, echo "$DRIVER_DIRS" | grep 'x11' >/dev/null 2>&1 AM_CONDITIONAL(HAVE_DRI_DRIVER, echo "$DRIVER_DIRS" | grep 'dri' >/dev/null 2>&1) AM_CONDITIONAL(HAVE_OSMESA_DRIVER, echo "$DRIVER_DIRS" | grep 'osmesa' >/dev/null 2>&1) -AM_CONDITIONAL(HAVE_X86_ASM, echo "$ASM_FLAGS" | grep 'X86_ASM' >/dev/null 2>&1) -AM_CONDITIONAL(HAVE_X86_64_ASM, echo "$ASM_FLAGS" | grep 'X86_64_ASM' >/dev/null 2>&1) -AM_CONDITIONAL(HAVE_SPARC_ASM, echo "$ASM_FLAGS" | grep 'SPARC_ASM' >/dev/null 2>&1) +AM_CONDITIONAL(HAVE_X86_ASM, echo "$DEFINES" | grep 'X86_ASM' >/dev/null 2>&1) +AM_CONDITIONAL(HAVE_X86_64_ASM, echo "$DEFINES" | grep 'X86_64_ASM' >/dev/null 2>&1) +AM_CONDITIONAL(HAVE_SPARC_ASM, echo "$DEFINES" | grep 'SPARC_ASM' >/dev/null 2>&1) dnl prepend CORE_DIRS to SRC_DIRS SRC_DIRS="$CORE_DIRS $SRC_DIRS" @@ -2144,9 +2127,10 @@ CFLAGS="$CFLAGS $USER_CFLAGS" CXXFLAGS="$CXXFLAGS $USER_CXXFLAGS" dnl Substitute the config -AC_CONFIG_FILES([configs/autoconf +AC_CONFIG_FILES([configs/current Makefile src/Makefile + src/gallium/Makefile src/gallium/auxiliary/pipe-loader/Makefile src/gallium/state_trackers/clover/Makefile src/gallium/drivers/Makefile @@ -2158,6 +2142,7 @@ AC_CONFIG_FILES([configs/autoconf src/egl/drivers/Makefile src/egl/drivers/dri2/Makefile src/egl/drivers/glx/Makefile + src/egl/Makefile src/egl/main/Makefile src/egl/main/egl.pc src/egl/wayland/Makefile @@ -2167,11 +2152,16 @@ AC_CONFIG_FILES([configs/autoconf src/glsl/tests/Makefile src/glx/Makefile src/glx/tests/Makefile + src/mapi/glapi/gen/Makefile src/mapi/shared-glapi/Makefile src/mapi/glapi/tests/Makefile src/gtest/Makefile + src/mesa/Makefile src/mesa/libdricore/Makefile src/mesa/main/tests/Makefile + src/mesa/x86/Makefile + src/mesa/x86-64/Makefile + src/mesa/drivers/Makefile src/mesa/drivers/dri/dri.pc src/mesa/drivers/dri/Makefile src/mesa/drivers/dri/common/Makefile @@ -2180,15 +2170,10 @@ AC_CONFIG_FILES([configs/autoconf src/mesa/drivers/dri/nouveau/Makefile src/mesa/drivers/dri/r200/Makefile src/mesa/drivers/dri/radeon/Makefile - src/mesa/drivers/dri/swrast/Makefile]) - -dnl Replace the configs/current symlink -AC_CONFIG_COMMANDS([configs],[ -if test -f configs/current || test -L configs/current; then - rm -f configs/current -fi -ln -s autoconf configs/current -]) + src/mesa/drivers/dri/swrast/Makefile + src/mesa/drivers/x11/Makefile + src/mesa/gl.pc + src/mesa/osmesa.pc]) dnl Sort the dirs alphabetically GALLIUM_TARGET_DIRS=`echo $GALLIUM_TARGET_DIRS|tr " " "\n"|sort -u|tr "\n" " "` @@ -2302,7 +2287,7 @@ cflags=`echo $CFLAGS $OPT_FLAGS $PIC_FLAGS $ARCH_FLAGS | \ $SED 's/^ *//;s/ */ /;s/ *$//'` cxxflags=`echo $CXXFLAGS $OPT_FLAGS $PIC_FLAGS $ARCH_FLAGS | \ $SED 's/^ *//;s/ */ /;s/ *$//'` -defines=`echo $DEFINES $ASM_FLAGS | $SED 's/^ *//;s/ */ /;s/ *$//'` +defines=`echo $DEFINES | $SED 's/^ *//;s/ */ /;s/ *$//'` echo "" echo " CFLAGS: $cflags" echo " CXXFLAGS: $cxxflags" diff --git a/mesalib/src/gallium/.gitignore b/mesalib/src/gallium/.gitignore new file mode 100644 index 000000000..5fc607b9e --- /dev/null +++ b/mesalib/src/gallium/.gitignore @@ -0,0 +1 @@ +/Makefile diff --git a/mesalib/src/gallium/Makefile b/mesalib/src/gallium/Makefile deleted file mode 100644 index 79ca767f7..000000000 --- a/mesalib/src/gallium/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# src/gallium/Makefile -TOP = ../.. -include $(TOP)/configs/current - -SUBDIRS = $(GALLIUM_DIRS) - -default install clean: - @for dir in $(SUBDIRS) ; do \ - if [ -d $$dir ] ; then \ - (cd $$dir && $(MAKE) $@) || exit 1; \ - fi \ - done diff --git a/mesalib/src/gallium/Makefile.am b/mesalib/src/gallium/Makefile.am new file mode 100644 index 000000000..e7cff8920 --- /dev/null +++ b/mesalib/src/gallium/Makefile.am @@ -0,0 +1,22 @@ +# Copyright © 2012 Intel Corporation +# +# 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. + +SUBDIRS = $(GALLIUM_DIRS) diff --git a/mesalib/src/mapi/glapi/gen/.gitignore b/mesalib/src/mapi/glapi/gen/.gitignore new file mode 100644 index 000000000..5fc607b9e --- /dev/null +++ b/mesalib/src/mapi/glapi/gen/.gitignore @@ -0,0 +1 @@ +/Makefile diff --git a/mesalib/src/mapi/glapi/gen/ARB_uniform_buffer_object.xml b/mesalib/src/mapi/glapi/gen/ARB_uniform_buffer_object.xml new file mode 100644 index 000000000..cbcd339e7 --- /dev/null +++ b/mesalib/src/mapi/glapi/gen/ARB_uniform_buffer_object.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mesalib/src/mapi/glapi/gen/Makefile b/mesalib/src/mapi/glapi/gen/Makefile deleted file mode 100644 index 0ac798957..000000000 --- a/mesalib/src/mapi/glapi/gen/Makefile +++ /dev/null @@ -1,241 +0,0 @@ -# This file isn't used during a normal compilation since we don't want to -# require Python in order to compile Mesa. -# Instead, when the Mesa developers update/change the API interface it's -# up to him/her to re-run this makefile and check in the newly generated files. - - -TOP = ../../../.. -include $(TOP)/configs/current - -MESA_DIR = $(TOP)/src/mesa -MESA_GLAPI_DIR = $(TOP)/src/mapi/glapi -MESA_MAPI_DIR = $(TOP)/src/mapi/mapi -MESA_GLX_DIR = $(TOP)/src/glx - -MESA_GLAPI_OUTPUTS = \ - $(MESA_GLAPI_DIR)/glapi_mapi_tmp.h \ - $(MESA_GLAPI_DIR)/glprocs.h \ - $(MESA_GLAPI_DIR)/glapitemp.h \ - $(MESA_GLAPI_DIR)/glapitable.h \ - $(MESA_GLAPI_DIR)/glapi_gentable.c - -MESA_GLAPI_ASM_OUTPUTS = \ - $(MESA_GLAPI_DIR)/glapi_x86.S \ - $(MESA_GLAPI_DIR)/glapi_x86-64.S \ - $(MESA_GLAPI_DIR)/glapi_sparc.S - -MESA_OUTPUTS = \ - $(MESA_GLAPI_OUTPUTS) \ - $(MESA_GLAPI_ASM_OUTPUTS) \ - $(MESA_DIR)/main/enums.c \ - $(MESA_DIR)/main/dispatch.h \ - $(MESA_DIR)/main/remap_helper.h \ - $(MESA_GLX_DIR)/indirect.c \ - $(MESA_GLX_DIR)/indirect.h \ - $(MESA_GLX_DIR)/indirect_init.c \ - $(MESA_GLX_DIR)/indirect_size.h \ - $(MESA_GLX_DIR)/indirect_size.c - -###################################################################### - -XORG_GLX_DIR = $(XORG_BASE)/glx -XORG_GLAPI_DIR = $(XORG_BASE)/glx - -XORG_GLAPI_OUTPUTS = \ - $(XORG_GLAPI_DIR)/glprocs.h \ - $(XORG_GLAPI_DIR)/glapitable.h \ - $(XORG_GLAPI_DIR)/dispatch.h \ - $(XORG_GLAPI_DIR)/glapi_gentable.c - -XORG_OUTPUTS = \ - $(XORG_GLAPI_OUTPUTS) \ - $(XORG_GLX_DIR)/indirect_dispatch.c \ - $(XORG_GLX_DIR)/indirect_dispatch_swap.c \ - $(XORG_GLX_DIR)/indirect_dispatch.h \ - $(XORG_GLX_DIR)/indirect_reqsize.c \ - $(XORG_GLX_DIR)/indirect_reqsize.h \ - $(XORG_GLX_DIR)/indirect_size.h \ - $(XORG_GLX_DIR)/indirect_size_get.c \ - $(XORG_GLX_DIR)/indirect_size_get.h \ - $(XORG_GLX_DIR)/indirect_table.c - -###################################################################### - -API_XML = \ - gl_API.xml \ - ARB_base_instance.xml \ - ARB_color_buffer_float.xml \ - ARB_copy_buffer.xml \ - ARB_debug_output.xml \ - ARB_depth_buffer_float.xml \ - ARB_depth_clamp.xml \ - ARB_draw_buffers_blend.xml \ - ARB_draw_elements_base_vertex.xml \ - ARB_draw_instanced.xml \ - ARB_ES2_compatibility.xml \ - ARB_framebuffer_object.xml \ - ARB_geometry_shader4.xml \ - ARB_instanced_arrays.xml \ - ARB_map_buffer_range.xml \ - ARB_robustness.xml \ - ARB_sampler_objects.xml \ - ARB_seamless_cube_map.xml \ - ARB_sync.xml \ - ARB_texture_buffer_object.xml \ - ARB_texture_compression_rgtc.xml \ - ARB_texture_float.xml \ - ARB_texture_rg.xml \ - ARB_texture_storage.xml \ - ARB_vertex_array_object.xml \ - AMD_draw_buffers_blend.xml \ - ARB_vertex_type_2_10_10_10_rev.xml \ - APPLE_object_purgeable.xml \ - APPLE_vertex_array_object.xml \ - EXT_draw_buffers2.xml \ - EXT_framebuffer_object.xml \ - EXT_gpu_shader4.xml \ - EXT_packed_depth_stencil.xml \ - EXT_provoking_vertex.xml \ - EXT_separate_shader_objects.xml \ - EXT_texture_array.xml \ - EXT_texture_integer.xml \ - EXT_transform_feedback.xml \ - NV_conditional_render.xml \ - NV_primitive_restart.xml \ - NV_texture_barrier.xml \ - OES_EGL_image.xml \ - GL3x.xml - - -COMMON = $(API_XML) gl_XML.py glX_XML.py license.py typeexpr.py - -COMMON_ES = \ - $(COMMON) \ - gl_and_es_API.xml \ - es_EXT.xml \ - ARB_ES2_compatibility.xml \ - ARB_get_program_binary.xml \ - OES_fixed_point.xml \ - OES_single_precision.xml - -COMMON_GLX = $(COMMON) glX_API.xml glX_XML.py glX_proto_common.py - -###################################################################### - -default: mesa -install: mesa - -mesa: $(MESA_OUTPUTS) - -xorg: check-xorg-source $(XORG_OUTPUTS) - -check-xorg-source: - @if ! test -d $(XORG_GLX_DIR); then \ - echo "ERROR: Must specify path to xserver/ checkout. Set XORG_BASE env var."; \ - if test x$(XORG_BASE) != x; then \ - echo "'$(XORG_GLX_DIR)' does not exist."; \ - fi; \ - exit 1; \ - fi - -clean: - -rm -f *~ *.pyo - -rm -f $(MESA_OUTPUTS) - -###################################################################### - -$(XORG_GLAPI_DIR)/%.c: $(MESA_GLAPI_DIR)/%.c - cp $< $@ - -$(XORG_GLAPI_DIR)/dispatch.h: $(MESA_DIR)/main/dispatch.h - cp $< $@ - -$(XORG_GLAPI_DIR)/%.h: $(MESA_GLAPI_DIR)/%.h - cp $< $@ - -###################################################################### - -$(MESA_GLAPI_DIR)/glapi_mapi_tmp.h: $(MESA_MAPI_DIR)/mapi_abi.py $(COMMON_ES) - $(PYTHON2) $(PYTHON_FLAGS) $< \ - --printer glapi --mode lib gl_and_es_API.xml > $@ - -$(MESA_GLAPI_DIR)/glprocs.h: gl_procs.py $(COMMON) - $(PYTHON2) $(PYTHON_FLAGS) $< > $@ - -$(MESA_GLAPI_DIR)/glapitemp.h: gl_apitemp.py $(COMMON) - $(PYTHON2) $(PYTHON_FLAGS) $< > $@ - -$(MESA_GLAPI_DIR)/glapitable.h: gl_table.py $(COMMON) - $(PYTHON2) $(PYTHON_FLAGS) $< > $@ - -$(MESA_GLAPI_DIR)/glapi_gentable.c: gl_gentable.py $(COMMON) - $(PYTHON2) $(PYTHON_FLAGS) $< > $@ - -###################################################################### - -$(MESA_GLAPI_DIR)/glapi_x86.S: gl_x86_asm.py $(COMMON) - $(PYTHON2) $(PYTHON_FLAGS) $< > $@ - -$(MESA_GLAPI_DIR)/glapi_x86-64.S: gl_x86-64_asm.py $(COMMON) - $(PYTHON2) $(PYTHON_FLAGS) $< > $@ - -$(MESA_GLAPI_DIR)/glapi_sparc.S: gl_SPARC_asm.py $(COMMON) - $(PYTHON2) $(PYTHON_FLAGS) $< > $@ - -###################################################################### - -$(MESA_DIR)/main/enums.c: gl_enums.py $(COMMON_ES) - $(PYTHON2) $(PYTHON_FLAGS) $< -f gl_and_es_API.xml > $@ - -$(MESA_DIR)/main/dispatch.h: gl_table.py $(COMMON) - $(PYTHON2) $(PYTHON_FLAGS) $< -m remap_table > $@ - -$(MESA_DIR)/main/remap_helper.h: remap_helper.py $(COMMON) - $(PYTHON2) $(PYTHON_FLAGS) $< > $@ - -###################################################################### - -$(MESA_GLX_DIR)/indirect.c: glX_proto_send.py $(COMMON_GLX) - $(PYTHON2) $(PYTHON_FLAGS) $< -m proto | $(INDENT) $(INDENT_FLAGS) > $@ - -$(MESA_GLX_DIR)/indirect.h: glX_proto_send.py $(COMMON_GLX) - $(PYTHON2) $(PYTHON_FLAGS) $< -m init_h > $@ - -$(MESA_GLX_DIR)/indirect_init.c: glX_proto_send.py $(COMMON_GLX) - $(PYTHON2) $(PYTHON_FLAGS) $< -m init_c > $@ - -$(MESA_GLX_DIR)/indirect_size.h $(XORG_GLX_DIR)/indirect_size.h: glX_proto_size.py $(COMMON_GLX) - $(PYTHON2) $(PYTHON_FLAGS) $< -m size_h --only-set -h _INDIRECT_SIZE_H_ \ - | $(INDENT) $(INDENT_FLAGS) > $@ - -$(MESA_GLX_DIR)/indirect_size.c: glX_proto_size.py $(COMMON_GLX) - $(PYTHON2) $(PYTHON_FLAGS) $< -m size_c --only-set \ - | $(INDENT) $(INDENT_FLAGS) > $@ - -###################################################################### - -$(XORG_GLX_DIR)/indirect_dispatch.c: glX_proto_recv.py $(COMMON_GLX) - $(PYTHON2) $(PYTHON_FLAGS) $< -m dispatch_c > $@ - -$(XORG_GLX_DIR)/indirect_dispatch_swap.c: glX_proto_recv.py $(COMMON_GLX) - $(PYTHON2) $(PYTHON_FLAGS) $< -m dispatch_c -s > $@ - -$(XORG_GLX_DIR)/indirect_dispatch.h: glX_proto_recv.py gl_and_glX_API.xml $(COMMON_GLX) - $(PYTHON2) $(PYTHON_FLAGS) $< -m dispatch_h -f gl_and_glX_API.xml -s > $@ - -$(XORG_GLX_DIR)/indirect_size_get.h: glX_proto_size.py $(COMMON_GLX) - $(PYTHON2) $(PYTHON_FLAGS) $< -m size_h --only-get -h '_INDIRECT_SIZE_GET_H_' \ - | $(INDENT) $(INDENT_FLAGS) > $@ - -$(XORG_GLX_DIR)/indirect_size_get.c: glX_proto_size.py $(COMMON_GLX) - $(PYTHON2) $(PYTHON_FLAGS) $< -m size_c | $(INDENT) $(INDENT_FLAGS) > $@ - -$(XORG_GLX_DIR)/indirect_reqsize.h: glX_proto_size.py $(COMMON_GLX) - $(PYTHON2) $(PYTHON_FLAGS) $< -m reqsize_h --only-get -h '_INDIRECT_SIZE_GET_H_' \ - | $(INDENT) $(INDENT_FLAGS) -l200 > $@ - -$(XORG_GLX_DIR)/indirect_reqsize.c: glX_proto_size.py $(COMMON_GLX) - $(PYTHON2) $(PYTHON_FLAGS) $< -m reqsize_c | $(INDENT) $(INDENT_FLAGS) > $@ - -$(XORG_GLX_DIR)/indirect_table.c: glX_server_table.py gl_and_glX_API.xml $(COMMON_GLX) - $(PYTHON2) $(PYTHON_FLAGS) $< -f gl_and_glX_API.xml > $@ diff --git a/mesalib/src/mapi/glapi/gen/Makefile.am b/mesalib/src/mapi/glapi/gen/Makefile.am new file mode 100644 index 000000000..d0d0a7ba0 --- /dev/null +++ b/mesalib/src/mapi/glapi/gen/Makefile.am @@ -0,0 +1,240 @@ +# This file isn't used during a normal compilation since we don't want to +# require Python in order to compile Mesa. +# Instead, when the Mesa developers update/change the API interface it's +# up to him/her to re-run this makefile and check in the newly generated files. + + +TOP = ../../../.. + +MESA_DIR = $(TOP)/src/mesa +MESA_GLAPI_DIR = $(TOP)/src/mapi/glapi +MESA_MAPI_DIR = $(TOP)/src/mapi/mapi +MESA_GLX_DIR = $(TOP)/src/glx + +MESA_GLAPI_OUTPUTS = \ + $(MESA_GLAPI_DIR)/glapi_mapi_tmp.h \ + $(MESA_GLAPI_DIR)/glprocs.h \ + $(MESA_GLAPI_DIR)/glapitemp.h \ + $(MESA_GLAPI_DIR)/glapitable.h \ + $(MESA_GLAPI_DIR)/glapi_gentable.c + +MESA_GLAPI_ASM_OUTPUTS = \ + $(MESA_GLAPI_DIR)/glapi_x86.S \ + $(MESA_GLAPI_DIR)/glapi_x86-64.S \ + $(MESA_GLAPI_DIR)/glapi_sparc.S + +MESA_OUTPUTS = \ + $(MESA_GLAPI_OUTPUTS) \ + $(MESA_GLAPI_ASM_OUTPUTS) \ + $(MESA_DIR)/main/enums.c \ + $(MESA_DIR)/main/dispatch.h \ + $(MESA_DIR)/main/remap_helper.h \ + $(MESA_GLX_DIR)/indirect.c \ + $(MESA_GLX_DIR)/indirect.h \ + $(MESA_GLX_DIR)/indirect_init.c \ + $(MESA_GLX_DIR)/indirect_size.h \ + $(MESA_GLX_DIR)/indirect_size.c + +###################################################################### + +XORG_GLX_DIR = $(XORG_BASE)/glx +XORG_GLAPI_DIR = $(XORG_BASE)/glx + +XORG_GLAPI_OUTPUTS = \ + $(XORG_GLAPI_DIR)/glprocs.h \ + $(XORG_GLAPI_DIR)/glapitable.h \ + $(XORG_GLAPI_DIR)/dispatch.h \ + $(XORG_GLAPI_DIR)/glapi_gentable.c + +XORG_OUTPUTS = \ + $(XORG_GLAPI_OUTPUTS) \ + $(XORG_GLX_DIR)/indirect_dispatch.c \ + $(XORG_GLX_DIR)/indirect_dispatch_swap.c \ + $(XORG_GLX_DIR)/indirect_dispatch.h \ + $(XORG_GLX_DIR)/indirect_reqsize.c \ + $(XORG_GLX_DIR)/indirect_reqsize.h \ + $(XORG_GLX_DIR)/indirect_size.h \ + $(XORG_GLX_DIR)/indirect_size_get.c \ + $(XORG_GLX_DIR)/indirect_size_get.h \ + $(XORG_GLX_DIR)/indirect_table.c + +###################################################################### + +API_XML = \ + gl_API.xml \ + ARB_base_instance.xml \ + ARB_color_buffer_float.xml \ + ARB_copy_buffer.xml \ + ARB_debug_output.xml \ + ARB_depth_buffer_float.xml \ + ARB_depth_clamp.xml \ + ARB_draw_buffers_blend.xml \ + ARB_draw_elements_base_vertex.xml \ + ARB_draw_instanced.xml \ + ARB_ES2_compatibility.xml \ + ARB_framebuffer_object.xml \ + ARB_geometry_shader4.xml \ + ARB_instanced_arrays.xml \ + ARB_map_buffer_range.xml \ + ARB_robustness.xml \ + ARB_sampler_objects.xml \ + ARB_seamless_cube_map.xml \ + ARB_sync.xml \ + ARB_texture_buffer_object.xml \ + ARB_texture_compression_rgtc.xml \ + ARB_texture_float.xml \ + ARB_texture_rg.xml \ + ARB_texture_storage.xml \ + ARB_vertex_array_object.xml \ + AMD_draw_buffers_blend.xml \ + ARB_vertex_type_2_10_10_10_rev.xml \ + APPLE_object_purgeable.xml \ + APPLE_vertex_array_object.xml \ + ARB_uniform_buffer_object.xml \ + EXT_draw_buffers2.xml \ + EXT_framebuffer_object.xml \ + EXT_gpu_shader4.xml \ + EXT_packed_depth_stencil.xml \ + EXT_provoking_vertex.xml \ + EXT_separate_shader_objects.xml \ + EXT_texture_array.xml \ + EXT_texture_integer.xml \ + EXT_transform_feedback.xml \ + NV_conditional_render.xml \ + NV_primitive_restart.xml \ + NV_texture_barrier.xml \ + OES_EGL_image.xml \ + GL3x.xml + + +COMMON = $(API_XML) gl_XML.py glX_XML.py license.py typeexpr.py + +COMMON_ES = \ + $(COMMON) \ + gl_and_es_API.xml \ + es_EXT.xml \ + ARB_ES2_compatibility.xml \ + ARB_get_program_binary.xml \ + OES_fixed_point.xml \ + OES_single_precision.xml + +COMMON_GLX = $(COMMON) glX_API.xml glX_XML.py glX_proto_common.py + +PYTHON_GEN = $(AM_V_GEN) $(PYTHON2) $(PYTHON_FLAGS) + +###################################################################### + +all-local: $(MESA_OUTPUTS) + +xorg: check-xorg-source $(XORG_OUTPUTS) + +check-xorg-source: + @if ! test -d $(XORG_GLX_DIR); then \ + echo "ERROR: Must specify path to xserver/ checkout. Set XORG_BASE env var."; \ + if test x$(XORG_BASE) != x; then \ + echo "'$(XORG_GLX_DIR)' does not exist."; \ + fi; \ + exit 1; \ + fi + +clean-local: + -rm -f *~ *.pyo + -rm -f $(MESA_OUTPUTS) + +###################################################################### + +$(XORG_GLAPI_DIR)/%.c: $(MESA_GLAPI_DIR)/%.c + cp $< $@ + +$(XORG_GLAPI_DIR)/dispatch.h: $(MESA_DIR)/main/dispatch.h + cp $< $@ + +$(XORG_GLAPI_DIR)/%.h: $(MESA_GLAPI_DIR)/%.h + cp $< $@ + +###################################################################### + +$(MESA_GLAPI_DIR)/glapi_mapi_tmp.h: $(MESA_MAPI_DIR)/mapi_abi.py $(COMMON_ES) + $(PYTHON_GEN) $< \ + --printer glapi --mode lib gl_and_es_API.xml > $@ + +$(MESA_GLAPI_DIR)/glprocs.h: gl_procs.py $(COMMON) + $(PYTHON_GEN) $< > $@ + +$(MESA_GLAPI_DIR)/glapitemp.h: gl_apitemp.py $(COMMON) + $(PYTHON_GEN) $< > $@ + +$(MESA_GLAPI_DIR)/glapitable.h: gl_table.py $(COMMON) + $(PYTHON_GEN) $< > $@ + +$(MESA_GLAPI_DIR)/glapi_gentable.c: gl_gentable.py $(COMMON) + $(PYTHON_GEN) $< > $@ + +###################################################################### + +$(MESA_GLAPI_DIR)/glapi_x86.S: gl_x86_asm.py $(COMMON) + $(PYTHON_GEN) $< > $@ + +$(MESA_GLAPI_DIR)/glapi_x86-64.S: gl_x86-64_asm.py $(COMMON) + $(PYTHON_GEN) $< > $@ + +$(MESA_GLAPI_DIR)/glapi_sparc.S: gl_SPARC_asm.py $(COMMON) + $(PYTHON_GEN) $< > $@ + +###################################################################### + +$(MESA_DIR)/main/enums.c: gl_enums.py $(COMMON_ES) + $(PYTHON_GEN) $< -f gl_and_es_API.xml > $@ + +$(MESA_DIR)/main/dispatch.h: gl_table.py $(COMMON) + $(PYTHON_GEN) $< -m remap_table > $@ + +$(MESA_DIR)/main/remap_helper.h: remap_helper.py $(COMMON) + $(PYTHON_GEN) $< > $@ + +###################################################################### + +$(MESA_GLX_DIR)/indirect.c: glX_proto_send.py $(COMMON_GLX) + $(PYTHON_GEN) $< -m proto | $(INDENT) $(INDENT_FLAGS) > $@ + +$(MESA_GLX_DIR)/indirect.h: glX_proto_send.py $(COMMON_GLX) + $(PYTHON_GEN) $< -m init_h > $@ + +$(MESA_GLX_DIR)/indirect_init.c: glX_proto_send.py $(COMMON_GLX) + $(PYTHON_GEN) $< -m init_c > $@ + +$(MESA_GLX_DIR)/indirect_size.h $(XORG_GLX_DIR)/indirect_size.h: glX_proto_size.py $(COMMON_GLX) + $(PYTHON_GEN) $< -m size_h --only-set -h _INDIRECT_SIZE_H_ \ + | $(INDENT) $(INDENT_FLAGS) > $@ + +$(MESA_GLX_DIR)/indirect_size.c: glX_proto_size.py $(COMMON_GLX) + $(PYTHON_GEN) $< -m size_c --only-set \ + | $(INDENT) $(INDENT_FLAGS) > $@ + +###################################################################### + +$(XORG_GLX_DIR)/indirect_dispatch.c: glX_proto_recv.py $(COMMON_GLX) + $(PYTHON_GEN) $< -m dispatch_c > $@ + +$(XORG_GLX_DIR)/indirect_dispatch_swap.c: glX_proto_recv.py $(COMMON_GLX) + $(PYTHON_GEN) $< -m dispatch_c -s > $@ + +$(XORG_GLX_DIR)/indirect_dispatch.h: glX_proto_recv.py gl_and_glX_API.xml $(COMMON_GLX) + $(PYTHON_GEN) $< -m dispatch_h -f gl_and_glX_API.xml -s > $@ + +$(XORG_GLX_DIR)/indirect_size_get.h: glX_proto_size.py $(COMMON_GLX) + $(PYTHON_GEN) $< -m size_h --only-get -h '_INDIRECT_SIZE_GET_H_' \ + | $(INDENT) $(INDENT_FLAGS) > $@ + +$(XORG_GLX_DIR)/indirect_size_get.c: glX_proto_size.py $(COMMON_GLX) + $(PYTHON_GEN) $< -m size_c | $(INDENT) $(INDENT_FLAGS) > $@ + +$(XORG_GLX_DIR)/indirect_reqsize.h: glX_proto_size.py $(COMMON_GLX) + $(PYTHON_GEN) $< -m reqsize_h --only-get -h '_INDIRECT_SIZE_GET_H_' \ + | $(INDENT) $(INDENT_FLAGS) -l200 > $@ + +$(XORG_GLX_DIR)/indirect_reqsize.c: glX_proto_size.py $(COMMON_GLX) + $(PYTHON_GEN) $< -m reqsize_c | $(INDENT) $(INDENT_FLAGS) > $@ + +$(XORG_GLX_DIR)/indirect_table.c: glX_server_table.py gl_and_glX_API.xml $(COMMON_GLX) + $(PYTHON_GEN) $< -f gl_and_glX_API.xml > $@ diff --git a/mesalib/src/mapi/glapi/gen/gl_API.xml b/mesalib/src/mapi/glapi/gen/gl_API.xml index c96b2a00f..af0513556 100644 --- a/mesalib/src/mapi/glapi/gen/gl_API.xml +++ b/mesalib/src/mapi/glapi/gen/gl_API.xml @@ -7927,7 +7927,9 @@ - + + + diff --git a/mesalib/src/mesa/.gitignore b/mesalib/src/mesa/.gitignore index ce83eaf47..5fc607b9e 100644 --- a/mesalib/src/mesa/.gitignore +++ b/mesalib/src/mesa/.gitignore @@ -1,5 +1 @@ -*/gen_matypes -*/matypes.h -depend.es* -depend.es* -objs-es* +/Makefile diff --git a/mesalib/src/mesa/Makefile b/mesalib/src/mesa/Makefile deleted file mode 100644 index b0b461fdd..000000000 --- a/mesalib/src/mesa/Makefile +++ /dev/null @@ -1,238 +0,0 @@ -# src/mesa/Makefile - -TOP = ../.. -include $(TOP)/configs/current - -MESA_LIBS := libmesa.a libmesagallium.a -DEPENDS := depend - -SRCDIR = . -include sources.mak - -# define preprocessor flags -MESA_CPPFLAGS := $(API_DEFINES) $(DEFINES) - -# append include dirs -MESA_CPPFLAGS += $(INCLUDE_DIRS) - -# tidy compiler flags -CFLAGS := $(filter-out $(DEFINES), $(CFLAGS)) -CXXFLAGS := $(filter-out $(DEFINES), $(CXXFLAGS)) - -# LLVM is needed for the state tracker -MESA_CFLAGS := $(LLVM_CFLAGS) $(CFLAGS) -MESA_CXXFLAGS := $(LLVM_CFLAGS) $(CXXFLAGS) - -%.o: %.c - $(CC) -c -o $@ $< $(MESA_CPPFLAGS) $(MESA_CFLAGS) - -%.o: %.cpp - $(CXX) -c -o $@ $< $(MESA_CPPFLAGS) $(MESA_CXXFLAGS) - -%.o: %.S - $(CC) -c -o $@ $< $(MESA_CPPFLAGS) $(MESA_CFLAGS) - -# Default: build dependencies, then asm_subdirs, GLSL built-in lib, -# then convenience libs (.a) and finally the device drivers: -default: $(DEPENDS) asm_subdirs $(MESA_LIBS) driver_subdirs - -.PHONY: main/git_sha1.h.tmp -main/git_sha1.h.tmp: - @touch main/git_sha1.h.tmp - @if test -d ../../.git; then \ - if which git > /dev/null; then \ - git log -n 1 --oneline | \ - sed 's/^\([^ ]*\) .*/#define MESA_GIT_SHA1 "git-\1"/' \ - > main/git_sha1.h.tmp ; \ - fi \ - fi - -main/git_sha1.h: main/git_sha1.h.tmp - @echo "updating main/git_sha1.h" - @if ! cmp -s main/git_sha1.h.tmp main/git_sha1.h; then \ - mv main/git_sha1.h.tmp main/git_sha1.h ;\ - fi - -# include glapi_gen.mk for generating glapi headers for GLES -GLAPI := $(TOP)/src/mapi/glapi/gen -include $(GLAPI)/glapi_gen.mk - -BUILT_SOURCES = \ - main/api_exec_es1_dispatch.h \ - main/api_exec_es1_remap_helper.h \ - main/api_exec_es2_dispatch.h \ - main/api_exec_es2_remap_helper.h \ - main/api_exec_es1.c \ - main/api_exec_es2.c \ - program/program_parse.tab.c \ - program/program_parse.tab.h \ - program/lex.yy.c - -main/api_exec_es1_dispatch.h: $(GLAPI)/gl_and_es_API.xml $(glapi_gen_dispatch_deps) - $(call glapi_gen_dispatch,$<,es1) - -main/api_exec_es1_remap_helper.h: $(GLAPI)/gl_and_es_API.xml $(glapi_gen_remap_deps) - $(call glapi_gen_remap,$<,es1) - -main/api_exec_es1.o: main/api_exec_es1_dispatch.h main/api_exec_es1_remap_helper.h - -main/api_exec_es2_dispatch.h: $(GLAPI)/gl_and_es_API.xml $(glapi_gen_dispatch_deps) - $(call glapi_gen_dispatch,$<,es2) - -main/api_exec_es2_remap_helper.h: $(GLAPI)/gl_and_es_API.xml $(glapi_gen_remap_deps) - $(call glapi_gen_remap,$<,es2) - -main/api_exec_es2.o: main/api_exec_es2_dispatch.h main/api_exec_es2_remap_helper.h - -main/api_exec_es1.c: main/APIspec.xml main/es_generator.py main/APIspecutil.py main/APIspec.py - $(PYTHON2) $(PYTHON_FLAGS) main/es_generator.py -S main/APIspec.xml -V GLES1.1 > $@ - -main/api_exec_es2.c: main/APIspec.xml main/es_generator.py main/APIspecutil.py main/APIspec.py - $(PYTHON2) $(PYTHON_FLAGS) main/es_generator.py -S main/APIspec.xml -V GLES2.0 > $@ - -program/program_parse.tab.c program/program_parse.tab.h: program/program_parse.y - $(BISON) -v -d --output=program/program_parse.tab.c $< - -program/lex.yy.c: program/program_lexer.l - $(FLEX) --never-interactive --outfile=$@ $< - -ifneq (,$(DRICORE_LIBS)) -DRICORE_TARGET = dricore -DRICORE_INSTALL_TARGET = install-dricore -endif - -###################################################################### -# Helper libraries used by many drivers: - -# Make archive of core mesa object files -libmesa.a: $(MESA_OBJECTS) $(GLSL_LIBS) - @ $(MKLIB) -o mesa -static $(MESA_OBJECTS) $(GLSL_LIBS) - -# Make archive of subset of core mesa object files for gallium -libmesagallium.a: $(MESA_GALLIUM_OBJECTS) $(GLSL_LIBS) - @ $(MKLIB) -o mesagallium -static $(MESA_GALLIUM_OBJECTS) $(GLSL_LIBS) - -dricore: $(BUILT_SOURCES) - @ (cd libdricore && $(MAKE)) - -###################################################################### -# Device drivers -driver_subdirs: $(MESA_LIBS) $(DRICORE_TARGET) - @ (cd drivers && $(MAKE)) - - -###################################################################### -# Assembly subdirs -asm_subdirs: - @ if echo "$(ASM_FLAGS)" | grep -q USE_X86_ASM ; then \ - (cd x86 && $(MAKE)) || exit 1 ; \ - fi - @ if echo "$(ASM_FLAGS)" | grep -q USE_X86_64_ASM ; then \ - (cd x86 && $(MAKE)) || exit 1 ; \ - (cd x86-64 && $(MAKE)) || exit 1 ; \ - fi - -###################################################################### -# Dependency generation - -depend: $(ALL_FILES) main/git_sha1.h - @ echo "running $(MKDEP)" - @ touch depend - @$(MKDEP) $(MKDEP_OPTIONS) $(MESA_CPPFLAGS) \ - $(ALL_FILES) > /dev/null 2>/dev/null - -###################################################################### -# Installation rules - -# this isn't fleshed out yet but is probably the way to go in the future -new_install: - (cd drivers && $(MAKE) install) - -# XXX replace this with new_install above someday -install: default $(DRICORE_INSTALL_TARGET) - @for driver in $(DRIVER_DIRS) ; do \ - case "$$driver" in \ - osmesa) if [ "$(DRIVER_DIRS)" = osmesa ]; then \ - $(MAKE) install-headers install-osmesa || exit 1 ; \ - else \ - $(MAKE) install-osmesa || exit 1 ; \ - fi ;; \ - dri) $(MAKE) install-libgl-pc install-dri || exit 1 ;; \ - *) $(MAKE) install-libgl-pc install-libgl || exit 1 ;; \ - esac ; \ - done - -pcedit = \ - -e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \ - -e 's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \ - -e 's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \ - -e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \ - - -gl_pcedit = sed \ - $(pcedit) \ - -e 's,@GL_PC_REQ_PRIV@,$(GL_PC_REQ_PRIV),' \ - -e 's,@GL_PC_LIB_PRIV@,$(GL_PC_LIB_PRIV),' \ - -e 's,@GL_PC_CFLAGS@,$(GL_PC_CFLAGS),' \ - -e 's,@GLX_TLS@,$(GLX_TLS),' \ - -e 's,@GL_LIB@,$(GL_LIB),' - -gl.pc: gl.pc.in - $(gl_pcedit) $< > $@ - -osmesa_pcedit = sed \ - $(pcedit) \ - -e 's,@OSMESA_LIB@,$(OSMESA_LIB),' \ - -e 's,@OSMESA_PC_REQ@,$(OSMESA_PC_REQ),' \ - -e 's,@OSMESA_PC_LIB_PRIV@,$(OSMESA_PC_LIB_PRIV),' - -osmesa.pc: osmesa.pc.in - $(osmesa_pcedit) $< > $@ - -install-headers: - $(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/GL - $(INSTALL) -m 644 $(TOP)/include/GL/*.h \ - $(DESTDIR)$(INSTALL_INC_DIR)/GL - -install-libgl: default - $(MINSTALL) $(TOP)/$(LIB_DIR)/$(GL_LIB_GLOB) \ - $(DESTDIR)$(INSTALL_LIB_DIR) - -install-libgl-pc: gl.pc install-headers - $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR) - $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig - $(INSTALL) -m 644 gl.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig - -install-osmesa: default osmesa.pc - $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR) - $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig - $(MINSTALL) $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_GLOB) \ - $(DESTDIR)$(INSTALL_LIB_DIR) - $(INSTALL) -m 644 osmesa.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig - -install-dri: default - cd drivers/dri && $(MAKE) install - -install-dricore: default - @ (cd libdricore && $(MAKE) install) - -# Emacs tags -tags: - etags `find . -name \*.[ch]` $(TOP)/include/GL/*.h - -clean: - -rm -f */*.o - -rm -f */*/*.o - -rm -f depend depend.bak libmesa.a libmesagallium.a - -rm -f drivers/*/*.o - -rm -f *.pc - -rm -f $(BUILT_SOURCES) - -@cd drivers/dri && $(MAKE) clean - -@cd drivers/x11 && $(MAKE) clean - -@cd drivers/osmesa && $(MAKE) clean - -@cd x86 && $(MAKE) clean - -@cd x86-64 && $(MAKE) clean - -@cd libdricore && $(MAKE) clean - - --include $(DEPENDS) diff --git a/mesalib/src/mesa/Makefile.am b/mesalib/src/mesa/Makefile.am new file mode 100644 index 000000000..e52678d58 --- /dev/null +++ b/mesalib/src/mesa/Makefile.am @@ -0,0 +1,107 @@ +# Copyright © 2012 Intel Corporation +# +# 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. + +SUBDIRS = x86 x86-64 . libdricore drivers + +gldir = $(includedir)/GL +gl_HEADERS = $(top_srcdir)/include/GL/*.h + +.PHONY: main/git_sha1.h.tmp +main/git_sha1.h.tmp: + @touch main/git_sha1.h.tmp + @if test -d ../../.git; then \ + if which git > /dev/null; then \ + git log -n 1 --oneline | \ + sed 's/^\([^ ]*\) .*/#define MESA_GIT_SHA1 "git-\1"/' \ + > main/git_sha1.h.tmp ; \ + fi \ + fi + +main/git_sha1.h: main/git_sha1.h.tmp + @echo "updating main/git_sha1.h" + @if ! cmp -s main/git_sha1.h.tmp main/git_sha1.h; then \ + mv main/git_sha1.h.tmp main/git_sha1.h ;\ + fi + +# include glapi_gen.mk for generating glapi headers for GLES +TOP = $(top_srcdir) +GLAPI = $(TOP)/src/mapi/glapi/gen +include $(GLAPI)/glapi_gen.mk + +BUILT_SOURCES = \ + main/git_sha1.h \ + main/api_exec_es1_dispatch.h \ + main/api_exec_es1_remap_helper.h \ + main/api_exec_es2_dispatch.h \ + main/api_exec_es2_remap_helper.h \ + main/api_exec_es1.c \ + main/api_exec_es2.c \ + program/program_parse.tab.c \ + program/program_parse.tab.h \ + program/lex.yy.c +CLEANFILES = \ + $(BUILT_SOURCES) \ + git_sha1.h.tmp + +main/api_exec_es1_dispatch.h: $(GLAPI)/gl_and_es_API.xml $(glapi_gen_dispatch_deps) + $(call glapi_gen_dispatch,$<,es1) + +main/api_exec_es1_remap_helper.h: $(GLAPI)/gl_and_es_API.xml $(glapi_gen_remap_deps) + $(call glapi_gen_remap,$<,es1) + +main/api_exec_es1.o: main/api_exec_es1_dispatch.h main/api_exec_es1_remap_helper.h + +main/api_exec_es2_dispatch.h: $(GLAPI)/gl_and_es_API.xml $(glapi_gen_dispatch_deps) + $(call glapi_gen_dispatch,$<,es2) + +main/api_exec_es2_remap_helper.h: $(GLAPI)/gl_and_es_API.xml $(glapi_gen_remap_deps) + $(call glapi_gen_remap,$<,es2) + +main/api_exec_es2.o: main/api_exec_es2_dispatch.h main/api_exec_es2_remap_helper.h + +main/api_exec_es1.c: main/APIspec.xml main/es_generator.py main/APIspecutil.py main/APIspec.py + $(PYTHON2) $(PYTHON_FLAGS) main/es_generator.py -S main/APIspec.xml -V GLES1.1 > $@ + +main/api_exec_es2.c: main/APIspec.xml main/es_generator.py main/APIspecutil.py main/APIspec.py + $(PYTHON2) $(PYTHON_FLAGS) main/es_generator.py -S main/APIspec.xml -V GLES2.0 > $@ + +program/program_parse.tab.c program/program_parse.tab.h: program/program_parse.y + $(YACC) -v -d --output=program/program_parse.tab.c $< + +program/lex.yy.c: program/program_lexer.l + $(LEX) --never-interactive --outfile=$@ $< + +all-local: + $(MAKE) -f Makefile.old + +install-exec-local: + $(MAKE) -f Makefile.old install + +clean-local: + $(MAKE) -f Makefile.old clean + +pkgconfigdir = $(libdir)/pkgconfig + +if HAVE_OSMESA_DRIVER +pkgconfig_DATA = osmesa.pc +else +pkgconfig_DATA = gl.pc +endif diff --git a/mesalib/src/mesa/Makefile.old b/mesalib/src/mesa/Makefile.old new file mode 100644 index 000000000..4ea70d43d --- /dev/null +++ b/mesalib/src/mesa/Makefile.old @@ -0,0 +1,82 @@ +# src/mesa/Makefile + +TOP = ../.. +include $(TOP)/configs/current + +MESA_LIBS := libmesa.a libmesagallium.a +DEPENDS := depend + +SRCDIR = . +include sources.mak + +# define preprocessor flags +MESA_CPPFLAGS := $(API_DEFINES) $(DEFINES) + +# append include dirs +MESA_CPPFLAGS += $(INCLUDE_DIRS) + +# tidy compiler flags +CFLAGS := $(filter-out $(DEFINES), $(CFLAGS)) +CXXFLAGS := $(filter-out $(DEFINES), $(CXXFLAGS)) + +# LLVM is needed for the state tracker +MESA_CFLAGS := $(LLVM_CFLAGS) $(CFLAGS) +MESA_CXXFLAGS := $(LLVM_CFLAGS) $(CXXFLAGS) + +%.o: %.c + $(CC) -c -o $@ $< $(MESA_CPPFLAGS) $(MESA_CFLAGS) + +%.o: %.cpp + $(CXX) -c -o $@ $< $(MESA_CPPFLAGS) $(MESA_CXXFLAGS) + +%.o: %.S + $(CC) -c -o $@ $< $(MESA_CPPFLAGS) $(MESA_CFLAGS) + +# Default: build dependencies, then asm_subdirs, GLSL built-in lib, +# then convenience libs (.a) and finally the device drivers: +default: $(DEPENDS) $(MESA_LIBS) + +###################################################################### +# Helper libraries used by many drivers: + +# Make archive of core mesa object files +libmesa.a: $(MESA_OBJECTS) $(GLSL_LIBS) + @ $(MKLIB) -o mesa -static $(MESA_OBJECTS) $(GLSL_LIBS) + +# Make archive of subset of core mesa object files for gallium +libmesagallium.a: $(MESA_GALLIUM_OBJECTS) $(GLSL_LIBS) + @ $(MKLIB) -o mesagallium -static $(MESA_GALLIUM_OBJECTS) $(GLSL_LIBS) + +###################################################################### +# Dependency generation + +depend: $(ALL_FILES) main/git_sha1.h + @ echo "running $(MKDEP)" + @ touch depend + @$(MKDEP) $(MKDEP_OPTIONS) $(MESA_CPPFLAGS) \ + $(ALL_FILES) > /dev/null 2>/dev/null + +###################################################################### +# Installation rules + +install: default $(DRICORE_INSTALL_TARGET) + @for driver in $(DRIVER_DIRS) ; do \ + case "$$driver" in \ + osmesa) $(MAKE) -f Makefile.old install-osmesa || exit 1 ;; \ + esac ; \ + done + +install-osmesa: default + $(MINSTALL) $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_GLOB) \ + $(DESTDIR)$(INSTALL_LIB_DIR) + +# Emacs tags +tags: + etags `find . -name \*.[ch]` $(TOP)/include/GL/*.h + +clean: + -rm -f */*.o + -rm -f */*/*.o + -rm -f depend depend.bak libmesa.a libmesagallium.a + +-include $(DEPENDS) diff --git a/mesalib/src/mesa/drivers/.gitignore b/mesalib/src/mesa/drivers/.gitignore new file mode 100644 index 000000000..5fc607b9e --- /dev/null +++ b/mesalib/src/mesa/drivers/.gitignore @@ -0,0 +1 @@ +/Makefile diff --git a/mesalib/src/mesa/drivers/Makefile b/mesalib/src/mesa/drivers/Makefile deleted file mode 100644 index c5998413e..000000000 --- a/mesalib/src/mesa/drivers/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -# src/mesa/drivers/Makefile - -TOP = ../../.. -include $(TOP)/configs/current - - -default: - @for dir in $(DRIVER_DIRS) ; do \ - if [ -d $$dir ] ; then \ - (cd $$dir && $(MAKE)) || exit 1; \ - fi \ - done - - -clean: - @for dir in $(DRIVER_DIRS) ; do \ - if [ -d $$dir ] ; then \ - (cd $$dir && $(MAKE) clean) || exit 1; \ - fi \ - done - - -install: - @for dir in $(DRIVER_DIRS) ; do \ - if [ -d $$dir ] ; then \ - (cd $$dir && $(MAKE) install) || exit 1; \ - fi \ - done - diff --git a/mesalib/src/mesa/drivers/Makefile.am b/mesalib/src/mesa/drivers/Makefile.am new file mode 100644 index 000000000..1bc74eadf --- /dev/null +++ b/mesalib/src/mesa/drivers/Makefile.am @@ -0,0 +1,22 @@ +# Copyright © 2012 Intel Corporation +# +# 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. + +SUBDIRS = $(DRIVER_DIRS) diff --git a/mesalib/src/mesa/drivers/dri/common/Makefile.am b/mesalib/src/mesa/drivers/dri/common/Makefile.am index 27c3e3d42..d81bc0e3f 100644 --- a/mesalib/src/mesa/drivers/dri/common/Makefile.am +++ b/mesalib/src/mesa/drivers/dri/common/Makefile.am @@ -25,7 +25,6 @@ AM_CFLAGS = \ -I$(top_srcdir)/src/mapi \ -I$(top_srcdir)/src/mesa/ \ $(DEFINES) \ - $(ASM_FLAGS) \ $(API_DEFINES) \ $(LIBDRM_CFLAGS) diff --git a/mesalib/src/mesa/drivers/dri/swrast/Makefile.am b/mesalib/src/mesa/drivers/dri/swrast/Makefile.am index 3dc7c1044..16a34413b 100644 --- a/mesalib/src/mesa/drivers/dri/swrast/Makefile.am +++ b/mesalib/src/mesa/drivers/dri/swrast/Makefile.am @@ -34,7 +34,6 @@ AM_CFLAGS = \ -I$(top_srcdir)/src/mesa/ \ -I$(top_srcdir)/src/mesa/drivers/dri/common \ $(DEFINES) \ - $(ASM_FLAGS) \ $(API_DEFINES) dridir = $(DRI_DRIVER_INSTALL_DIR) diff --git a/mesalib/src/mesa/gl.pc.in b/mesalib/src/mesa/gl.pc.in index 2d3bc917e..181724b97 100644 --- a/mesalib/src/mesa/gl.pc.in +++ b/mesalib/src/mesa/gl.pc.in @@ -1,12 +1,12 @@ -prefix=@INSTALL_DIR@ +prefix=@prefix@ exec_prefix=${prefix} -libdir=@INSTALL_LIB_DIR@ -includedir=@INSTALL_INC_DIR@ +libdir=@libdir@ +includedir=@includedir@ Name: gl Description: Mesa OpenGL library Requires.private: @GL_PC_REQ_PRIV@ -Version: @VERSION@ +Version: @PACKAGE_VERSION@ Libs: -L${libdir} -l@GL_LIB@ Libs.private: @GL_PC_LIB_PRIV@ Cflags: -I${includedir} @GL_PC_CFLAGS@ diff --git a/mesalib/src/mesa/main/api_exec.c b/mesalib/src/mesa/main/api_exec.c index 15b9f6974..19e7f9807 100644 --- a/mesalib/src/mesa/main/api_exec.c +++ b/mesalib/src/mesa/main/api_exec.c @@ -579,17 +579,7 @@ _mesa_create_exec_table(void) #endif /* ARB 28. GL_ARB_vertex_buffer_object */ - SET_BindBufferARB(exec, _mesa_BindBufferARB); - SET_BufferDataARB(exec, _mesa_BufferDataARB); - SET_BufferSubDataARB(exec, _mesa_BufferSubDataARB); - SET_DeleteBuffersARB(exec, _mesa_DeleteBuffersARB); - SET_GenBuffersARB(exec, _mesa_GenBuffersARB); - SET_GetBufferParameterivARB(exec, _mesa_GetBufferParameterivARB); - SET_GetBufferPointervARB(exec, _mesa_GetBufferPointervARB); - SET_GetBufferSubDataARB(exec, _mesa_GetBufferSubDataARB); - SET_IsBufferARB(exec, _mesa_IsBufferARB); - SET_MapBufferARB(exec, _mesa_MapBufferARB); - SET_UnmapBufferARB(exec, _mesa_UnmapBufferARB); + _mesa_init_bufferobj_dispatch(exec); /* ARB 29. GL_ARB_occlusion_query */ _mesa_init_queryobj_dispatch(exec); diff --git a/mesalib/src/mesa/main/bufferobj.c b/mesalib/src/mesa/main/bufferobj.c index 332af3d36..5f724ace3 100644 --- a/mesalib/src/mesa/main/bufferobj.c +++ b/mesalib/src/mesa/main/bufferobj.c @@ -43,6 +43,7 @@ #include "mtypes.h" #include "texobj.h" #include "transformfeedback.h" +#include "dispatch.h" /* Debug flags */ @@ -92,6 +93,11 @@ get_buffer_target(struct gl_context *ctx, GLenum target) return &ctx->Texture.BufferObject; } break; + case GL_UNIFORM_BUFFER: + if (ctx->Extensions.ARB_uniform_buffer_object) { + return &ctx->UniformBuffer; + } + break; default: return NULL; } @@ -598,6 +604,8 @@ _mesa_copy_buffer_subdata(struct gl_context *ctx, void _mesa_init_buffer_objects( struct gl_context *ctx ) { + GLuint i; + memset(&DummyBufferObject, 0, sizeof(DummyBufferObject)); _glthread_INIT_MUTEX(DummyBufferObject.Mutex); DummyBufferObject.RefCount = 1000*1000*1000; /* never delete */ @@ -609,16 +617,43 @@ _mesa_init_buffer_objects( struct gl_context *ctx ) ctx->Shared->NullBufferObj); _mesa_reference_buffer_object(ctx, &ctx->CopyWriteBuffer, ctx->Shared->NullBufferObj); + + ctx->UniformBufferBindings = calloc(ctx->Const.MaxUniformBufferBindings, + sizeof(*ctx->UniformBufferBindings)); + + _mesa_reference_buffer_object(ctx, &ctx->UniformBuffer, + ctx->Shared->NullBufferObj); + + for (i = 0; i < ctx->Const.MaxUniformBufferBindings; i++) { + _mesa_reference_buffer_object(ctx, + &ctx->UniformBufferBindings[i].BufferObject, + ctx->Shared->NullBufferObj); + ctx->UniformBufferBindings[i].Offset = -1; + ctx->UniformBufferBindings[i].Size = -1; + } } void _mesa_free_buffer_objects( struct gl_context *ctx ) { + GLuint i; + _mesa_reference_buffer_object(ctx, &ctx->Array.ArrayBufferObj, NULL); _mesa_reference_buffer_object(ctx, &ctx->CopyReadBuffer, NULL); _mesa_reference_buffer_object(ctx, &ctx->CopyWriteBuffer, NULL); + + _mesa_reference_buffer_object(ctx, &ctx->UniformBuffer, NULL); + + for (i = 0; i < ctx->Const.MaxUniformBufferBindings; i++) { + _mesa_reference_buffer_object(ctx, + &ctx->UniformBufferBindings[i].BufferObject, + NULL); + } + + free(ctx->UniformBufferBindings); + ctx->UniformBufferBindings = NULL; } @@ -840,6 +875,10 @@ _mesa_DeleteBuffersARB(GLsizei n, const GLuint *ids) } } + if (ctx->UniformBuffer == bufObj) { + _mesa_BindBufferARB( GL_UNIFORM_BUFFER, 0 ); + } + /* unbind any pixel pack/unpack pointers bound to this buffer */ if (ctx->Pack.BufferObj == bufObj) { _mesa_BindBufferARB( GL_PIXEL_PACK_BUFFER_EXT, 0 ); @@ -1954,3 +1993,204 @@ _mesa_GetObjectParameterivAPPLE(GLenum objectType, GLuint name, GLenum pname, } #endif /* FEATURE_APPLE_object_purgeable */ + +static void +set_ubo_binding(struct gl_context *ctx, + int index, + struct gl_buffer_object *bufObj, + GLintptr offset, + GLsizeiptr size, + GLboolean autoSize) +{ + struct gl_uniform_buffer_binding *binding; + + binding = &ctx->UniformBufferBindings[index]; + if (binding->BufferObject == bufObj && + binding->Offset == offset && + binding->Size == size && + binding->AutomaticSize == autoSize) { + return; + } + + FLUSH_VERTICES(ctx, _NEW_BUFFER_OBJECT); + + _mesa_reference_buffer_object(ctx, &binding->BufferObject, bufObj); + binding->Offset = offset; + binding->Size = size; + binding->AutomaticSize = autoSize; +} + +/** + * Specify a buffer object to receive vertex shader results. Plus, + * specify the starting offset to place the results, and max size. + */ +static void +bind_buffer_range_uniform_buffer(struct gl_context *ctx, + GLuint index, + struct gl_buffer_object *bufObj, + GLintptr offset, + GLsizeiptr size) +{ + if (index >= ctx->Const.MaxUniformBufferBindings) { + _mesa_error(ctx, GL_INVALID_VALUE, "glBindBufferRange(index=%d)", index); + return; + } + + if (offset & (ctx->Const.UniformBufferOffsetAlignment - 1)) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glBindBufferRange(offset misalgned %d/%d)", (int) offset, + ctx->Const.UniformBufferOffsetAlignment); + return; + } + + if (bufObj == ctx->Shared->NullBufferObj) { + offset = -1; + size = -1; + } + + _mesa_reference_buffer_object(ctx, &ctx->UniformBuffer, bufObj); + set_ubo_binding(ctx, index, bufObj, offset, size, GL_FALSE); +} + + +/** + * Specify a buffer object to receive vertex shader results. + * As above, but start at offset = 0. + */ +static void +bind_buffer_base_uniform_buffer(struct gl_context *ctx, + GLuint index, + struct gl_buffer_object *bufObj) +{ + if (index >= ctx->Const.MaxUniformBufferBindings) { + _mesa_error(ctx, GL_INVALID_VALUE, "glBindBufferBase(index=%d)", index); + return; + } + + _mesa_reference_buffer_object(ctx, &ctx->UniformBuffer, bufObj); + if (bufObj == ctx->Shared->NullBufferObj) + set_ubo_binding(ctx, index, bufObj, -1, -1, GL_TRUE); + else + set_ubo_binding(ctx, index, bufObj, 0, 0, GL_TRUE); +} + +void GLAPIENTRY +_mesa_BindBufferRange(GLenum target, GLuint index, + GLuint buffer, GLintptr offset, GLsizeiptr size) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_buffer_object *bufObj; + + if (buffer == 0) { + bufObj = ctx->Shared->NullBufferObj; + } else { + bufObj = _mesa_lookup_bufferobj(ctx, buffer); + } + + if (!bufObj) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glBindBufferRange(invalid buffer=%u)", buffer); + return; + } + + if (size <= 0) { + _mesa_error(ctx, GL_INVALID_VALUE, "glBindBufferRange(size=%d)", + (int) size); + return; + } + + if (offset + size > bufObj->Size) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glBindBufferRange(offset + size %d > buffer size %d)", + (int) (offset + size), (int) (bufObj->Size)); + return; + } + + switch (target) { + case GL_TRANSFORM_FEEDBACK_BUFFER: + _mesa_bind_buffer_range_transform_feedback(ctx, index, bufObj, + offset, size); + return; + case GL_UNIFORM_BUFFER: + bind_buffer_range_uniform_buffer(ctx, index, bufObj, offset, size); + return; + default: + _mesa_error(ctx, GL_INVALID_ENUM, "glBindBufferRange(target)"); + return; + } +} + +void GLAPIENTRY +_mesa_BindBufferBase(GLenum target, GLuint index, GLuint buffer) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_buffer_object *bufObj; + + if (buffer == 0) { + bufObj = ctx->Shared->NullBufferObj; + } else { + bufObj = _mesa_lookup_bufferobj(ctx, buffer); + } + + if (!bufObj) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glBindBufferBase(invalid buffer=%u)", buffer); + return; + } + + /* Note that there's some oddness in the GL 3.1-GL 3.3 specifications with + * regards to BindBufferBase. It says (GL 3.1 core spec, page 63): + * + * "BindBufferBase is equivalent to calling BindBufferRange with offset + * zero and size equal to the size of buffer." + * + * but it says for glGetIntegeri_v (GL 3.1 core spec, page 230): + * + * "If the parameter (starting offset or size) was not specified when the + * buffer object was bound, zero is returned." + * + * What happens if the size of the buffer changes? Does the size of the + * buffer at the moment glBindBufferBase was called still play a role, like + * the first quote would imply, or is the size meaningless in the + * glBindBufferBase case like the second quote would suggest? The GL 4.1 + * core spec page 45 says: + * + * "It is equivalent to calling BindBufferRange with offset zero, while + * size is determined by the size of the bound buffer at the time the + * binding is used." + * + * My interpretation is that the GL 4.1 spec was a clarification of the + * behavior, not a change. In particular, this choice will only make + * rendering work in cases where it would have had undefined results. + */ + + switch (target) { + case GL_TRANSFORM_FEEDBACK_BUFFER: + _mesa_bind_buffer_base_transform_feedback(ctx, index, bufObj); + return; + case GL_UNIFORM_BUFFER: + bind_buffer_base_uniform_buffer(ctx, index, bufObj); + return; + default: + _mesa_error(ctx, GL_INVALID_ENUM, "glBindBufferBase(target)"); + return; + } +} + +void +_mesa_init_bufferobj_dispatch(struct _glapi_table *disp) +{ + SET_BindBufferARB(disp, _mesa_BindBufferARB); + SET_BufferDataARB(disp, _mesa_BufferDataARB); + SET_BufferSubDataARB(disp, _mesa_BufferSubDataARB); + SET_DeleteBuffersARB(disp, _mesa_DeleteBuffersARB); + SET_GenBuffersARB(disp, _mesa_GenBuffersARB); + SET_GetBufferParameterivARB(disp, _mesa_GetBufferParameterivARB); + SET_GetBufferPointervARB(disp, _mesa_GetBufferPointervARB); + SET_GetBufferSubDataARB(disp, _mesa_GetBufferSubDataARB); + SET_IsBufferARB(disp, _mesa_IsBufferARB); + SET_MapBufferARB(disp, _mesa_MapBufferARB); + SET_UnmapBufferARB(disp, _mesa_UnmapBufferARB); + SET_BindBufferRangeEXT(disp, _mesa_BindBufferRange); + SET_BindBufferBaseEXT(disp, _mesa_BindBufferBase); +} diff --git a/mesalib/src/mesa/main/bufferobj.h b/mesalib/src/mesa/main/bufferobj.h index 66343c3cd..e1d0f7a97 100644 --- a/mesalib/src/mesa/main/bufferobj.h +++ b/mesalib/src/mesa/main/bufferobj.h @@ -159,4 +159,14 @@ extern void GLAPIENTRY _mesa_GetObjectParameterivAPPLE(GLenum objectType, GLuint name, GLenum pname, GLint* params); #endif +void GLAPIENTRY +_mesa_BindBufferBase(GLenum target, GLuint index, GLuint buffer); + +void GLAPIENTRY +_mesa_BindBufferRange(GLenum target, GLuint index, + GLuint buffer, GLintptr offset, GLsizeiptr size); + +extern void +_mesa_init_bufferobj_dispatch(struct _glapi_table *disp); + #endif diff --git a/mesalib/src/mesa/main/context.c b/mesalib/src/mesa/main/context.c index 3bcedecd9..643476b94 100644 --- a/mesalib/src/mesa/main/context.c +++ b/mesalib/src/mesa/main/context.c @@ -542,6 +542,9 @@ init_program_limits(GLenum type, struct gl_program_constants *prog) prog->MediumInt.RangeMax = 24; prog->MediumInt.Precision = 0; prog->LowInt = prog->HighInt = prog->MediumInt; + + prog->MaxUniformBlocks = 12; + prog->MaxCombinedUniformComponents = prog->MaxUniformComponents; } @@ -653,6 +656,12 @@ _mesa_init_constants(struct gl_context *ctx) ctx->Const.MaxTransformFeedbackSeparateComponents = 4 * MAX_FEEDBACK_ATTRIBS; ctx->Const.MaxTransformFeedbackInterleavedComponents = 4 * MAX_FEEDBACK_ATTRIBS; + /** GL_ARB_uniform_buffer_object */ + ctx->Const.MaxCombinedUniformBlocks = 36; + ctx->Const.MaxUniformBufferBindings = 36; + ctx->Const.MaxUniformBlockSize = 16384; + ctx->Const.UniformBufferOffsetAlignment = 1; + /* GL 3.2: hard-coded for now: */ ctx->Const.ProfileMask = GL_CONTEXT_COMPATIBILITY_PROFILE_BIT; diff --git a/mesalib/src/mesa/main/extensions.c b/mesalib/src/mesa/main/extensions.c index 079316145..e4fe73307 100644 --- a/mesalib/src/mesa/main/extensions.c +++ b/mesalib/src/mesa/main/extensions.c @@ -141,7 +141,7 @@ static const struct extension extension_table[] = { { "GL_ARB_texture_swizzle", o(EXT_texture_swizzle), GL, 2008 }, { "GL_ARB_transform_feedback2", o(ARB_transform_feedback2), GL, 2010 }, { "GL_ARB_transpose_matrix", o(ARB_transpose_matrix), GL, 1999 }, - { "GL_ARB_uniform_buffer_object", o(ARB_uniform_buffer_object), GL, 2002 }, + { "GL_ARB_uniform_buffer_object", o(ARB_uniform_buffer_object), GL, 2009 }, { "GL_ARB_vertex_array_bgra", o(EXT_vertex_array_bgra), GL, 2008 }, { "GL_ARB_vertex_array_object", o(ARB_vertex_array_object), GL, 2006 }, { "GL_ARB_vertex_buffer_object", o(dummy_true), GL, 2003 }, diff --git a/mesalib/src/mesa/main/get.c b/mesalib/src/mesa/main/get.c index 8dc47306f..67732521c 100644 --- a/mesalib/src/mesa/main/get.c +++ b/mesalib/src/mesa/main/get.c @@ -289,6 +289,12 @@ static const int extra_ARB_sampler_objects[] = { EXTRA_END }; +static const int extra_ARB_uniform_buffer_object_and_geometry_shader[] = { + EXT(ARB_uniform_buffer_object), + EXT(ARB_geometry_shader4), + EXTRA_END +}; + EXTRA_EXT(ARB_ES2_compatibility); EXTRA_EXT(ARB_texture_cube_map); @@ -335,6 +341,7 @@ EXTRA_EXT(EXT_framebuffer_sRGB); EXTRA_EXT(ARB_texture_buffer_object); EXTRA_EXT(OES_EGL_image_external); EXTRA_EXT(ARB_blend_func_extended); +EXTRA_EXT(ARB_uniform_buffer_object); static const int extra_ARB_vertex_program_ARB_fragment_program_NV_vertex_program[] = { @@ -1321,6 +1328,31 @@ static const struct value_desc values[] = { { GL_MAX_DUAL_SOURCE_DRAW_BUFFERS, CONTEXT_INT(Const.MaxDualSourceDrawBuffers), extra_ARB_blend_func_extended }, + /* GL_ARB_uniform_buffer_object */ + { GL_MAX_VERTEX_UNIFORM_BLOCKS, CONTEXT_INT(Const.VertexProgram.MaxUniformBlocks), + extra_ARB_uniform_buffer_object }, + { GL_MAX_FRAGMENT_UNIFORM_BLOCKS, CONTEXT_INT(Const.FragmentProgram.MaxUniformBlocks), + extra_ARB_uniform_buffer_object }, + { GL_MAX_GEOMETRY_UNIFORM_BLOCKS, CONTEXT_INT(Const.GeometryProgram.MaxUniformBlocks), + extra_ARB_uniform_buffer_object_and_geometry_shader }, + { GL_MAX_COMBINED_UNIFORM_BLOCKS, CONTEXT_INT(Const.MaxCombinedUniformBlocks), + extra_ARB_uniform_buffer_object }, + { GL_MAX_UNIFORM_BLOCK_SIZE, CONTEXT_INT(Const.MaxUniformBlockSize), + extra_ARB_uniform_buffer_object }, + { GL_MAX_UNIFORM_BUFFER_BINDINGS, CONTEXT_INT(Const.MaxUniformBufferBindings), + extra_ARB_uniform_buffer_object }, + + { GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS, CONTEXT_INT(Const.VertexProgram.MaxCombinedUniformComponents), + extra_ARB_uniform_buffer_object }, + { GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS, CONTEXT_INT(Const.FragmentProgram.MaxCombinedUniformComponents), + extra_ARB_uniform_buffer_object }, + { GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS, CONTEXT_INT(Const.GeometryProgram.MaxCombinedUniformComponents), + extra_ARB_uniform_buffer_object_and_geometry_shader }, + { GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, CONTEXT_INT(Const.UniformBufferOffsetAlignment), + extra_ARB_uniform_buffer_object }, + + { GL_UNIFORM_BUFFER_BINDING, LOC_CUSTOM, TYPE_INT, 0, extra_ARB_uniform_buffer_object }, + #endif /* FEATURE_GL */ }; @@ -1771,6 +1803,10 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu v->value_int = samp ? samp->Name : 0; } break; + /* GL_ARB_uniform_buffer_object */ + case GL_UNIFORM_BUFFER_BINDING: + v->value_int = ctx->UniformBuffer->Name; + break; } } @@ -2530,6 +2566,30 @@ find_value_indexed(const char *func, GLenum pname, int index, union value *v) goto invalid_enum; v->value_int = ctx->TransformFeedback.CurrentObject->BufferNames[index]; return TYPE_INT; + + case GL_UNIFORM_BUFFER_BINDING: + if (index >= ctx->Const.MaxUniformBufferBindings) + goto invalid_value; + if (!ctx->Extensions.ARB_uniform_buffer_object) + goto invalid_enum; + v->value_int = ctx->UniformBufferBindings[index].BufferObject->Name; + return TYPE_INT; + + case GL_UNIFORM_BUFFER_START: + if (index >= ctx->Const.MaxUniformBufferBindings) + goto invalid_value; + if (!ctx->Extensions.ARB_uniform_buffer_object) + goto invalid_enum; + v->value_int = ctx->UniformBufferBindings[index].Offset; + return TYPE_INT; + + case GL_UNIFORM_BUFFER_SIZE: + if (index >= ctx->Const.MaxUniformBufferBindings) + goto invalid_value; + if (!ctx->Extensions.ARB_uniform_buffer_object) + goto invalid_enum; + v->value_int = ctx->UniformBufferBindings[index].Size; + return TYPE_INT; } invalid_enum: diff --git a/mesalib/src/mesa/main/mtypes.h b/mesalib/src/mesa/main/mtypes.h index d52ab151a..def0db1aa 100644 --- a/mesalib/src/mesa/main/mtypes.h +++ b/mesalib/src/mesa/main/mtypes.h @@ -2709,6 +2709,9 @@ struct gl_program_constants /* ES 2.0 and GL_ARB_ES2_compatibility */ struct gl_precision LowFloat, MediumFloat, HighFloat; struct gl_precision LowInt, MediumInt, HighInt; + /* GL_ARB_uniform_buffer_object */ + GLuint MaxUniformBlocks; + GLuint MaxCombinedUniformComponents; }; @@ -2774,6 +2777,15 @@ struct gl_constants GLuint MaxVertexVaryingComponents; /**< Between vert and geom shader */ GLuint MaxGeometryVaryingComponents; /**< Between geom and frag shader */ + /** @{ + * GL_ARB_uniform_buffer_object + */ + GLuint MaxCombinedUniformBlocks; + GLuint MaxUniformBufferBindings; + GLuint MaxUniformBlockSize; + GLuint UniformBufferOffsetAlignment; + /** @} */ + /** GL_ARB_geometry_shader4 */ GLuint MaxGeometryOutputVertices; GLuint MaxGeometryTotalOutputComponents; @@ -3283,6 +3295,20 @@ struct gl_driver_flags GLbitfield NewArray; /**< Vertex array state */ }; +struct gl_uniform_buffer_binding +{ + struct gl_buffer_object *BufferObject; + /** Start of uniform block data in the buffer */ + GLintptr Offset; + /** Size of data allowed to be referenced from the buffer (in bytes) */ + GLsizeiptr Size; + /** + * glBindBufferBase() indicates that the Size should be ignored and only + * limited by the current size of the BufferObject. + */ + GLboolean AutomaticSize; +}; + /** * Mesa rendering context. * @@ -3418,6 +3444,21 @@ struct gl_context struct gl_buffer_object *CopyReadBuffer; /**< GL_ARB_copy_buffer */ struct gl_buffer_object *CopyWriteBuffer; /**< GL_ARB_copy_buffer */ + + /** + * Current GL_ARB_uniform_buffer_object binding referenced by + * GL_UNIFORM_BUFFER target for glBufferData, glMapBuffer, etc. + */ + struct gl_buffer_object *UniformBuffer; + + /** + * Array of uniform buffers for GL_ARB_uniform_buffer_object and GL 3.1. + * This is set up using glBindBufferRange() or glBindBufferBase(). They are + * associated with uniform blocks by glUniformBlockBinding()'s state in the + * shader program. + */ + struct gl_uniform_buffer_binding *UniformBufferBindings; + /*@}*/ struct gl_meta_state *Meta; /**< for "meta" operations */ diff --git a/mesalib/src/mesa/main/transformfeedback.c b/mesalib/src/mesa/main/transformfeedback.c index 1bd76d130..84c409185 100644 --- a/mesalib/src/mesa/main/transformfeedback.c +++ b/mesalib/src/mesa/main/transformfeedback.c @@ -291,8 +291,6 @@ _mesa_init_transform_feedback_dispatch(struct _glapi_table *disp) /* EXT_transform_feedback */ SET_BeginTransformFeedbackEXT(disp, _mesa_BeginTransformFeedback); SET_EndTransformFeedbackEXT(disp, _mesa_EndTransformFeedback); - SET_BindBufferRangeEXT(disp, _mesa_BindBufferRange); - SET_BindBufferBaseEXT(disp, _mesa_BindBufferBase); SET_BindBufferOffsetEXT(disp, _mesa_BindBufferOffsetEXT); SET_TransformFeedbackVaryingsEXT(disp, _mesa_TransformFeedbackVaryings); SET_GetTransformFeedbackVaryingEXT(disp, _mesa_GetTransformFeedbackVarying); @@ -431,18 +429,14 @@ bind_buffer_range(struct gl_context *ctx, GLuint index, * Specify a buffer object to receive vertex shader results. Plus, * specify the starting offset to place the results, and max size. */ -void GLAPIENTRY -_mesa_BindBufferRange(GLenum target, GLuint index, - GLuint buffer, GLintptr offset, GLsizeiptr size) +void +_mesa_bind_buffer_range_transform_feedback(struct gl_context *ctx, + GLuint index, + struct gl_buffer_object *bufObj, + GLintptr offset, + GLsizeiptr size) { struct gl_transform_feedback_object *obj; - struct gl_buffer_object *bufObj; - GET_CURRENT_CONTEXT(ctx); - - if (target != GL_TRANSFORM_FEEDBACK_BUFFER) { - _mesa_error(ctx, GL_INVALID_ENUM, "glBindBufferRange(target)"); - return; - } obj = ctx->TransformFeedback.CurrentObject; @@ -457,8 +451,8 @@ _mesa_BindBufferRange(GLenum target, GLuint index, return; } - if ((size <= 0) || (size & 0x3)) { - /* must be positive and multiple of four */ + if (size & 0x3) { + /* must a multiple of four */ _mesa_error(ctx, GL_INVALID_VALUE, "glBindBufferRange(size=%d)", (int) size); return; } @@ -470,25 +464,6 @@ _mesa_BindBufferRange(GLenum target, GLuint index, return; } - if (buffer == 0) { - bufObj = ctx->Shared->NullBufferObj; - } else { - bufObj = _mesa_lookup_bufferobj(ctx, buffer); - } - - if (!bufObj) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glBindBufferRange(invalid buffer=%u)", buffer); - return; - } - - if (offset + size > bufObj->Size) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glBindBufferRange(offset + size %d > buffer size %d)", - (int) (offset + size), (int) (bufObj->Size)); - return; - } - bind_buffer_range(ctx, index, bufObj, offset, size); } @@ -497,18 +472,13 @@ _mesa_BindBufferRange(GLenum target, GLuint index, * Specify a buffer object to receive vertex shader results. * As above, but start at offset = 0. */ -void GLAPIENTRY -_mesa_BindBufferBase(GLenum target, GLuint index, GLuint buffer) +void +_mesa_bind_buffer_base_transform_feedback(struct gl_context *ctx, + GLuint index, + struct gl_buffer_object *bufObj) { struct gl_transform_feedback_object *obj; - struct gl_buffer_object *bufObj; GLsizeiptr size; - GET_CURRENT_CONTEXT(ctx); - - if (target != GL_TRANSFORM_FEEDBACK_BUFFER) { - _mesa_error(ctx, GL_INVALID_ENUM, "glBindBufferBase(target)"); - return; - } obj = ctx->TransformFeedback.CurrentObject; @@ -523,18 +493,6 @@ _mesa_BindBufferBase(GLenum target, GLuint index, GLuint buffer) return; } - if (buffer == 0) { - bufObj = ctx->Shared->NullBufferObj; - } else { - bufObj = _mesa_lookup_bufferobj(ctx, buffer); - } - - if (!bufObj) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glBindBufferBase(invalid buffer=%u)", buffer); - return; - } - /* default size is the buffer size rounded down to nearest * multiple of four. */ diff --git a/mesalib/src/mesa/main/transformfeedback.h b/mesalib/src/mesa/main/transformfeedback.h index 7d63de017..85f4cbc77 100644 --- a/mesalib/src/mesa/main/transformfeedback.h +++ b/mesalib/src/mesa/main/transformfeedback.h @@ -60,12 +60,17 @@ _mesa_BeginTransformFeedback(GLenum mode); extern void GLAPIENTRY _mesa_EndTransformFeedback(void); -extern void GLAPIENTRY -_mesa_BindBufferRange(GLenum target, GLuint index, - GLuint buffer, GLintptr offset, GLsizeiptr size); +extern void +_mesa_bind_buffer_range_transform_feedback(struct gl_context *ctx, + GLuint index, + struct gl_buffer_object *bufObj, + GLintptr offset, + GLsizeiptr size); -extern void GLAPIENTRY -_mesa_BindBufferBase(GLenum target, GLuint index, GLuint buffer); +extern void +_mesa_bind_buffer_base_transform_feedback(struct gl_context *ctx, + GLuint index, + struct gl_buffer_object *bufObj); extern void GLAPIENTRY _mesa_BindBufferOffsetEXT(GLenum target, GLuint index, GLuint buffer, diff --git a/mesalib/src/mesa/osmesa.pc.in b/mesalib/src/mesa/osmesa.pc.in index 05327f40a..307255ffc 100644 --- a/mesalib/src/mesa/osmesa.pc.in +++ b/mesalib/src/mesa/osmesa.pc.in @@ -1,12 +1,12 @@ -prefix=@INSTALL_DIR@ +prefix=@prefix@ exec_prefix=${prefix} -libdir=@INSTALL_LIB_DIR@ -includedir=@INSTALL_INC_DIR@ +libdir=@libdir@ +includedir=@includedir@ Name: osmesa Description: Mesa Off-screen Rendering library Requires: @OSMESA_PC_REQ@ -Version: @VERSION@ +Version: @PACKAGE_VERSION@ Libs: -L${libdir} -l@OSMESA_LIB@ Libs.private: @OSMESA_PC_LIB_PRIV@ Cflags: -I${includedir} diff --git a/mesalib/src/mesa/x86/.gitignore b/mesalib/src/mesa/x86/.gitignore new file mode 100644 index 000000000..ba7486c0b --- /dev/null +++ b/mesalib/src/mesa/x86/.gitignore @@ -0,0 +1,3 @@ +Makefile +gen_matypes +matypes.h diff --git a/mesalib/src/mesa/x86/Makefile b/mesalib/src/mesa/x86/Makefile deleted file mode 100644 index 9716dc27f..000000000 --- a/mesalib/src/mesa/x86/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -# src/mesa/x86/Makefile - -TOP = ../../.. -include $(TOP)/configs/current - - -INCLUDE_DIRS = \ - -I$(TOP)/include/GL \ - -I$(TOP)/include \ - -I$(TOP)/src/mapi \ - -I.. \ - -I../main \ - -I../math \ - -I../tnl - - -default: gen_matypes matypes.h - -clean: - -rm -f matypes.h gen_matypes - - -gen_matypes: gen_matypes.c - $(HOST_CC) $(ARCH_FLAGS) $(INCLUDE_DIRS) $(HOST_CFLAGS) gen_matypes.c -o gen_matypes - -# need some special rules here, unfortunately -matypes.h: ../main/mtypes.h ../tnl/t_context.h gen_matypes - ./gen_matypes > matypes.h - -common_x86_asm.o: matypes.h -3dnow_normal.o: matypes.h -3dnow_xform1.o: matypes.h -3dnow_xform2.o: matypes.h -3dnow_xform3.o: matypes.h -3dnow_xform4.o: matypes.h -mmx_blend.o: matypes.h -sse_normal.o: matypes.h -sse_xform1.o: matypes.h -sse_xform2.o: matypes.h -sse_xform3.o: matypes.h -sse_xform4.o: matypes.h -x86_cliptest.o: matypes.h -x86_xform2.o: matypes.h -x86_xform3.o: matypes.h -x86_xform4.o: matypes.h - diff --git a/mesalib/src/mesa/x86/Makefile.am b/mesalib/src/mesa/x86/Makefile.am new file mode 100644 index 000000000..f241de505 --- /dev/null +++ b/mesalib/src/mesa/x86/Makefile.am @@ -0,0 +1,39 @@ +# Copyright © 2012 Intel Corporation +# +# 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. + +if HAVE_X86_ASM + +AM_CPPFLAGS = \ + -I$(top_srcdir)/src/mesa \ + -I$(top_srcdir)/src/mapi \ + $(API_DEFINES) \ + $(DEFINES) + +noinst_PROGRAMS = gen_matypes + +gen_matypes_SOURCES = gen_matypes.c +BUILT_SOURCES = matypes.h +CLEANFILES = matypes.h + +matypes.h: gen_matypes + $(AM_V_GEN)./gen_matypes > $@ + +endif -- cgit v1.2.3