summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorAlex Deucher <[email protected]>2012-03-19 10:52:46 -0400
committerAlex Deucher <[email protected]>2012-03-19 10:52:46 -0400
commit91ddfa72b4384d04e4d84e60b4cdf3efee7ef49b (patch)
tree00f747cd8ec2945847c49198fa9c36b9f99942b6 /src/gallium/drivers
parent40c995c1fd7865f1b25765aa783fdadbf948b3dd (diff)
r600g: fix r600_get_backend_mask() for virtual addresses
I don't think we should hit this path for virtual addresses, but just in case. Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/r600/r600_hw_context.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/r600_hw_context.c b/src/gallium/drivers/r600/r600_hw_context.c
index 1d272e93e9c..1e1b78247ea 100644
--- a/src/gallium/drivers/r600/r600_hw_context.c
+++ b/src/gallium/drivers/r600/r600_hw_context.c
@@ -36,6 +36,7 @@ void r600_get_backend_mask(struct r600_context *ctx)
uint32_t *results;
unsigned num_backends = ctx->screen->info.r600_num_backends;
unsigned i, mask = 0;
+ uint64_t va;
/* if backend_map query is supported by the kernel */
if (ctx->screen->info.r600_backend_map_valid) {
@@ -71,6 +72,8 @@ void r600_get_backend_mask(struct r600_context *ctx)
if (!buffer)
goto err;
+ va = r600_resource_va(&ctx->screen->screen, (void*)buffer);
+
/* initialize buffer with zeroes */
results = ctx->ws->buffer_map(buffer->buf, ctx->cs, PIPE_TRANSFER_WRITE);
if (results) {
@@ -80,8 +83,8 @@ void r600_get_backend_mask(struct r600_context *ctx)
/* emit EVENT_WRITE for ZPASS_DONE */
cs->buf[cs->cdw++] = PKT3(PKT3_EVENT_WRITE, 2, 0);
cs->buf[cs->cdw++] = EVENT_TYPE(EVENT_TYPE_ZPASS_DONE) | EVENT_INDEX(1);
- cs->buf[cs->cdw++] = 0;
- cs->buf[cs->cdw++] = 0;
+ cs->buf[cs->cdw++] = va;
+ cs->buf[cs->cdw++] = (va >> 32UL) & 0xFF;
cs->buf[cs->cdw++] = PKT3(PKT3_NOP, 0, 0);
cs->buf[cs->cdw++] = r600_context_bo_reloc(ctx, buffer, RADEON_USAGE_WRITE);