Skip to content

Keep 8.4.0-dev up to date until release - #2074

Open
dimensionscape wants to merge 255 commits into
8.4.0-devfrom
develop
Open

dimensionscape wants to merge 255 commits into
8.4.0-devfrom
develop

Conversation

@dimensionscape

Copy link
Copy Markdown
Member

No description provided.

player-03 and others added 30 commits May 14, 2026 16:46
Now copying directly into the application directory rather than _obj/assets_. Everything else here is the same.
This adds a native Vulkan context, wires it through the SDL backend, and exposes the bootstrap pieces needed to create an instance and surface from Lime.
This makes Vulkan selectable from project.xml and adds a small smoke test in CI so the new backend stays covered.
Guard the Vulkan helper imports so the doc builds can compile these types on flash and html5 as well as native targets.
Add the first logical device, queue, command pool, command buffer, fence, and semaphore wrappers for Lime's Vulkan API. Back them with native CFFI calls and exercise the path in the Vulkan smoke test.

Keep the deeper Vulkan primitives behind lime-vulkan so regular Lime apps do not resolve Vulkan-only bindings during startup.
Match the HashLink declarations for Vulkan device enumeration and renderer overlays to the signatures exported by the native hdll.
Introduce comprehensive Vulkan bindings and runtime helpers across Haxe and native code. Updated docs/ImportAll.hx to expose many new lime.graphics.vulkan types. Added numerous Haxe VK* classes and shader SPIR-V assets for the vulkan-smoke test. Major changes in project/src/ExternalInterface.cpp: include <algorithm>, robust device extension enumeration and VK_KHR_portability_subset handling, helpers for choosing present modes, creating/destroying managed swapchains, querying swapchain images and surface formats, finding memory types, and conversion helpers between native Vulkan structs and Haxe/HL values. Also cleaned up existing garbage collectors and added utility functions for array conversions. Tests updated to include Vulkan smoke test assets and project configuration.
Add multiple Vulkan helpers and extended pipeline/command support.

- Implement lime_vk_download_memory (and HL variant) to map and copy device memory to host Bytes.
- Add lime_vk_reset_descriptor_pool (and HL variant) to reset descriptor pools.
- Extend pipeline cache creation to accept initial data and add lime_vk_get_pipeline_cache_data to retrieve cache blobs (with HL variants).
- Expand graphics pipeline state parsing to include stencil ops and per-attachment color write mask.
- Add new command helpers: cmd bind descriptor set (extended), copy buffer<->image region variants, clear depth/stencil image, push constants, and enhanced blit image parameter handling.
- Register new native primes and update NativeCFFI.hx to expose the added functions.
- Minor fix: include VK_IMAGE_USAGE_TRANSFER_SRC_BIT when supported.

These changes are intended to expose more/additional Vulkan functionality to the higher-level API and allow using pipeline caches, fine-grained copy/blit/clear operations, push constants, and descriptor pool management.
Change the Vulkan render-pass/native bindings to accept a packed integer state array instead of many individual parameters. C/C++ and HL CFFI signatures updated to parse the state vector (including a new depthInitialLayout entry) and set attachment initial layouts accordingly.

Also, I simplified VkImageBlit handling to require the full packed layout (21 ints) and removed the old fallback parsing. Removed the legacy lime_vk_cmd_copy_buffer_to_image bindings/definitions (use the region variant instead).

Updated NativeCFFI prime/load signatures and VKDevice to build and pass the packed state array.
Add multisampling and color-resolve support across the Vulkan backend and tests. Expose framebuffer sample count limits from the native ExternalInterface, parse and store them on VKPhysicalDevice, and add helper methods (getMaxUsableSampleCount, supportsSampleCount). Extend render-pass creation to accept resolve attachment parameters and construct a resolve attachment/subpass pResolveAttachments when needed, and propagate resolveFormat into VKRenderPass. Add multisample state fields to VKGraphicsPipelineInfo and wire rasterizationSamples, sample shading, sample mask, and alpha-to-coverage/one into pipeline creation. Update the example test (vulkan-smoke) to request MSAA, create transient MSAA color attachments, include them in framebuffers, and handle resource creation/disposal. Also increase packed data size checks where appropriate.
Add Vulkan support to C++ Windows and Linux builds and CI. CI: install libvulkan-dev and adjust workflow steps to build the default Vulkan-enabled Lime (remove explicit -D lime-vulkan flags). Build/config: add lime-vulkan defines in include.xml and set LIME_VULKAN for windows/linux in project/Build.xml (respecting no-vulkan/apple/winrt exclusions). Tests: remove the explicit lime-vulkan haxedef from tests/vulkan-smoke/project.xml. README: document that native Vulkan is included in standard Windows and Linux C++ Lime builds and note Apple still requires explicit Vulkan builds/MoltenVK.
Introduce managed Vulkan mapped memory support and several Vulkan convenience helpers. Tracks mapped memory in a ManagedVulkanMappedMemory map, prevents double-mapping, automatically unmaps on vkFreeMemory, and exposes map/unmap/write/flush/invalidate operations. Add UpdateManagedVulkanDescriptorSets to batch-update descriptor sets, plus command helpers (dynamic descriptor set bind, draw indirect, draw indexed indirect, clear attachments). Export new device limit fields (maxPushConstantsSize, minStorageBufferOffsetAlignment, minUniformBufferOffsetAlignment, nonCoherentAtomSize) and update Haxe NativeCFFI bindings/primes for new functions.
Add managedVulkanDeviceProcCache to store PFN_vkVoidFunction lookups per VkDevice and a ClearManagedVulkanDeviceProcCache helper.
…_GameControllerDB/

Seems to have been a while. Last commit for mappings in Lime that I found was: 314e020
Standardize the window attribute name to renderer. ProjectXMLParser now recognizes "renderer" and sets the window renderType. README and tests/vulkan-smoke/project.xml updated to use <window renderer="vulkan" />.
* Implement OpenAL audio capture extension

* OpenALAudioContext: wrap import in conditional

* Fix OpenAL capture default-device handling


The follow-up change makes the capture API accept a null device name for the default input device and fixes the ALC string path for capture/default-device queries.

---------

Co-authored-by: Chris Speciale <christopher.gaf@gmail.com>
07c2c7c switched Windows cpp builds from post-link icon patching with ReplaceVistaIcon to embedding ApplicationMain.ico through ApplicationMain.rc.

That introduced two separate regressions. The resource template referenced ApplicationMain.ico unconditionally, so builds failed with RC2135 when icon generation did not produce a file. Static cpp builds also dropped the resource at the final Main link step, so the generated icon and metadata never made it into the executable.

Generate the Windows icon before copying the resource template, set HAS_ICON from createWindowsIcon, gate the ICON stanza in ApplicationMain.rc, and include the rc file group in the static cpp Main link.
dimensionscape and others added 30 commits October 14, 2026 19:11
Promise is @:generic, so FutureWork, which takes a Promise<T>, read the
callbacks of a Promise<Int> or other specialization through the wrong
class. On C++ every completeAsync() call failed with a null reference.
Promise now passes its callbacks instead of itself.
Threads beyond minThreads exited as soon as they went idle, so jobs
that came one after another each started a new thread. They now wait
idleTimeout, a second by default, for another job first. Starting fewer
threads also ends fewer, which on Windows Neko can abort if a thread
ends during a collection.
GCEnterBlocking and GCExitBlocking did nothing on HashLink, so a thread
waiting in native code, as on curl, held up every collection until it
returned. A thread looping on such calls without allocating held them
up for good. They now call hl_blocking, which allows nesting and threads
HashLink doesn't know of.
A transfer, and a name lookup where it isn't on a thread of its own, can
keep curl_multi_perform busy for seconds, and every collection waited
for it, so the application froze, as when resizing its window
(#1769). The lock it holds is let go before leaving the
blocking state, as finalizers take it during collections.
Only Windows builds used curl's threaded resolver. Elsewhere a slow name
lookup ran within curl_multi_perform. CURL.versionInfo(), which returned
null, now gives curl's age, version number and features, which show
the threaded resolver.
Stereo is balanced as it is buffered, so a new pan only reached sound
buffered after it, up to half a second later, and none of what opening
queued before playing. The pan was also written outside the sound lock.
The sound yet to play is now kept as it was decoded and queued again
with the new balance, from the sample the output is at.
Transparent windows only worked on Windows. On Linux, a transparent
OpenGL window is now given a 32-bit visual, which compositors blend by
its alpha. The setting that asks SDL for it is reset once the window is
created, so later windows keep an opaque visual. On macOS, the window
and its OpenGL surface are made non-opaque.

Windows report whether they really are transparent to the tests.
The Linux runners have no display, so creating a window gives null
there. The tests now pass, saying why, unless only the transparent
window fails.
2.32 is the last line of SDL 2, with a year of fixes since 2.30.12. It
builds the new Wayland shared memory buffer source, and no longer the
PSP condition variable source it dropped.

Lime's Windows config now says MSVC has strtoull, as SDL's own does.
2.32 builds SDL_ScanUnsignedLongLong without it but not the helper it
calls, so the link failed.

The Android Java files are 2.32.10's, keeping Lime's backport of the
backspace fix for Android 11 and later.
A run that hangs, as the Windows run past 24.8 days has, is killed
with its report unprinted, so it showed nothing of where it stopped.
Starting to play can skip sound to catch up with the clock, reading it
into the same buffer the test measured and dropping it. Where that came
last, as on slow runners, the test saw unpanned sound that was never
queued. It now measures the next buffer queued after any skipping.
On Windows, SDL hides the composition and candidate windows of input
methods, as games draw their own, so Lime apps showed no candidates
when typing Chinese, Japanese or Korean. SDL now shows them, placed by
the text input rect. Compositions too long for SDL_TEXTEDITING arrive
whole through SDL_TEXTEDITING_EXT rather than cut at 31 bytes.
Linux names an application by SDL_APP_NAME as it keeps the screen
awake and plays its sound, and otherwise calls it "SDL Application".
The first window's title, which is the application's, is used unless
SDL_APP_NAME is set.
flash() asks for the user's attention, by flashing the taskbar button
or bouncing the Dock icon, briefly or until the window is focused, and
can cancel it. alert() now flashes through it, so it asks for attention
on macOS and Linux as it did on Windows and AIR. mouseRect keeps the
cursor within an area of the window, and keyboardGrab sends the keys
the system would take, such as Alt+Tab, to the window while focused.
They work on native desktop targets, and flash() on AIR.
The languages the user prefers, most preferred first, from SDL on
native targets, navigator.languages on HTML5 and Capabilities on Flash
and AIR. It is read each time, as the user can change them while the
application runs.
Lime only told of displays turning. It now dispatches when a display is
connected, with the display, when one is disconnected, with the ID it
had, and when one moves, as the displays are arranged or the primary
display changes.
Lime's own SDL configs for Windows, macOS and Linux left it out, so
virtual joysticks could not be attached there, as they can on Android
and iOS. It does nothing until one is.
type says what kind of controller a gamepad is, as for button prompts.
Motion sensors are turned on with setSensorEnabled() and read through
onSensorUpdate, and touchpads, as on PlayStation controllers, through
onTouchpadDown, onTouchpadMove and onTouchpadUp. rumbleTriggers() runs
the motors in the triggers, and setLED() sets the light's color, with
hasSensor(), hasTriggerRumble() and hasLED() to check for them first.
Trigger rumble also works on HTML5 where the browser has it.
…gh DPI

allowHighDPI did nothing on Windows, which drew Lime applications at
96 DPI and stretched them to each display's scale, blurring them. Where
a window allows high DPI, Windows is now told, as the application is
created, that it is aware of each display's DPI. Window sizes stay in
points, as on macOS, with the drawable in pixels, so window.scale is
the display's scale. allowHighDPI stays off by default on Windows.
Touchpads and smooth wheels scroll by fractions of a step, which SDL
adds up into whole steps for onMouseWheel. With preciseMouseWheel on, a
window's onMouseWheel gives the fractions instead. It is off by
default, as code that takes the steps as whole numbers, as OpenFL does,
would then not scroll on touchpads.
The sound is moved back once it drifts more than 0.1 s from the clock,
and its position moves a mix at a time, 56 to 84 ms on the macOS
runners, so one reading against a 100 ms limit failed now and then on
a source that had come back. The gap is now averaged over 0.3 s and
held to 150 ms. Without moving the sound back it is over 600 ms.
watchDevicePixelRatio() ran in the constructor before the canvas or div
was created. When the window's initial scale did not match
devicePixelRatio, it called updateSize(), which dereferenced a null div:

  TypeError: Cannot read properties of undefined (reading 'style')
    at HTML5Window.updateSize

This happened for any app with allowHighDPI false (or DOM rendering) on a
screen whose devicePixelRatio is not 1: phones, HiDPI laptops, Windows
display scaling, or browser zoom.

It also replaced the scale with devicePixelRatio regardless of
allowHighDPI, so those apps were switched to high DPI anyway.

Now the ratio is only watched when high DPI is in effect, and the watch
starts after the first updateSize(), once the canvas or div exists.
The Discord action put each job in a field of its own, and Discord
takes at most 25 in a message, fewer than the 34 jobs here, so it
turned every message down. The action didn't check, so the job passed
and nothing arrived. It also only ran when every job had passed. Each
run now sends one message, naming the jobs that did not pass with
links to them, and the job fails if Discord turns the message down.
HashLink 1.16 defines _GUID in hl.h as the type string of its GUID type,
which breaks the struct _GUID in Windows headers included after it. Lime
does not use the type string, so CFFI.h undefines it.
This reverts commit 73758fd.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.