diff options
author | Marek Olšák <[email protected]> | 2016-10-03 15:37:19 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-10-26 13:02:58 +0200 |
commit | dc6bbe2dd0eb9ba421c8454b3b6179a6b0452b40 (patch) | |
tree | b2b427ca36e40a9bcdd58992f616242fcc7062c9 /src/gallium/drivers/radeon | |
parent | 462e3cdf3b92464dab57da2b9e00986f8e6091be (diff) |
gallium/radeon: use r600_gfx_write_event_eop everywhere
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r-- | src/gallium/drivers/radeon/r600_pipe_common.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/r600_query.c | 17 |
2 files changed, 7 insertions, 14 deletions
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c index 835008360a6..1a7a712beb2 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.c +++ b/src/gallium/drivers/radeon/r600_pipe_common.c @@ -122,7 +122,9 @@ void r600_gfx_write_event_eop(struct r600_common_context *ctx, radeon_emit(cs, new_fence); /* immediate data */ radeon_emit(cs, 0); /* unused */ - r600_emit_reloc(ctx, &ctx->gfx, buf, RADEON_USAGE_WRITE, RADEON_PRIO_QUERY); + if (buf) + r600_emit_reloc(ctx, &ctx->gfx, buf, RADEON_USAGE_WRITE, + RADEON_PRIO_QUERY); } unsigned r600_gfx_write_fence_dwords(struct r600_common_screen *screen) diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c index ac71a4358e0..a5c8595ea12 100644 --- a/src/gallium/drivers/radeon/r600_query.c +++ b/src/gallium/drivers/radeon/r600_query.c @@ -557,12 +557,8 @@ static void r600_query_hw_do_emit_start(struct r600_common_context *ctx, radeon_emit(cs, (va >> 32) & 0xFFFF); break; case PIPE_QUERY_TIME_ELAPSED: - radeon_emit(cs, PKT3(PKT3_EVENT_WRITE_EOP, 4, 0)); - radeon_emit(cs, EVENT_TYPE(EVENT_TYPE_BOTTOM_OF_PIPE_TS) | EVENT_INDEX(5)); - radeon_emit(cs, va); - radeon_emit(cs, EOP_DATA_SEL(3) | ((va >> 32) & 0xFFFF)); - radeon_emit(cs, 0); - radeon_emit(cs, 0); + r600_gfx_write_event_eop(ctx, EVENT_TYPE_BOTTOM_OF_PIPE_TS, + 0, 3, NULL, va, 0, 0); break; case PIPE_QUERY_PIPELINE_STATISTICS: radeon_emit(cs, PKT3(PKT3_EVENT_WRITE, 2, 0)); @@ -643,13 +639,8 @@ static void r600_query_hw_do_emit_stop(struct r600_common_context *ctx, va += 8; /* fall through */ case PIPE_QUERY_TIMESTAMP: - radeon_emit(cs, PKT3(PKT3_EVENT_WRITE_EOP, 4, 0)); - radeon_emit(cs, EVENT_TYPE(EVENT_TYPE_BOTTOM_OF_PIPE_TS) | EVENT_INDEX(5)); - radeon_emit(cs, va); - radeon_emit(cs, EOP_DATA_SEL(3) | ((va >> 32) & 0xFFFF)); - radeon_emit(cs, 0); - radeon_emit(cs, 0); - + r600_gfx_write_event_eop(ctx, EVENT_TYPE_BOTTOM_OF_PIPE_TS, + 0, 3, NULL, va, 0, 0); fence_va = va + 8; break; case PIPE_QUERY_PIPELINE_STATISTICS: { |