demons-souls: improve Vulkan graphics pipeline, indirect descriptors,… #477
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!477
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/477/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@LordixDemon on GitHub · 2026-09-03 19:18 UTC · original
LordixDemon:demons-souls→main· +4128 −3878 · 97 files · 1 commits · closed without mergingSummary
This PR introduces critical fixes to the Vulkan graphics pipeline, implements 1-level indirect image descriptor table materialization, fixes texture tiler bounds assertions, and implements essential Ngs2 audio stubs.
With these changes, Demon's Souls (PPSA01341) now successfully boots past the intro screens, main menu, and loading sequences, reaching actual gameplay. While the current in-game framerate is very modest, reaching gameplay without fatal pipeline errors or crashes lays a solid foundation for subsequent performance and rendering optimizations.
Game Status
ctest).Technical Details
1. Vulkan Pipeline & Device Initialization
vulkanWindow.cpp): Relaxed the overly strict Vulkan 1.2shaderBufferInt64Atomics = VK_TRUErequirement during physical device enumeration, preventing modern desktop GPUs from being incorrectly skipped (skip_device = true) or failing device creation.depthRenderTarget.cpp): Replaced fatal aborts (DepthFatal) triggered by non-standard register states with graceful fallbacks (defaulting to standard host formatsD32_SFLOAT/D32_SFLOAT_S8_UINT, fallback pitch-based tile dimension calculations, and skipping inactive depth passes instead of terminating the process).colorRenderTarget.cpp,renderDraw.cpp): Switched attachment write validation torender_target_write_mask, takingBlendControland component write masks into account rather than relying solely on raw target slot masks.shaders.cpp): Restored dynamic vertex input layout generation (VkVertexInputBindingDescription,VkVertexInputAttributeDescription), correctly deriving strides, attribute formats, used component counts, and guest out-of-bounds behavior.2. Shader Recompiler & Indirect Descriptors
ResourceMaterialization.cpp,ResourceTracking.cpp): Added support for 1-level direct indirect image descriptor tables (material_source == UINT32_MAX) loaded dynamically vias_buffer_load_dwordx8, matching the dynamic texture indexing scheme used by Demon's Souls.pipelineCache.cpp): AddedTryReadBackingmemory fallback when reading guest memory during pipeline cache specialization.spirvEmitterFlow.cpp): Preserved albedo unpacking and alpha channel clamping for specific shadow passes.3. Texture Tiling & Cache
tiler.cpp): Integrated row pitch and linear slice strides into buffer capacity calculation for bothDetileandTileImage.TileManager::Prepare): Removed overzealous block-rounded tiled capacity assertions that triggered false-positive aborts on valid non-standard texture footprints.textureCache.cpp): Enhanced overlap detection and resolution for layered views and non-depth uploads.4. Audio Subsystem (
audio.cpp)Ngs2SystemCreateWithAllocator,Ngs2RackCreateWithAllocator,Ngs2SystemRender, and RIFF waveform parsing), preventing game audio threads from stalling or terminating early.@LordixDemon on GitHub · 2026-09-03 21:13 UTC · original
@Nmzik pls check before u merge a lot of PR's
@Nmzik on GitHub · 2026-09-03 21:16 UTC · original
@LordixDemon I will cherry pick your fixes. Your PR is based on old code
@LordixDemon on GitHub · 2026-09-03 21:24 UTC · original
@Nmzik Sounds good, thank you! I have a few ideas to improve performance and compatibility across different GPU architectures. Is there an official Telegram or Discord where it's possible to discuss the most needed changes?
@Nmzik on GitHub · 2026-09-24 07:09 UTC · original
closed in favor #500
Pull request closed