Repository navigation
Add BC block copy support to CopyRectangle - #752
Open
nv3ifu (nv3ifu) wants to merge 2 commits into
Open
nv3ifu (nv3ifu) wants to merge 2 commits into
nv3ifu (nv3ifu) wants to merge 2 commits into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Author
|
Applied clang-format 21.1.2 using the repository configuration. |
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.
Related to #568.
CopyRectanglecurrently rejects BC-compressed images. This change adds direct block copies between images with identical BC formats, without decompression or recompression.The source rectangle is expanded to cover all intersecting 4x4 blocks. The destination origin is rounded down to a block boundary, so pixels outside the requested rectangle may also be overwritten. Both the original pixel bounds and the resulting block bounds are checked.
Copies use each image's row pitch, with source and destination storage ranges validated before writing. Different formats remain unsupported by the BC path, and filter flags do not affect the block copy.
Validation
I wrote local tests covering BC formats, aligned and unaligned regions, small images, padded row pitches, randomized copies, and invalid inputs. These tests passed with an x64 Release build.
The existing
CopyRectangletests inwalbourn/directxtextestdo not yet cover BC block copies.Is this rounding behavior consistent with the intended semantics of #568? Should I adapt these local tests and submit a companion PR to
walbourn/directxtextest?