mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-14 07:08:32 +09:00
- viewport, scissor, blend constants, depth bias, line width and the six stencil parameters were re-emitted unconditionally for EVERY draw (~1500 vkCmdSet* per frame in MC 26.2, where ANGLE emits a handful), costing CPU record time and GPU command-processor work for values that almost never change between draws - a recording-scoped shadow now drops any vkCmdSet* whose values match what the command buffer already holds; valid because every PipelineFactory pipeline declares the same eight dynamic states, so set values persist across those binds - the shadow resets at every command-buffer (re)begin (dynamic state does not survive the boundary) and after binding the blit or depth-mipmap pipelines, whose narrower dynamic sets make the untouched states undefined and whose raw viewport/scissor writes bypass the shadow