mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-01 18:40:57 -06:00
Merge 36aef43b14 into deb8c66ffb
This commit is contained in:
commit
3d2aee10bc
@ -889,9 +889,14 @@ RenderState Rasterizer::BeginRendering(const GraphicsPipeline* pipeline) {
|
||||
ASSERT(desc.view_info.range.extent.levels == 1 && !image.binding.needs_rebind);
|
||||
|
||||
const bool has_stencil = image.info.props.has_stencil;
|
||||
// Stencil writes can be enabled while depth writes are off.
|
||||
const bool stencil_write =
|
||||
has_stencil && regs.depth_control.stencil_enable && !desc.view_info.is_storage;
|
||||
const auto new_layout = desc.view_info.is_storage
|
||||
? has_stencil ? vk::ImageLayout::eDepthStencilAttachmentOptimal
|
||||
: vk::ImageLayout::eDepthAttachmentOptimal
|
||||
: stencil_write
|
||||
? vk::ImageLayout::eDepthReadOnlyStencilAttachmentOptimal
|
||||
: has_stencil ? vk::ImageLayout::eDepthStencilReadOnlyOptimal
|
||||
: vk::ImageLayout::eDepthReadOnlyOptimal;
|
||||
image.Transit(new_layout,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user