summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/r600_cs.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-01-21 23:31:51 +0100
committerMarek Olšák <[email protected]>2014-01-28 01:38:59 +0100
commitdc76eea22c27775d9df17a6a878a15fd84d32fff (patch)
tree692a6b66617321d601a5ce689569f01a2d333e57 /src/gallium/drivers/radeon/r600_cs.h
parent4e5c70e066b0fa28a6e40791963604286929a412 (diff)
r600g: only emit NOP relocations for queries if VM is disabled
Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/r600_cs.h')
-rw-r--r--src/gallium/drivers/radeon/r600_cs.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/r600_cs.h b/src/gallium/drivers/radeon/r600_cs.h
index fa749dad6c9..c3af3decfcc 100644
--- a/src/gallium/drivers/radeon/r600_cs.h
+++ b/src/gallium/drivers/radeon/r600_cs.h
@@ -66,6 +66,20 @@ static INLINE unsigned r600_context_bo_reloc(struct r600_common_context *rctx,
return rctx->ws->cs_add_reloc(ring->cs, rbo->cs_buf, usage, rbo->domains) * 4;
}
+static INLINE void r600_emit_reloc(struct r600_common_context *rctx,
+ struct r600_ring *ring, struct r600_resource *rbo,
+ enum radeon_bo_usage usage)
+{
+ struct radeon_winsys_cs *cs = ring->cs;
+ bool has_vm = ((struct r600_common_screen*)rctx->b.screen)->info.r600_virtual_address;
+ unsigned reloc = r600_context_bo_reloc(rctx, ring, rbo, usage);
+
+ if (!has_vm) {
+ radeon_emit(cs, PKT3(PKT3_NOP, 0, 0));
+ radeon_emit(cs, reloc);
+ }
+}
+
static INLINE void r600_write_config_reg_seq(struct radeon_winsys_cs *cs, unsigned reg, unsigned num)
{
assert(reg < R600_CONTEXT_REG_OFFSET);