summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets
diff options
context:
space:
mode:
authorChristian König <[email protected]>2011-01-20 22:43:18 +0100
committerChristian König <[email protected]>2011-01-20 22:43:18 +0100
commit78faf8d0e9c276a0ff1465e501d58fb3d66de2f7 (patch)
tree4e124bd6b511e408c5e113c4166b8fa97fd75b24 /src/gallium/targets
parentd2ff6b8715e817c1ef14d4bf12be58c19d894143 (diff)
parent37233f1ee0213a224611788bbab38840ba9f8308 (diff)
Merge remote branch 'origin/master' into pipe-video
Conflicts: src/gallium/drivers/r600/r600_asm.c
Diffstat (limited to 'src/gallium/targets')
-rw-r--r--src/gallium/targets/egl/Makefile6
-rw-r--r--src/gallium/targets/graw-xlib/graw_xlib.c20
-rw-r--r--src/gallium/targets/libgl-xlib/Makefile4
3 files changed, 26 insertions, 4 deletions
diff --git a/src/gallium/targets/egl/Makefile b/src/gallium/targets/egl/Makefile
index 017c1952141..92d971bab01 100644
--- a/src/gallium/targets/egl/Makefile
+++ b/src/gallium/targets/egl/Makefile
@@ -123,8 +123,12 @@ endif
# OpenGL state tracker
GL_CPPFLAGS := -I$(TOP)/src/mesa $(API_DEFINES)
-# cannot not link to $(GL_LIB) as the app might want GLES
+ifeq ($(SHARED_GLAPI),1)
+GL_SYS := $(DRI_LIB_DEPS) -l$(GLAPI_LIB)
+else
+# cannot link to $(GL_LIB) as the app might want GL or GLES
GL_SYS := $(DRI_LIB_DEPS)
+endif
GL_LIBS := $(TOP)/src/mesa/libmesagallium.a
# OpenVG state tracker
diff --git a/src/gallium/targets/graw-xlib/graw_xlib.c b/src/gallium/targets/graw-xlib/graw_xlib.c
index 578086f8f9a..b6d798e577c 100644
--- a/src/gallium/targets/graw-xlib/graw_xlib.c
+++ b/src/gallium/targets/graw-xlib/graw_xlib.c
@@ -66,9 +66,6 @@ graw_create_window_and_screen( int x,
root = RootWindow( graw.display, scrnum );
- if (format != PIPE_FORMAT_R8G8B8A8_UNORM)
- goto fail;
-
if (graw.display == NULL)
goto fail;
@@ -88,6 +85,23 @@ graw_create_window_and_screen( int x,
exit(1);
}
+ /* See if the requirested pixel format matches the visual */
+ if (visinfo->red_mask == 0xff0000 &&
+ visinfo->green_mask == 0xff00 &&
+ visinfo->blue_mask == 0xff) {
+ if (format != PIPE_FORMAT_B8G8R8A8_UNORM)
+ goto fail;
+ }
+ else if (visinfo->red_mask == 0xff &&
+ visinfo->green_mask == 0xff00 &&
+ visinfo->blue_mask == 0xff0000) {
+ if (format != PIPE_FORMAT_R8G8B8A8_UNORM)
+ goto fail;
+ }
+ else {
+ goto fail;
+ }
+
/* window attributes */
attr.background_pixel = 0;
attr.border_pixel = 0;
diff --git a/src/gallium/targets/libgl-xlib/Makefile b/src/gallium/targets/libgl-xlib/Makefile
index fb537c31556..53a6c33ed82 100644
--- a/src/gallium/targets/libgl-xlib/Makefile
+++ b/src/gallium/targets/libgl-xlib/Makefile
@@ -60,6 +60,10 @@ GL_LIB_DEPS += $(LLVM_LIBS)
LDFLAGS += $(LLVM_LDFLAGS)
endif
+ifeq ($(SHARED_GLAPI),1)
+GL_LIB_DEPS := -L$(TOP)/$(LIB_DIR) -l$(GLAPI_LIB) $(GL_LIB_DEPS)
+endif
+
.SUFFIXES : .cpp