mirror of
https://github.com/libretro/ppsspp.git
synced 2025-01-29 12:52:34 +00:00
Vulkan: Update dyn stencil state only as needed.
This commit is contained in:
parent
3a08ff5c06
commit
b1a2a44377
@ -617,9 +617,11 @@ void DrawEngineVulkan::DoFlush(VkCommandBuffer cmd) {
|
|||||||
// TODO: Dirty-flag these.
|
// TODO: Dirty-flag these.
|
||||||
vkCmdSetScissor(cmd_, 0, 1, &dynState.scissor);
|
vkCmdSetScissor(cmd_, 0, 1, &dynState.scissor);
|
||||||
vkCmdSetViewport(cmd_, 0, 1, &dynState.viewport);
|
vkCmdSetViewport(cmd_, 0, 1, &dynState.viewport);
|
||||||
vkCmdSetStencilReference(cmd_, VK_STENCIL_FRONT_AND_BACK, dynState.stencilRef);
|
if (dynState.useStencil) {
|
||||||
vkCmdSetStencilWriteMask(cmd_, VK_STENCIL_FRONT_AND_BACK, dynState.stencilWriteMask);
|
vkCmdSetStencilWriteMask(cmd_, VK_STENCIL_FRONT_AND_BACK, dynState.stencilWriteMask);
|
||||||
vkCmdSetStencilCompareMask(cmd_, VK_STENCIL_FRONT_AND_BACK, dynState.stencilCompareMask);
|
vkCmdSetStencilCompareMask(cmd_, VK_STENCIL_FRONT_AND_BACK, dynState.stencilCompareMask);
|
||||||
|
vkCmdSetStencilReference(cmd_, VK_STENCIL_FRONT_AND_BACK, dynState.stencilRef);
|
||||||
|
}
|
||||||
float bc[4];
|
float bc[4];
|
||||||
Uint8x4ToFloat4(bc, dynState.blendColor);
|
Uint8x4ToFloat4(bc, dynState.blendColor);
|
||||||
vkCmdSetBlendConstants(cmd_, bc);
|
vkCmdSetBlendConstants(cmd_, bc);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user