summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2007-08-08 12:28:21 +0100
committerKeith Whitwell <keith@tungstengraphics.com>2007-08-08 12:30:27 +0100
commit715acc7622255f7cc99d632c57aac14af4bac89a (patch)
tree69fb9946c5e434c8796b95089a0761ea23148e3b /src/mesa/drivers
parentcf3fb4e3ef16ec1ab08fdbe418afe15c48df73fc (diff)
The i915simple driver now runs well enough to lock up hardware.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_pipe_i915simple.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_pipe_i915simple.c b/src/mesa/drivers/dri/intel_winsys/intel_pipe_i915simple.c
index b456550a8c..244e32c885 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_pipe_i915simple.c
+++ b/src/mesa/drivers/dri/intel_winsys/intel_pipe_i915simple.c
@@ -168,7 +168,7 @@ static unsigned *intel_i915_batch_start( struct i915_winsys *sws,
/* XXX: check relocs.
*/
- if (intel_batchbuffer_space( intel->batch ) < dwords * 4) {
+ if (intel_batchbuffer_space( intel->batch ) >= dwords * 4) {
/* XXX: Hmm, the driver can't really do much with this pointer:
*/
//return intel->batch->ptr;
@@ -191,8 +191,18 @@ static void intel_i915_batch_reloc( struct i915_winsys *sws,
unsigned delta )
{
struct intel_context *intel = intel_i915_winsys(sws)->intel;
- unsigned flags = 0;
- unsigned mask = 0;
+ unsigned flags = DRM_BO_FLAG_MEM_TT;
+ unsigned mask = DRM_BO_MASK_MEM;
+
+ if (access_flags & I915_BUFFER_ACCESS_WRITE) {
+ flags |= DRM_BO_FLAG_WRITE;
+ mask |= DRM_BO_FLAG_WRITE;
+ }
+
+ if (access_flags & I915_BUFFER_ACCESS_READ) {
+ flags |= DRM_BO_FLAG_READ;
+ mask |= DRM_BO_FLAG_READ;
+ }
intel_batchbuffer_emit_reloc( intel->batch,
dri_bo( buf ),