summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/intel/intel_ioctl.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-05-02 11:52:52 -0700
committerEric Anholt <eric@anholt.net>2008-05-02 12:58:25 -0700
commit89bba44e969f15bf20da6d700c493237b095a588 (patch)
tree8660dc28a50401231119ed49ee997ccea98b92de /src/mesa/drivers/dri/intel/intel_ioctl.c
parent3323ccb803282dddcf1e403df33d00eaa0fbd0f8 (diff)
Add intel_bufmgr_gem for new graphics execution manager.
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_ioctl.c')
-rw-r--r--src/mesa/drivers/dri/intel/intel_ioctl.c32
1 files changed, 9 insertions, 23 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_ioctl.c b/src/mesa/drivers/dri/intel/intel_ioctl.c
index 66e36102b9..f9624a6abe 100644
--- a/src/mesa/drivers/dri/intel/intel_ioctl.c
+++ b/src/mesa/drivers/dri/intel/intel_ioctl.c
@@ -151,9 +151,9 @@ void
intel_exec_ioctl(struct intel_context *intel,
GLuint used,
GLboolean ignore_cliprects, GLboolean allow_unlock,
- void *start, GLuint count, dri_fence **fence)
+ struct drm_i915_gem_execbuffer *execbuf,
+ dri_fence **fence)
{
- struct drm_i915_execbuffer execbuf;
dri_fence *fo;
int ret;
@@ -169,16 +169,13 @@ intel_exec_ioctl(struct intel_context *intel,
memset(&execbuf, 0, sizeof(execbuf));
- execbuf.num_buffers = count;
- execbuf.batch.used = used;
- execbuf.batch.cliprects = intel->pClipRects;
- execbuf.batch.num_cliprects = ignore_cliprects ? 0 : intel->numClipRects;
- execbuf.batch.DR1 = 0;
- execbuf.batch.DR4 = ((((GLuint) intel->drawX) & 0xffff) |
- (((GLuint) intel->drawY) << 16));
-
- execbuf.ops_list = (unsigned long)start; // TODO
- execbuf.fence_arg.flags = DRM_FENCE_FLAG_SHAREABLE | DRM_I915_FENCE_FLAG_FLUSHED;
+ execbuf->batch_start_offset = 0;
+ execbuf->batch_len = used;
+ execbuf->cliprects_ptr = (uintptr_t)intel->pClipRects;
+ execbuf->num_cliprects = ignore_cliprects ? 0 : intel->numClipRects;
+ execbuf->DR1 = 0;
+ execbuf->DR4 = ((((GLuint) intel->drawX) & 0xffff) |
+ (((GLuint) intel->drawY) << 16));
do {
ret = drmCommandWriteRead(intel->driFd, DRM_I915_EXECBUFFER, &execbuf,
@@ -191,17 +188,6 @@ intel_exec_ioctl(struct intel_context *intel,
exit(1);
}
- if (execbuf.fence_arg.error != 0) {
-
- /*
- * Fence creation has failed, but the GPU has been
- * idled by the kernel. Safe to continue.
- */
-
- *fence = NULL;
- return;
- }
-
fo = intel_ttm_fence_create_from_arg(intel->bufmgr, "fence buffers",
&execbuf.fence_arg);
if (!fo) {