mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 12:20:10 +01:00
turnip: include stencil test for drawcall costs
Stencil test reads from and writes to the stencil buffer. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16733>
This commit is contained in:
parent
2dc10165a1
commit
fe9a2374e6
1 changed files with 6 additions and 0 deletions
|
|
@ -3992,11 +3992,17 @@ tu6_draw_common(struct tu_cmd_buffer *cmd,
|
|||
cmd->state.drawcall_count++;
|
||||
|
||||
cmd->state.total_drawcalls_cost += cmd->state.pipeline->drawcall_base_cost;
|
||||
|
||||
/* add depth memory bandwidth cost */
|
||||
if (cmd->state.rb_depth_cntl & A6XX_RB_DEPTH_CNTL_Z_WRITE_ENABLE)
|
||||
cmd->state.total_drawcalls_cost++;
|
||||
if (cmd->state.rb_depth_cntl & A6XX_RB_DEPTH_CNTL_Z_TEST_ENABLE)
|
||||
cmd->state.total_drawcalls_cost++;
|
||||
|
||||
/* add stencil memory bandwidth cost */
|
||||
if (cmd->state.rb_stencil_cntl & A6XX_RB_STENCIL_CONTROL_STENCIL_ENABLE)
|
||||
cmd->state.total_drawcalls_cost += 2;
|
||||
|
||||
tu_emit_cache_flush_renderpass(cmd, cs);
|
||||
|
||||
bool primitive_restart_enabled = pipeline->ia.primitive_restart;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue