Commit Graph
1218 Commits
Author SHA1 Message Date
izzy2lostandClaude Opus 5.5 8221444e12 fix(gles): fall back to clamp-to-edge when border clamp is unsupported
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 18:06:20 -04:00
Vicente Mediano f7f2f41ff4 fix(rendering): correct texture handling and backend behavior 2026-09-08 21:43:48 -03:00
Vicente Mediano 4bdb8ef2d8 1.1.0: slang shader pipeline — translator fixes, post pipeline, GL chain orientation 2026-08-25 17:42:39 -04:00
Vicente Mediano a31fbffa86 Move gamecontrollerdb loading to the port layer 2026-08-15 18:19:24 -04:00
Vicente Mediano 60f78d9b1f Fix D3D11 shader-cache bytecode handling and guard null GuiTexture (#24, #7) 2026-08-15 18:15:20 -04:00
Vicente Mediano 59acb68fcd fix(gui): harden controller navigation and framebuffers 2026-08-13 17:06:27 -04:00
Vicente Mediano a4919b181e fix(gui): decide per gesture who drives the pointer during a touch
Tapping the enhancement menu on a touchscreen highlighted a widget without
activating it, or needed several tries. Two pointers were writing to ImGui at
once: the SDL_FINGER translation pressed at the raw finger position, while the
platform's own touch-to-pointer emulation moved the cursor tens of pixels away
before delivering its click. ImGui only activates a widget when the press and
the release land on the same one, so whether a tap worked depended on how far
the cursor had drifted in between.

Which of the two behaviours a machine shows is not fixed. The same binary on the
same device produced 58 FINGERUPs against 2 pointer clicks in one session, and 1
against 42 in the next, so a decision made once per run samples whichever mode
happened to appear first -- an earlier attempt to stand the feed down on seeing a
pointer click did exactly that and left later taps pressing nothing at all.

The press is now held back one event after FINGERDOWN. A real pointer click
arriving next means the platform owns the gesture and already clicks coherently,
so nothing is contributed. Anything else means the gesture is ours, and the press
is replayed at the point the finger landed. Holding the press rather than
suppressing it keeps finger drags working: a slider still grabs from where it was
touched and follows the finger.

A real pointer release now also ends the gesture whoever owned it. Platforms that
emulate a pointer largely stop sending FINGERUP, and without this the state
latched and every later touch was discarded as a second finger.

SDL's own touch-to-mouse synthesis stays disabled so the arbitration is between
two sources rather than three: its events carry SDL_TOUCH_MOUSEID and would not
be recognised as the platform's.

GDX_DIAG_TOUCH=1 traces every pointer event with ImGui's state and, for touch,
why an event was dropped or left unfed. It is off unless the variable is set.
2026-08-10 23:32:46 -04:00
Vicente Mediano 7bca0e22ed fix(gui): stop double-feeding touch input to ImGui 2026-08-10 22:02:54 -04:00
Vicente Mediano e57d62c63d feat(fast3d): overscan scissor intercept, ultrawide anchor travel, inverted fill-rect guard 2026-08-08 15:16:25 -04:00
Vicente Mediano d77370217d feat(fast3d): swapchain depth for sub-frame bursts, per-pass perf seams, gated texbind hash
gfx_dxgi: BufferCount 3->4 and mMaxFrameLatency 2->4 so an interpolation burst of 3 presents can be submitted without blocking the game thread (usable depth is latency-1; the init wait burns one token). Fast3dWindow: gui/StartFrame/Run/EndFrame perf sub-timers behind the port's cached-bool seams. interpreter: GdxNoteTexBind behind GDX_DIAG_TEXBIND - it ran nine FNV multiplies per texture bind in shipping builds.
2026-08-03 23:43:10 -04:00
Vicente Mediano 28a259c030 feat(fast3d): persistent shader cache, sub-frame present path, fill-rect diagnostics
Adds ShaderBlobCache (D3D11 DXBC + GL program binaries) removing 9-15ms per-variant runtime compiles. Bypasses the software frame limiter for interpolation sub-frames, which could not pace a burst. Adds [fillrect] telemetry and GDX_NO_{PIPESYNC,BLEND_ALPHA,PRIM_DEPTH}_FLUSH attribution toggles, all env-gated and default off.
2026-08-03 01:30:58 -04:00
Vicente Mediano c4ebe15a4d fix(gfx): prim-depth batch flushing, CI texture cache latch, vsync-paced frame limiter 2026-07-23 21:56:57 -04:00
Vicente Mediano ea6f403c92 chore(diag): gate effect-tile, effect-draw and pit-uv probes behind env flags 2026-07-20 01:25:57 -04:00
Vicente Mediano 1cec7d9a30 feat: audio output pipeline, widescreen, master volume for the port 2026-07-17 22:00:59 -04:00
Vicente Mediano fc18520090 feat(fast3d): widescreen toggle, master volume, default gamepad map
Widescreen 16:9 / 4:3 pillarbox (interpreter, Fast3dGui), audio master-volume gain (os), F-Zero X default gamepad mapping — Z on triggers, C on right stick.
2026-07-13 02:28:54 -04:00
Vicente Mediano 10d8a9c684 feat(libultra): output reconstruction low-pass (15kHz default) and raw AI output tap 2026-07-12 19:14:58 -04:00
Vicente Mediano 4d0137be56 fix(libultra): AI cushion gating, audio-thread-aware os shims, GDX_AI_TAP
osAiGetLength cushion and osAiSetNextBuffer gating for the dedicated
audio thread ([ai-sink] removed), plus an env-gated raw PCM tap:
GDX_AI_TAP=1 appends every buffer handed to the device to
gdiffuser-ai-tap.pcm (s16 interleaved stereo, post-substitution --
exactly what the listener hears) for offline waveform analysis.
2026-07-11 04:13:52 -04:00
Vicente Mediano 740c69eb89 fix(fast3d): framebuffer readback coverage alpha and interpreter hardening
ImportTextureI4 clamp, ReadFramebufferToCPU alpha=coverage on D3D11,
race-gated tmem probes and P1 gating in the interpreter, and the backend
interface / shader adjustments that carry them.
2026-07-11 04:13:42 -04:00
Vicente Mediano 43da4d5da2 feat(fast3d): F-Zero X interpreter support, audio output wiring, and crash hardening
Fast3D interpreter:
- Real TMEM emulation: per-word loaded_texture[512] + tmem[4096] mirror,
  content-hashed texture cache keys, interior-offset tile resolution
- F3DEX2 reject-variant family (Standard/Reject/FZeroFlxReject) with
  reject-box triangle screening and general homogeneous clipping
- G_BRANCH_Z / G_RDPHALF_1 handlers for physical F3DEX2 display lists
- COPY-mode dsdx guard, I4 tile-bounds cropping, alpha-compare forces
  ALPHA shader option, MIRROR|CLAMP maps to MIRROR_ONCE (D3D11)
- Ucode-switch state preserved on same-table variant switches
- gfx_check_image_signature validates memory readability before the
  OTR signature strncmp (stale SETTIMG pointers crashed transitions)

Audio output:
- osAiSetNextBuffer/osAiGetLength wired to the SDL AudioPlayer with
  real buffered-length throttling (was TODO stubs)

Misc:
- Blocking message queues: os_mesg/os_vi excluded (port scheduler owns them)
- OSMesg C++ helpers, archive read padding, crash handler raw-address dump
2026-07-06 18:44:56 -04:00
briaguya a3f1e102e1 fix windows arm CI failure (#1127) 2026-06-12 23:34:42 -04:00
Jeod 6fdfab32f5 Bind imgui's gamepad backend to the controller libultraship is using (#1112)
* Bind imgui's gamepad backend to the controllers libultraship is using

* Update Fast3dGui.cpp
2026-06-02 19:21:41 -04:00
Pepper0ni f30fe0ed1e Add fixedAspect flag to framebuffers (#1109)
* Add fixedAspect flag

* clang pls

* oops, I had the silly thing in reverse

* change fixedApect to forceFixedAspect

* clang
2026-05-22 08:48:11 -06:00
Pepper0ni 42ecb8ed48 fixed building on GCC 16 (#1100) 2026-05-06 14:50:34 -04:00
CopilotandKenix3 8813b8233d Remove cross-layer includes from ship namespace (#1097)
* refactor: remove cross-layer includes from Ship namespace

- Remove unused consolevariablebridge.h include from MobileImpl.cpp
- Decouple Context.cpp from fast/debug/GfxDebugger.h by making
  InitGfxDebugger() accept a shared_ptr parameter (like InitWindow/InitControlDeck)
- Remove LUS::GfxDebuggerWindow instantiation from Gui.cpp (should be
  registered from the libultraship layer instead)
- Decouple Config.cpp from fast/backends/gfx_metal.h by using Window's
  available backends list for default fallback selection

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/cc9a3aa8-4ee7-48f2-aa6b-47c2832803a0

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>

* fix: add null checks for GfxDebugger parameter and Window in Config

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/cc9a3aa8-4ee7-48f2-aa6b-47c2832803a0

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>

* revert: restore Context.cpp/Context.h GfxDebugger changes to original state

Fast::GfxDebugger is still referenced in Context.h (forward declaration,
GetGfxDebugger return type, mGfxDebugger member), so the previous changes
did not actually decouple the ship layer from fast. Revert to original
InitGfxDebugger() with no parameters; will be addressed in the component
refactor instead.

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/72144527-4404-4a09-8ee6-97c61130d219

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>

* fix: remove extra blank lines in Config.cpp (clang-format)

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/b4b91158-e788-4d5a-8121-89f36b69cde8

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>

* fix: add WindowBackend::NONE and return it when no Window is available

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/3a67e462-03be-4cc7-ac96-b56ddbf5d78a

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>

* refactor: move WindowBackend enum to Fast namespace; use int32_t in ship::Window API

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/526c1d54-6cac-4d86-b948-c31d3abae19f

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>

* refactor: move all Fast3d ImGui backend dispatch to virtual methods on Window

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/22c50f87-dcd3-4c27-a1a0-cfa9c7a3145b

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>

* refactor: create Fast3dGui class and restore Window.Backend.Name config string

Addresses review feedback:
1. Move ImGui backend dispatch from Window virtuals to Gui virtuals with
   a new Fast3dGui subclass (extends Ship::Gui). This removes all
   Fast::WindowBackend references from Gui.cpp and places backend-specific
   ImGui logic in the Fast namespace where it belongs.
2. Restore the Window.Backend.Name config string by adding a virtual
   GetWindowBackendName() on Window, overridden in Fast3dWindow.
3. Fast3dWindow default constructors now use Fast3dGui instead of Ship::Gui.

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/314d6c8c-e74d-4055-9d11-b6194fffe3a1

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>

* style: fix clang-format-14 alignment issues

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/314d6c8c-e74d-4055-9d11-b6194fffe3a1

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>

* refactor: move WindowEvent to Fast namespace; HandleWindowEvents only on Fast3dGui

Fixes issue #926 (ship including fast):
- WindowEvent was defined in Ship::Gui but only ever used in fast backends
  (gfx_sdl2.cpp, gfx_dxgi.cpp) and Fast3dGui. Moved to Fast::WindowEvent in
  include/fast/WindowEvent.h.
- HandleWindowEvents removed from Ship::Gui virtual interface; it is now a
  plain (non-virtual) method only on Fast3dGui.
- gfx_sdl2 and gfx_dxgi now dynamic_cast the Gui to Fast3dGui with SPDLOG_ERROR
  error handling before dispatching window events.

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/c2e05218-2994-4bc0-ad73-a2ca0dff25ec

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>

* Move window backend persistence from Config to Window

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/4cb4a129-b887-4a82-8512-8383cff2fcba

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>

* Add SetCurrentDimensions and GetPrimaryMonitorRect to Window/Fast3dWindow (PR #785)

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/4cb4a129-b887-4a82-8512-8383cff2fcba

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>

* Push texture cache and Interpreter from Gui down to Fast3dGui

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/4cb4a129-b887-4a82-8512-8383cff2fcba

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>

* Move audio backend persistence from Config to Audio

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/18622f13-a54b-4445-bcd2-7c786d413f81

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>

* Fix migration save, throttle one-time log warnings in SDL2/DXGI backends

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/18622f13-a54b-4445-bcd2-7c786d413f81

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>

* Move GetCurrentAudioChannelsSetting from Config to Audio; move GfxDebugger from Context to Fast3dWindow/Interpreter

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/b347a7d2-c361-44bf-a8fd-fadb3548368e

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>

* Fix Gui.cpp missing GuiTexture.h include; fix GfxDebuggerWindow texture method calls; apply clang-format

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/b347a7d2-c361-44bf-a8fd-fadb3548368e

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>

* Fix clang-format-14 formatting issues in interpreter.cpp and Gui.h

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/3af3f34e-fb61-46b9-afe8-22d4b972a116

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>

* Move InputEditorWindow to libultraship layer (namespace LUS); remove auto-registration from Gui

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/aeb70820-2942-4146-b30a-578c94c0e96d

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>

* Move GuiWindowInitData from Ship::Gui to Fast::Fast3dGui; fix Input Editor null dereference

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/c7448a65-b6af-4808-b92b-05d6a3b80b05

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>

* Fix CI: add Ship:: qualifiers to InputEditorWindow (no using namespace)

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/d5c2b6d8-024a-4809-930d-c35733dd795d

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>

* Fix CI: qualify remaining unqualified Ship:: types in InputEditorWindow

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/5f67d2e4-1fb8-4c76-98f3-aa034a32be9c

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>

* Fix CI: qualify Ship::Mobile in Fast3dGui.cpp for Android/iOS builds

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/9812efcb-d1fc-4831-8ed1-db3ecad52b68

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>
2026-05-04 00:00:23 -04:00
Jeod f5c3843fe9 Gate keystore behind ENABLE_SCRIPTING (#1095)
* Gate more scripting code behind -DENABLE_SCRIPTING=1

* Tidy workflow needs to have scripting on so it checks any new scripting code
2026-05-02 09:36:43 -04:00