| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | | | | |
|
| | |\ \ \ \
| | | | | |
| | | | | | |
FSR 3.1 implementation for DLSS games
|
| | | |\ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
# Conflicts:
# src/video_core/renderer_vulkan/blit_image.cpp
# src/video_core/renderer_vulkan/blit_image.h
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Fire Emblem: Fortune's Weave's DLSS network can't run here, and the
temporal stand-in is only an approximation of it. FSR 3.1 takes the
same inputs DLSS does: the jittered colour, motion vectors, the jitter
and the depth, which the game's first DLSS pass reads through
cbuf0+0x298 (Z32, reversed, the colour's size). Kepler compute keeps it
next to the motion vectors.
Fsr3Upscaler ports the host side of the SDK's ffx_fsr3upscaler.cpp: the
eight passes (prepare inputs, luma and shading-change pyramids, shading
change, reactivity, luma instability, accumulate, RCAS), the internal
images and the constants, recorded through the scheduler with the
shaders from externals/FidelityFX-SDK. It takes HDR colour, render-size
motion vectors and reversed depth, computes its own exposure, and uses
the no-wave SPD variants on devices without compute quad operations.
The SDK's GLSL uses separate textures and samplers, so DescriptorBankInfo
gains sampled image and sampler counts (default 0). FSR's RCAS follows
the RCAS Sharpness slider. The result goes to FSR's own RGBA16F image
and is drawn into the game's output, which keeps its format.
TextureCacheRuntime::TemporalUpscale runs FSR 3.1 first. Without the
depth, at mismatched scales, on a device lacking FSR's formats or
features, or if its pipelines fail to build, the stand-in runs instead,
and the bilinear blit stays last. EDEN_NX2_DLSS_REPLACEMENT=standin
forces the stand-in. A gap of more than 250 ms between evaluations
restarts the history.
The BlitColor overload that takes a raw image view transitions its
source to SHADER_READ_ONLY_OPTIMAL but described it as GENERAL in the
descriptor (a validation error); it now describes the layout it uses.
Assisted-by: Claude Opus 5.5 (debugging, implementation and drafting)
Signed-off-by: Duck912 <350528965+Duck912@users.noreply.github.com>
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The GPU half of AMD FidelityFX Super Resolution 3.1.4, unmodified, from
FidelityFX SDK v1.1.4 (commit c6efa6bf7f20, MIT): the GLSL headers
(core, fsr3upscaler, spd, fsr1) and the eight Vulkan upscaling pass
files. The next commit compiles them with glslangValidator in
host_shaders like the other shaders. No prebuilt binary, DLL or AMD tool
from the SDK is used, and the HLSL callbacks, the autogen-reactive pass
and the debug view are left out. REUSE entry added for the directory.
Assisted-by: Claude Opus 5.5 (implementation and drafting)
Signed-off-by: Duck912 <350528965+Duck912@users.noreply.github.com>
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Fire Emblem: Fortune's Weave's DLSS input matches Eden's (same 720p
image, same detail), but the stand-in's 1440p output was blurrier than a
plain bilinear 2x of it (Laplacian 0.0066 vs 0.0081; Eden's real DLSS
0.0111), and the image drifted darker over time:
- the sample kernel was about twice too wide for the output resolution;
- the history was kept in the output's B10G11R11 format, whose 5-6 bit
mantissas round away a frame's 0.03-0.1 share;
- the 1-sigma neighbourhood clip removed detail that only some jitter
positions sample (railings, thin edges).
The history is now an RGBA16F pair the shader writes as a storage image,
with no per-frame copy. Still pixels use a third of the kernel width and
a 1.5-sigma clip, so detail from many jitter positions accumulates.
Moving pixels keep the old kernel and 1-sigma clip, and so do pixels
that moved recently or whose history falls far outside the
neighbourhood (content that changes without motion vectors), remembered
in the history's alpha. Static output goes from 0.0066 to 0.0102 with
no brightness drift and no new ghosting.
With resolution scaling the stand-in used to fall back to a bilinear
blit. The images are now scaled up as BlitImage does, the jitter is
scaled to host pixels and the history follows the framebuffer's render
area.
RCAS (temporal_sharpen.frag) sharpens a copy of each result, never the
history, in range-compressed space since the output is HDR. Its strength
is the sharpness slider, relabelled "RCAS Sharpness" (0% turns it off).
EDEN_NX2_TEMPORAL_KERNEL, _CLIP, _KERNEL_MOTION, _CLIP_MOTION and
_WEIGHT tune the filter (all four filter values at 1 give the old one),
and EDEN_NX2_TEMPORAL_SHARPEN=<stops>|off overrides the slider.
Assisted-by: Claude Opus 5.5 (debugging, implementation and drafting)
Signed-off-by: Duck912 <350528965+Duck912@users.noreply.github.com>
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The window filter "AMD FidelityFX Super Resolution 3" (present/fsr3.cpp)
runs FSR 1's EASU and RCAS with RCAS at 0.8x the slider and no temporal
blending, and the frame generation type "FSR 3"
(present/fsr3_frame_gen.cpp) is Eglantine's own optical-flow
interpolation, not AMD's. Both names suggested AMD's FSR 3 upscaler.
Label them "AMD FidelityFX Super Resolution 1, softer sharpening" (FSR 1
Soft) and "Optical Flow Interpolation (built-in)" (Optical Flow), and
the plain FSR filter "AMD FidelityFX Super Resolution 1 (FSR 1)". Only
the display text changes; setting ids and enum values stay, so configs
carry over.
Assisted-by: Claude Opus 5.5 (investigation and drafting)
Signed-off-by: Duck912 <350528965+Duck912@users.noreply.github.com>
|
| | |\ \ \ \ \ \
| | |_|/ / / /
| |/| | | | | |
nx2: video decoding fixes (green movies, end of stream, H.264 detection)
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
FFmpeg 6.1's swscale leaves the chroma plane of an NV12 to NV12 copy at
zero, so movies decoded on the host GPU (Mario Kart World's pre-race
movie, Hyrule Warriors' cutscenes) showed green. CPU-decoded frames
(YUV420P) were not affected.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Bananza's movie player acquires one decoded frame every time a released
output image's fence completes, and aborts (2111-3604) when the ring is
empty. Completing those fences at once after the end of a stream (the
Mario Kart World workaround) made it acquire from an empty ring the
moment its cutscene movies ended.
Released images now keep their normal pending fence after the end of a
stream. Stop (207) and Finalize (115) complete every fence handed out
so far, so a client that waits on its returned images after a movie is
still released when it stops the decoder.
EDEN_NX2_VDEC_EOS_RELEASE_NOW=1 restores the old immediate completion;
EDEN_NX2_VDEC_TRACE=1 logs every decoder call.
Tested on Bananza: the post-breakout cutscene movie ends and gameplay
continues (mining tunnel). Mario Kart World not retested.
Assisted-by: Claude (Anthropic) for investigation and code.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 0f8eaa54be5bff351de7c9a80cc06a4b3453bc76)
(cherry picked from commit 8ed051843a33a5dec086d1ec6985798c8b336a6a)
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 144b193c841a4b291e5eca065c94cbe82136a4b1)
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
stream is H.264 (Yoshi demo)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
- Complete pending fences immediately on release once the stream ends and no
frames remain to be processed, preventing infinite waits in movie teardown.
- Stop re-arming m_ready->room when an end-of-stream packet arrives or the final
frame is output, avoiding spurious wakeups and subsequent empty queue queries.
- Reset m_stream_ended when new input is submitted or on Flush/Stop.
Fixes an abort (2111-3604 / 0x1c286f) in Donkey Kong Bananza during the tutorial
transition scene when the video decoder stream ends.
Assisted-by: Gemini (vdecsvc end-of-stream fence completion and timer de-arming)
(cherry picked from commit b180df1ed77568da7c3e78dd97c0c46d84e54494)
|
| | |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions).
- [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability.
-------------------
https://git.eden-emu.dev/eden-emu/eden/pulls/4542
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4590
Reviewed-by: crueter <crueter@eden-emu.dev>
Reviewed-by: John <john@eden-emu.dev>
(cherry picked from commit 0731f40f4d86227f05da3fffbc44831065b53a8a)
Co-Authored-By: Claude Code <noreply@anthropic.com>
(cherry picked from commit 7c3821da0e678978d55df14d65e047539eafba4c)
|
| | |\ \ \ \ \
| | |_|_|_|/
| |/| | | | |
ci: queue release builds instead of cancelling the running one
|
| | |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Pushes in quick succession cancelled every build before it finished, so a
busy stretch published no release. Let the running build finish and keep
the newest push queued behind it.
|
| | |\ \ \ \
| | | | | |
| | | | | | |
shader: lower F2I.F16, TLD/TLD4.F16 and partial-mask TXD (Hyrule Warriors black gameplay)
|
| | | |\ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
nx2-experimental lowers partial-mask TXD as well (Splatoon Raiders).
Keep its RZ second destination and this branch's odd register for a
lone third channel; take its wider F2I mode check with the .H1 source.
Assisted-by: Claude Opus 5.5 (conflict resolution)
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
TXD was only lowered with all four channels (and rejected any
instruction without a second destination, as RZ & 1 is set).
Hyrule Warriors: Age of Imprisonment's gradient-sampling programs
fetch one channel into Rd, or three channels with the third in the
second destination, and were rejected ("native gradient texture
mode"), so their draws were skipped.
Pass the channel mask on to Maxwell TXD. The first two enabled
channels go to Rd, Rd+1 and the others to the second destination;
when those aren't consecutive, write to scratch and move them as the
four-channel case already did.
Assisted-by: Claude Opus 5.5 (diagnosis, fix and testing)
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
TLD.SCR and TLD4 with .F16 (bit 79) return their components packed in
pairs: components 0 and 1 in Rd, 2 and 3 in the second destination.
The lowering rejected them ("native texel fetch mode", "native texture
gather mode"), so the compute programs using them never ran.
In Hyrule Warriors: Age of Imprisonment these are compute programs
that run once gameplay starts, and gameplay stayed black (the pause
menu, drawn another way, showed the scene).
Lower the F32 form into R248/R249 and R246/R247, then pack each pair
the way F2FP.PACK_AB is lowered.
Assisted-by: Claude Opus 5.5 (diagnosis, fix and testing)
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
F2I from an F16 source was only lowered unsigned and from the low
half. F2I.F16 (signed, bit 72) and F2I.U32.F16 Rd, Rs.H1 (bits 60-61)
were rejected ("native float-to-integer conversion mode"); Hyrule
Warriors: Age of Imprisonment has 24 such programs.
Accept bit 72 as the other F2I forms do, and pick the high half for
.H1.
Assisted-by: Claude Opus 5.5 (diagnosis, fix and testing)
|
| |\ \ \ \ \ \ \ |
|
| | |\| | | | | | |
|
| | |\ \ \ \ \ \ \ |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Read the selected program metadata before kernel initialization so NSP launches receive the Switch 2 memory layout and clock. This fixes Mario Kart World 1.8.0 crashing during startup while its loose 1.0 dump already boots.
|
| |\ \ \ \ \ \ \ \ \
| | |_|_|_|_|_|/ /
| |/| | | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
HandleProxyPacket now receives data that bsd has already decompressed.
Assisted-by: Claude Opus 5.5 (investigation and implementation)
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
A receive with MSG_DONTWAIT restored the blocking mode from the descriptor copy taken
before the call. When fcntl(SETFL, O_NONBLOCK) ran during the receive, the fd kept
reporting O_NONBLOCK while its socket blocked again. Receives now switch the mode only
for MSG_DONTWAIT and read the current flags under file_descriptors_mutex at both ends,
and SETFL changes the mode and the stored flags in the same critical section.
OnProxyPacketReceived decompressed each room packet once per matching socket while
holding file_descriptors_mutex, so every bsd call waited for it. It now copies the
distinct sockets under the lock, decompresses once without it and delivers the result.
Also reject fd == MAX_FD in IsFileDescriptorValid and PollImpl, which read past the
table, and guard the ProxySocket blocking and receive timeout setters with
packets_mutex, matching their reader.
Assisted-by: Claude Opus 5.5 (investigation and implementation)
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Add unit tests for the room LAN fixes in this branch. The socket tests
check datagram truncation, TCP remainders and peeks, timeouts, wakeups on
close and on a new packet, and stream behavior with the default protocol.
The LDN tests check that a join waits for the host's reply, rejects bad or
duplicate joins, ignores late replies and uses fresh identities.
Assisted-by: Sol (LDN join tests)
Assisted-by: Claude Opus 5.5 (room socket tests)
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
bsd runs on three host threads, but its calls kept a raw reference into
the shared descriptor table while they used a socket. A close() on
another thread could then destroy the socket mid-call. Waking a blocked
room recv() on close made this happen every time. Every call now works
on a copy of the descriptor taken under the table lock, poll() keeps its
sockets alive while it waits, and close() resets the slot only if it
still holds the same socket.
accept() picked a free fd before blocking and only locked the write, so
another thread could publish a socket in the same slot. It now picks
and writes the fd in one critical section after Accept() returns. dup()
now re-checks the source fd under the lock.
A duplicated fd shares its socket, so the room packet loop queued each
packet once per fd. Deliver it once per socket.
NIFM: when the selected host adapter is missing, the room still works
and IsNetworkAvailable reports it, but GetCurrentNetworkProfile returned
an empty profile. Report a wired room profile in that case, and put the
room address on the first adapter in EnumerateNetworkInterfaces.
Assisted-by: Claude Opus 5.5 (investigation and implementation)
|
| | |\ \ \ \ \ \ \ \
| | | |_|/ / / / /
| | |/| | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
socket(AF_INET, SOCK_STREAM, 0) leaves the protocol unspecified, so the
TCP checks in ProxySocket::Recv and ReceivePacket missed such sockets.
recv() then waited for the timeout and returned EAGAIN instead of end of
stream, and partial reads dropped the rest of the packet. Keep the socket
type and use it for these checks. The protocol stays as it is, because it
is sent to other room members.
A MSG_PEEK reader leaves the packet queued, so notify every waiter when a
packet arrives instead of only one.
Assisted-by: Claude Opus 5.5 (investigation and implementation)
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
bsd:s, bsd:u and bsd:a share one file descriptor table, but each
service bound its own proxy packet callback, so every room packet was
queued three times on each socket. Bind the callback once.
The room thread walked the descriptor table without a lock while bsd
created and closed sockets, so it could reach a destroyed or not yet
created socket. Guard the table with a mutex, and publish a socket only
after it is created and initialized. Check airplane mode before an fd
is taken, so a refused socket no longer leaks its slot.
ProxySocket now initializes protocol, decompresses packets outside the
packet lock without copying the compressed data first, and keeps a read
offset for partial TCP reads instead of erasing from the front.
Add Network::GetRoomIPv4Address(), set only in the Joined and Moderator
states. NIFM uses it for network availability and for every reported
address, including EnumerateNetworkInterfaces and GetCurrentIpAddress,
so no call reports the room address while another rejects the network.
Assisted-by: Claude Opus 5.5 (investigation and implementation)
|
| | |\ \ \ \ \ \ \ \
| | | |_|/ / / / /
| | |/| | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The room host and room moderators are in the Moderator state, not
Joined, so the airplane mode override for joined rooms did not apply to
them and LAN Play still returned them to the menu. Accept both states.
Share the room address override between the NIFM profile and IP config
calls so they cannot drift apart.
recv() on a room TCP socket now waited for the receive timeout, because
Recv goes through RecvFrom. Room TCP sockets have no peer, so keep the
previous immediate end-of-stream result when nothing is queued.
Close() now drops queued packets and wakes a blocked recv, which then
fails with EBADF. The socket state that the room thread reads when it
queues a packet is now guarded by the packet mutex.
Assisted-by: Claude Opus 5.5 (investigation and implementation)
|
| |\ \ \ \ \ \ \ \ \ |
|
| | | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
HandleProxyPacket now receives data that bsd has already decompressed.
Assisted-by: Claude Opus 5.5 (investigation and implementation)
|
| | | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
A receive with MSG_DONTWAIT restored the blocking mode from the descriptor copy taken
before the call. When fcntl(SETFL, O_NONBLOCK) ran during the receive, the fd kept
reporting O_NONBLOCK while its socket blocked again. Receives now switch the mode only
for MSG_DONTWAIT and read the current flags under file_descriptors_mutex at both ends,
and SETFL changes the mode and the stored flags in the same critical section.
OnProxyPacketReceived decompressed each room packet once per matching socket while
holding file_descriptors_mutex, so every bsd call waited for it. It now copies the
distinct sockets under the lock, decompresses once without it and delivers the result.
Also reject fd == MAX_FD in IsFileDescriptorValid and PollImpl, which read past the
table, and guard the ProxySocket blocking and receive timeout setters with
packets_mutex, matching their reader.
Assisted-by: Claude Opus 5.5 (investigation and implementation)
|
| | | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Add unit tests for the room LAN fixes in this branch. The socket tests
check datagram truncation, TCP remainders and peeks, timeouts, wakeups on
close and on a new packet, and stream behavior with the default protocol.
The LDN tests check that a join waits for the host's reply, rejects bad or
duplicate joins, ignores late replies and uses fresh identities.
Assisted-by: Sol (LDN join tests)
Assisted-by: Claude Opus 5.5 (room socket tests)
|
| | | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
bsd runs on three host threads, but its calls kept a raw reference into
the shared descriptor table while they used a socket. A close() on
another thread could then destroy the socket mid-call. Waking a blocked
room recv() on close made this happen every time. Every call now works
on a copy of the descriptor taken under the table lock, poll() keeps its
sockets alive while it waits, and close() resets the slot only if it
still holds the same socket.
accept() picked a free fd before blocking and only locked the write, so
another thread could publish a socket in the same slot. It now picks
and writes the fd in one critical section after Accept() returns. dup()
now re-checks the source fd under the lock.
A duplicated fd shares its socket, so the room packet loop queued each
packet once per fd. Deliver it once per socket.
NIFM: when the selected host adapter is missing, the room still works
and IsNetworkAvailable reports it, but GetCurrentNetworkProfile returned
an empty profile. Report a wired room profile in that case, and put the
room address on the first adapter in EnumerateNetworkInterfaces.
Assisted-by: Claude Opus 5.5 (investigation and implementation)
|
| | |\ \ \ \ \ \ \ \ \
| |/ / / / / / / / /
|/| | | | | | | | | |
|
| |\ \ \ \ \ \ \ \ \ \
| | |_|_|/ / / / / /
| |/| | | | | | | | |
|
| | |\ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
qt: ask about the recommended MKW settings only when booting MKW
|
| | |/ / / / / / / / /
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
The prompt showed at every startup whatever game was launched, and Yes
overwrote the global settings for every title. Ask on the first MKW boot
of a session instead and apply the preset to that session only.
|
| | |\ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
core: do not index registered_processes with an unregistered ASID
|
| | | | | | | | | | | | |
|
| | |\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | |
| | | | | | | | | | | | |
texture_cache: look up X8Z24 with UNORM, UINT, UNORM, UNORM components
|
| | | | |_|_|_|_|/ / / /
| | |/| | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
X8Z24 was only known with UINT in the last three components. Mario
Tennis Fever samples its depth buffer as X8Z24 with components
UNORM, UINT, UNORM, UNORM (as S8Z24 already is in the table), which
hit the "texture format=42" fallback to A8B8G8R8. The depth image was
then copied into a colour image of the wrong format every frame (with
"Unimplemented" layer-count asserts) and read as colour, and distant
scenery around the court (the arch and the castle stadium) wasn't
drawn.
Map it to X8_D24_UNORM like the other X8Z24 entry.
Assisted-by: Claude Opus 5.5 (diagnosis, fix and testing)
|
| | |\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | |
| | | | | | | | | | | | |
Prevents crashes when creating game shortcuts by validating the loade…
|
| | | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
before accessing game titles or icons. Adds safe fallbacks for missing titles and icons, allowing shortcuts to be created even when the game loader or icon is unavailable.
Fixes a potential crash when creating game shortcuts, as reported in Issue #274.
Previously, the shortcut creation process attempted to retrieve the game title and icon even when GetLoader() returned an invalid loader. This could cause a crash when the selected game file could not be loaded correctly.
Changes
Validate the loader: Check whether the loader is valid before accessing game title or icon data.
Preserve title fallback: Continue using the title from game metadata whenever available. If no valid loader is available, fall back to the program ID.
Handle missing icons: Only attempt to retrieve the game icon when a valid loader exists. Log a warning if the icon cannot be retrieved.
Validate image data: Add a validity check in SaveIconToFile() to prevent empty or invalid images from being processed.
Expected Behavior
Game shortcuts can now be created even when no valid loader or game icon is available. In such cases, the program ID is used as the display name, and the shortcut is created without a custom game icon.
|