Repository navigation
Conversation
A descriptor can name more bytes than the host's 4,096 16-byte registers can address. The native runtime kept the title's full length, so a dynamic table could allocate and copy it before sending an invalid CBV to the host. Aligning a near-u32::MAX size could also wrap. Cap the recorded range at 64 KiB so the dynamic scratch copy and the mirrored host view use the same bounded range. Keep the original size for smaller and zero-byte descriptors. Cover the public creation path with a regression for unaligned, boundary and overflowing sizes. Based-on: fxceless/victory-fork#1206 Based-on: fxceless/victory-fork#1260 Tested-on: Fedora Linux 45, Xeon E5-2670 v3, native VKD3D-Proton with Lavapipe (44 tests) and AMD Radeon RX 6800 with RADV (clear readback) Assisted-by: gpt-6.2 sol xhigh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A title can specify a constant-buffer view larger than the host can address. The dynamic descriptor path allocates and copies the recorded range before creating the host view. A large range wastes scratch memory and copy work, and rounding a near-maximum size to 256 bytes can wrap.
Cap the range at 4,096 16-byte registers when recording the view. Both dynamic and mirrored descriptors now use the same bounded range. Keep zero and smaller lengths as recorded, including lengths that are rounded only when the host view is made.
The regression exercises the descriptor creation API with zero, unaligned, boundary and maximum sizes. The Linux release build passed. The GPU library suite passed 44 tests with one ignored. A separate headless clear readback passed on RADV.
Based-on: fxceless/victory-fork#1206
Based-on: fxceless/victory-fork#1260
Tested-on: Fedora Linux 45, Intel Xeon E5-2670 v3, Lavapipe and AMD Radeon RX 6800 with RADV using native VKD3D-Proton
Assisted-by: gpt-6.2 sol xhigh