mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-20 11:57:01 +02:00
Saving Private Windows
This commit is contained in:
parent
feeb311d7c
commit
69f6a0573c
2 changed files with 11 additions and 10 deletions
|
|
@ -1336,8 +1336,8 @@ void RasterizerVulkan::UpdateStencilFaces(Tegra::Engines::Maxwell3D::Regs& regs)
|
||||||
if (front_dirty || back_dirty) {
|
if (front_dirty || back_dirty) {
|
||||||
scheduler.Record([front_ref = regs.stencil_front_ref,
|
scheduler.Record([front_ref = regs.stencil_front_ref,
|
||||||
back_ref = regs.stencil_back_ref,
|
back_ref = regs.stencil_back_ref,
|
||||||
two_sided](vk::CommandBuffer cmdbuf) {
|
is_two_sided = two_sided](vk::CommandBuffer cmdbuf) {
|
||||||
const bool set_back = two_sided && front_ref != back_ref;
|
const bool set_back = is_two_sided && front_ref != back_ref;
|
||||||
cmdbuf.SetStencilReference(set_back ? VK_STENCIL_FACE_FRONT_BIT
|
cmdbuf.SetStencilReference(set_back ? VK_STENCIL_FACE_FRONT_BIT
|
||||||
: VK_STENCIL_FACE_FRONT_AND_BACK,
|
: VK_STENCIL_FACE_FRONT_AND_BACK,
|
||||||
front_ref);
|
front_ref);
|
||||||
|
|
@ -1361,9 +1361,9 @@ void RasterizerVulkan::UpdateStencilFaces(Tegra::Engines::Maxwell3D::Regs& regs)
|
||||||
scheduler.Record([
|
scheduler.Record([
|
||||||
front_write_mask = regs.stencil_front_mask,
|
front_write_mask = regs.stencil_front_mask,
|
||||||
back_write_mask = regs.stencil_back_mask,
|
back_write_mask = regs.stencil_back_mask,
|
||||||
two_sided = regs.stencil_two_side_enable
|
is_two_sided = regs.stencil_two_side_enable
|
||||||
](vk::CommandBuffer cmdbuf) {
|
](vk::CommandBuffer cmdbuf) {
|
||||||
const bool set_back = two_sided && front_write_mask != back_write_mask;
|
const bool set_back = is_two_sided && front_write_mask != back_write_mask;
|
||||||
cmdbuf.SetStencilWriteMask(set_back ? VK_STENCIL_FACE_FRONT_BIT
|
cmdbuf.SetStencilWriteMask(set_back ? VK_STENCIL_FACE_FRONT_BIT
|
||||||
: VK_STENCIL_FACE_FRONT_AND_BACK,
|
: VK_STENCIL_FACE_FRONT_AND_BACK,
|
||||||
front_write_mask);
|
front_write_mask);
|
||||||
|
|
@ -1387,9 +1387,9 @@ void RasterizerVulkan::UpdateStencilFaces(Tegra::Engines::Maxwell3D::Regs& regs)
|
||||||
scheduler.Record([
|
scheduler.Record([
|
||||||
front_test_mask = regs.stencil_front_func_mask,
|
front_test_mask = regs.stencil_front_func_mask,
|
||||||
back_test_mask = regs.stencil_back_func_mask,
|
back_test_mask = regs.stencil_back_func_mask,
|
||||||
two_sided = regs.stencil_two_side_enable
|
is_two_sided = regs.stencil_two_side_enable
|
||||||
](vk::CommandBuffer cmdbuf) {
|
](vk::CommandBuffer cmdbuf) {
|
||||||
const bool set_back = two_sided && front_test_mask != back_test_mask;
|
const bool set_back = is_two_sided && front_test_mask != back_test_mask;
|
||||||
cmdbuf.SetStencilCompareMask(set_back ? VK_STENCIL_FACE_FRONT_BIT
|
cmdbuf.SetStencilCompareMask(set_back ? VK_STENCIL_FACE_FRONT_BIT
|
||||||
: VK_STENCIL_FACE_FRONT_AND_BACK,
|
: VK_STENCIL_FACE_FRONT_AND_BACK,
|
||||||
front_test_mask);
|
front_test_mask);
|
||||||
|
|
|
||||||
|
|
@ -1038,14 +1038,15 @@ bool Device::GetSuitability(bool requires_swapchain) {
|
||||||
// Set next pointer.
|
// Set next pointer.
|
||||||
void** next = &features2.pNext;
|
void** next = &features2.pNext;
|
||||||
|
|
||||||
// Vulkan 1.2 and 1.3 features
|
// Vulkan 1.2 and 1.3 features
|
||||||
if (instance_version >= VK_API_VERSION_1_2) {
|
if (instance_version >= VK_API_VERSION_1_2) {
|
||||||
features_1_2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES;
|
features_1_2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES;
|
||||||
SetNext(next, features_1_2);
|
features_1_2.pNext = nullptr;
|
||||||
|
*next = &features_1_2;
|
||||||
if (instance_version >= VK_API_VERSION_1_3) {
|
if (instance_version >= VK_API_VERSION_1_3) {
|
||||||
features_1_3.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES;
|
features_1_3.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES;
|
||||||
SetNext(next, features_1_3);
|
features_1_3.pNext = nullptr;
|
||||||
|
features_1_2.pNext = &features_1_3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue