summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Andersson <[email protected]>2013-03-25 23:11:34 +0100
committerAlex Deucher <[email protected]>2013-03-25 18:18:23 -0400
commit92855bcc95207252045314b658eb10c6305020bc (patch)
tree5a5d60ed97c6e2d9ddd36c47a6aedc533093e4c6
parent634fb837ef7533171cb78f33bebdbacaa4b8511d (diff)
r600g: Use virtual address for PIPE_QUERY_SO* in r600_emit_query_end
Virtual address is used for PIPE_QUERY_SO* queries in r600_emit_query_begin, but not in r600_emit_query_end. This will trigger a GPU fault when one of those queries is made and virtual address is enabled. Note: this is a candidate for the 9.1 branch Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--src/gallium/drivers/r600/r600_query.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/r600_query.c b/src/gallium/drivers/r600/r600_query.c
index 03351892978..782ad26e3b2 100644
--- a/src/gallium/drivers/r600/r600_query.c
+++ b/src/gallium/drivers/r600/r600_query.c
@@ -186,10 +186,11 @@ static void r600_emit_query_end(struct r600_context *ctx, struct r600_query *que
case PIPE_QUERY_PRIMITIVES_GENERATED:
case PIPE_QUERY_SO_STATISTICS:
case PIPE_QUERY_SO_OVERFLOW_PREDICATE:
+ va += query->buffer.results_end + query->result_size/2;
cs->buf[cs->cdw++] = PKT3(PKT3_EVENT_WRITE, 2, 0);
cs->buf[cs->cdw++] = EVENT_TYPE(EVENT_TYPE_SAMPLE_STREAMOUTSTATS) | EVENT_INDEX(3);
- cs->buf[cs->cdw++] = query->buffer.results_end + query->result_size/2;
- cs->buf[cs->cdw++] = 0;
+ cs->buf[cs->cdw++] = va;
+ cs->buf[cs->cdw++] = (va >> 32UL) & 0xFF;
break;
case PIPE_QUERY_TIME_ELAPSED:
va += query->buffer.results_end + query->result_size/2;