Skip to content

Add true HDR output, RT shadows, and PCSS shadows for vulkan#7554

Open
The-E wants to merge 58 commits into
scp-fs2open:masterfrom
The-E:true-hdr
Open

Add true HDR output, RT shadows, and PCSS shadows for vulkan#7554
The-E wants to merge 58 commits into
scp-fs2open:masterfrom
The-E:true-hdr

Conversation

@The-E

@The-E The-E commented Jun 30, 2026

Copy link
Copy Markdown
Member

Note that this is based on @notimaginative's PR (#7553) and should only be merged afterwards.
This also adapts the work done in @BMagnu's Shadow Overhaul PR (#7529), which is therefore another path dependency.

Summary

Adds optional HDR10 (PQ / ST.2084 + BT.2020) swap chain output to the Vulkan renderer, with paper-white / peak-luminance controls and an in-game calibration screen. When disabled (the default) or when running on a non-HDR display / the OpenGL renderer, behavior is unchanged.

This PR has since grown to also bring the Vulkan renderer's shadow rendering up to par with the shadow-rendering overhaul merged in from lafiel/shadow_overhaul_2 (dynamic cascade counts, PCF/PCSS, cockpit shadow cascades, and an optional raytraced-shadow path), since both landed on this branch together. Unlike the HDR work, the shadow overhaul itself affects both the OpenGL and Vulkan backends.

What's included

Swap chain & metadata (VulkanRendererSetup.cpp)

  • Enables VK_EXT_swapchain_colorspace (instance) and VK_EXT_hdr_metadata (device, when available).
  • When HDR is requested, negotiates an A2B10G10R10 swap chain with the HDR10_ST2084 color space, falling back cleanly to SDR/sRGB otherwise.
  • Submits VkHdrMetadataEXT (paper white / peak luminance, BT.2020 primaries) and re-applies it on swap chain recreation (resize / fullscreen toggle).

Frame composition refactor (VulkanRenderer.cpp, VulkanRendererLoop.cpp)

  • Introduces an intermediate RGBA16F composition buffer at window resolution. All rendering (scene, UI, ImGui) now targets this buffer.
  • A final encode pass converts the composition buffer to the swap chain: SDR passthrough when HDR is off, HDR10 PQ encode when on.

Tonemap / output shaders (tonemapping-f.sdr, gamma.sdr)

  • New hdr_mode uniform: 0 = existing SDR tonemap, 1 = HDR scene tonemap (exposure + headroom clamp relative to paper white, stored as extended sRGB in the fp16 composition buffer), 2 = HDR10 output encode (linearize, scale to nits, BT.709 -> BT.2020, PQ encode).
  • LDR intermediate targets (Scene_ldr, Scene_luminance) widen to fp16 when HDR is active so highlights above paper white survive.

Post-process anti-aliasing (VulkanPostProcessingSMAA.cpp, VulkanPostProcessingLDR.cpp, smaa-*.sdr, fxaapre-f.sdr)

  • Ported SMAA to Vulkan. It previously had no Vulkan implementation at all — Graphics.AAMode listed the SMAA presets unconditionally, but selecting one while running Vulkan silently produced zero anti-aliasing with no warning. All three passes (edge detection, blending-weight calculation, neighborhood blending) are now implemented, plus the area/search lookup texture uploads; the shared SMAA.sdr algorithm body needed no changes, only thin per-backend wrapper shaders.
  • FXAA and SMAA both now work correctly while HDR10 output is active, instead of being unconditionally disabled there. Their fixed luma thresholds assume [0,1] LDR input, which breaks once Scene_ldr carries extended-range values; fixed by tonemapping a second, properly-compressed proxy buffer for edge/luma detection only, while the actual blended output still reads the real extended-range colors — so anti-aliasing works without sacrificing HDR headroom.

Options (2d.cpp / 2d.h)

  • Graphics.HDR (bool, requires restart), Graphics.HDRPaperWhite (nits, live), Graphics.HDRPeakLuminance (nits, live), persisted via the options system.
  • Gr_hdr_output_active reflects whether the renderer actually negotiated an HDR10 swap chain (distinct from the request flag).

Calibration screen (ingame_options_ui.cpp / .h)

  • New "HDR Calibration" entry in the SCP Options menu.
  • Status banner (active / enabled-but-inactive / disabled), live paper-white and peak-luminance sliders bound to the persistent options, a paper-white-relative grayscale ramp, and R/G/B/white primary patches for sanity-checking the BT.709 -> BT.2020 mapping.

OpenGL (gropenglpostprocessing.cpp)

  • New tonemap UBO fields are explicitly zero-initialized so the OpenGL backend's behavior is unchanged.

HDR framebuffer readback (1c3f8b7f9)

  • Adds an fp16 -> BGRA8 conversion path for framebuffer readback, so screenshots and other systems that assume 8-bit output keep working when HDR display output is enabled.

Vulkan raytraced shadows — TLAS/BLAS (63f8fa059)

  • New VulkanRaytracingManager: BLAS caching keyed to model lifecycle, per-frame TLAS build/rebuild (VulkanRaytracingTlas.cpp, VulkanRaytracingBlas.cpp) with dynamic capacity growth.
  • Vulkan buffer/device-address plumbing needed for acceleration structures (VulkanBuffer, VulkanMemory).
  • Descriptor manager support for binding the TLAS and RT-shadow resources, plus a capability query for raytracing support (gr_vulkan.cpp).

Shadow rendering overhaul, OpenGL side (merged from shadow_overhaul_2)

  • Extracted shadow rendering into its own shader/render pass and consolidated render-queue code — model_draw_list and the new shadow_render_list now share a common render_queue<Derived, DrawEntryT> CRTP base (code/graphics/render_queue.h).
  • Switched from VSM to hardware PCF + PCSS with proper depth textures; smoothness exposed as a mod-table option.
  • Shadow cascade count is now dynamic (mod-table configurable) instead of a hardcoded 4, and cockpit geometry gets its own dedicated shadow cascades instead of fighting with the main scene's.
  • Assorted correctness fixes: depth-clamped shadow geometry to avoid artifacts, FOV multiplier fix, shadow cascade override handling, inter-frame shadow buffer clearing.

Vulkan shadow parity port (f35864fda)

  • shader_get_shadow_cascade_defines() shared between both backends' shader compilers so cascade-count defines stay in sync.
  • New VulkanDrawManager::renderShadowDraw(): builds the SDR_TYPE_SHADOW_MAP_GEN pipeline, binds ShadowMapData/ShadowCascadeParams UBOs, and does a single instanced draw across all active cascades, replacing the old "spawn N instances" hack.
  • VulkanShadowMap rewritten: dropped the VSM color target entirely, dynamic layer count (Num_shadow_cascades + Num_cockpit_shadow_cascades), and a depth-compare sampler for hardware PCF via sampler2DArrayShadow.
  • New descriptor bindings (GlobalBinding::ShadowCascadeParams, MaterialBinding::ShadowMapData), and VulkanDeletionQueue::queueAccelerationStructure() so TLAS rebuilds defer destruction of the old acceleration structure instead of destroying it synchronously out from under an in-flight command buffer.
  • Shaders unified across both backends (single transformToShadowMap(), matching sampler2DArrayShadow usage, matching vertex/fragment interface blocks, shared shadowCascadeParams UBO layout).
  • Fixed a startup crash (shadow_cascade_params_init() needed to run eagerly, not lazily, since shadows_start_render() indexes Shadow_frustums before the lazy init point is reached) and a validation error from building the shadow TLAS inside an active render pass.
  • Fixed a Vulkan-only regression where destroyed/blown-off submodels (e.g. a ship's turret rotator after its subsystem is destroyed) stayed visible, stuck in place with an identity transform, instead of being hidden — the shader computed the "clip this submodel" flag but the code that acted on it was accidentally wrapped in #ifndef VULKAN.

Logging

  • Vulkan logging calls unified on mprintf/scoped nprintf categories for consistency with the rest of the codebase, plus a new in-game log filter UI for toggling categories and browsing session logs.

Fixes picked up along the way

  • Fixed a Vulkan startup crash: gr_uniform_buffer_managers_init() was only ever called from the OpenGL init path, so UniformBufferManager stayed null under Vulkan and the first draw needing a uniform buffer (title screen rendering) dereferenced it (SIGSEGV).
  • Fixed all four Mac CI configs failing with ccache: No such file or directory — the workflow hardcodes the Intel Homebrew ccache path (/usr/local/bin/ccache), which doesn't exist on Apple Silicon-hosted GitHub runners (Homebrew installs under /opt/homebrew there). configure_cmake.sh now falls back to a PATH-resolved ccache when the configured path isn't executable.

Notes / limitations

  • The HDR10 output path itself is Vulkan only; OpenGL is intentionally untouched there. The shadow-rendering overhaul affects both backends, with this PR bringing Vulkan up to parity with the OpenGL-side changes.
  • HDR requires a restart to take effect (swap chain format negotiation).
  • ImGui patches cannot exceed paper white, so peak luminance is best tuned in-game by raising it until bright highlights/explosions stop clipping.

@The-E The-E requested review from asarium and z64555 as code owners June 30, 2026 17:45

@BMagnu BMagnu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check out SDR_FLAG_TONEMAPPING_LINEAR_OUT.
It's basically poor-man's HDR output in the OpenGL pass, currently only used for the OpenXR pass, since the headset swapchain seems to do its own tonemap, or at the very least expects non-SDR input (it's highly possible that proper HDR input is in fact the correct thing to forward here, instead of truly linear data).
This should very likely be merged into this work, even if it means supporting OpenGL to some degree, rather than exist as a weird, second, half-baked HDR pass. Especially since proper handling across not only gameplay but also menus will fix #7181.
I'm not yet fully familiar with most of the Vulkan PR, but I assume that before this change, there is no handling of Cmdline_window_res, which this new buffer could then do in the future as well? I also assume that this PR is going to be the proper place to mirror #7484 for the SDL3 upgrade. If so, we should at least prepare / design this in a way that makes it easy to retrofit.

@The-E The-E changed the title Add true HDR output Add true HDR output, RT shadows, and PCSS shadows for vulkan Jul 4, 2026
@The-E The-E added graphics A feature or issue related to graphics (2d and 3d) vulkan Issues and Features related to the vulkan render backend labels Jul 5, 2026
@The-E The-E force-pushed the true-hdr branch 5 times, most recently from c6dbb22 to 1d6a74b Compare July 7, 2026 18:04
@notimaginative

Copy link
Copy Markdown
Contributor

Gave this a try on my Mac. Most of my known Vulkan bugs appear to be gone (tex flicker, MSAA, fog, loadout flicker). The texture corruption in massive_battle2 looks to be substantially reduced, if not entirely eliminated.

New issues that I noticed:

Shadows do not appear to work correctly. Or at least not like they did before. I'm not seeing/noticing self-shadowing in the techroom or lab. I see shadows in-mission, but they can move or completely vanish depending on my view direction even if nothing else in the mission is moving. I cleaned out the cache just to be sure but there was no visual change.

HDR works but certain graphical elements flicker (like text and highlighted ui controls), and there is some easily producible yet kind of random graphics corruption. The corruption was visible on some ui screens but not others. In the techroom when viewing the Ulysses there is corruption, but not when viewing the Herc. I have not yet played a mission with HDR enabled.

@BMagnu

BMagnu commented Jul 8, 2026

Copy link
Copy Markdown
Member

Another known bug, for the record:
The Orbradar is basically a disco ball at the moment

@The-E

The-E commented Jul 8, 2026

Copy link
Copy Markdown
Member Author

Gave this a try on my Mac. Most of my known Vulkan bugs appear to be gone (tex flicker, MSAA, fog, loadout flicker). The texture corruption in massive_battle2 looks to be substantially reduced, if not entirely eliminated.

New issues that I noticed:

Shadows do not appear to work correctly. Or at least not like they did before. I'm not seeing/noticing self-shadowing in the techroom or lab. I see shadows in-mission, but they can move or completely vanish depending on my view direction even if nothing else in the mission is moving. I cleaned out the cache just to be sure but there was no visual change.

HDR works but certain graphical elements flicker (like text and highlighted ui controls), and there is some easily producible yet kind of random graphics corruption. The corruption was visible on some ui screens but not others. In the techroom when viewing the Ulysses there is corruption, but not when viewing the Herc. I have not yet played a mission with HDR enabled.

can you post logs (with the vulkan log filter enabled) and screenshots of this?

@notimaginative

Copy link
Copy Markdown
Contributor

Here are logs, screenshots, and a vid. I'm not sure if the screenshot or vid will actually show the HDR, but in the game it's very noticeable and nice looking on my MBP screen.

For the log I made sure to enable "Vulkan" and "vulkanstate", launched the game, went to the techroom, switch the model from Ulysses to Hec, went back to mainhall and exited. The pilot select screen had ui flickering and corruption, the mainhall had ui flickering but no real corruption, the Ulysses had both, the Herc had ui flicker only.

vulkan-hdr.log

I had trouble with the screenshots as one frame appears to have corruption but show none of the ui elements that flicker, or show the ui elements but not the corruption. So most of the screenshots, particularly from the techroom, never showed any corruption. As such I'm just including a single screenshot that demonstrated the corruption as well as a shot of my in-game settings.

The video is just enough to show the various issues. However while recording the video the Herc actually showed corruption, so I just cut it before the switch.

vulkan-hdr-settings vulkan-hdr-screen
vulkan-hdr.mp4

I should probably also note that I'm unable to use fullscreen here. I tried, to see if there was any difference, but it always crashes. On the Mac it must do a mode switch to work, but that was disabled in the Vulkan PR. Mode switching should work better when SDL3 hits though so we can probably re-enable it.

@The-E The-E force-pushed the true-hdr branch 2 times, most recently from ebc3677 to 8f027ba Compare July 12, 2026 15:39
Comment thread ci/linux/configure_cmake.sh Outdated
Comment thread code/def_files/data/effects/shadows.sdr Outdated
@notimaginative notimaginative dismissed their stale review July 13, 2026 10:47

The only things that jumped out at me during a cursory review are fixed. I'm going to leave actual approval to BMagnu however, since I'm not qualified to properly review the bulk of the changes.

BMagnu and others added 7 commits July 14, 2026 09:34
…adows

Squashed snapshot of lafiel/shadow_overhaul_2's continuation work
(d3922aa..010f9d2), which has no separate upstream PR of its own.
Squashed snapshot of the Vulkan backend as vendored into this branch
(ce2d1e8..6ce5394, authored by Mara van der Laan with build/CI
fixes by Taylor Richards). This work has its own upstream PR scp-fs2open#7553
(notimaginative:vulkan-pr-new) and is not otherwise original to true-hdr.
Squashed snapshot of true-hdr's own integration work: true HDR
framebuffer output, wiring the shadow overhaul into the Vulkan
backend (raytraced + cascaded shadow maps), logging refactors, log
filter UI, and CI/build fixes.
CI hardcodes /usr/local/bin/ccache, but macOS runners on Apple Silicon
hosts install Homebrew (and ccache) under /opt/homebrew instead,
causing all four Mac configs to fail with "No such file or directory".
The-E and others added 29 commits July 14, 2026 09:36
- Moved SMAA-specific logic into `VulkanSMAA` class for better separation of concerns.
- Simplified `initSMAA`, `shutdownSMAA`, and `executeSMAA` logic by leveraging `VulkanLDR` and `PostProcessContext` abstractions.
- Improved initialization and cleanup code with clearer resource lifecycle management.
- Updated debug markers and messages to reference `VulkanSMAA`.
- Enhanced flexibility of fullscreen triangle rendering API with additional parameters (`sampleCount`, `bindGlobalSet`).
- Adjusted viewport height to negative value to account for G-buffer render pass's negative Y-axis convention.
- Ensured proper alignment of point and tube light volumes with actual light positions.
- Added gamma correction to HDR10 path, applying user settings before PQ/BT.2020 encode.
- Replaced the SDR blit-only path with an encode pass that applies gamma correction, ensuring consistent behavior across devices.
- Refactored VulkanPostProcessor and associated shaders to support gamma slider adjustments for both SDR and HDR output.
…ering

- Added uniform buffer setup and default material uniforms in `vulkan_draw_sphere`.
- Disabled face culling in material definition for sphere rendering to align behavior with OpenGL.
… diagnostics

Groundwork for the renderer-review fix series (.agents/plans/
vulkan-renderer-review-fixes.md, Phase 0):

- Register a VK_EXT_debug_utils messenger (preferred) instead of only the
  deprecated VK_EXT_debug_report callback, which is kept as a fallback for
  loaders without debug-utils. The messenger config is also chained into
  instance creation so vkCreateInstance-time messages are captured.
  Validation errors/warnings now go to the main log via mprintf.
- New -gr_sync_validation cmdline flag (implies -gr_debug): chains
  VkValidationFeaturesEXT with synchronization validation into instance
  creation when VK_LAYER_KHRONOS_validation is available. This is the
  regression net for the synchronization fixes in the following commits.
- Frame stats now report descriptor sets/writes allocated per frame and the
  total pipeline count (descriptor-manager counters; DescriptorWriter::flush
  moved out-of-line to report into the manager).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…per-frame UBO ring

Phase 1 of the renderer-review fix series: shared helpers that the
correctness fixes build on.

- New VulkanRenderer::beginTrackedRenderPass(PassBeginDesc): every render-pass
  begin on the frame command buffer now records vkCmdBeginRenderPass and
  updates the state tracker (pass, color attachment count, sample count,
  render area, viewport) in one place. Converted: setupFrame,
  beginSceneRendering (both branches), resumeSceneRendering,
  endSceneRendering, beginRenderTarget (viewport kept for gr_set_viewport),
  resumeSwapChainPass, plus new resumeScenePassAfterCopy() shared by
  copyEffectTexture/copySceneDepthForParticles and
  rebeginSwapChainPassAfterReadback() shared by both readbackFramebuffer
  exits (~200 lines of duplicated begin/clear/viewport blocks removed).
- The state tracker records the active render area; all four
  vkCmdClearAttachments sites clamp their rects against it and skip empty
  results. Previously gr_screen-sized clear rects could exceed a smaller
  off-screen render target's render area, which is invalid API usage.
- New PerFrameUboRing utility (VulkanPerFrameUbo.h/.cpp): a persistently
  mapped uniform buffer with one slot region per frame in flight and a
  self-flushing alloc(). Used by the next commit to fix the cross-frame
  UBO races.

Deliberate behavior deltas (all safe-direction): the helper always sets
colorAttachmentCount/sampleCount (some sites previously inherited stale
values), and resumeSwapChainPass/resumeSceneRendering now also reset the
standard flipped viewport instead of leaving the previous one.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Phase 2 of the renderer-review fix series: with two frames in flight, several
host-visible resources were rewritten by the CPU while the previous frame's
GPU work could still be reading them.

- The post-processing scratch UBO is now a PerFrameUboRing (per-frame-in-
  flight slot regions, persistently mapped, self-flushing alloc). All the
  per-pass map/unmap/cursor bookkeeping in bloom/LDR/fog/SMAA is deleted;
  the cursor resets exactly once per frame via the new
  VulkanPostProcessor::beginFrame() hook in setupFrame.
  This also fixes two latent bugs: (a) fog consumed scratch slots mid-scene
  and bloom's later same-frame cursor reset overwrote them before submission
  whenever fog+bloom were both active; (b) volumetric_fog_data (288 bytes)
  overflowed the 256-byte slots - the memcpy spilled into the neighboring
  slot and the shader's bound range ended before the aspect/fov/noise
  fields. Slots are now 512 bytes (static_assert at the fog call site) and
  the per-frame budget is 32 slots.
- The dedicated tonemap, output-encode, and MSAA-resolve UBOs (each a single
  instance rewritten per frame, i.e. racy; the MSAA one also never flushed)
  are deleted entirely - those passes build their structs on the stack and
  allocate from the scratch ring.
- Static-buffer rewrites orphan instead of racing: getVkBuffer() stamps a
  last-used frame number, and a full-content updateBufferData() on a Static
  buffer used within the last MAX_FRAMES_IN_FLIGHT frames defers the old
  VkBuffer to the deletion queue and writes a fresh one. Offset writes
  (GPU-heap appends to fresh regions) and PersistentMapping buffers (the
  engine holds their mapped pointer and syncs via gr_sync) are exempt.
- gr_sync_wait now honors its contract: VulkanRenderFrame::waitForFinish
  takes a timeout and reports expiry without consuming the fence;
  VulkanRenderer::waitForFrame returns false for fences taken during the
  still-recording frame (previously it waited on a stale or idle slot and
  reported success) and resolves the frame->slot mapping correctly. This
  makes UniformBufferManager's segment-fence throttling actually protective
  on Vulkan for the first time.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ing logic, improved resource management across Vulkan post-processing subsystems.
…tion updates

- Unified Vulkan validation flag handling in setup, separating engine debug output from synchronization validation.
- Specified access masks and stage flags to address cross-frame WRITE_AFTER_WRITE vulnerabilities, notably in G-buffer, post-processing, and MSAA resolve paths.
- Adjusted subpass dependencies and image layout transitions to prevent read-after-write and write-after-write hazards, detected using `-gr_sync_validation`.
- Fixed uniform buffer and barrier transitions to ensure proper ordering in render passes across frames.
…and future testing

- Clarified dependency logic for cross-pass and cross-frame synchronization, ensuring explicit stage and access flag comments match observed behavior.
- Adjusted subpass dependencies to decouple render-pass compatibility definitions from dependency assumptions.
- Highlighted MoltenVK-specific issues and retained workarounds with notes for re-testing on macOS hardware.
- Updated synchronization barriers and validation notes to address historical inconsistencies across platforms.
…aphics queue

- Removed transfer queue handling, simplifying buffer and queue logic to use the graphics queue for all transfer operations.
- Updated buffer sharing modes and removed related code paths and parameters for transfer queue families.
- Introduced exclusive buffer access, noting async transfer and queue ownership transfers are future work.
- Limited enabled device features to only those actively used by the renderer, reducing unnecessary feature requests (e.g., robustBufferAccess).
- Removed `endFrame()` from `VulkanDescriptorManager`, replacing it with `setCurrentFrame(frameIndex)` for explicit frame synchronization.
- Centralized frame index advancement within `VulkanRenderer` to ensure consistency across components.
- Invalidated cached descriptor set bindings at render-pass boundaries to handle raw recorder staleness correctly.
- Optimized pipeline descriptor rebind logic by removing redundant clears during pipeline changes.
…for improved hashing and memoization efficiency

- Replaced inefficient shift-based hashing in `PipelineConfig::hash` with a robust `hashCombine` strategy to minimize bucket collisions.
- Introduced `maskBits` helper to streamline bitmask creation for boolean fields.
- Implemented memoization for Global (Set 0) descriptor sets, reducing redundant rebuilds across frames and improving performance.
- Added dirty state tracking (`m_globalSetDirty`) and invalidation logic for Global set updates following relevant input changes (e.g., TLAS or UBO modifications).
…eToSwapChainPass` method to streamline HDR and SDR output paths.
- Added memoization for Material (Set 1) and PerDraw (Set 2) descriptor sets to reuse cached sets across frames if inputs remain unchanged.
- Implemented precise input tracking for Material and PerDraw descriptor sets to detect and rebuild only when necessary.
- Reduced redundant Vulkan descriptor allocations and writes, improving performance on repeated or batched draw calls.
- Added `eColorAttachmentRead` to access masks in multiple barriers to ensure proper synchronization for load operations (e.g., `loadOp=eLoad`) across render passes.
- Prevented `READ_AFTER_WRITE` synchronization validation issues in deferred and multi-pass rendering scenarios.
- Updated comments to clarify the reasoning behind the access mask changes and load dependencies.
- Consolidated destruction queue methods in `VulkanDeletionQueue` using a shared `queueHandle` template to reduce redundancy.
- Introduced `ModelDrawParams` structure and `computeModelDrawParams` function to unify indexed draw parameters for models and shadows.
- Simplified draw logic by eliminating repeated calculation of indexed draw parameters and improving code reuse.
…ion texture arrays

- Introduced `releaseAnimationSlotRef` to manage reference counting for shared animation texture-array slots, preventing premature destruction of shared resources.
- Updated `flushTextures` and related methods to integrate `releaseAnimationSlotRef` for shared slot cleanup.
- Refactored staging buffer creation into `createStagingBuffer` for 3D texture uploads and shared path consistency.
- Enhanced texture upload logic with improved tracking and logging for re-upload cases, aiding preloading gap analysis.
- Added instrumentation for on-demand mid-frame texture uploads in `FrameStats`.
- Updated smart pointer usage for consistency across Vulkan resource managers (`std::make_unique`).
- Removed redundant `cubeImageView` member and related cleanup logic; unified sampling view management.
- Added per-instance debug log counters (avoiding static state) for Vulkan texture uploads and bindings, improving visibility during initialization and run-time.
- Optimized `VulkanRenderer` property/feature getters by caching physical device properties and features during device creation.
- Improved memory region flushing logic for out-of-date offsets, aligning with Vulkan Memory Allocator behavior.
- Refactored render pass state tracking to reapply dynamic state reliably after mid-frame render passes.
- Enhanced validation and error handling for mismatched update texture formats.
…dering in Vulkan

- Corrected bitmap lock type from `BMP_TEX_OTHER` to `BMP_AABITMAP` for YUV textures during on-demand loading.
- Updated movie rendering to bind alpha from the `MovieData` UBO (set 2, binding 4) for Vulkan, aligning behavior with OpenGL implementation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

graphics A feature or issue related to graphics (2d and 3d) vulkan Issues and Features related to the vulkan render backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants