summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-11-06 10:10:50 -0700
committerBrian <brian.paul@tungstengraphics.com>2007-11-06 10:10:50 -0700
commiteef6783537c3bf3a454b2c56b1cf71d0c73e45ee (patch)
tree9def0d4b5136b7c01628d91db4f2fde85a790d83 /src/mesa
parentc80d17b68dfbee091b43588f19acc2e8bf1e1522 (diff)
Remove use of Mesa/GL types/functions (s/GLuint/uint/ etc)
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_batchbuffer.c39
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_batchbuffer.h41
2 files changed, 39 insertions, 41 deletions
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_batchbuffer.c b/src/mesa/drivers/dri/intel_winsys/intel_batchbuffer.c
index 6b7772ddb2..fc9010f58a 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_batchbuffer.c
+++ b/src/mesa/drivers/dri/intel_winsys/intel_batchbuffer.c
@@ -26,7 +26,6 @@
**************************************************************************/
#include <errno.h>
-#include "main/imports.c"
#include "intel_batchbuffer.h"
#include "intel_context.h"
#include "intel_screen.h"
@@ -72,13 +71,13 @@
*/
static void
-intel_dump_batchbuffer(GLuint offset, GLuint * ptr, GLuint count)
+intel_dump_batchbuffer(uint offset, uint * ptr, uint count)
{
int i;
- _mesa_printf("\n\n\nSTART BATCH (%d dwords):\n", count / 4);
+ printf("\n\n\nSTART BATCH (%d dwords):\n", count / 4);
for (i = 0; i < count / 4; i += 1)
- _mesa_printf("\t0x%08x\n", ptr[i]);
- _mesa_printf("END BATCH\n\n\n");
+ printf("\t0x%08x\n", ptr[i]);
+ printf("END BATCH\n\n\n");
}
void
@@ -172,9 +171,9 @@ intel_batchbuffer_free(struct intel_batchbuffer *batch)
static void
intel_batch_ioctl(struct intel_context *intel,
- GLuint start_offset,
- GLuint used,
- GLboolean allow_unlock)
+ uint start_offset,
+ uint used,
+ boolean allow_unlock)
{
drmI830BatchBuffer batch;
@@ -192,7 +191,7 @@ intel_batch_ioctl(struct intel_context *intel,
if (drmCommandWrite(intel->driFd, DRM_I830_BATCHBUFFER, &batch,
sizeof(batch))) {
- _mesa_printf("DRM_I830_BATCHBUFFER: %d\n", -errno);
+ printf("DRM_I830_BATCHBUFFER: %d\n", -errno);
UNLOCK_HARDWARE(intel);
exit(1);
}
@@ -205,11 +204,11 @@ intel_batch_ioctl(struct intel_context *intel,
*/
static void
do_flush_locked(struct intel_batchbuffer *batch,
- GLuint used,
- GLboolean allow_unlock)
+ uint used,
+ boolean allow_unlock)
{
- GLuint *ptr;
- GLuint i;
+ uint *ptr;
+ uint i;
unsigned fenceFlags;
struct _DriFenceObject *fo;
@@ -219,7 +218,7 @@ do_flush_locked(struct intel_batchbuffer *batch,
* whole task should be done internally by the memory manager, and
* that dma buffers probably need to be pinned within agp space.
*/
- ptr = (GLuint *) driBOMap(batch->buffer, DRM_BO_FLAG_WRITE,
+ ptr = (uint *) driBOMap(batch->buffer, DRM_BO_FLAG_WRITE,
DRM_BO_HINT_ALLOW_UNFENCED_MAP);
@@ -277,8 +276,8 @@ struct _DriFenceObject *
intel_batchbuffer_flush(struct intel_batchbuffer *batch)
{
struct intel_context *intel = batch->intel;
- GLuint used = batch->ptr - batch->map;
- GLboolean was_locked = intel->locked;
+ uint used = batch->ptr - batch->map;
+ boolean was_locked = intel->locked;
if (used == 0)
return batch->last_fence;
@@ -333,10 +332,10 @@ intel_batchbuffer_finish(struct intel_batchbuffer *batch)
/* This is the only way buffers get added to the validate list.
*/
-GLboolean
+boolean
intel_batchbuffer_emit_reloc(struct intel_batchbuffer *batch,
struct _DriBufferObject *buffer,
- GLuint flags, GLuint mask, GLuint delta)
+ uint flags, uint mask, uint delta)
{
assert(batch->nr_relocs < MAX_RELOCS);
@@ -348,7 +347,7 @@ intel_batchbuffer_emit_reloc(struct intel_batchbuffer *batch,
r->buf = buffer;
r->offset = batch->ptr - batch->map;
r->delta = delta;
- *(GLuint *) batch->ptr = 0x12345678;
+ *(uint *) batch->ptr = 0x12345678;
}
batch->ptr += 4;
@@ -359,7 +358,7 @@ intel_batchbuffer_emit_reloc(struct intel_batchbuffer *batch,
void
intel_batchbuffer_data(struct intel_batchbuffer *batch,
- const void *data, GLuint bytes, GLuint flags)
+ const void *data, uint bytes, uint flags)
{
assert((bytes & 3) == 0);
intel_batchbuffer_require_space(batch, bytes, flags);
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_batchbuffer.h b/src/mesa/drivers/dri/intel_winsys/intel_batchbuffer.h
index 43a9a9fa79..82feafa21f 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_batchbuffer.h
+++ b/src/mesa/drivers/dri/intel_winsys/intel_batchbuffer.h
@@ -28,7 +28,7 @@
#ifndef INTEL_BATCHBUFFER_H
#define INTEL_BATCHBUFFER_H
-#include "main/glheader.h"
+#include "pipe/p_compiler.h"
#include "dri_bufmgr.h"
struct intel_context;
@@ -44,8 +44,8 @@ struct intel_context;
struct buffer_reloc
{
struct _DriBufferObject *buf;
- GLuint offset;
- GLuint delta; /* not needed? */
+ uint offset;
+ uint delta; /* not needed? */
};
struct intel_batchbuffer
@@ -55,20 +55,19 @@ struct intel_batchbuffer
struct _DriBufferObject *buffer;
struct _DriFenceObject *last_fence;
- GLuint flags;
+ uint flags;
drmBOList list;
- GLuint list_count;
- GLubyte *map;
- GLubyte *ptr;
+ uint list_count;
+ ubyte *map;
+ ubyte *ptr;
struct buffer_reloc reloc[MAX_RELOCS];
- GLuint nr_relocs;
- GLuint size;
+ uint nr_relocs;
+ uint size;
};
-struct intel_batchbuffer *intel_batchbuffer_alloc(struct intel_context
- *intel);
+struct intel_batchbuffer *intel_batchbuffer_alloc(struct intel_context *intel);
void intel_batchbuffer_free(struct intel_batchbuffer *batch);
@@ -86,22 +85,22 @@ void intel_batchbuffer_reset(struct intel_batchbuffer *batch);
* intel_buffer_dword() calls.
*/
void intel_batchbuffer_data(struct intel_batchbuffer *batch,
- const void *data, GLuint bytes, GLuint flags);
+ const void *data, uint bytes, uint flags);
void intel_batchbuffer_release_space(struct intel_batchbuffer *batch,
- GLuint bytes);
+ uint bytes);
-GLboolean intel_batchbuffer_emit_reloc(struct intel_batchbuffer *batch,
- struct _DriBufferObject *buffer,
- GLuint flags,
- GLuint mask, GLuint offset);
+boolean intel_batchbuffer_emit_reloc(struct intel_batchbuffer *batch,
+ struct _DriBufferObject *buffer,
+ uint flags,
+ uint mask, uint offset);
/* Inline functions - might actually be better off with these
* non-inlined. Certainly better off switching all command packets to
* be passed as structs rather than dwords, but that's a little bit of
* work...
*/
-static INLINE GLuint
+static INLINE uint
intel_batchbuffer_space(struct intel_batchbuffer *batch)
{
return (batch->size - BATCH_RESERVED) - (batch->ptr - batch->map);
@@ -109,17 +108,17 @@ intel_batchbuffer_space(struct intel_batchbuffer *batch)
static INLINE void
-intel_batchbuffer_emit_dword(struct intel_batchbuffer *batch, GLuint dword)
+intel_batchbuffer_emit_dword(struct intel_batchbuffer *batch, uint dword)
{
assert(batch->map);
assert(intel_batchbuffer_space(batch) >= 4);
- *(GLuint *) (batch->ptr) = dword;
+ *(uint *) (batch->ptr) = dword;
batch->ptr += 4;
}
static INLINE void
intel_batchbuffer_require_space(struct intel_batchbuffer *batch,
- GLuint sz, GLuint flags)
+ uint sz, uint flags)
{
assert(sz < batch->size - 8);
if (intel_batchbuffer_space(batch) < sz ||