diff options
author | Jason Ekstrand <[email protected]> | 2015-06-23 18:05:25 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-06-23 18:05:25 -0700 |
commit | a62edcce4eb4c800d972817a20ee874bf2a2c3ef (patch) | |
tree | 46083a8762d45a6c595c7aaee2bb1cd0fc36eb62 /src/gallium/targets | |
parent | 9b9f973ca6d3cc1ec5be27857def00a83c032464 (diff) | |
parent | 6844d6b7f8398a25eff511541b187afeb1199ce0 (diff) |
Merge remote-tracking branch 'mesa-public/master' into vulkan
Diffstat (limited to 'src/gallium/targets')
-rw-r--r-- | src/gallium/targets/d3dadapter9/Makefile.am | 2 | ||||
-rw-r--r-- | src/gallium/targets/dri/Android.mk | 127 | ||||
-rw-r--r-- | src/gallium/targets/dri/Makefile.am | 6 | ||||
-rw-r--r-- | src/gallium/targets/haiku-softpipe/GalliumContext.cpp | 25 | ||||
-rw-r--r-- | src/gallium/targets/haiku-softpipe/GalliumContext.h | 6 | ||||
-rw-r--r-- | src/gallium/targets/libgl-xlib/Makefile.am | 7 | ||||
-rw-r--r-- | src/gallium/targets/osmesa/Makefile.am | 1 | ||||
-rw-r--r-- | src/gallium/targets/pipe-loader/Makefile.am | 2 |
8 files changed, 150 insertions, 26 deletions
diff --git a/src/gallium/targets/d3dadapter9/Makefile.am b/src/gallium/targets/d3dadapter9/Makefile.am index 1dc55f5c1cd..591978f1f61 100644 --- a/src/gallium/targets/d3dadapter9/Makefile.am +++ b/src/gallium/targets/d3dadapter9/Makefile.am @@ -74,6 +74,8 @@ endif # HAVE_LD_VERSION_SCRIPT d3dadapter9_la_LIBADD = \ $(top_builddir)/src/gallium/auxiliary/libgalliumvl_stub.la \ $(top_builddir)/src/gallium/auxiliary/libgallium.la \ + $(top_builddir)/src/glsl/libnir.la \ + $(top_builddir)/src/libglsl_util.la \ $(top_builddir)/src/gallium/state_trackers/nine/libninetracker.la \ $(top_builddir)/src/util/libmesautil.la \ $(top_builddir)/src/gallium/winsys/sw/wrapper/libwsw.la \ diff --git a/src/gallium/targets/dri/Android.mk b/src/gallium/targets/dri/Android.mk new file mode 100644 index 00000000000..5ba129b7961 --- /dev/null +++ b/src/gallium/targets/dri/Android.mk @@ -0,0 +1,127 @@ +# Mesa 3-D graphics library +# +# Copyright (C) 2015 Chih-Wei Huang <[email protected]> +# Copyright (C) 2015 Android-x86 Open Source Project +# +# 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 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. + +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_MODULE := gallium_dri + +ifeq ($(MESA_LOLLIPOP_BUILD),true) +LOCAL_MODULE_RELATIVE_PATH := $(notdir $(MESA_DRI_MODULE_PATH)) +else +LOCAL_MODULE_PATH := $(MESA_DRI_MODULE_PATH) +endif + +LOCAL_SRC_FILES := target.c + +LOCAL_CFLAGS := -DDRI_TARGET -DHAVE_LIBDRM + +LOCAL_SHARED_LIBRARIES := \ + libdl \ + libglapi \ + libexpat \ + +# swrast only? +ifeq ($(MESA_GPU_DRIVERS),swrast) +LOCAL_CFLAGS += -D__NOT_HAVE_DRM_H +else +LOCAL_SHARED_LIBRARIES += libdrm +endif + +ifneq ($(filter freedreno,$(MESA_GPU_DRIVERS)),) +LOCAL_CFLAGS += -DGALLIUM_FREEDRENO +gallium_DRIVERS += libmesa_winsys_freedreno libmesa_pipe_freedreno +LOCAL_SHARED_LIBRARIES += libdrm_freedreno +endif +ifneq ($(filter i915g,$(MESA_GPU_DRIVERS)),) +gallium_DRIVERS += libmesa_winsys_i915 libmesa_pipe_i915 +LOCAL_SHARED_LIBRARIES += libdrm_intel +LOCAL_CFLAGS += -DGALLIUM_I915 +endif +ifneq ($(filter ilo,$(MESA_GPU_DRIVERS)),) +gallium_DRIVERS += libmesa_winsys_intel libmesa_pipe_ilo +LOCAL_SHARED_LIBRARIES += libdrm_intel +LOCAL_CFLAGS += -DGALLIUM_ILO +endif +ifneq ($(filter nouveau,$(MESA_GPU_DRIVERS)),) +gallium_DRIVERS += libmesa_winsys_nouveau libmesa_pipe_nouveau +LOCAL_CFLAGS += -DGALLIUM_NOUVEAU +LOCAL_SHARED_LIBRARIES += libdrm_nouveau +endif +ifneq ($(filter r%,$(MESA_GPU_DRIVERS)),) +ifneq ($(filter r300g,$(MESA_GPU_DRIVERS)),) +gallium_DRIVERS += libmesa_pipe_r300 +LOCAL_CFLAGS += -DGALLIUM_R300 +endif +ifneq ($(filter r600g,$(MESA_GPU_DRIVERS)),) +gallium_DRIVERS += libmesa_pipe_r600 +LOCAL_CFLAGS += -DGALLIUM_R600 +endif +ifneq ($(filter radeonsi,$(MESA_GPU_DRIVERS)),) +gallium_DRIVERS += libmesa_pipe_radeonsi +LOCAL_SHARED_LIBRARIES += libLLVM +LOCAL_CFLAGS += -DGALLIUM_RADEONSI +endif +gallium_DRIVERS += libmesa_winsys_radeon libmesa_pipe_radeon +LOCAL_SHARED_LIBRARIES += libdrm_radeon +endif +ifneq ($(filter swrast,$(MESA_GPU_DRIVERS)),) +gallium_DRIVERS += libmesa_pipe_softpipe libmesa_winsys_sw_dri libmesa_winsys_sw_kms_dri +LOCAL_CFLAGS += -DGALLIUM_SOFTPIPE +endif +ifneq ($(filter vc4,$(MESA_GPU_DRIVERS)),) +LOCAL_CFLAGS += -DGALLIUM_VC4 +gallium_DRIVERS += libmesa_winsys_vc4 libmesa_pipe_vc4 +endif +ifneq ($(filter vmwgfx,$(MESA_GPU_DRIVERS)),) +gallium_DRIVERS += libmesa_winsys_svga libmesa_pipe_svga +LOCAL_CFLAGS += -DGALLIUM_VMWGFX +endif +ifneq ($(filter nouveau r600g,$(MESA_GPU_DRIVERS)),) +LOCAL_SHARED_LIBRARIES += $(if $(filter true,$(MESA_LOLLIPOP_BUILD)),libc++,libstlport) +endif + +LOCAL_STATIC_LIBRARIES := \ + $(gallium_DRIVERS) \ + libmesa_st_dri \ + libmesa_st_mesa \ + libmesa_glsl \ + libmesa_dri_common \ + libmesa_megadriver_stub \ + libmesa_gallium \ + libmesa_util \ + libmesa_loader \ + +ifeq ($(MESA_ENABLE_LLVM),true) +LOCAL_STATIC_LIBRARIES += \ + libLLVMR600CodeGen \ + libLLVMR600Desc \ + libLLVMR600Info \ + libLLVMR600AsmPrinter \ + libelf +LOCAL_LDLIBS += $(if $(filter true,$(MESA_LOLLIPOP_BUILD)),-lgcc) +endif + +include $(GALLIUM_COMMON_MK) +include $(BUILD_SHARED_LIBRARY) diff --git a/src/gallium/targets/dri/Makefile.am b/src/gallium/targets/dri/Makefile.am index f9e4ada9338..96483964589 100644 --- a/src/gallium/targets/dri/Makefile.am +++ b/src/gallium/targets/dri/Makefile.am @@ -53,12 +53,6 @@ gallium_dri_la_LIBADD = \ $(LIBDRM_LIBS) \ $(GALLIUM_COMMON_LIB_DEPS) -# XXX: Temporary allow duplicated symbols, as the loader pulls in xmlconfig.c -# which already provides driParse* and driQuery* amongst others. -# Remove this hack as we come up with a cleaner solution. -gallium_dri_la_LDFLAGS += \ - -Wl,--allow-multiple-definition - EXTRA_gallium_dri_la_DEPENDENCIES = \ dri.sym \ $(top_srcdir)/src/gallium/targets/dri-vdpau.dyn diff --git a/src/gallium/targets/haiku-softpipe/GalliumContext.cpp b/src/gallium/targets/haiku-softpipe/GalliumContext.cpp index f9d7dfc8734..1e3874bdb17 100644 --- a/src/gallium/targets/haiku-softpipe/GalliumContext.cpp +++ b/src/gallium/targets/haiku-softpipe/GalliumContext.cpp @@ -10,17 +10,18 @@ #include "GalliumContext.h" +#include <stdio.h> + #include "GLView.h" #include "bitmap_wrapper.h" -extern "C" { + #include "glapi/glapi.h" #include "pipe/p_format.h" -#include "state_tracker/st_cb_fbo.h" -#include "state_tracker/st_cb_flush.h" +//#include "state_tracker/st_cb_fbo.h" +//#include "state_tracker/st_cb_flush.h" #include "state_tracker/st_context.h" #include "state_tracker/st_gl_api.h" -#include "state_tracker/st_manager.h" #include "state_tracker/sw_winsys.h" #include "sw/hgl/hgl_sw_winsys.h" #include "util/u_atomic.h" @@ -28,7 +29,6 @@ extern "C" { #include "target-helpers/inline_sw_helper.h" #include "target-helpers/inline_debug_helper.h" -} #ifdef DEBUG @@ -125,7 +125,8 @@ GalliumContext::CreateContext(Bitmap *bitmap) context->read = NULL; context->st = NULL; - context->api = st_gl_api_create(); + // Create st_gl_api + context->api = hgl_create_st_api(); if (!context->api) { ERROR("%s: Couldn't obtain Mesa state tracker API!\n", __func__); return -1; @@ -157,12 +158,10 @@ GalliumContext::CreateContext(Bitmap *bitmap) attribs.minor = 0; //attribs.flags |= ST_CONTEXT_FLAG_DEBUG; - struct st_api* api = context->api; - // Create context using state tracker api call enum st_context_error result; - context->st = api->create_context(api, context->manager, &attribs, - &result, context->st); + context->st = context->api->create_context(context->api, context->manager, + &attribs, &result, context->st); if (!context->st) { ERROR("%s: Couldn't create mesa state tracker context!\n", @@ -287,10 +286,8 @@ GalliumContext::SetCurrentContext(Bitmap *bitmap, context_id contextID) return B_ERROR; } - struct st_api* api = context->api; - if (!bitmap) { - api->make_current(context->api, NULL, NULL, NULL); + context->api->make_current(context->api, NULL, NULL, NULL); return B_OK; } @@ -303,7 +300,7 @@ GalliumContext::SetCurrentContext(Bitmap *bitmap, context_id contextID) } // We need to lock and unlock framebuffers before accessing them - api->make_current(context->api, context->st, context->draw->stfbi, + context->api->make_current(context->api, context->st, context->draw->stfbi, context->read->stfbi); //if (context->textures[ST_ATTACHMENT_BACK_LEFT] diff --git a/src/gallium/targets/haiku-softpipe/GalliumContext.h b/src/gallium/targets/haiku-softpipe/GalliumContext.h index b50d52895fc..22076cbb141 100644 --- a/src/gallium/targets/haiku-softpipe/GalliumContext.h +++ b/src/gallium/targets/haiku-softpipe/GalliumContext.h @@ -12,14 +12,10 @@ #include <stddef.h> #include <kernel/image.h> -extern "C" { -//#include "state_tracker/st_api.h" #include "pipe/p_compiler.h" #include "pipe/p_screen.h" #include "postprocess/filters.h" -#include "os/os_thread.h" #include "hgl_context.h" -} #include "bitmap_wrapper.h" @@ -56,6 +52,6 @@ private: context_id fCurrentContext; pipe_mutex fMutex; }; - + #endif /* GALLIUMCONTEXT_H */ diff --git a/src/gallium/targets/libgl-xlib/Makefile.am b/src/gallium/targets/libgl-xlib/Makefile.am index 33b0d1345de..d99caae3cb0 100644 --- a/src/gallium/targets/libgl-xlib/Makefile.am +++ b/src/gallium/targets/libgl-xlib/Makefile.am @@ -24,6 +24,11 @@ GL_MAJOR = 1 GL_MINOR = 5 GL_TINY = $(MESA_MAJOR)$(MESA_MINOR)0$(MESA_TINY) +if HAVE_SHARED_GLAPI +SHARED_GLAPI_CFLAGS = -DGLX_SHARED_GLAPI +SHARED_GLAPI_LIB = $(top_builddir)/src/mapi/shared-glapi/libglapi.la +endif + AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/src \ @@ -35,6 +40,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/gallium/state_trackers/glx/xlib \ -I$(top_srcdir)/src/gallium/auxiliary \ -I$(top_srcdir)/src/gallium/winsys \ + $(SHARED_GLAPI_CFLAGS) \ -DGALLIUM_SOFTPIPE \ -DGALLIUM_RBUG \ -DGALLIUM_TRACE @@ -65,6 +71,7 @@ lib@GL_LIB@_la_LIBADD = \ $(top_builddir)/src/mapi/glapi/libglapi.la \ $(top_builddir)/src/mesa/libmesagallium.la \ $(top_builddir)/src/gallium/auxiliary/libgallium.la \ + $(SHARED_GLAPI_LIB) \ $(GL_LIB_DEPS) \ $(CLOCK_LIB) diff --git a/src/gallium/targets/osmesa/Makefile.am b/src/gallium/targets/osmesa/Makefile.am index 2c09736714a..38e515f8252 100644 --- a/src/gallium/targets/osmesa/Makefile.am +++ b/src/gallium/targets/osmesa/Makefile.am @@ -42,7 +42,6 @@ nodist_EXTRA_lib@OSMESA_LIB@_la_SOURCES = dummy.cpp lib@OSMESA_LIB@_la_SOURCES = target.c lib@OSMESA_LIB@_la_LDFLAGS = \ - -module \ -no-undefined \ -version-number @OSMESA_VERSION@ \ $(GC_SECTIONS) \ diff --git a/src/gallium/targets/pipe-loader/Makefile.am b/src/gallium/targets/pipe-loader/Makefile.am index 967cdb76542..e4048b58605 100644 --- a/src/gallium/targets/pipe-loader/Makefile.am +++ b/src/gallium/targets/pipe-loader/Makefile.am @@ -52,6 +52,8 @@ endif PIPE_LIBS += \ $(top_builddir)/src/gallium/auxiliary/libgallium.la \ + $(top_builddir)/src/glsl/libnir.la \ + $(top_builddir)/src/libglsl_util.la \ $(top_builddir)/src/util/libmesautil.la \ $(top_builddir)/src/gallium/drivers/rbug/librbug.la \ $(top_builddir)/src/gallium/drivers/trace/libtrace.la \ |