Fixes 0 gpu time reported for glBlitFramebuffer in apitrace replay --pgpu.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4356>
static const struct fd_acc_sample_provider perfcntr = {
.query_type = FD_QUERY_FIRST_PERFCNTR,
- .active = FD_STAGE_DRAW | FD_STAGE_CLEAR,
+ .active = FD_STAGE_ALL,
.resume = perfcntr_resume,
.pause = perfcntr_pause,
.result = perfcntr_accumulate_result,
static const struct fd_hw_sample_provider time_elapsed = {
.query_type = PIPE_QUERY_TIME_ELAPSED,
- .active = FD_STAGE_DRAW | FD_STAGE_CLEAR,
+ .active = FD_STAGE_ALL,
.enable = time_elapsed_enable,
.get_sample = time_elapsed_get_sample,
.accumulate_result = time_elapsed_accumulate_result,
static const struct fd_acc_sample_provider time_elapsed = {
.query_type = PIPE_QUERY_TIME_ELAPSED,
- .active = FD_STAGE_DRAW | FD_STAGE_CLEAR,
+ .active = FD_STAGE_ALL,
.size = sizeof(struct fd5_query_sample),
.resume = timestamp_resume,
.pause = timestamp_pause,
static const struct fd_acc_sample_provider perfcntr = {
.query_type = FD_QUERY_FIRST_PERFCNTR,
- .active = FD_STAGE_DRAW | FD_STAGE_CLEAR,
+ .active = FD_STAGE_ALL,
.resume = perfcntr_resume,
.pause = perfcntr_pause,
.result = perfcntr_accumulate_result,
mtx_unlock(&ctx->screen->lock);
+ fd_batch_set_stage(batch, FD_STAGE_BLIT);
+
emit_setup(batch);
if ((info->src.resource->target == PIPE_BUFFER) &&
static const struct fd_acc_sample_provider time_elapsed = {
.query_type = PIPE_QUERY_TIME_ELAPSED,
- .active = FD_STAGE_DRAW | FD_STAGE_CLEAR,
+ .active = FD_STAGE_ALL,
.size = sizeof(struct fd6_query_sample),
.resume = timestamp_resume,
.pause = timestamp_pause,
static const struct fd_acc_sample_provider perfcntr = {
.query_type = FD_QUERY_FIRST_PERFCNTR,
- .active = FD_STAGE_DRAW | FD_STAGE_CLEAR,
+ .active = FD_STAGE_ALL,
.resume = perfcntr_resume,
.pause = perfcntr_pause,
.result = perfcntr_accumulate_result,