Move a shadow made before its pages' in-place verdict in place once it passes
A texture over host pages made before its class's in-place verdicts were known is a shadow (CheckPending): an unknown, not a lack. Under the owner's 11-07 ruling a shadow is only for accesses that cannot be done in place, so such a shadow must not stay one for life because it was made early. Each such shadow now waits for its class's verdicts (StorageForms::moves). The check's thread, at each verdict, decides from facts stored with the wait (class, usage, texel bytes) and takes no handle of a program's texture. Where the verdicts take an image in place, the texture waits for the storage-form switch. At the commit of the device's only uncommitted command buffer, the switch makes the image in place exactly as the texture's making makes it: the declared plan, with feedback loop and storage usage where the device makes them so, and noted for a rebind and its first move. Where every encoder ran, the texture presents it from then on (TextureShared::moved; every storage read goes through Texture::storage). It is counted in host_textures_in_place and in the new WorkCounts::host_textures_moved_in_place, and its slots are written again. No texel is copied: between encoders the shadow holds nothing the buffer lacks, and the image in place is the buffer's bytes, whose uses hazard tracking orders after earlier copies back and merges. A view made before the move keeps the shadow. A shadow with a usage or render shadow, over detached or copied bytes, or whose image the device refuses stays a shadow. The shadow's image is kept with the texture until it goes. Test: runtime_lane::in_place_textures::a_texture_made_before_its_verdict_moves_in_place_once_it_passes (under the validation layer). Docs: storage_form.rs and in_place.rs module docs, FAST-PATHS in-place row, HOWTO, API.md. (cherry picked from commit 605d0444de1ad1a9b93e02649db7e1b2fda18e93)
This commit is contained in:
1 parent
14791569c7
commit
f9bc470d7c
21 files changed
+616
-100
No files matched your search
+3
-1
@@ -346,7 +346,9 @@ through an unsigned-integer view of 4, 8 or 16-byte texels while the CPU writes
|
||||
them (a program's atomics are among no round). It runs
|
||||
on a thread of its own, which the first such texture starts; a texture made before its kind of
|
||||
pages and access has its verdict is a shadow, made without waiting for the check
|
||||
(`WorkCounts::host_texture_shadows_check_pending`). It runs once per driver and driver version: its
|
||||
(`WorkCounts::host_texture_shadows_check_pending`), and moves in place, with no copy, at a quiet
|
||||
commit once its kind's verdicts pass (`WorkCounts::host_textures_moved_in_place`; docs/HOWTO.md
|
||||
says which commits). It runs once per driver and driver version: its
|
||||
verdicts are kept in the shader cache's
|
||||
directory, named by the driver and the check's own version, not the runtime's (a device without
|
||||
one checks once per process), and recalled as the next device is made
|
||||
|
||||
Reference in new issue
Block a user