summaryrefslogtreecommitdiffstats
path: root/src/libXvMC
diff options
context:
space:
mode:
Diffstat (limited to 'src/libXvMC')
-rw-r--r--src/libXvMC/Makefile19
-rw-r--r--src/libXvMC/context.c4
2 files changed, 20 insertions, 3 deletions
diff --git a/src/libXvMC/Makefile b/src/libXvMC/Makefile
index 4985ecd3e9d..83fcfc523c1 100644
--- a/src/libXvMC/Makefile
+++ b/src/libXvMC/Makefile
@@ -1,7 +1,12 @@
TARGET = libXvMCg3dvl.so
SONAME = libXvMCg3dvl.so.1
GALLIUMDIR = ../gallium
-OBJECTS = block.o surface.o context.o subpicture.o attributes.o ${GALLIUMDIR}/winsys/g3dvl/xsp_winsys.o
+
+OBJECTS = block.o surface.o context.o subpicture.o attributes.o
+
+ifeq (${DRIVER}, softpipe)
+OBJECTS += ${GALLIUMDIR}/winsys/g3dvl/xsp_winsys.o
+endif
CFLAGS += -g -fPIC -Wall -Werror \
-I${GALLIUMDIR}/state_trackers/g3dvl \
@@ -9,6 +14,8 @@ CFLAGS += -g -fPIC -Wall -Werror \
-I${GALLIUMDIR}/include \
-I${GALLIUMDIR}/auxiliary \
-I${GALLIUMDIR}/drivers
+
+ifeq (${DRIVER}, softpipe)
LDFLAGS += -L${GALLIUMDIR}/state_trackers/g3dvl \
-L${GALLIUMDIR}/drivers/softpipe \
-L${GALLIUMDIR}/auxiliary/tgsi \
@@ -17,7 +24,17 @@ LDFLAGS += -L${GALLIUMDIR}/state_trackers/g3dvl \
-L${GALLIUMDIR}/auxiliary/cso_cache \
-L${GALLIUMDIR}/auxiliary/util \
-L${GALLIUMDIR}/auxiliary/rtasm
+else
+LDFLAGS += -L${GALLIUMDIR}/state_trackers/g3dvl \
+ -L${GALLIUMDIR}/winsys/g3dvl/nouveau \
+ -L${GALLIUMDIR}/auxiliary/util
+endif
+
+ifeq (${DRIVER}, softpipe)
LIBS += -lg3dvl -lsoftpipe -ldraw -ltgsi -ltranslate -lrtasm -lcso_cache -lutil -lm
+else
+LIBS += -lg3dvl -lnouveau_dri -lutil
+endif
#############################################
diff --git a/src/libXvMC/context.c b/src/libXvMC/context.c
index 22eadc1889b..59e1cb2b256 100644
--- a/src/libXvMC/context.c
+++ b/src/libXvMC/context.c
@@ -2,7 +2,7 @@
#include <X11/Xlib.h>
#include <X11/extensions/XvMClib.h>
#include <vl_context.h>
-#include <xsp_winsys.h>
+#include <vl_winsys.h>
static Status Validate(Display *display, XvPortID port, int surface_type_id, unsigned int width, unsigned int height, int flags, int *chroma_format)
{
@@ -117,7 +117,7 @@ Status XvMCCreateContext(Display *display, XvPortID port, int surface_type_id, i
if (ret != Success)
return ret;
- pipe = create_pipe_context(display);
+ pipe = create_pipe_context(display, XDefaultScreen(display));
assert(pipe);