A castable-format list may name an R8G8B8A8 texture's B8G8R8A8 formats,
or the reverse, or cross B8G8R8X8 and B8G8R8A8. WARP and AMD's D3D12
driver store a clear or a draw through an RTV in a listed format in the
view's channel order and encoding: an R8G8B8A8 texture cleared to
(0.2, 0.4, 0.6, 0.25) through a B8G8R8A8 RTV holds 153, 102, 51, 64.
CreateRenderTargetView refused such an RTV on an R8G8B8A8 texture, so
the clear failed Close and draws were dropped, and a typed B8G8R8A8
texture's RTV kept the image's format whatever the view named, so its
clears came out in BGRA order and without the sRGB encoding.
An RGBA8 or BGRA8 UNORM/SRGB texture (B8G8R8X8 included) now gets an
RTV in another of these formats when its list, as the application gave
it, names that format, and color_view_format lets a castable image's
clear cross between the two channel orders. Draws already used the
PSO's format for the attachment view. A format the list doesn't name
stays refused; a typed B8G8R8A8 texture without a list keeps ignoring
the RTV's format, as before.
d3d12_clear_test compares 8 such textures with WARP in full and
rectangle clears (the X byte of an X8 view left out: WARP and AMD write
different values there) and checks that 3 unlisted formats get no RTV;
d3d12_draw_test draws through the same views; typeless_rtv_test checks
the replay's crossing and its refusals.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
xmem.cpp ignores the attributes argument, and the bits of the Scarlett
XALLOC_ATTRIBUTES word are not known yet. With gta6rt --trace FILE, the first
XMemAlloc and the first XMemFree for each distinct raw attribute word now
write an "xmem_attributes" event (api, the word, the size for an allocation,
the caller as module+RVA), so the bits can be decoded from a real run without
logging every allocation. Off: one relaxed load per call.
xmem_test opens a trace and checks one event per word and API, the size of the
first call, a caller on every event, and nothing recorded while the trace is
off. README.md documents the event.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
CreateRenderTargetView and CreateDepthStencilView stored ArraySize -1 of a
TEXTURE2DARRAY or TEXTURE2DMSARRAY view as the layer count, so the view was
nulled (typeless and castable RGBA8) or the list was refused at replay. The
host accepts it and clears the remaining slices. Resolve it at creation;
out-of-range views are refused as before. d3d12_view_slices_test compares
clears through such views with the host on the same adapter and WARP.
d3d12_typeless_rtv_test listed {first slice 1, ArraySize -1} on a four-slice
texture among the views the layer must reject; the host accepts that view, so
the entry now uses first slice 4, which the host refuses too.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- rdna2spirv: declare each packed vertex input register once; a register whose elements disagree on the component
type is refused (SHADER-644).
- runtime: a title's VirtualAlloc drops the console's MEM_GRAPHICS / MEM_TITLE type bits the host rejects (RT-217).
- runtime: XPersistentLocalStorageImpl is served from <overlay>\persistent with the package's 2048 MB quota
(RT-219; layout from the public docs, not measured in a caller).
- runtime: G:\ names the package and T:\ a scratch folder in the overlay; paths under the configured folders and
every path with no folders configured stay host paths (RT-218).
- winhttp_offline: header blocks and timeouts the host WinHTTP rejects are rejected the same way.
- cfg_structure.run: a limit of zero or less runs no blocks.
- shader_meta: an s_movk_i32 with a register operand and a float immediate beyond float32 are left unknown instead
of raising.
Each comes with a test that fails on the old code. Conflicts with main resolved here (internal_dir() hides T:'s
folder; both file_system_test blocks kept).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review on #3655 (kacper-serewis, daemosofchaos, on Windows 11):
- A parameter block shorter than COPYFILE2_EXTENDED_PARAMETERS (dwSize
0, 4, 31) made the fallback copy and return S_OK, where the host's
CopyFile2 returns E_INVALIDARG and writes nothing. Both paths now
check it first, before copy_paths prepares the destination.
- The fallback silently dropped COPY_FILE_SKIP_ALTERNATE_STREAMS and
copied the stream. Its flags are now sorted: passed on (the ones both
calls define), dropped (requests that leave the contents as
CopyFileExW writes them: no offload, compressed traffic, sparse copy,
...), or refused with ERROR_NOT_SUPPORTED before anything is written
(SKIP_ALTERNATE_STREAMS, DIRECTORY, OPEN_AND_COPY_REPARSE_POINT,
IGNORE_SOURCE_ENCRYPTION, unknown bits, a longer V2 block).
- A cancel flag already set is answered by the fallback itself, since
Wine 9's CopyFileExW doesn't read it.
rt::fs::force_copy_file2_fallback lets the test run the fallback on
Windows, where the host has CopyFile2 (Maraco91 noted it couldn't be
reached there). file_system_test runs its CopyFile2 checks both ways:
no block, short blocks, fail-if-exists with a hint flag, a set cancel
flag, and in the fallback the refused flags and block.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GN11jcpJWD4phrXJyDgED6