summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets/osmesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/targets/osmesa')
-rw-r--r--src/gallium/targets/osmesa/Makefile.am6
-rw-r--r--src/gallium/targets/osmesa/SConscript43
-rw-r--r--src/gallium/targets/osmesa/osmesa.def16
-rw-r--r--src/gallium/targets/osmesa/osmesa.mingw.def13
4 files changed, 77 insertions, 1 deletions
diff --git a/src/gallium/targets/osmesa/Makefile.am b/src/gallium/targets/osmesa/Makefile.am
index f53823aecae..2c09736714a 100644
--- a/src/gallium/targets/osmesa/Makefile.am
+++ b/src/gallium/targets/osmesa/Makefile.am
@@ -76,7 +76,11 @@ lib@OSMESA_LIB@_la_LIBADD += $(top_builddir)/src/gallium/drivers/llvmpipe/libllv
endif
EXTRA_lib@OSMESA_LIB@_la_DEPENDENCIES = osmesa.sym
-EXTRA_DIST = osmesa.sym
+EXTRA_DIST = \
+ osmesa.sym \
+ osmesa.def \
+ osmesa.mingw.def \
+ SConscript
include $(top_srcdir)/install-gallium-links.mk
diff --git a/src/gallium/targets/osmesa/SConscript b/src/gallium/targets/osmesa/SConscript
new file mode 100644
index 00000000000..4a9115ba1cf
--- /dev/null
+++ b/src/gallium/targets/osmesa/SConscript
@@ -0,0 +1,43 @@
+Import('*')
+
+env = env.Clone()
+
+env.Prepend(CPPPATH = [
+ '#src/mapi',
+ '#src/mesa',
+ #Dir('../../../mapi'), # src/mapi build path for python-generated GL API files/headers
+])
+
+env.Prepend(LIBS = [
+ st_osmesa,
+ ws_null,
+ glapi,
+ mesa,
+ gallium,
+ trace,
+ glsl,
+ mesautil,
+ softpipe
+])
+
+env.Append(CPPDEFINES = ['GALLIUM_TRACE', 'GALLIUM_SOFTPIPE'])
+
+sources = ['target.c']
+
+if env['llvm']:
+ env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
+ env.Prepend(LIBS = [llvmpipe])
+
+if env['platform'] == 'windows':
+ if env['gcc'] and env['machine'] != 'x86_64':
+ sources += ['osmesa.mingw.def']
+ else:
+ sources += ['osmesa.def']
+
+gallium_osmesa = env.SharedLibrary(
+ target ='osmesa',
+ source = sources,
+ LIBS = env['LIBS'],
+)
+
+env.Alias('osmesa', gallium_osmesa)
diff --git a/src/gallium/targets/osmesa/osmesa.def b/src/gallium/targets/osmesa/osmesa.def
new file mode 100644
index 00000000000..e2a31ab5457
--- /dev/null
+++ b/src/gallium/targets/osmesa/osmesa.def
@@ -0,0 +1,16 @@
+;DESCRIPTION 'Mesa OSMesa lib for Win32'
+VERSION 4.1
+
+EXPORTS
+ OSMesaCreateContext
+ OSMesaCreateContextExt
+ OSMesaDestroyContext
+ OSMesaMakeCurrent
+ OSMesaGetCurrentContext
+ OSMesaPixelStore
+ OSMesaGetIntegerv
+ OSMesaGetDepthBuffer
+ OSMesaGetColorBuffer
+ OSMesaGetProcAddress
+ OSMesaColorClamp
+ OSMesaPostprocess
diff --git a/src/gallium/targets/osmesa/osmesa.mingw.def b/src/gallium/targets/osmesa/osmesa.mingw.def
new file mode 100644
index 00000000000..874ac544084
--- /dev/null
+++ b/src/gallium/targets/osmesa/osmesa.mingw.def
@@ -0,0 +1,13 @@
+EXPORTS
+ OSMesaCreateContext = OSMesaCreateContext@8
+ OSMesaCreateContextExt = OSMesaCreateContextExt@20
+ OSMesaDestroyContext = OSMesaDestroyContext@4
+ OSMesaMakeCurrent = OSMesaMakeCurrent@20
+ OSMesaGetCurrentContext = OSMesaGetCurrentContext@0
+ OSMesaPixelStore = OSMesaPixelStore@8
+ OSMesaGetIntegerv = OSMesaGetIntegerv@8
+ OSMesaGetDepthBuffer = OSMesaGetDepthBuffer@20
+ OSMesaGetColorBuffer = OSMesaGetColorBuffer@20
+ OSMesaGetProcAddress = OSMesaGetProcAddress@4
+ OSMesaColorClamp = OSMesaColorClamp@4
+ OSMesaPostprocess = OSMesaPostprocess@12