early-access version 3013

main
pineappleEA 2022-10-11 02:55:26 +02:00
parent b16ace6ba4
commit 971fac7f75
13 changed files with 87 additions and 69 deletions

View File

@ -1,7 +1,7 @@
yuzu emulator early access yuzu emulator early access
============= =============
This is the source code for early-access 3012. This is the source code for early-access 3013.
## Legal Notice ## Legal Notice

View File

@ -487,7 +487,7 @@ void LANDiscovery::ReceivePacket(const Network::LDNPacket& packet) {
std::scoped_lock lock{packet_mutex}; std::scoped_lock lock{packet_mutex};
switch (packet.type) { switch (packet.type) {
case Network::LDNPacketType::Scan: { case Network::LDNPacketType::Scan: {
LOG_INFO(Frontend, "Scan packet received!"); LOG_DEBUG(Frontend, "Scan packet received!");
if (state == State::AccessPointCreated) { if (state == State::AccessPointCreated) {
// Reply to the sender // Reply to the sender
SendPacket(Network::LDNPacketType::ScanResp, network_info, packet.local_ip); SendPacket(Network::LDNPacketType::ScanResp, network_info, packet.local_ip);
@ -495,7 +495,7 @@ void LANDiscovery::ReceivePacket(const Network::LDNPacket& packet) {
break; break;
} }
case Network::LDNPacketType::ScanResp: { case Network::LDNPacketType::ScanResp: {
LOG_INFO(Frontend, "ScanResp packet received!"); LOG_DEBUG(Frontend, "ScanResp packet received!");
NetworkInfo info{}; NetworkInfo info{};
std::memcpy(&info, packet.data.data(), sizeof(NetworkInfo)); std::memcpy(&info, packet.data.data(), sizeof(NetworkInfo));
@ -611,13 +611,6 @@ MacAddress LANDiscovery::GetFakeMac() const {
Result LANDiscovery::GetNodeInfo(NodeInfo& node, const UserConfig& userConfig, Result LANDiscovery::GetNodeInfo(NodeInfo& node, const UserConfig& userConfig,
u16 localCommunicationVersion) { u16 localCommunicationVersion) {
const auto network_interface = Network::GetSelectedNetworkInterface();
if (!network_interface) {
LOG_ERROR(Service_LDN, "No network interface available");
return ResultNoIpAddress;
}
node.mac_address = GetFakeMac(); node.mac_address = GetFakeMac();
node.is_connected = 1; node.is_connected = 1;
std::memcpy(node.user_name.data(), userConfig.user_name.data(), UserNameBytesMax + 1); std::memcpy(node.user_name.data(), userConfig.user_name.data(), UserNameBytesMax + 1);

View File

@ -150,7 +150,7 @@ public:
} }
~IUserLocalCommunicationService() { ~IUserLocalCommunicationService() {
if (is_initialized) { if (is_network_available) {
if (auto room_member = room_network.GetRoomMember().lock()) { if (auto room_member = room_network.GetRoomMember().lock()) {
room_member->Unbind(ldn_packet_received); room_member->Unbind(ldn_packet_received);
} }
@ -193,7 +193,7 @@ public:
NetworkInfo network_info{}; NetworkInfo network_info{};
const auto rc = lan_discovery.GetNetworkInfo(network_info); const auto rc = lan_discovery.GetNetworkInfo(network_info);
if (rc.IsError()) { if (rc.IsError()) {
LOG_ERROR(Service_LDN, "NetworkInfo is not valid {}", rc.raw); LOG_DEBUG(Service_LDN, "NetworkInfo is not valid {}", rc.raw);
IPC::ResponseBuilder rb{ctx, 2}; IPC::ResponseBuilder rb{ctx, 2};
rb.Push(rc); rb.Push(rc);
return; return;
@ -205,6 +205,14 @@ public:
} }
void GetIpv4Address(Kernel::HLERequestContext& ctx) { void GetIpv4Address(Kernel::HLERequestContext& ctx) {
if (!is_network_available) {
IPC::ResponseBuilder rb{ctx, 4};
rb.Push(ResultSuccess);
rb.PushRaw(Ipv4Address{127, 0, 0, 1});
rb.PushRaw(Ipv4Address{255, 255, 255, 0});
return;
}
const auto network_interface = Network::GetSelectedNetworkInterface(); const auto network_interface = Network::GetSelectedNetworkInterface();
if (!network_interface) { if (!network_interface) {
@ -342,6 +350,13 @@ public:
return; return;
} }
if (!is_network_available) {
IPC::ResponseBuilder rb{ctx, 3};
rb.Push(ResultSuccess);
rb.Push(0);
return;
}
u16 count = 0; u16 count = 0;
std::vector<NetworkInfo> network_infos(network_info_size); std::vector<NetworkInfo> network_infos(network_info_size);
Result rc = lan_discovery.Scan(network_infos, count, scan_filter); Result rc = lan_discovery.Scan(network_infos, count, scan_filter);
@ -488,18 +503,18 @@ public:
} }
void Initialize(Kernel::HLERequestContext& ctx) { void Initialize(Kernel::HLERequestContext& ctx) {
const auto rc = InitializeImpl(ctx); InitializeImpl(ctx);
if (rc.IsError()) {
LOG_ERROR(Service_LDN, "Network isn't initialized, rc={}", rc.raw);
}
// Initialize always returns success
IPC::ResponseBuilder rb{ctx, 2}; IPC::ResponseBuilder rb{ctx, 2};
rb.Push(rc); rb.Push(ResultSuccess);
} }
void Finalize(Kernel::HLERequestContext& ctx) { void Finalize(Kernel::HLERequestContext& ctx) {
if (auto room_member = room_network.GetRoomMember().lock()) { if (is_network_available) {
room_member->Unbind(ldn_packet_received); if (auto room_member = room_network.GetRoomMember().lock()) {
room_member->Unbind(ldn_packet_received);
}
} }
is_initialized = false; is_initialized = false;
@ -519,22 +534,25 @@ public:
} }
Result InitializeImpl(Kernel::HLERequestContext& ctx) { Result InitializeImpl(Kernel::HLERequestContext& ctx) {
lan_discovery.Initialize([&]() { OnEventFired(); });
is_initialized = true;
is_network_available = false;
const auto network_interface = Network::GetSelectedNetworkInterface(); const auto network_interface = Network::GetSelectedNetworkInterface();
if (!network_interface) { if (!network_interface) {
LOG_ERROR(Service_LDN, "No network interface is set"); LOG_ERROR(Service_LDN, "No network interface is set");
return ResultAirplaneModeEnabled; return ResultSuccess;
} }
if (auto room_member = room_network.GetRoomMember().lock()) { if (auto room_member = room_network.GetRoomMember().lock()) {
ldn_packet_received = room_member->BindOnLdnPacketReceived( ldn_packet_received = room_member->BindOnLdnPacketReceived(
[this](const Network::LDNPacket& packet) { OnLDNPacketReceived(packet); }); [this](const Network::LDNPacket& packet) { OnLDNPacketReceived(packet); });
is_network_available = true;
} else { } else {
LOG_ERROR(Service_LDN, "Couldn't bind callback!"); LOG_ERROR(Service_LDN, "Couldn't bind callback!");
return ResultAirplaneModeEnabled; return ResultSuccess;
} }
lan_discovery.Initialize([&]() { OnEventFired(); });
is_initialized = true;
return ResultSuccess; return ResultSuccess;
} }
@ -547,6 +565,7 @@ public:
Network::RoomMember::CallbackHandle<Network::LDNPacket> ldn_packet_received; Network::RoomMember::CallbackHandle<Network::LDNPacket> ldn_packet_received;
bool is_initialized{}; bool is_initialized{};
bool is_network_available{};
}; };
class LDNS final : public ServiceFramework<LDNS> { class LDNS final : public ServiceFramework<LDNS> {

View File

@ -199,7 +199,7 @@ std::optional<NetworkInterface> GetSelectedNetworkInterface() {
}); });
if (res == network_interfaces.end()) { if (res == network_interfaces.end()) {
LOG_ERROR(Network, "Couldn't find selected interface \"{}\"", selected_network_interface); LOG_DEBUG(Network, "Couldn't find selected interface \"{}\"", selected_network_interface);
return std::nullopt; return std::nullopt;
} }

View File

@ -61,7 +61,7 @@ void SetupDirtyRenderTargets(Maxwell3D::DirtyState::Tables& tables) {
} }
void SetupDirtyShaders(Maxwell3D::DirtyState::Tables& tables) { void SetupDirtyShaders(Maxwell3D::DirtyState::Tables& tables) {
FillBlock(tables[0], OFF(pipelines), NUM(pipelines) * Maxwell3D::Regs::MaxShaderProgram, FillBlock(tables[0], OFF(pipelines), NUM(pipelines[0]) * Maxwell3D::Regs::MaxShaderProgram,
Shaders); Shaders);
} }
} // Anonymous namespace } // Anonymous namespace

View File

@ -74,15 +74,15 @@ void Maxwell3D::InitializeRegisterDefaults() {
regs.stencil_front_op.zfail = Regs::StencilOp::Op::Keep_D3D; regs.stencil_front_op.zfail = Regs::StencilOp::Op::Keep_D3D;
regs.stencil_front_op.zpass = Regs::StencilOp::Op::Keep_D3D; regs.stencil_front_op.zpass = Regs::StencilOp::Op::Keep_D3D;
regs.stencil_front_op.func = Regs::ComparisonOp::Always_GL; regs.stencil_front_op.func = Regs::ComparisonOp::Always_GL;
regs.stencil_front_func.func_mask = 0xFFFFFFFF; regs.stencil_front_func_mask = 0xFFFFFFFF;
regs.stencil_front_func.mask = 0xFFFFFFFF; regs.stencil_front_mask = 0xFFFFFFFF;
regs.stencil_two_side_enable = 1; regs.stencil_two_side_enable = 1;
regs.stencil_back_op.fail = Regs::StencilOp::Op::Keep_D3D; regs.stencil_back_op.fail = Regs::StencilOp::Op::Keep_D3D;
regs.stencil_back_op.zfail = Regs::StencilOp::Op::Keep_D3D; regs.stencil_back_op.zfail = Regs::StencilOp::Op::Keep_D3D;
regs.stencil_back_op.zpass = Regs::StencilOp::Op::Keep_D3D; regs.stencil_back_op.zpass = Regs::StencilOp::Op::Keep_D3D;
regs.stencil_back_op.func = Regs::ComparisonOp::Always_GL; regs.stencil_back_op.func = Regs::ComparisonOp::Always_GL;
regs.stencil_back_func.func_mask = 0xFFFFFFFF; regs.stencil_back_func_mask = 0xFFFFFFFF;
regs.stencil_back_func.mask = 0xFFFFFFFF; regs.stencil_back_mask = 0xFFFFFFFF;
regs.depth_test_func = Regs::ComparisonOp::Always_GL; regs.depth_test_func = Regs::ComparisonOp::Always_GL;
regs.gl_front_face = Regs::FrontFace::CounterClockWise; regs.gl_front_face = Regs::FrontFace::CounterClockWise;

View File

@ -1795,12 +1795,6 @@ public:
ComparisonOp func; ComparisonOp func;
}; };
struct StencilFunc {
s32 ref;
u32 func_mask;
u32 mask;
};
struct PsSaturate { struct PsSaturate {
// Opposite of DepthMode // Opposite of DepthMode
enum class Depth : u32 { enum class Depth : u32 {
@ -2737,7 +2731,9 @@ public:
u32 post_z_pixel_imask; ///< 0x0F1C u32 post_z_pixel_imask; ///< 0x0F1C
INSERT_PADDING_BYTES_NOINIT(0x20); INSERT_PADDING_BYTES_NOINIT(0x20);
ConstantColorRendering const_color_rendering; ///< 0x0F40 ConstantColorRendering const_color_rendering; ///< 0x0F40
StencilFunc stencil_back_func; ///< 0x0F54 s32 stencil_back_ref; ///< 0x0F54
u32 stencil_back_mask; ///< 0x0F58
u32 stencil_back_func_mask; ///< 0x0F5C
INSERT_PADDING_BYTES_NOINIT(0x24); INSERT_PADDING_BYTES_NOINIT(0x24);
VertexStreamSubstitute vertex_stream_substitute; ///< 0x0F84 VertexStreamSubstitute vertex_stream_substitute; ///< 0x0F84
u32 line_mode_clip_generated_edge_do_not_draw; ///< 0x0F8C u32 line_mode_clip_generated_edge_do_not_draw; ///< 0x0F8C
@ -2855,7 +2851,9 @@ public:
Blend blend; ///< 0x133C Blend blend; ///< 0x133C
u32 stencil_enable; ///< 0x1380 u32 stencil_enable; ///< 0x1380
StencilOp stencil_front_op; ///< 0x1384 StencilOp stencil_front_op; ///< 0x1384
StencilFunc stencil_front_func; ///< 0x1394 s32 stencil_front_ref; ///< 0x1394
s32 stencil_front_func_mask; ///< 0x1398
s32 stencil_front_mask; ///< 0x139C
INSERT_PADDING_BYTES_NOINIT(0x4); INSERT_PADDING_BYTES_NOINIT(0x4);
u32 draw_auto_start_byte_count; ///< 0x13A4 u32 draw_auto_start_byte_count; ///< 0x13A4
PsSaturate frag_color_clamp; ///< 0x13A8 PsSaturate frag_color_clamp; ///< 0x13A8
@ -3303,7 +3301,9 @@ ASSERT_REG_POSITION(vpc_perf, 0x0F14);
ASSERT_REG_POSITION(pm_local_trigger, 0x0F18); ASSERT_REG_POSITION(pm_local_trigger, 0x0F18);
ASSERT_REG_POSITION(post_z_pixel_imask, 0x0F1C); ASSERT_REG_POSITION(post_z_pixel_imask, 0x0F1C);
ASSERT_REG_POSITION(const_color_rendering, 0x0F40); ASSERT_REG_POSITION(const_color_rendering, 0x0F40);
ASSERT_REG_POSITION(stencil_back_func, 0x0F54); ASSERT_REG_POSITION(stencil_back_ref, 0x0F54);
ASSERT_REG_POSITION(stencil_back_mask, 0x0F58);
ASSERT_REG_POSITION(stencil_back_func_mask, 0x0F5C);
ASSERT_REG_POSITION(vertex_stream_substitute, 0x0F84); ASSERT_REG_POSITION(vertex_stream_substitute, 0x0F84);
ASSERT_REG_POSITION(line_mode_clip_generated_edge_do_not_draw, 0x0F8C); ASSERT_REG_POSITION(line_mode_clip_generated_edge_do_not_draw, 0x0F8C);
ASSERT_REG_POSITION(color_mask_common, 0x0F90); ASSERT_REG_POSITION(color_mask_common, 0x0F90);
@ -3408,7 +3408,9 @@ ASSERT_REG_POSITION(invalidate_texture_data_cache_lines, 0x1338);
ASSERT_REG_POSITION(blend, 0x133C); ASSERT_REG_POSITION(blend, 0x133C);
ASSERT_REG_POSITION(stencil_enable, 0x1380); ASSERT_REG_POSITION(stencil_enable, 0x1380);
ASSERT_REG_POSITION(stencil_front_op, 0x1384); ASSERT_REG_POSITION(stencil_front_op, 0x1384);
ASSERT_REG_POSITION(stencil_front_func, 0x1394); ASSERT_REG_POSITION(stencil_front_ref, 0x1394);
ASSERT_REG_POSITION(stencil_front_func_mask, 0x1398);
ASSERT_REG_POSITION(stencil_front_mask, 0x139C);
ASSERT_REG_POSITION(draw_auto_start_byte_count, 0x13A4); ASSERT_REG_POSITION(draw_auto_start_byte_count, 0x13A4);
ASSERT_REG_POSITION(frag_color_clamp, 0x13A8); ASSERT_REG_POSITION(frag_color_clamp, 0x13A8);
ASSERT_REG_POSITION(window_origin, 0x13AC); ASSERT_REG_POSITION(window_origin, 0x13AC);

View File

@ -657,8 +657,13 @@ void RasterizerOpenGL::SyncDepthClamp() {
} }
flags[Dirty::DepthClampEnabled] = false; flags[Dirty::DepthClampEnabled] = false;
oglEnable(GL_DEPTH_CLAMP, maxwell3d->regs.viewport_clip_control.geometry_clip != bool depth_clamp_disabled{maxwell3d->regs.viewport_clip_control.geometry_clip ==
Maxwell::ViewportClipControl::GeometryClip::Passthrough); Maxwell::ViewportClipControl::GeometryClip::Passthrough ||
maxwell3d->regs.viewport_clip_control.geometry_clip ==
Maxwell::ViewportClipControl::GeometryClip::FrustumXYZ ||
maxwell3d->regs.viewport_clip_control.geometry_clip ==
Maxwell::ViewportClipControl::GeometryClip::FrustumZ};
oglEnable(GL_DEPTH_CLAMP, !depth_clamp_disabled);
} }
void RasterizerOpenGL::SyncClipEnabled(u32 clip_mask) { void RasterizerOpenGL::SyncClipEnabled(u32 clip_mask) {
@ -745,19 +750,19 @@ void RasterizerOpenGL::SyncStencilTestState() {
oglEnable(GL_STENCIL_TEST, regs.stencil_enable); oglEnable(GL_STENCIL_TEST, regs.stencil_enable);
glStencilFuncSeparate(GL_FRONT, MaxwellToGL::ComparisonOp(regs.stencil_front_op.func), glStencilFuncSeparate(GL_FRONT, MaxwellToGL::ComparisonOp(regs.stencil_front_op.func),
regs.stencil_front_func.ref, regs.stencil_front_func.func_mask); regs.stencil_front_ref, regs.stencil_front_func_mask);
glStencilOpSeparate(GL_FRONT, MaxwellToGL::StencilOp(regs.stencil_front_op.fail), glStencilOpSeparate(GL_FRONT, MaxwellToGL::StencilOp(regs.stencil_front_op.fail),
MaxwellToGL::StencilOp(regs.stencil_front_op.zfail), MaxwellToGL::StencilOp(regs.stencil_front_op.zfail),
MaxwellToGL::StencilOp(regs.stencil_front_op.zpass)); MaxwellToGL::StencilOp(regs.stencil_front_op.zpass));
glStencilMaskSeparate(GL_FRONT, regs.stencil_front_func.mask); glStencilMaskSeparate(GL_FRONT, regs.stencil_front_mask);
if (regs.stencil_two_side_enable) { if (regs.stencil_two_side_enable) {
glStencilFuncSeparate(GL_BACK, MaxwellToGL::ComparisonOp(regs.stencil_back_op.func), glStencilFuncSeparate(GL_BACK, MaxwellToGL::ComparisonOp(regs.stencil_back_op.func),
regs.stencil_back_func.ref, regs.stencil_back_func.mask); regs.stencil_back_ref, regs.stencil_back_mask);
glStencilOpSeparate(GL_BACK, MaxwellToGL::StencilOp(regs.stencil_back_op.fail), glStencilOpSeparate(GL_BACK, MaxwellToGL::StencilOp(regs.stencil_back_op.fail),
MaxwellToGL::StencilOp(regs.stencil_back_op.zfail), MaxwellToGL::StencilOp(regs.stencil_back_op.zfail),
MaxwellToGL::StencilOp(regs.stencil_back_op.zpass)); MaxwellToGL::StencilOp(regs.stencil_back_op.zpass));
glStencilMaskSeparate(GL_BACK, regs.stencil_back_func.mask); glStencilMaskSeparate(GL_BACK, regs.stencil_back_mask);
} else { } else {
glStencilFuncSeparate(GL_BACK, GL_ALWAYS, 0, 0xFFFFFFFF); glStencilFuncSeparate(GL_BACK, GL_ALWAYS, 0, 0xFFFFFFFF);
glStencilOpSeparate(GL_BACK, GL_KEEP, GL_KEEP, GL_KEEP); glStencilOpSeparate(GL_BACK, GL_KEEP, GL_KEEP, GL_KEEP);

View File

@ -100,14 +100,12 @@ void SetupDirtyDepthTest(Tables& tables) {
void SetupDirtyStencilTest(Tables& tables) { void SetupDirtyStencilTest(Tables& tables) {
static constexpr std::array offsets = { static constexpr std::array offsets = {
OFF(stencil_enable), OFF(stencil_front_op.func), OFF(stencil_enable), OFF(stencil_front_op.func), OFF(stencil_front_ref),
OFF(stencil_front_func.ref), OFF(stencil_front_func.func_mask), OFF(stencil_front_func_mask), OFF(stencil_front_op.fail), OFF(stencil_front_op.zfail),
OFF(stencil_front_op.fail), OFF(stencil_front_op.zfail), OFF(stencil_front_op.zpass), OFF(stencil_front_mask), OFF(stencil_two_side_enable),
OFF(stencil_front_op.zpass), OFF(stencil_front_func.mask), OFF(stencil_back_op.func), OFF(stencil_back_ref), OFF(stencil_back_func_mask),
OFF(stencil_two_side_enable), OFF(stencil_back_op.func), OFF(stencil_back_op.fail), OFF(stencil_back_op.zfail), OFF(stencil_back_op.zpass),
OFF(stencil_back_func.ref), OFF(stencil_back_func.func_mask), OFF(stencil_back_mask)};
OFF(stencil_back_op.fail), OFF(stencil_back_op.zfail),
OFF(stencil_back_op.zpass), OFF(stencil_back_func.mask)};
for (const auto offset : offsets) { for (const auto offset : offsets) {
tables[0][offset] = StencilTest; tables[0][offset] = StencilTest;
} }

View File

@ -63,7 +63,11 @@ void FixedPipelineState::Refresh(Tegra::Engines::Maxwell3D& maxwell3d,
primitive_restart_enable.Assign(regs.primitive_restart.enabled != 0 ? 1 : 0); primitive_restart_enable.Assign(regs.primitive_restart.enabled != 0 ? 1 : 0);
depth_bias_enable.Assign(enabled_lut[POLYGON_OFFSET_ENABLE_LUT[topology_index]] != 0 ? 1 : 0); depth_bias_enable.Assign(enabled_lut[POLYGON_OFFSET_ENABLE_LUT[topology_index]] != 0 ? 1 : 0);
depth_clamp_disabled.Assign(regs.viewport_clip_control.geometry_clip == depth_clamp_disabled.Assign(regs.viewport_clip_control.geometry_clip ==
Maxwell::ViewportClipControl::GeometryClip::Passthrough); Maxwell::ViewportClipControl::GeometryClip::Passthrough ||
regs.viewport_clip_control.geometry_clip ==
Maxwell::ViewportClipControl::GeometryClip::FrustumXYZ ||
regs.viewport_clip_control.geometry_clip ==
Maxwell::ViewportClipControl::GeometryClip::FrustumZ);
ndc_minus_one_to_one.Assign(regs.depth_mode == Maxwell::DepthMode::MinusOneToOne ? 1 : 0); ndc_minus_one_to_one.Assign(regs.depth_mode == Maxwell::DepthMode::MinusOneToOne ? 1 : 0);
polygon_mode.Assign(PackPolygonMode(regs.polygon_mode_front)); polygon_mode.Assign(PackPolygonMode(regs.polygon_mode_front));
patch_control_points_minus_one.Assign(regs.patch_vertices - 1); patch_control_points_minus_one.Assign(regs.patch_vertices - 1);

View File

@ -771,11 +771,10 @@ void RasterizerVulkan::UpdateStencilFaces(Tegra::Engines::Maxwell3D::Regs& regs)
if (regs.stencil_two_side_enable) { if (regs.stencil_two_side_enable) {
// Separate values per face // Separate values per face
scheduler.Record( scheduler.Record(
[front_ref = regs.stencil_front_func.ref, [front_ref = regs.stencil_front_ref, front_write_mask = regs.stencil_front_mask,
front_write_mask = regs.stencil_front_func.mask, front_test_mask = regs.stencil_front_func_mask, back_ref = regs.stencil_back_ref,
front_test_mask = regs.stencil_front_func.func_mask, back_write_mask = regs.stencil_back_mask,
back_ref = regs.stencil_back_func.ref, back_write_mask = regs.stencil_back_func.mask, back_test_mask = regs.stencil_back_func_mask](vk::CommandBuffer cmdbuf) {
back_test_mask = regs.stencil_back_func.func_mask](vk::CommandBuffer cmdbuf) {
// Front face // Front face
cmdbuf.SetStencilReference(VK_STENCIL_FACE_FRONT_BIT, front_ref); cmdbuf.SetStencilReference(VK_STENCIL_FACE_FRONT_BIT, front_ref);
cmdbuf.SetStencilWriteMask(VK_STENCIL_FACE_FRONT_BIT, front_write_mask); cmdbuf.SetStencilWriteMask(VK_STENCIL_FACE_FRONT_BIT, front_write_mask);
@ -788,9 +787,8 @@ void RasterizerVulkan::UpdateStencilFaces(Tegra::Engines::Maxwell3D::Regs& regs)
}); });
} else { } else {
// Front face defines both faces // Front face defines both faces
scheduler.Record([ref = regs.stencil_front_func.ref, scheduler.Record([ref = regs.stencil_front_ref, write_mask = regs.stencil_front_mask,
write_mask = regs.stencil_front_func.mask, test_mask = regs.stencil_front_func_mask](vk::CommandBuffer cmdbuf) {
test_mask = regs.stencil_front_func.func_mask](vk::CommandBuffer cmdbuf) {
cmdbuf.SetStencilReference(VK_STENCIL_FACE_FRONT_AND_BACK, ref); cmdbuf.SetStencilReference(VK_STENCIL_FACE_FRONT_AND_BACK, ref);
cmdbuf.SetStencilWriteMask(VK_STENCIL_FACE_FRONT_AND_BACK, write_mask); cmdbuf.SetStencilWriteMask(VK_STENCIL_FACE_FRONT_AND_BACK, write_mask);
cmdbuf.SetStencilCompareMask(VK_STENCIL_FACE_FRONT_AND_BACK, test_mask); cmdbuf.SetStencilCompareMask(VK_STENCIL_FACE_FRONT_AND_BACK, test_mask);

View File

@ -77,12 +77,12 @@ void SetupDirtyDepthBounds(Tables& tables) {
void SetupDirtyStencilProperties(Tables& tables) { void SetupDirtyStencilProperties(Tables& tables) {
auto& table = tables[0]; auto& table = tables[0];
table[OFF(stencil_two_side_enable)] = StencilProperties; table[OFF(stencil_two_side_enable)] = StencilProperties;
table[OFF(stencil_front_func.ref)] = StencilProperties; table[OFF(stencil_front_ref)] = StencilProperties;
table[OFF(stencil_front_func.mask)] = StencilProperties; table[OFF(stencil_front_mask)] = StencilProperties;
table[OFF(stencil_front_func.func_mask)] = StencilProperties; table[OFF(stencil_front_func_mask)] = StencilProperties;
table[OFF(stencil_back_func.ref)] = StencilProperties; table[OFF(stencil_back_ref)] = StencilProperties;
table[OFF(stencil_back_func.mask)] = StencilProperties; table[OFF(stencil_back_mask)] = StencilProperties;
table[OFF(stencil_back_func.func_mask)] = StencilProperties; table[OFF(stencil_back_func_mask)] = StencilProperties;
} }
void SetupDirtyLineWidth(Tables& tables) { void SetupDirtyLineWidth(Tables& tables) {

View File

@ -911,7 +911,6 @@ void GMainWindow::InitializeWidgets() {
statusBar()->addPermanentWidget(label); statusBar()->addPermanentWidget(label);
} }
// TODO (flTobi): Add the widget when multiplayer is fully implemented
statusBar()->addPermanentWidget(multiplayer_state->GetStatusText(), 0); statusBar()->addPermanentWidget(multiplayer_state->GetStatusText(), 0);
statusBar()->addPermanentWidget(multiplayer_state->GetStatusIcon(), 0); statusBar()->addPermanentWidget(multiplayer_state->GetStatusIcon(), 0);