Skip to content

Draft: dzn: Use D3D render passes

Jesse Natalie requested to merge jenatali/mesa:dzn-render-passes into main

The goal here is to use D3D render passes when possible to allow tile-based deferred renderers (all one of them in our ecosystem) to optimize tile memory usage.

After rewriting this a few times I think I landed on something I'm happy with. I'm subclassing the common render pass object, letting it do most of the heavy lifting for me, and then scanning through the resulting data to figure out what each attachment should be doing in each subpass. Assuming we're not in cases that don't map nicely (there's a few), then when that pass is used for rendering, we use the D3D render pass begin/end APIs instead of OMSetRenderTargets, ClearRenderTargetView, ClearDepthStencilView, ResolveSubresource[Region]. The common infrastructure still handles pipeline barriers for us though between subpasses.

Merge request reports