Lines Matching refs:batch
29 * Tracks, for a given batch key (which maps to a FBO/framebuffer state),
49 get_history(struct fd_autotune *at, struct fd_batch *batch)
54 assert(batch->key || batch->nondraw);
55 if (!batch->key)
59 _mesa_hash_table_search_pre_hashed(at->ht, batch->hash, batch->key);
68 history->key = fd_batch_key_clone(history, batch->key);
83 _mesa_hash_table_insert_pre_hashed(at->ht, batch->hash, history->key,
156 fallback_use_bypass(struct fd_batch *batch)
158 struct pipe_framebuffer_state *pfb = &batch->framebuffer;
161 if (batch->cleared || batch->gmem_reason ||
162 (batch->num_draws > 5) || (pfb->samples > 1)) {
174 fd_autotune_use_bypass(struct fd_autotune *at, struct fd_batch *batch)
176 struct pipe_framebuffer_state *pfb = &batch->framebuffer;
183 if (!batch->ctx->screen->gmem_reason_mask)
184 return fallback_use_bypass(batch);
186 if (batch->gmem_reason & ~batch->ctx->screen->gmem_reason_mask)
187 return fallback_use_bypass(batch);
195 return fallback_use_bypass(batch);
198 struct fd_batch_history *history = get_history(at, batch);
200 return fallback_use_bypass(batch);
202 batch->autotune_result = get_result(at, history);
203 batch->autotune_result->cost = batch->cost;
205 bool use_bypass = fallback_use_bypass(batch);
232 float sample_cost = batch->cost;
233 sample_cost /= batch->num_draws;
235 float total_draw_cost = (avg_samples * sample_cost) / batch->num_draws;
238 batch->hash, batch->num_draws, total_samples, avg_samples,