Repository navigation
Conversation
…_maintenance5) The retail title's first native pipelines name an A8_UNORM render target (@KkelebekK's RT-5 measurements). The layer stored every A8_UNORM texture as R8_UNORM with a swizzled SRV and refused render targets. Where the GPU has VK_KHR_maintenance5 and can sample VK_FORMAT_A8_UNORM_KHR and blend it as a colour attachment, gta6rt enables the extension and its feature (VulkanDeviceInfo::a8_render_target), and an A8_UNORM texture created with ALLOW_RENDER_TARGET is stored in that format: - its RTVs and the PSO's RTVFormats use it, so draws, blends and clears write the alpha channel (the clear quantizes alpha like the other UNORM formats); - its SRVs view the image in the same format. Vulkan puts A8 in a compatibility class of its own, so it cannot share an image with an R8 view: gfx10's format table gains an 8_UNORM row for it whose one channel X is alpha (channels_a), and the T#'s (0, 0, 0, X) becomes (ZERO, ZERO, ZERO, A) on that view; - CheckFeatureSupport adds RENDER_TARGET and BLENDABLE for A8_UNORM; - the copy paths know its one-byte texel. Other A8_UNORM textures stay R8_UNORM, and devices without the format refuse A8 render targets as before. Depth-stencil and UAV stay refused. Tests (both on an RTX 3060 and an Intel UHD 750, with Vulkan validation): - d3d12_clear_formats: A8_UNORM joins the WARP comparison (was "not exposed"); - d3d12_descriptor_test: format support and creation follow the device; an A8 render target's default and remapped SRVs sample like the R8-backed ones; - d3d12_draw_test: a full-screen draw and two alpha blends into an A8 target; - gfx10_descriptors_test: the A8 row and its view mapping. vk_test_device.h enables maintenance5 like gta6rt, so the whole suite runs with it: ctest gives the same failures as main on both GPUs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 67950a8)
…efuses the others
castable_view_formats() mapped every castable format through vulkan_format(), which has no
A8_UNORM case, so CreateCommittedResource3/CreatePlacedResource2 with castable={A8_UNORM}
failed with E_INVALIDARG ("castable format not supported yet: 65"). The resource's own format
is always viewable (create_texture adds the image's format), so naming A8_UNORM on an A8
texture is now a no-op.
An A8 render target's VK_FORMAT_A8_UNORM_KHR image is in a compatibility class of its own,
so an R8_UNORM castable entry (same texel size) would have reached its
VkImageFormatListCreateInfo. Any format other than A8_UNORM is now refused with E_INVALIDARG
before Vulkan.
The A8 gate (runtime and vk_test_device.h) also requires TRANSFER_SRC/DST, since every
texture is created with transfer usage.
d3d12_draw_test runs the A8 clear/draw/blend cases on a second target made through
CreateCommittedResource3 with castable={A8_UNORM}, and checks castable={R8_UNORM} returns
E_INVALIDARG. Without the shim change it fails with the reported message.
Reported by tupacfan04 on #7403.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 18b0bfb)
texture_format refused every A8_UNORM texture that was not 2D, so GetResourceAllocationInfo answered UINT64_MAX for a 1D one (a title's boot sizes a 128-texel 1D A8_UNORM texture and asserts on that size). The host accepts A8_UNORM in 1D, 2D and 3D (the gap is listed by #4533's host sweep). They are R8_UNORM images like the 2D ones; the SRV's alpha-only swizzle does not depend on the dimension. Format support now names TEXTURE1D and TEXTURE3D too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 952be9b) Adapted to main by Mumogg: resolved on top of the A8 render-target commits as the original integration merge (a5c96e0) did: a 2D render target stays VK_FORMAT_A8_UNORM_KHR, and every other A8 texture, in any dimension, is an R8_UNORM image.
|
Independent Windows A/B check. Windows 10 22H2 (19045), RTX 5070 (NVIDIA 610.88), Vulkan, MSVC 19.51.36256, Windows SDK 10.0.26100 and Ninja/Release.
The control uses the same new test source and CMake registration, with no runtime changes. With #602, both textures reported 65,536-byte allocations. All 128 (1D) and 256 (3D) texels round-tripped, and both SRVs decoded to Synthetic tests only. No game files, no retail boot and no online gameplay. AI-assisted (Codex). |
|
Independent check. Windows 10 Pro 22H2 (19045), VS 2022 RelWithDebInfo, Vulkan SDK 1.4.363.0,
Reading note: in Synthetic tests only, no game files. AI-assisted (Claude Code): I read the diff and ran the tests on that machine. |
…n 1D and 3D, again; the retail frame loop then runs for minutes (RT-A8-DIMENSIONS) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Closing as carried:
Thanks. AI-assisted (Claude Code, Claude Opus 5.5). |
Claimed in #14 as
RT-A8-DIMENSIONS. Depends on: #428 (its two commits come first here; this pull request is the last commit). Independent of my stacked proxy pull requests.What and why
The third description that device slot 25 refuses on the retail boot (after #427's and #428's) is a 1D A8_UNORM texture, 128 x 1, no flags.
mainonly accepts A8_UNORM in 2D, so the log saysGetResourceAllocationInfo format not supported yet: 65, slot 25 answersUINT64_MAX, and a worker thread of the title stops on itsint3; a few seconds later the title's crash reporting ends the process (the 30 s exit I corrected in #432).Commit
952be9b04by NiiRoZz (old PR 7755;-x, authorship kept; an ancestor ofmainwhose content is not in the tree): an A8_UNORM texture is an R8_UNORM image in 1D and 3D too, as the host makes all three, withd3d12_a8_dimensions_test.The one conflict is with #428, which the commit predates: resolved as the original integration merge (
a5c96e0dd) did. A 2D render target staysVK_FORMAT_A8_UNORM_KHR; every other A8 texture, in any dimension, is R8_UNORM; a render target that is not 2D is refused. The commit message says so.Measured
Linux (Nobara 44, kernel 7.3), Wine 11.21 staging, RTX 5070 Ti (driver 615.78.08), clang-cl 22.1.8 + xwin SDK 10.0.26100, own 1.0.2.1 copy, network off, 300 s allowed, on
mainece4ba5b3with my stacked pull requests up to #432 and #142, #219, #328, #387.--runint3, then the title's crash reportingCreatePipelineStateokExecuteCommandListsokXboxPresentation::PresentXokAbout the end of the long run, since I got this wrong once already: I read the exit line this time. Exit 137 is a kill, and the system journal for that run says
The kernel OOM killer killed some processes in this unitwith a 52 GB memory peak, which is the cap I set (MemoryMax=52G). The integration branch (#321) ends the same way at about the same time; there it is the NVIDIA compiler taking the title's largest compute modules. I have not confirmed that it is the same cause here.Still open on this path: the four rectangle-list pipelines (
primitive topology type not supported: 19), queue slot 31, the memory growth, and the picture, which I have not looked at.Tests under Wine:
d3d12_a8_dimensions(new with the commit)d3d12_descriptord3d12_drawNot built with MSVC and not run on Windows.
AI-assisted (Claude Code); built and run on the machine above.
🤖 Generated with Claude Code
https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt