Texture buffers: each device holds a format as words only where it lacks the format's own view for an access
metal::format::texel_buffer_form is the one place that decides, per format and device: the format's own view where the device holds it directly as a uniform texel buffer, a storage texel buffer and a storage texel buffer written without a format; else words where it has a word layout; else its own view of the first two (whose writes the runtime refuses). The resource ID word is unchanged and the same on every device; a module takes the codes its profile holds as words (texel_buffer_word_codes) and tests a word's code against them, emitting nothing of the words where the profile holds none so. The routines' cases and the precision notes follow those codes. The runtime's texel_form takes the same answer. AGENTS.md rule 2 gains the fourteenth form; the runtime's README records the words' cost (7.3x the own view's GPU time for an R8Unorm texture buffer written on an RTX 3090, job m3-max-80580). This commit alone was not built; the series is checked at its tip.
This commit is contained in:
1 parent
0ad55e1468
commit
7cdaa1cc3f
10 files changed
+336
-133
No files matched your search
+10
-6
@@ -270,8 +270,9 @@ and so do the command line, the compile worker and every validation tool. It hol
|
||||
[RESOURCE-ID.md](RESOURCE-ID.md)), reads, writes and updates atomically its texture buffers, slots and
|
||||
argument buffers' members alike (a uniform texel buffer where it reads one, a storage texel
|
||||
buffer where it writes one, the element of set 1's texel-buffer array at its ID's index; where
|
||||
the ID's word says the texture buffer is held as words, that element is a view of `R32_UINT`
|
||||
and the function converts its texels itself: RESOURCE-ID.md, the texture buffer word), and
|
||||
the ID's word names a format the profile holds as words, `metal::format::texel_buffer_form`,
|
||||
that element is a view of `R32_UINT` and the function converts its texels itself:
|
||||
RESOURCE-ID.md, the texture buffer word), and
|
||||
samples its texture slots
|
||||
through its runtime sampler slots and its constexpr samplers and reads them through those (MSL
|
||||
4.1's `read(sampler, coord)`, its border texel from bits 0-11 of the ID's word). Any other
|
||||
@@ -2064,8 +2065,9 @@ bound.
|
||||
alias (at a slot, or held by an argument buffer), the module decodes the codes (or the
|
||||
device's filter of them) by the MSL transfer through the device's `Pow`, at every such access on
|
||||
every device. A `float` read of a texture buffer held as words decodes an 8-bit sRGB colour code
|
||||
the same way, and records the note outright: its routine reads every format the texture
|
||||
buffer's word may name.
|
||||
the same way, and records the note where the profile holds an 8-bit sRGB format's texture
|
||||
buffers as words (`metal::format::texel_buffer_form`): its routine reads every format the
|
||||
profile holds so.
|
||||
- `metal2vulkan-degrade-function-storage-assumed` (precision).
|
||||
`PrecisionNote::FunctionStorageAssumed`: A vertex or fragment function keeps more private memory
|
||||
(its `alloca`s, a call stack among them, or constants held as `Private` variables) than the floor,
|
||||
@@ -2554,8 +2556,10 @@ bound.
|
||||
from the textures the command makes resident or binds), so a reading of the module alone
|
||||
holds it, and so does a command that can name one. A texture buffer held as words converts its
|
||||
extended-range texels the same way, and encodes a write's 8-bit sRGB colour by
|
||||
`unorm4x8_srgb`'s pack; its `float` read and write record the note outright, the routine
|
||||
converting every format the texture buffer's word may name. Its other conversions are exact: a
|
||||
`unorm4x8_srgb`'s pack; its `float` read and write record the note where the profile holds an
|
||||
extended-range format's texture buffers as words, and its write where it holds an 8-bit sRGB
|
||||
one's so, the routine converting every format the profile holds as words. Its other
|
||||
conversions are exact: a
|
||||
normalized code to its correctly rounded quotient, a value to the exact product's code rounded
|
||||
to nearest even, a half or small float exactly, and a write's half or small float toward zero,
|
||||
as Metal's kernel writes.
|
||||
|
||||
Reference in new issue
Block a user