mesa: Changes to 'upstream-experimental'
Makefile | 8 -
configs/autoconf.in | 5
configs/default | 2
configure.ac | 14 +-
src/gallium/state_trackers/egl/x11/glxinit.c | 4
src/gallium/state_trackers/egl/x11/native_dri2.c | 14 ++
src/gallium/state_trackers/egl/x11/native_x11.c | 2
src/gallium/state_trackers/egl/x11/x11_screen.c | 76 +++++++-----
src/gallium/state_trackers/egl/x11/x11_screen.h | 26 ++--
src/gallium/winsys/drm/Makefile.egl | 2
src/glw/Makefile | 2
src/mesa/drivers/dri/r300/compiler/radeon_pair_schedule.c | 86 ++++++++++----
12 files changed, 170 insertions(+), 71 deletions(-)
New commits:
commit d06e0117e302bc314baa75e02e8268936982e6c6
Author: Chia-I Wu <olv@lunarg.com>
Date: Fri Jul 16 20:09:29 2010 +0800
st/egl: Fix build on FreeBSD.
There is no libdl on FreeBSD. Based on patch from Thinker
<thinker@branda.to>, which is against 7.8.
This fixes fdo bug #29093.
(cherry picked from commit 08f4bc07e424aaeb35eb58736fdca64b1398c190)
diff --git a/configs/autoconf.in b/configs/autoconf.in
index b6071f8..6218be9 100644
--- a/configs/autoconf.in
+++ b/configs/autoconf.in
@@ -29,6 +29,9 @@ X11_CFLAGS = @X11_CFLAGS@
GLW_CFLAGS = @GLW_CFLAGS@
GLUT_CFLAGS = @GLUT_CFLAGS@
+# dlopen
+DLOPEN_LIBS = @DLOPEN_LIBS@
+
# Assembler
MESA_ASM_SOURCES = @MESA_ASM_SOURCES@
GLAPI_ASM_SOURCES = @GLAPI_ASM_SOURCES@
diff --git a/configs/default b/configs/default
index f12bec8..d4b45a3 100644
--- a/configs/default
+++ b/configs/default
@@ -121,6 +121,8 @@ APP_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LI
APP_LIB_DEPS = -lm
X11_LIBS = -lX11
+DLOPEN_LIBS = -ldl
+
# Installation directories (for make install)
INSTALL_DIR = /usr/local
INSTALL_LIB_DIR = $(INSTALL_DIR)/$(LIB_DIR)
diff --git a/configure.ac b/configure.ac
index 81fd320..e15371f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -398,6 +398,7 @@ dnl Check to see if dlopen is in default libraries (like Solaris, which
dnl has it in libc), or if libdl is needed to get it.
AC_CHECK_FUNC([dlopen], [],
[AC_CHECK_LIB([dl], [dlopen], [DLOPEN_LIBS="-ldl"])])
+AC_SUBST([DLOPEN_LIBS])
dnl See if posix_memalign is available
AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"])
diff --git a/src/gallium/winsys/drm/Makefile.egl b/src/gallium/winsys/drm/Makefile.egl
index 8363de6..c48967f 100644
--- a/src/gallium/winsys/drm/Makefile.egl
+++ b/src/gallium/winsys/drm/Makefile.egl
@@ -11,7 +11,7 @@
EGL_DRIVER_OBJECTS = $(EGL_DRIVER_SOURCES:.c=.o)
-common_LIBS = -ldrm -lm -ldl
+common_LIBS = -ldrm -lm $(DLOPEN_LIBS)
x11_ST = $(TOP)/src/gallium/state_trackers/egl/libeglx11.a
x11_LIBS = $(common_LIBS) -lX11 -lXext -lXfixes
commit b69d5414aa6ed1a816fc2a15a287325b376cebef
Author: Tom Stellard <tstellar@gmail.com>
Date: Sun Jul 4 12:30:52 2010 -0700
r300/compiler: Fix scheduling of TEX instructions.
The following instruction sequence will no longer be emitted in separate
TEX blocks:
0: TEX temp[0].xyz, temp[1].xy__, 2D[0];
1: TEX temp[1].xyz, temp[2].xy__, 2D[0];
This fixes fdo bug #25109
(cherry picked from commit 3724a2e65f5b3aa6e123889342a3e9c4d05903f5)
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_pair_schedule.c b/src/mesa/drivers/dri/r300/compiler/radeon_pair_schedule.c
index df67aaf..b8ee288 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_pair_schedule.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_pair_schedule.c
@@ -141,12 +141,28 @@ static void add_inst_to_list(struct schedule_instruction ** list, struct schedul
*list = inst;
}
+static void add_inst_to_list_end(struct schedule_instruction ** list,
+ struct schedule_instruction * inst)
+{
+ if(!*list){
+ *list = inst;
+ }else{
+ struct schedule_instruction * temp = *list;
+ while(temp->NextReady){
+ temp = temp->NextReady;
+ }
+ temp->NextReady = inst;
+ }
+}
+
static void instruction_ready(struct schedule_state * s, struct schedule_instruction * sinst)
{
DBG("%i is now ready\n", sinst->Instruction->IP);
+ /* Adding Ready TEX instructions to the end of the "Ready List" helps
+ * us emit TEX instructions in blocks without losing our place. */
if (sinst->Instruction->Type == RC_INSTRUCTION_NORMAL)
- add_inst_to_list(&s->ReadyTEX, sinst);
+ add_inst_to_list_end(&s->ReadyTEX, sinst);
else if (sinst->Instruction->U.P.Alpha.Opcode == RC_OPCODE_NOP)
add_inst_to_list(&s->ReadyRGB, sinst);
else if (sinst->Instruction->U.P.RGB.Opcode == RC_OPCODE_NOP)
@@ -163,11 +179,14 @@ static void decrease_dependencies(struct schedule_state * s, struct schedule_ins
instruction_ready(s, sinst);
}
-static void commit_instruction(struct schedule_state * s, struct schedule_instruction * sinst)
-{
- DBG("%i: commit\n", sinst->Instruction->IP);
-
- for(unsigned int i = 0; i < sinst->NumReadValues; ++i) {
+/**
+ * This function decreases the dependencies of the next instruction that
+ * wants to write to each of sinst's read values.
+ */
+static void commit_update_reads(struct schedule_state * s,
+ struct schedule_instruction * sinst){
+ unsigned int i;
+ for(i = 0; i < sinst->NumReadValues; ++i) {
struct reg_value * v = sinst->ReadValues[i];
assert(v->NumReaders > 0);
v->NumReaders--;
@@ -176,8 +195,12 @@ static void commit_instruction(struct schedule_state * s, struct schedule_instru
decrease_dependencies(s, v->Next->Writer);
}
}
+}
- for(unsigned int i = 0; i < sinst->NumWriteValues; ++i) {
+static void commit_update_writes(struct schedule_state * s,
+ struct schedule_instruction * sinst){
+ unsigned int i;
+ for(i = 0; i < sinst->NumWriteValues; ++i) {
struct reg_value * v = sinst->WriteValues[i];
if (v->NumReaders) {
for(struct reg_value_reader * r = v->Readers; r; r = r->Next) {
@@ -196,6 +219,15 @@ static void commit_instruction(struct schedule_state * s, struct schedule_instru
}
}
+static void commit_alu_instruction(struct schedule_state * s, struct schedule_instruction * sinst)
+{
+ DBG("%i: commit\n", sinst->Instruction->IP);
+
+ commit_update_reads(s, sinst);
+
+ commit_update_writes(s, sinst);
+}
+
/**
* Emit all ready texture instructions in a single block.
*
@@ -208,21 +240,37 @@ static void emit_all_tex(struct schedule_state * s, struct rc_instruction * befo
assert(s->ReadyTEX);
- /* Don't let the ready list change under us! */
- readytex = s->ReadyTEX;
- s->ReadyTEX = 0;
-
/* Node marker for R300 */
struct rc_instruction * inst_begin = rc_insert_new_instruction(s->C, before->Prev);
inst_begin->U.I.Opcode = RC_OPCODE_BEGIN_TEX;
/* Link texture instructions back in */
+ readytex = s->ReadyTEX;
while(readytex) {
- struct schedule_instruction * tex = readytex;
+ rc_insert_instruction(before->Prev, readytex->Instruction);
+ DBG("%i: commit TEX reads\n", readytex->Instruction->IP);
+
+ /* All of the TEX instructions in the same TEX block have
+ * their source registers read from before any of the
+ * instructions in that block write to their destination
+ * registers. This means that when we commit a TEX
+ * instruction, any other TEX instruction that wants to write
+ * to one of the committed instruction's source register can be
+ * marked as ready and should be emitted in the same TEX
+ * block. This prevents the following sequence from being
+ * emitted in two different TEX blocks:
+ * 0: TEX temp[0].xyz, temp[1].xy__, 2D[0];
+ * 1: TEX temp[1].xyz, temp[2].xy__, 2D[0];
+ */
+ commit_update_reads(s, readytex);
+ readytex = readytex->NextReady;
+ }
+ readytex = s->ReadyTEX;
+ s->ReadyTEX = 0;
+ while(readytex){
+ DBG("%i: commit TEX writes\n", readytex->Instruction->IP);
+ commit_update_writes(s, readytex);
readytex = readytex->NextReady;
-
- rc_insert_instruction(before->Prev, tex->Instruction);
- commit_instruction(s, tex);
}
}
@@ -328,7 +376,7 @@ static void emit_one_alu(struct schedule_state *s, struct rc_instruction * befor
}
rc_insert_instruction(before->Prev, sinst->Instruction);
- commit_instruction(s, sinst);
+ commit_alu_instruction(s, sinst);
} else {
struct schedule_instruction **prgb;
struct schedule_instruction **palpha;
@@ -346,8 +394,8 @@ static void emit_one_alu(struct schedule_state *s, struct rc_instruction * befor
*prgb = (*prgb)->NextReady;
*palpha = (*palpha)->NextReady;
rc_insert_instruction(before->Prev, psirgb->Instruction);
- commit_instruction(s, psirgb);
- commit_instruction(s, psialpha);
+ commit_alu_instruction(s, psirgb);
+ commit_alu_instruction(s, psialpha);
goto success;
}
}
@@ -357,7 +405,7 @@ static void emit_one_alu(struct schedule_state *s, struct rc_instruction * befor
s->ReadyRGB = s->ReadyRGB->NextReady;
rc_insert_instruction(before->Prev, sinst->Instruction);
- commit_instruction(s, sinst);
+ commit_alu_instruction(s, sinst);
success: ;
}
}
commit f6bba7b996b9a72fcf121e66b6317f5635b1a5c4
Author: Chia-I Wu <olv@lunarg.com>
Date: Tue Jul 6 14:34:43 2010 +0800
st/egl: Add support for !GLX_DIRECT_RENDERING.
st/egl uses GLX code for DRI2 support. It should honor
GLX_DIRECT_RENDERING.
Also updates configure.ac to define GLX_DIRECT_RENDERING for st/egl.
(cherry picked from commit cf588ab3f1edb89be4cd57045a3888ff482fa817)
diff --git a/configure.ac b/configure.ac
index 121c386..81fd320 100644
--- a/configure.ac
+++ b/configure.ac
@@ -699,7 +699,7 @@ AC_SUBST([DRI_DRIVER_SEARCH_DIR])
dnl Direct rendering or just indirect rendering
AC_ARG_ENABLE([driglx-direct],
[AS_HELP_STRING([--disable-driglx-direct],
- [enable direct rendering in GLX for DRI @<:@default=enabled@:>@])],
+ [enable direct rendering in GLX and EGL for DRI @<:@default=enabled@:>@])],
[driglx_direct="$enableval"],
[driglx_direct="yes"])
dnl Which drivers to build - default is chosen by platform
@@ -1216,6 +1216,10 @@ yes)
if test "x$enable_egl" != xyes; then
AC_MSG_ERROR([cannot build egl state tracker without EGL library])
fi
+ # define GLX_DIRECT_RENDERING even when the driver is not dri
+ if test "x$mesa_driver" != xdri -a "x$driglx_direct" = xyes; then
+ DEFINES="$DEFINES -DGLX_DIRECT_RENDERING"
+ fi
;;
xorg)
PKG_CHECK_MODULES([LIBDRM_XORG], [libdrm >= $LIBDRM_XORG_REQUIRED])
diff --git a/src/gallium/state_trackers/egl/x11/glxinit.c b/src/gallium/state_trackers/egl/x11/glxinit.c
index 1ed2afd..dd35189 100644
--- a/src/gallium/state_trackers/egl/x11/glxinit.c
+++ b/src/gallium/state_trackers/egl/x11/glxinit.c
@@ -16,6 +16,8 @@
#include "glxinit.h"
+#ifdef GLX_DIRECT_RENDERING
+
typedef struct GLXGenericGetString
{
CARD8 reqType;
@@ -680,3 +682,5 @@ __glXInitialize(Display * dpy)
return dpyPriv;
}
+
+#endif /* GLX_DIRECT_RENDERING */
diff --git a/src/gallium/state_trackers/egl/x11/native_dri2.c b/src/gallium/state_trackers/egl/x11/native_dri2.c
index 8d2a8b1..a8bdd34 100644
--- a/src/gallium/state_trackers/egl/x11/native_dri2.c
+++ b/src/gallium/state_trackers/egl/x11/native_dri2.c
@@ -37,6 +37,8 @@
#include "native_x11.h"
#include "x11_screen.h"
+#ifdef GLX_DIRECT_RENDERING
+
enum dri2_surface_type {
DRI2_SURFACE_TYPE_WINDOW,
DRI2_SURFACE_TYPE_PIXMAP,
@@ -878,3 +880,15 @@ x11_create_dri2_display(EGLNativeDisplayType dpy,
return &dri2dpy->base;
}
+
+#else /* GLX_DIRECT_RENDERING */
+
+struct native_display *
+x11_create_dri2_display(EGLNativeDisplayType dpy,
+ struct native_event_handler *event_handler,
+ struct drm_api *api)
+{
+ return NULL;
+}
+
+#endif /* GLX_DIRECT_RENDERING */
diff --git a/src/gallium/state_trackers/egl/x11/native_x11.c b/src/gallium/state_trackers/egl/x11/native_x11.c
index 7b4fe63..0c25e4d 100644
--- a/src/gallium/state_trackers/egl/x11/native_x11.c
+++ b/src/gallium/state_trackers/egl/x11/native_x11.c
@@ -70,7 +70,9 @@ native_create_probe(EGLNativeDisplayType dpy)
xscr = x11_screen_create(xdpy, scr);
if (xscr) {
if (x11_screen_support(xscr, X11_SCREEN_EXTENSION_DRI2)) {
+#ifdef GLX_DIRECT_RENDERING
driver_name = x11_screen_probe_dri2(xscr, NULL, NULL);
+#endif
if (driver_name)
nprobe->data = strdup(driver_name);
}
diff --git a/src/gallium/state_trackers/egl/x11/x11_screen.c b/src/gallium/state_trackers/egl/x11/x11_screen.c
index f409611..1706120 100644
--- a/src/gallium/state_trackers/egl/x11/x11_screen.c
+++ b/src/gallium/state_trackers/egl/x11/x11_screen.c
@@ -39,8 +39,10 @@
#include "glxinit.h"
struct x11_screen {
+#ifdef GLX_DIRECT_RENDERING
/* dummy base class */
struct __GLXDRIdisplayRec base;
+#endif
Display *dpy;
int number;
@@ -103,15 +105,19 @@ x11_screen_destroy(struct x11_screen *xscr)
if (xscr->dri_device)
Xfree(xscr->dri_device);
+#ifdef GLX_DIRECT_RENDERING
/* xscr->glx_dpy will be destroyed with the X display */
if (xscr->glx_dpy)
xscr->glx_dpy->dri2Display = NULL;
+#endif
if (xscr->visuals)
XFree(xscr->visuals);
free(xscr);
}
+#ifdef GLX_DIRECT_RENDERING
+
static boolean
x11_screen_init_dri2(struct x11_screen *xscr)
{
@@ -133,6 +139,8 @@ x11_screen_init_glx(struct x11_screen *xscr)
return (xscr->glx_dpy != NULL);
}
+#endif /* GLX_DIRECT_RENDERING */
+
/**
* Return true if the screen supports the extension.
*/
@@ -145,12 +153,14 @@ x11_screen_support(struct x11_screen *xscr, enum x11_screen_extension ext)
case X11_SCREEN_EXTENSION_XSHM:
supported = XShmQueryExtension(xscr->dpy);
break;
+#ifdef GLX_DIRECT_RENDERING
case X11_SCREEN_EXTENSION_GLX:
supported = x11_screen_init_glx(xscr);
break;
case X11_SCREEN_EXTENSION_DRI2:
supported = x11_screen_init_dri2(xscr);
break;
+#endif
default:
break;
}
@@ -234,6 +244,39 @@ x11_screen_convert_visual(struct x11_screen *xscr, const XVisualInfo *visual,
}
/**
+ * Return the depth of a drawable.
+ *
+ * Unlike other drawable functions, the drawable needs not be a DRI2 drawable.
+ */
+uint
+x11_drawable_get_depth(struct x11_screen *xscr, Drawable drawable)
+{
+ unsigned int depth;
+
+ if (drawable != xscr->last_drawable) {
+ Window root;
+ int x, y;
+ unsigned int w, h, border;
+ Status ok;
+
+ ok = XGetGeometry(xscr->dpy, drawable, &root,
+ &x, &y, &w, &h, &border, &depth);
+ if (!ok)
+ depth = 0;
+
+ xscr->last_drawable = drawable;
+ xscr->last_depth = depth;
+ }
+ else {
+ depth = xscr->last_depth;
+ }
+
+ return depth;
+}
+
+#ifdef GLX_DIRECT_RENDERING
+
+/**
* Return the GLX fbconfigs.
*/
const __GLcontextModes *
@@ -392,37 +435,6 @@ x11_drawable_get_buffers(struct x11_screen *xscr, Drawable drawable,
}
/**
- * Return the depth of a drawable.
- *
- * Unlike other drawable functions, the drawable needs not be a DRI2 drawable.
- */
-uint
-x11_drawable_get_depth(struct x11_screen *xscr, Drawable drawable)
-{
- unsigned int depth;
-
- if (drawable != xscr->last_drawable) {
- Window root;
- int x, y;
- unsigned int w, h, border;
- Status ok;
-
- ok = XGetGeometry(xscr->dpy, drawable, &root,
- &x, &y, &w, &h, &border, &depth);
- if (!ok)
- depth = 0;
-
- xscr->last_drawable = drawable;
- xscr->last_depth = depth;
- }
- else {
- depth = xscr->last_depth;
- }
-
- return depth;
-}
-
-/**
* Create a mode list of the given size.
*/
__GLcontextModes *
@@ -489,3 +501,5 @@ dri2InvalidateBuffers(Display *dpy, XID drawable)
xscr->dri_invalidate_buffers(xscr, drawable, xscr->dri_user_data);
}
+
+#endif /* GLX_DIRECT_RENDERING */
diff --git a/src/gallium/state_trackers/egl/x11/x11_screen.h b/src/gallium/state_trackers/egl/x11/x11_screen.h
index 37e8d5a..55e1201 100644
--- a/src/gallium/state_trackers/egl/x11/x11_screen.h
+++ b/src/gallium/state_trackers/egl/x11/x11_screen.h
@@ -68,20 +68,18 @@ void
x11_screen_convert_visual(struct x11_screen *xscr, const XVisualInfo *visual,
__GLcontextModes *mode);
+uint
+x11_drawable_get_depth(struct x11_screen *xscr, Drawable drawable);
+
+#ifdef GLX_DIRECT_RENDERING
+
+/* GLX */
const __GLcontextModes *
x11_screen_get_glx_configs(struct x11_screen *xscr);
const __GLcontextModes *
x11_screen_get_glx_visuals(struct x11_screen *xscr);
-const char *
-x11_screen_probe_dri2(struct x11_screen *xscr, int *major, int *minor);
-
-int
-x11_screen_enable_dri2(struct x11_screen *xscr,
- x11_drawable_invalidate_buffers invalidate_buffers,
- void *user_data);
-
__GLcontextModes *
x11_context_modes_create(unsigned count);
@@ -91,6 +89,15 @@ x11_context_modes_destroy(__GLcontextModes *modes);
unsigned
x11_context_modes_count(const __GLcontextModes *modes);
+/* DRI2 */
+const char *
+x11_screen_probe_dri2(struct x11_screen *xscr, int *major, int *minor);
+
+int
+x11_screen_enable_dri2(struct x11_screen *xscr,
+ x11_drawable_invalidate_buffers invalidate_buffers,
+ void *user_data);
+
void
x11_drawable_enable_dri2(struct x11_screen *xscr,
Drawable drawable, boolean on);
@@ -105,7 +112,6 @@ x11_drawable_get_buffers(struct x11_screen *xscr, Drawable drawable,
int *width, int *height, unsigned int *attachments,
boolean with_format, int num_ins, int *num_outs);
-uint
-x11_drawable_get_depth(struct x11_screen *xscr, Drawable drawable);
+#endif /* GLX_DIRECT_RENDERING */
#endif /* _X11_SCREEN_H_ */
commit 6afe2936f72ae2327d176e63b2b3bee64fee43ca
Author: Brian Paul <brianp@vmware.com>
Date: Mon Jul 5 16:50:08 2010 -0600
mesa: put progs/util into the MesaDemos package
diff --git a/Makefile b/Makefile
index 84d0038..e9c7970 100644
--- a/Makefile
+++ b/Makefile
@@ -285,9 +285,6 @@ MAIN_FILES = \
$(DIRECTORY)/src/mesa/x86-64/*.[chS] \
$(DIRECTORY)/src/mesa/x86-64/Makefile \
$(DIRECTORY)/progs/Makefile \
- $(DIRECTORY)/progs/util/README \
- $(DIRECTORY)/progs/util/*.[ch] \
- $(DIRECTORY)/progs/util/sampleMakefile \
$(DIRECTORY)/windows/VC8/
ES_FILES = \
@@ -438,7 +435,10 @@ DEMO_FILES = \
$(DIRECTORY)/progs/glsl/*.c \
$(DIRECTORY)/progs/glsl/*.frag \
$(DIRECTORY)/progs/glsl/*.vert \
- $(DIRECTORY)/progs/glsl/*.shtest
+ $(DIRECTORY)/progs/glsl/*.shtest \
+ $(DIRECTORY)/progs/util/README \
+ $(DIRECTORY)/progs/util/*.[ch] \
+ $(DIRECTORY)/progs/util/sampleMakefile
GLUT_FILES = \
$(DIRECTORY)/include/GL/glut.h \
commit fd95ea52e59321bd1f78c338a95f501bff6e671a
Author: Dan Nicholson <dbn.lists@gmail.com>
Date: Thu Jul 1 13:02:47 2010 -0700
Use GLW_CFLAGS when building libGLw
We check for libX11 and libXt, so we might as well use the CFLAGS
pkg-config tells us about.
(cherry picked from commit 442c37e2ef57d8dcf88c91d457df7f6516d76264)
Conflicts:
configs/autoconf.in
diff --git a/configs/autoconf.in b/configs/autoconf.in
index 440b50b..b6071f8 100644
--- a/configs/autoconf.in
+++ b/configs/autoconf.in
@@ -26,6 +26,7 @@ INTEL_LIBS = @INTEL_LIBS@
INTEL_CFLAGS = @INTEL_CFLAGS@
X11_LIBS = @X11_LIBS@
X11_CFLAGS = @X11_CFLAGS@
+GLW_CFLAGS = @GLW_CFLAGS@
GLUT_CFLAGS = @GLUT_CFLAGS@
# Assembler
diff --git a/src/glw/Makefile b/src/glw/Makefile
index 1fb3d3c..39352f0 100644
--- a/src/glw/Makefile
+++ b/src/glw/Makefile
@@ -17,7 +17,7 @@ OBJECTS = $(GLW_SOURCES:.c=.o)
##### RULES #####
.c.o:
- $(CC) -c $(INCDIRS) $(CFLAGS) $<
+ $(CC) -c $(INCDIRS) $(CFLAGS) $(GLW_CFLAGS) $<
commit 31799da47fc367ead5a0b74f579fc288b0f99c55
Author: Dan Nicholson <dbn.lists@gmail.com>
Date: Thu Jul 1 13:02:09 2010 -0700
Use GLUT_CFLAGS when building glut
Fix this build error (in MesaGLUT-7.6.1)...
glut_cmap.c:23:66: error: X11/Xmu/StdCmap.h: No such file or directory
...by not preventing the cflags that pkg-config finds for glut dependencies
(including 'xmu') from being used.
Defining GLUT_CFLAGS before running the pkg-config prevents the
cflags found by pkg-config from being used.
This patch lets GLUT_CFLAGS that configure & pkg-config work
so hard to set actually get used.
Also make sure the generated configs/autoconf defines GLUT_CFLAGS
used in (at least) src/glut/glx/Makefile.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
(cherry picked from commit 9617254a1e5522615c96ab25c9e0a70e0d63d7e7)
Conflicts:
configs/autoconf.in
diff --git a/configs/autoconf.in b/configs/autoconf.in
index fbd5faa..440b50b 100644
--- a/configs/autoconf.in
+++ b/configs/autoconf.in
@@ -26,6 +26,7 @@ INTEL_LIBS = @INTEL_LIBS@
INTEL_CFLAGS = @INTEL_CFLAGS@
X11_LIBS = @X11_LIBS@
X11_CFLAGS = @X11_CFLAGS@
+GLUT_CFLAGS = @GLUT_CFLAGS@
# Assembler
MESA_ASM_SOURCES = @MESA_ASM_SOURCES@
diff --git a/configure.ac b/configure.ac
index e711634..121c386 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1102,10 +1102,6 @@ fi
if test "x$enable_glut" = xyes; then
SRC_DIRS="$SRC_DIRS glut/glx"
- GLUT_CFLAGS=""
- if test "x$GCC" = xyes; then
- GLUT_CFLAGS="-fexceptions"
- fi
if test "$x11_pkgconfig" = yes; then
PKG_CHECK_MODULES([GLUT],[x11 xmu xi])
GLUT_PC_REQ_PRIV="x11 xmu xi"
@@ -1116,6 +1112,9 @@ if test "x$enable_glut" = xyes; then
GLUT_PC_LIB_PRIV="$GLUT_LIB_DEPS"
GLUT_PC_CFLAGS="$X11_INCLUDES"
fi
+ if test "x$GCC" = xyes; then
+ GLUT_CFLAGS="$GLUT_CFLAGS -fexceptions"
+ fi
GLUT_LIB_DEPS="$GLUT_LIB_DEPS -lm"
GLUT_PC_LIB_PRIV="$GLUT_PC_LIB_PRIV -lm"
Reply to: