RUNTIME 2257: render targets placed apart in one Private placement heap keep no shadows
A game's render targets placed apart in one tracked Private placement heap (reims gameload G2
rtheap: MSAA colour, MSAA depth and a shadow map) were held as shadows on the Iris and the AMD
GPUs, with attached reads through copies, clears in part and sample moves every frame (+34.9 ms a
frame over native on the Iris guest at pin 77). Four causes, each with a test that fails before:
- C (d1eaec0f47, 792ea614de): a heap's images shared memory wherever their keys met, so a
texture placed apart was taken as attached to another's pass; images now share memory only where
their bytes meet, and the heap's own shadow images use their whole key's memory.
- B1 (6f54af68e2, e56bb982d7): a multisample heap texture takes the device's own size and
alignment answer and lies in its image (the 780M asks at most 64 KiB).
- D (f760b95001): a whole clear of a 2D multisample attachment copies nothing in.
- B2 (317d905449): a heap texture's device answer takes the device's alignment up to the heap's
own (the XTX's MSAA colour answers 256 KiB: 2375680 @ 256K, depth 1179656 @ 128K, shadow map
393224 @ 128K), the host GPU's real value as the owner's rule for device-describing answers
states.
New owned fixture hpr_reads (our MSL; regen-air-fixtures): fragment functions reading a device
buffer; its golden and the compile census are re-blessed at the next pin.
Verified (steelbrain/rtheap at 23fc75a899): release lane heap_placed_targets (320x192, 7
heap-placed targets, Device policy, mean of 10 frames), placed vs device-made: XTX 1.619 vs 0.576
ms before, shadows MsaaColor/MsaaDepth/Shadow, to 0.530 vs 0.594 ms, every shadow count 0
(m3-max-27670); 780M 2.150 vs 0.579 to 0.548 vs 0.599 ms (27671). Metal policy
(exact_answers): XTX 2.033 to 0.683 ms, 780M 2.650 to 1.079 ms, shadows kept as the switch says.
Texels and kernel reads equal the device-made frame on every leg. lavapipe green (27676); XTX
(27687) and 780M (27688) every heap_placed*, attached_levels, tracker, heap and shadow test
passes, the other failures only under the carried archive's compile-time paths and the
shadow_standing layer test fixed separately (4d95375fe2). Per-draw walk_costs on the XTX, one run
a side (27834): barriers 304.5 to 275.0 us a frame, no barrier 178.7 to 251.8 us with identical
draw-path counts; an exclusive alternating re-run (27858) decides whether that is noise.
This commit is contained in:
1 parent
4d95375fe2
commit
b31c23f7c0
38 files changed
+1564
-115
No files matched your search
+8
-7
@@ -3573,8 +3573,8 @@ bound.
|
||||
- `metal2vulkan-degrade-heap-texture-larger-than-metal` (precision). `HeapTextureLargerThanMetal`: A
|
||||
heap texture sized or made (`heap_texture_size_and_align`, `Heap::new_texture`) whose images on the
|
||||
device need more bytes or a coarser alignment than Metal's answer, which the runtime models: under
|
||||
the default `HeapAnswerPolicy::Device`, a single-sample texture whose image binds into the heap's
|
||||
memory, which lies in that image; under `HeapAnswerPolicy::Metal`, one that no shadow of its bytes
|
||||
the default `HeapAnswerPolicy::Device`, a texture whose image binds into the heap's memory, which
|
||||
lies in that image; under `HeapAnswerPolicy::Metal`, one that no shadow of its bytes
|
||||
holds to Metal's answer: not a multisample texture, whose image lies in memory of its own, nor one
|
||||
whose planes or Metal's tiles fit its bytes. The answer is then the larger of the two, since no
|
||||
image binds at Metal's offsets. Every other such texture answers Metal's numbers and announces
|
||||
@@ -5434,11 +5434,12 @@ each item named states the rule in full.
|
||||
|
||||
- **A heap texture answers Metal's size and alignment where the device's image fits them, else
|
||||
the device's** (`Device::heap_texture_size_and_align`, `DevicePolicy::heap_answers`). Under the
|
||||
default `HeapAnswerPolicy::Device`, a single-sample texture whose image binds into the heap's
|
||||
memory and needs more than Metal's answer answers the larger of the two and lies in that image:
|
||||
no image is put in its place and no shadow holds it. The alignment it takes is at most 64 KiB
|
||||
(an AMD Radeon Pro 5300M's answer on a Mac), and at most 4 KiB or its own size; where its image
|
||||
asks more, its image that a 4 KiB alignment holds (host-transfer usage, else linear) takes its
|
||||
default `HeapAnswerPolicy::Device`, a texture whose image binds into the heap's memory (a
|
||||
multisample one too) and needs more than Metal's answer answers the larger of the two and lies
|
||||
in that image: no image is put in its place and no shadow holds it. The alignment it takes is
|
||||
the device's (on an RX 7900 XTX, 256 KiB for a 4-sample render target past 128 texels a side), at most a
|
||||
heap's memory's own, 256 KiB, past which no image binds there, and at most 4 KiB or its own
|
||||
size; where its image asks more, its image that a 4 KiB alignment holds (host-transfer usage, else linear) takes its
|
||||
place. A `Shared` texture's answer also holds the linear image a heap over host pages binds.
|
||||
Under `HeapAnswerPolicy::Metal` (in `exact_answers`), the answer is Metal's: an image that fits
|
||||
it takes the place of one that does not, else a shadow of the heap's bytes holds the texture
|
||||
|
||||
Reference in new issue
Block a user