r600g: add pausing pipeline & streamout queries into set_active_query_state
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
@@ -2395,6 +2395,12 @@ static void cayman_init_atom_start_cs(struct r600_context *rctx)
|
||||
r600_store_value(cb, PKT3(PKT3_EVENT_WRITE, 0, 0));
|
||||
r600_store_value(cb, EVENT_TYPE(EVENT_TYPE_PS_PARTIAL_FLUSH) | EVENT_INDEX(4));
|
||||
|
||||
/* This enables pipeline stat & streamout queries.
|
||||
* They are only disabled by blits.
|
||||
*/
|
||||
r600_store_value(cb, PKT3(PKT3_EVENT_WRITE, 0, 0));
|
||||
r600_store_value(cb, EVENT_TYPE(EVENT_TYPE_PIPELINESTAT_START) | EVENT_INDEX(0));
|
||||
|
||||
cayman_init_common_regs(cb, rctx->b.chip_class,
|
||||
rctx->b.family, rctx->screen->b.info.drm_minor);
|
||||
|
||||
@@ -2648,6 +2654,12 @@ void evergreen_init_atom_start_cs(struct r600_context *rctx)
|
||||
r600_store_value(cb, PKT3(PKT3_EVENT_WRITE, 0, 0));
|
||||
r600_store_value(cb, EVENT_TYPE(EVENT_TYPE_PS_PARTIAL_FLUSH) | EVENT_INDEX(4));
|
||||
|
||||
/* This enables pipeline stat & streamout queries.
|
||||
* They are only disabled by blits.
|
||||
*/
|
||||
r600_store_value(cb, PKT3(PKT3_EVENT_WRITE, 0, 0));
|
||||
r600_store_value(cb, EVENT_TYPE(EVENT_TYPE_PIPELINESTAT_START) | EVENT_INDEX(0));
|
||||
|
||||
evergreen_init_common_regs(rctx, cb, rctx->b.chip_class,
|
||||
rctx->b.family, rctx->screen->b.info.drm_minor);
|
||||
|
||||
|
||||
@@ -223,6 +223,16 @@ void r600_flush_emit(struct r600_context *rctx)
|
||||
cs->buf[cs->cdw++] = 0x0000000A; /* POLL_INTERVAL */
|
||||
}
|
||||
|
||||
if (rctx->b.flags & R600_CONTEXT_START_PIPELINE_STATS) {
|
||||
radeon_emit(cs, PKT3(PKT3_EVENT_WRITE, 0, 0));
|
||||
radeon_emit(cs, EVENT_TYPE(EVENT_TYPE_PIPELINESTAT_START) |
|
||||
EVENT_INDEX(0));
|
||||
} else if (rctx->b.flags & R600_CONTEXT_STOP_PIPELINE_STATS) {
|
||||
radeon_emit(cs, PKT3(PKT3_EVENT_WRITE, 0, 0));
|
||||
radeon_emit(cs, EVENT_TYPE(EVENT_TYPE_PIPELINESTAT_STOP) |
|
||||
EVENT_INDEX(0));
|
||||
}
|
||||
|
||||
if (wait_until) {
|
||||
/* Use of WAIT_UNTIL is deprecated on Cayman+ */
|
||||
if (rctx->b.family < CHIP_CAYMAN) {
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
#define R600_CONTEXT_WAIT_CP_DMA_IDLE (R600_CONTEXT_PRIVATE_FLAG << 10)
|
||||
|
||||
/* the number of CS dwords for flushing and drawing */
|
||||
#define R600_MAX_FLUSH_CS_DWORDS 16
|
||||
#define R600_MAX_FLUSH_CS_DWORDS 18
|
||||
#define R600_MAX_DRAW_CS_DWORDS 58
|
||||
|
||||
#define R600_MAX_USER_CONST_BUFFERS 13
|
||||
|
||||
@@ -2177,6 +2177,12 @@ void r600_init_atom_start_cs(struct r600_context *rctx)
|
||||
r600_store_value(cb, PKT3(PKT3_EVENT_WRITE, 0, 0));
|
||||
r600_store_value(cb, EVENT_TYPE(EVENT_TYPE_PS_PARTIAL_FLUSH) | EVENT_INDEX(4));
|
||||
|
||||
/* This enables pipeline stat & streamout queries.
|
||||
* They are only disabled by blits.
|
||||
*/
|
||||
r600_store_value(cb, PKT3(PKT3_EVENT_WRITE, 0, 0));
|
||||
r600_store_value(cb, EVENT_TYPE(EVENT_TYPE_PIPELINESTAT_START) | EVENT_INDEX(0));
|
||||
|
||||
family = rctx->b.family;
|
||||
ps_prio = 0;
|
||||
vs_prio = 1;
|
||||
|
||||
@@ -2864,6 +2864,15 @@ static void r600_set_active_query_state(struct pipe_context *ctx, boolean enable
|
||||
{
|
||||
struct r600_context *rctx = (struct r600_context*)ctx;
|
||||
|
||||
/* Pipeline stat & streamout queries. */
|
||||
if (enable) {
|
||||
rctx->b.flags &= ~R600_CONTEXT_STOP_PIPELINE_STATS;
|
||||
rctx->b.flags |= R600_CONTEXT_START_PIPELINE_STATS;
|
||||
} else {
|
||||
rctx->b.flags &= ~R600_CONTEXT_START_PIPELINE_STATS;
|
||||
rctx->b.flags |= R600_CONTEXT_STOP_PIPELINE_STATS;
|
||||
}
|
||||
|
||||
/* Occlusion queries. */
|
||||
if (rctx->db_misc_state.occlusion_queries_disabled != !enable) {
|
||||
rctx->db_misc_state.occlusion_queries_disabled = !enable;
|
||||
|
||||
Reference in New Issue
Block a user