summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2007-08-11 14:01:37 +0100
committerKeith Whitwell <keith@tungstengraphics.com>2007-08-11 14:01:37 +0100
commit8c4409690d30b5fc5c048b90351c14522119fa9c (patch)
tree3357364075b5fdca289485ef40e689826fb992a0 /src/mesa/drivers
parenta0e48b1ff9884ed66a156bd2d11b475ff177f166 (diff)
Fix some build failures. Move intelScreenContext to intel_context.c
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_batchbuffer.c5
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_context.c38
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_context.h2
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_lock.c5
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_screen.c24
5 files changed, 38 insertions, 36 deletions
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_batchbuffer.c b/src/mesa/drivers/dri/intel_winsys/intel_batchbuffer.c
index 4d0759fc32..6fe9ecc539 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_batchbuffer.c
+++ b/src/mesa/drivers/dri/intel_winsys/intel_batchbuffer.c
@@ -25,8 +25,11 @@
*
**************************************************************************/
+#include <errno.h>
+#include "main/imports.c"
#include "intel_batchbuffer.h"
-#include "intel_ioctl.h"
+#include "intel_context.h"
+#include "intel_screen.h"
#include "intel_reg.h"
#include "drm.h"
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_context.c b/src/mesa/drivers/dri/intel_winsys/intel_context.c
index af5deb4dc6..435d17421c 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_context.c
+++ b/src/mesa/drivers/dri/intel_winsys/intel_context.c
@@ -36,29 +36,28 @@
#include "drivers/common/driverfuncs.h"
-#include "intel_screen.h"
-
#include "i830_dri.h"
+#include "intel_screen.h"
+#include "intel_context.h"
#include "intel_buffers.h"
#include "intel_winsys.h"
-#include "intel_ioctl.h"
#include "intel_batchbuffer.h"
#include "state_tracker/st_public.h"
#include "state_tracker/st_context.h"
#include "pipe/p_defines.h"
+#include "pipe/p_context.h"
#include "drirenderbuffer.h"
#include "vblank.h"
#include "utils.h"
#include "xmlpool.h" /* for symbolic values of enum-type options */
-#include "pipe/p_context.h"
-#if DEBUG
+#ifdef DEBUG
int __intel_debug = 0;
#endif
@@ -145,7 +144,7 @@ const struct dri_extension card_extensions[] = {
-
+#ifdef DEBUG
static const struct dri_debug_control debug_control[] = {
{"ioctl", DEBUG_IOCTL},
{"bat", DEBUG_BATCH},
@@ -153,7 +152,7 @@ static const struct dri_debug_control debug_control[] = {
{"swap", DEBUG_SWAP},
{NULL, 0}
};
-
+#endif
static void
intelInvalidateState(GLcontext * ctx, GLuint new_state)
@@ -279,7 +278,7 @@ intelCreateContext(const __GLcontextModes * mesaVis,
_mesa_enable_extension(ctx, "GL_EXT_texture_compression_s3tc");
}
-#if DEBUG
+#ifdef DEBUG
__intel_debug = driParseDebugString(getenv("INTEL_DEBUG"), debug_control);
#endif
@@ -442,3 +441,26 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv,
+struct intel_context *intelScreenContext(intelScreenPrivate *intelScreen)
+{
+ /*
+ * This should probably change to have the screen allocate a dummy
+ * context at screen creation. For now just use the current context.
+ */
+
+ GET_CURRENT_CONTEXT(ctx);
+ if (ctx == NULL) {
+/* _mesa_problem(NULL, "No current context in intelScreenContext\n");
+ return NULL; */
+ /* need a context for the first time makecurrent is called (for hw lock
+ when allocating priv buffers) */
+ if (intelScreen->dummyctxptr == NULL) {
+ _mesa_problem(NULL, "No current context in intelScreenContext\n");
+ return NULL;
+ }
+ return intelScreen->dummyctxptr;
+ }
+
+ return intel_context(ctx);
+}
+
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_context.h b/src/mesa/drivers/dri/intel_winsys/intel_context.h
index 924b7ca05a..76c900157a 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_context.h
+++ b/src/mesa/drivers/dri/intel_winsys/intel_context.h
@@ -109,7 +109,7 @@ extern char *__progname;
/* ================================================================
* Debugging:
*/
-#if DEBUG
+#ifdef DEBUG
extern int __intel_debug;
#define DEBUG_SWAP 0x1
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_lock.c b/src/mesa/drivers/dri/intel_winsys/intel_lock.c
index 34319545d9..e9e4bc0645 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_lock.c
+++ b/src/mesa/drivers/dri/intel_winsys/intel_lock.c
@@ -31,11 +31,12 @@
#include "extensions.h"
#include "intel_screen.h"
+#include "intel_context.h"
+#include "intel_batchbuffer.h"
+#include "intel_buffers.h"
#include "i830_dri.h"
-#include "intel_ioctl.h"
-#include "intel_batchbuffer.h"
#include "state_tracker/st_public.h"
#include "state_tracker/st_context.h"
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_screen.c b/src/mesa/drivers/dri/intel_winsys/intel_screen.c
index 90a432a041..cf8d190d34 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_screen.c
+++ b/src/mesa/drivers/dri/intel_winsys/intel_screen.c
@@ -38,7 +38,6 @@
#include "intel_screen.h"
#include "intel_batchbuffer.h"
#include "intel_buffers.h"
-#include "intel_ioctl.h"
#include "i830_dri.h"
#include "dri_bufpool.h"
@@ -565,26 +564,3 @@ __driCreateNewScreen_20050727(__DRInativeDisplay * dpy, int scrn,
return (void *) psp;
}
-struct intel_context *intelScreenContext(intelScreenPrivate *intelScreen)
-{
- /*
- * This should probably change to have the screen allocate a dummy
- * context at screen creation. For now just use the current context.
- */
-
- GET_CURRENT_CONTEXT(ctx);
- if (ctx == NULL) {
-/* _mesa_problem(NULL, "No current context in intelScreenContext\n");
- return NULL; */
- /* need a context for the first time makecurrent is called (for hw lock
- when allocating priv buffers) */
- if (intelScreen->dummyctxptr == NULL) {
- _mesa_problem(NULL, "No current context in intelScreenContext\n");
- return NULL;
- }
- return intelScreen->dummyctxptr;
- }
- return intel_context(ctx);
-
-}
-