mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:50:52 +01:00
[PR #1189] inflate: copy DEFLATE stored blocks in bulk (RT-INFLATE-STORED-COPY) #1220
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1220
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1189
Author: @sodove
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:perf/rt-inflate-stored📝 Commits (1)
152c644inflate: append aligned stored block payloads in bulk📊 Changes
2 files changed (+21 additions, -6 deletions)
View changed files
📝
runtime/src/shader_library.h(+10 -5)📝
runtime/test/shader_library_test.cpp(+11 -1)📄 Description
Claimed in the coordination issue as: RT-INFLATE-STORED-COPY (claim).
Depends on: none. Applies independently alongside #1081, which changes match expansion and Adler-32.
What changed
The CPU zlib inflater used by the DirectStorage request handler and shader-library extraction appended each byte of an aligned DEFLATE stored block separately. It now takes the available input as a span and appends that range in one operation. The declared length is still checked against the output limit before copying. A truncated block still contributes its available prefix before reporting a data error.
Measured on the runtime queue
Windows 11 x64, Ryzen 5 9600X, MSVC 19.44
/O2. Synthetic zlib requests each produced 4 MiB. The indicated percentage of output came from stored blocks containing pseudorandom bytes. A compressed tail kept every request within the shim’s source/destination size contract.6293c1c4f→ this PR (ms/request)09ba0aa85→ both (ms/request)Each figure is the median of ten paired rounds with alternating run order. Timed the actual queue from enqueue through submission and its completion event, eight requests per sample after a warm-up batch. Every request returned
S_OKand its full destination matched outside the timer. The mixed cases improved in all ten pairs. Changes on the 0% control were within 2% in either direction. The retail block mix, game startup time and FPS were not measured.Tested
gta6rt.exein RelWithDebInfo on native Windows. CTest passedshader_libraryanddstorage(329 checks in the latter). The shader-library suite also passed on Linux x86-64 with GCC 15.2.git merge-treeapplies this PR and #1081 cleanly.GPUs tested: n/a (CPU and DirectStorage queue). Only synthetic input used.
AI-assisted: yes (OpenAI Codex).
Checklist
mainand merges cleanly.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.