translator: a fetch's element index first among the floor's fragment fields, from the vertex function's end
On the floor a fragment function's push fields started at the vertex function's push end rounded up to 8. Where that end is a multiple of 4 and not of 8, the four bytes below the base went unused, and a fetching fragment function placed its four-byte element index (PushField::FetchedColor) after its eight-byte fields: a pair that fits the floor's 256 bytes with those four bytes used was pushed past them. The fragment base is now the vertex function's push end, and FetchedColor sorts after SlotBindOffset and before the slot addresses (SlotGuestBase): a fragment function that pushes no parameter block's address places it in those four bytes. Each field is still placed at the next offset aligned to it, so a fragment function whose first field is eight bytes, the spilled block's address included, starts where it did, and the vertex function's window still ends at 248. The fixed windows read no base: the old runtime's modules are unchanged. The docs that stated the rounding say the base is the vertex function's end: the push module, VERTEX_FLOOR_END, LoweringInputs::push_base, docs/API.md section 5, rt's README, and the render identity test's notes; the spill test reads the base unrounded (its vertex function ends at 248).
This commit is contained in:
1 parent
e814ef024b
commit
a010d17c6b
9 files changed
+46
-43
No files matched your search
+1
-1
@@ -134,7 +134,7 @@ compile does. `DevicePolicy::default()` is `DevicePolicy::UNTRUSTED`:
|
||||
(256 on a device made by `Device::from_queries`, whose runtime's floor requires that much
|
||||
`maxPushConstantsSize`: a dispatch region and 28 buffer addresses). On such a device a render
|
||||
pipeline's two functions share one 256-byte range: the vertex function's window is `[0, 248)`,
|
||||
and the fragment function's runs from the vertex function's end, rounded up to 8, to 256. A
|
||||
and the fragment function's runs from the vertex function's end to 256. A
|
||||
vertex function is lowered without knowing its fragment function, so it leaves the last 8
|
||||
bytes, where a fragment function whose fields spill always pushes its block's address; that
|
||||
costs only a vertex function whose own fields pass 248 bytes, which spills where it would have
|
||||
|
||||
Reference in new issue
Block a user