summaryrefslogtreecommitdiff
path: root/src/gallium/targets/dri-vmwgfx
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/targets/dri-vmwgfx')
-rw-r--r--src/gallium/targets/dri-vmwgfx/Makefile1
-rw-r--r--src/gallium/targets/dri-vmwgfx/SConscript8
-rw-r--r--src/gallium/targets/dri-vmwgfx/vmw_powf.c17
3 files changed, 21 insertions, 5 deletions
diff --git a/src/gallium/targets/dri-vmwgfx/Makefile b/src/gallium/targets/dri-vmwgfx/Makefile
index 97c703b373..38f78932e1 100644
--- a/src/gallium/targets/dri-vmwgfx/Makefile
+++ b/src/gallium/targets/dri-vmwgfx/Makefile
@@ -12,6 +12,7 @@ PIPE_DRIVERS = \
C_SOURCES = \
target.c \
+ vmw_powf.c \
$(COMMON_GALLIUM_SOURCES)
DRIVER_DEFINES = \
diff --git a/src/gallium/targets/dri-vmwgfx/SConscript b/src/gallium/targets/dri-vmwgfx/SConscript
index 7afabc7429..7888e4f2c8 100644
--- a/src/gallium/targets/dri-vmwgfx/SConscript
+++ b/src/gallium/targets/dri-vmwgfx/SConscript
@@ -1,9 +1,5 @@
Import('*')
-if not 'svga' in env['drivers']:
- print 'warning: svga pipe driver not built skipping vmwgfx_dri.so'
- Return()
-
env = drienv.Clone()
env.Append(CPPDEFINES = ['GALLIUM_RBUG', 'GALLIUM_TRACE'])
@@ -20,8 +16,10 @@ env.Prepend(LIBS = [
COMMON_DRI_DRM_OBJECTS
])
-env.LoadableModule(
+module = env.LoadableModule(
target = 'vmwgfx_dri.so',
source = 'target.c',
SHLIBPREFIX = '',
)
+
+env.Alias('dri-vmwgfx', module) \ No newline at end of file
diff --git a/src/gallium/targets/dri-vmwgfx/vmw_powf.c b/src/gallium/targets/dri-vmwgfx/vmw_powf.c
new file mode 100644
index 0000000000..ca5e39b389
--- /dev/null
+++ b/src/gallium/targets/dri-vmwgfx/vmw_powf.c
@@ -0,0 +1,17 @@
+/**
+ * Powf may leave an unresolved symbol pointing to a libstdc++.so powf.
+ * However, not all libstdc++.so include this function, so optionally
+ * replace the powf function with calls to expf and logf.
+ */
+
+#ifdef VMW_RESOLVE_POWF
+
+extern float expf(float x);
+extern float logf(float x);
+extern float powf(float x, float y);
+
+float powf(float x, float y) {
+ return expf(logf(x)*y);
+}
+
+#endif