From: Alex Deucher Date: Mon, 19 Mar 2012 14:52:46 +0000 (-0400) Subject: r600g: fix r600_get_backend_mask() for virtual addresses X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=91ddfa72b4384d04e4d84e60b4cdf3efee7ef49b;p=mesa.git 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 --- 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);