Skip to content

Write GetDesc into caller storage and check array and volume mip counts - #1

Open
MichaelSmithAI wants to merge 1 commit into
enzoduarte1:gpu/getdesc-automatic-mipsfrom
MichaelSmithAI:fix/933-getdesc-output
Open

MichaelSmithAI wants to merge 1 commit into
enzoduarte1:gpu/getdesc-automatic-mipsfrom
MichaelSmithAI:fix/933-getdesc-output

Conversation

@MichaelSmithAI

Copy link
Copy Markdown

Use a raw pointer write for the GetDesc output. A caller can provide writable, uninitialized storage. The implementation now constructs the description locally, computes the allocated mip count as before, and writes the completed value into that storage.

A regression creates committed textures through the guest device vtable, calls GetDesc into MaybeUninit storage and compares the returned description with the host texture. With width 4, height 2 and nine array slices, the automatic chain contains three mip levels. For a volume of depth nine it contains four. An explicit request for two levels returns two for both textures.

Both GetDesc tests passed on an RTX 4090 under Wine/vkd3d-proton 3.2. This covers the output storage and mip counts. The ABI pointer return is tracked separately in #779. Follow-up to #933.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant