diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-11-10 11:05:20 +0000 |
---|---|---|
committer | Owain G. Ainsworth <oga@openbsd.org> | 2010-03-01 15:59:27 +0000 |
commit | b922eae80792aa9659cd17d1792080bad934e5fc (patch) | |
tree | e2dd9a5fe3d16ce089117f00630969efd357476e /src/i915_render.c | |
parent | 670f5aa873923a325bffff61c76d107d32806cd7 (diff) |
Check that batch buffers are atomic.
Since batch buffers are rarely emitted by themselves but as part of a
sequence of state and vertices, the whole sequence is emitted atomically.
Here we just enforce that batches are marked as being part of an atomic
sequence as appropriate.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
(Cherry picked from commit 67af5a99253b1295f8dc09b28863eb7dc8b59e1d).
Diffstat (limited to 'src/i915_render.c')
-rw-r--r-- | src/i915_render.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/i915_render.c b/src/i915_render.c index 6a936bea..65fea784 100644 --- a/src/i915_render.c +++ b/src/i915_render.c @@ -438,7 +438,7 @@ static void i915_emit_composite_setup(ScrnInfoPtr scrn) is_affine_mask = i830_transform_is_affine(intel->transform[1]); if (mask == NULL) { - BEGIN_BATCH(10); + ATOMIC_BATCH(10); OUT_BATCH(_3DSTATE_MAP_STATE | 3); OUT_BATCH(0x00000001); /* map 0 */ OUT_RELOC_PIXMAP(source, I915_GEM_DOMAIN_SAMPLER, 0, 0); @@ -452,7 +452,7 @@ static void i915_emit_composite_setup(ScrnInfoPtr scrn) OUT_BATCH(intel->samplerstate[2]); ADVANCE_BATCH(); } else { - BEGIN_BATCH(16); + ATOMIC_BATCH(16); OUT_BATCH(_3DSTATE_MAP_STATE | 6); OUT_BATCH(0x00000003); /* map 0,1 */ OUT_RELOC_PIXMAP(source, I915_GEM_DOMAIN_SAMPLER, 0, 0); @@ -475,7 +475,7 @@ static void i915_emit_composite_setup(ScrnInfoPtr scrn) { uint32_t ss2; - BEGIN_BATCH(16); + ATOMIC_BATCH(16); OUT_BATCH(_3DSTATE_BUF_INFO_CMD); OUT_BATCH(BUF_3D_ID_COLOR_BACK | BUF_3D_USE_FENCE | BUF_3D_PITCH(dst_pitch)); @@ -731,7 +731,7 @@ i915_emit_composite_primitive(PixmapPtr dest, num_floats = 3 * per_vertex; - BEGIN_BATCH(1 + num_floats); + ATOMIC_BATCH(1 + num_floats); OUT_BATCH(PRIM3D_INLINE | PRIM3D_RECTLIST | (num_floats - 1)); OUT_BATCH_F(intel->dst_coord_adjust + dstX + w); |