summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/r600/drm/r600_priv.h
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2010-10-05 10:29:30 -0400
committerJerome Glisse <jglisse@redhat.com>2010-10-05 10:43:23 -0400
commit585e4098aa0cb68a2cfce55ced5c585bd20aba24 (patch)
treeacfb6786ddc754554eb34741150840e1689c085d /src/gallium/winsys/r600/drm/r600_priv.h
parent12d16e5f14237d86315bf5a5d6a7cf0619a7334e (diff)
r600g: improve bo flushing
Flush read cache before writting register. Track flushing inside of a same cs and avoid reflushing same bo if not necessary. Allmost properly force flush if bo rendered too and then use as a texture in same cs (missing pipeline flush dunno if it's needed or not). Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Diffstat (limited to 'src/gallium/winsys/r600/drm/r600_priv.h')
-rw-r--r--src/gallium/winsys/r600/drm/r600_priv.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/winsys/r600/drm/r600_priv.h b/src/gallium/winsys/r600/drm/r600_priv.h
index 4619207432..f6ceb0adc3 100644
--- a/src/gallium/winsys/r600/drm/r600_priv.h
+++ b/src/gallium/winsys/r600/drm/r600_priv.h
@@ -53,6 +53,7 @@ struct r600_reg {
unsigned offset;
unsigned need_bo;
unsigned flush_flags;
+ unsigned flush_mask;
};
struct radeon_bo {
@@ -68,6 +69,7 @@ struct radeon_bo {
boolean set_busy;
struct r600_reloc *reloc;
unsigned reloc_id;
+ unsigned last_flush;
};
struct r600_bo {
@@ -102,6 +104,8 @@ struct pb_buffer *radeon_bo_pb_create_buffer_from_handle(struct pb_manager *_mgr
/* r600_hw_context.c */
void r600_context_bo_reloc(struct r600_context *ctx, u32 *pm4, struct r600_bo *rbo);
+void r600_context_bo_flush(struct r600_context *ctx, unsigned flush_flags,
+ unsigned flush_mask, struct r600_bo *rbo);
struct r600_bo *r600_context_reg_bo(struct r600_context *ctx, unsigned offset);
int r600_context_add_block(struct r600_context *ctx, const struct r600_reg *reg, unsigned nreg);
@@ -148,6 +152,10 @@ static inline void r600_context_block_emit_dirty(struct r600_context *ctx, struc
r600_context_bo_reloc(ctx,
&block->pm4[block->reloc[id].bo_pm4_index[k]],
block->reloc[id].bo);
+ r600_context_bo_flush(ctx,
+ block->reloc[id].flush_flags,
+ block->reloc[id].flush_mask,
+ block->reloc[id].bo);
}
}
}