i915/drmbuf: attempt to push relocations into buffer manager

This moves the relocations into the buffer manager in prepration for
a superioctl move.
This commit is contained in:
Dave Airlie
2007-10-03 15:50:46 +10:00
parent de1d725f44
commit 4cd3ef58a9
7 changed files with 305 additions and 118 deletions

View File

@@ -2,6 +2,9 @@
#define INTEL_BATCHBUFFER_H
#include "mtypes.h"
#include "intel_drmbuf.h"
#include "dri_bufmgr.h"
struct intel_context;
@@ -9,19 +12,9 @@ struct intel_context;
#define BATCH_SZ 16384
#define BATCH_RESERVED 16
#define MAX_RELOCS 4096
#define INTEL_BATCH_NO_CLIPRECTS 0x1
#define INTEL_BATCH_CLIPRECTS 0x2
struct buffer_reloc
{
dri_bo *buf;
GLuint offset;
GLuint delta; /* not needed? */
GLuint validate_flags;
};
struct intel_batchbuffer
{
struct intel_context *intel;
@@ -30,13 +23,9 @@ struct intel_batchbuffer
dri_fence *last_fence;
GLuint flags;
drmBOList list;
GLuint list_count;
GLubyte *map;
GLubyte *ptr;
struct buffer_reloc reloc[MAX_RELOCS];
GLuint nr_relocs;
GLuint size;
};