⬆️ Build on metal2vulkan development 5ccd158e6d
The pin moves from 5a04298008 to 5ccd158e6d, metal2vulkan's development. For the guest: - Every compute pipeline a command buffer binds now goes through one bind that binds rt's descriptor set 1 first (rt 70dfe08320). The guest's dispatches after rt's own count kernel of an executeCommandsInBuffer:indirectBuffer:indirectBufferOffset: over a range the GPU writes found that set unbound, which lost the device in the rendering sample's indirect path on the RTX 3090 and the RX 7900 XTX. - Texture buffers are made: a texture buffer over a buffer (newTextureWithDescriptor:offset:bytesPerRow: of a buffer) reads and writes the buffer's bytes through a Vulkan buffer view (rt 817463704e). Before, it was rt's gap (rt-refused-gap). rt refuses an offset off the device's texture-buffer alignment (TextureBufferAlignment) and rows or texels that do not fit the buffer (BufferTextureLayout), counted under rt-refused-metal. A blit copy to or from a texture buffer is rt's gap (Gap::TextureCopy). - A texture buffer the device places (newTextureWithDescriptor: of MTLTextureTypeTextureBuffer on the device) is rt's own refusal, not Metal's (TextureBufferNotOverBuffer: rt makes a texture buffer only over a buffer its consumer places, and the host places none for it yet): nil, counted under a new code for rt's own refusals, rt-refused-ours, apart from rt-refused-metal. - A copy between textures whose bytes share memory is cut into ordered slabs; where rt cannot cut it so, it is rt's gap (Gap::OverlappingCopy), and nothing is encoded. - rt's floor adds six texel-buffer features of Vulkan 1.2 (uniform and storage texel buffers: update-after-bind, dynamic and non-uniform array indexing) and counts texel-buffer arrays against the descriptor limits. - SEMANTICS_VERSION 2257 -> 2258: the translation caches are made again, so the first boot after this pin is cold. The pin-range tests' texture buffer, a device-placed one, was rt's gap and is now rt's TextureBufferNotOverBuffer, counted under rt-refused-ours (RtRefusal::Ours); decoder_with_a_texture_buffer checks that, and docs/accuracy-ledger.md names the code, the refusal and the two gaps. No lock change: metal2vulkan's manifests did not change.
This commit is contained in:
1 parent
81967c598b
commit
dbecd242be
4 files changed
+33
-13
No files matched your search
+2
-2
@@ -33,11 +33,11 @@ reims-vgpu-graphics = { path = "crates/reims-vgpu-graphics" }
|
||||
reims-vgpu-video = { path = "crates/reims-vgpu-video" }
|
||||
# metal2vulkan's Metal types, for the Metal enums and descriptor values the runtime's calls take,
|
||||
# from metal2vulkan's public repository at the commit both name.
|
||||
metal2vulkan = { git = "https://github.com/steelbrain/metal2vulkan", rev = "5a04298008ae5f09952556b8a4bc287cee3c4daf" }
|
||||
metal2vulkan = { git = "https://github.com/steelbrain/metal2vulkan", rev = "5ccd158e6d122000e27573c7dfb6aa61f8200037" }
|
||||
# The Vulkan platform's runtime (architecture D1), metal2vulkan-runtime: a Metal-shaped API on
|
||||
# Vulkan, one path for every device, under reims-vgpu-vulkan's `rt_platform` and `seam` and
|
||||
# reims-vgpu's `pool::rt_blocks`.
|
||||
metal2vulkan-runtime = { git = "https://github.com/steelbrain/metal2vulkan", rev = "5a04298008ae5f09952556b8a4bc287cee3c4daf" }
|
||||
metal2vulkan-runtime = { git = "https://github.com/steelbrain/metal2vulkan", rev = "5ccd158e6d122000e27573c7dfb6aa61f8200037" }
|
||||
# The hashes of the Vulkan platform's metallib sources (reims-vgpu-vulkan/build.rs).
|
||||
sha2 = "0.10.9"
|
||||
# A display window's swapchain on Linux (reims-vgpu-vulkan/src/swapchain.rs), at the runtime's
|
||||
|
||||
@@ -252,8 +252,14 @@ pub enum RtRefusal {
|
||||
BelowFloor,
|
||||
/// A failed Vulkan call (`Error::Vulkan`).
|
||||
Vulkan,
|
||||
/// A call Metal refuses (`Error::Refused`).
|
||||
/// A call rt refuses as Metal's refusal (`Error::Refused`), or on a rule of rt's own that
|
||||
/// [`RtRefusal::Ours`] does not name.
|
||||
Refused,
|
||||
/// A call rt refuses on a rule of its own, not Metal's (`Error::Refused`, its basis rt's in
|
||||
/// metal2vulkan-runtime's `error.rs`): a texture buffer the device places
|
||||
/// (`Refusal::TextureBufferNotOverBuffer`), which rt makes only over a buffer its consumer
|
||||
/// places.
|
||||
Ours,
|
||||
/// One of the device's or rt's fixed limits (`Error::Limit`).
|
||||
Limit,
|
||||
/// A block no handle holds (`Error::NoSuchBlock`).
|
||||
@@ -276,11 +282,12 @@ pub enum RtRefusal {
|
||||
|
||||
impl RtRefusal {
|
||||
/// Every kind, once.
|
||||
pub const ALL: [RtRefusal; 12] = [
|
||||
pub const ALL: [RtRefusal; 13] = [
|
||||
RtRefusal::Loader,
|
||||
RtRefusal::BelowFloor,
|
||||
RtRefusal::Vulkan,
|
||||
RtRefusal::Refused,
|
||||
RtRefusal::Ours,
|
||||
RtRefusal::Limit,
|
||||
RtRefusal::NoSuchBlock,
|
||||
RtRefusal::Thread,
|
||||
@@ -297,6 +304,7 @@ impl RtRefusal {
|
||||
rt::Error::Loader(_) | rt::Error::NoDirectDriverLoading => RtRefusal::Loader,
|
||||
rt::Error::BelowFloor(_) => RtRefusal::BelowFloor,
|
||||
rt::Error::Vulkan { .. } => RtRefusal::Vulkan,
|
||||
rt::Error::Refused(rt::Refusal::TextureBufferNotOverBuffer) => RtRefusal::Ours,
|
||||
rt::Error::Refused(_) => RtRefusal::Refused,
|
||||
rt::Error::Limit(_) => RtRefusal::Limit,
|
||||
rt::Error::NoSuchBlock(_) => RtRefusal::NoSuchBlock,
|
||||
@@ -315,6 +323,7 @@ impl RtRefusal {
|
||||
RtRefusal::BelowFloor => "rt-refused-below-floor",
|
||||
RtRefusal::Vulkan => "rt-refused-vulkan",
|
||||
RtRefusal::Refused => "rt-refused-metal",
|
||||
RtRefusal::Ours => "rt-refused-ours",
|
||||
RtRefusal::Limit => "rt-refused-limit",
|
||||
RtRefusal::NoSuchBlock => "rt-refused-no-such-block",
|
||||
RtRefusal::Thread => "rt-refused-thread",
|
||||
|
||||
@@ -8786,8 +8786,10 @@ mod tests {
|
||||
/// A decoder on the Vulkan platform with a queue (1), and, as a process in slot 0 picks
|
||||
/// (`RgfxIdSpace`, next fit from the slot's base, a pick of Metal's span of a pin), the create
|
||||
/// of a device-placed 1 MiB texture buffer (10) at the slot's first pick, which the host takes
|
||||
/// no pin of. rt builds no texture buffers: the create is refused, counted under rt's code
|
||||
/// (`rt-refused-gap`), so no range of its lies among the pins the tests make after it.
|
||||
/// no pin of. rt makes a texture buffer only over a buffer its consumer places, which the host
|
||||
/// does not yet place for a device-placed one (`Refusal::TextureBufferNotOverBuffer`, rt's own
|
||||
/// refusal, not Metal's): the create is refused, counted under rt's own refusals' code
|
||||
/// (`rt-refused-ours`), so no range of its lies among the pins the tests make after it.
|
||||
fn decoder_with_a_texture_buffer() -> (
|
||||
GraphicsDecoder<reims_vgpu_vulkan::RtPlatform>,
|
||||
<reims_vgpu_vulkan::RtPlatform as Platform>::Device,
|
||||
@@ -8835,20 +8837,20 @@ mod tests {
|
||||
},
|
||||
..RgfxTextureCreate::default()
|
||||
};
|
||||
let refused = crate::platform::counted("rt-refused-gap");
|
||||
let refused = crate::platform::counted("rt-refused-ours");
|
||||
assert_eq!(
|
||||
dec.decode(&device, texture.as_bytes()).unwrap(),
|
||||
Err(DecodeError::Refused),
|
||||
"rt builds no texture buffers"
|
||||
"rt makes no texture buffer the device places"
|
||||
);
|
||||
assert_eq!(crate::platform::counted("rt-refused-gap") - refused, 1);
|
||||
assert_eq!(crate::platform::counted("rt-refused-ours") - refused, 1);
|
||||
assert!(dec.object(10).is_none());
|
||||
(dec, device)
|
||||
}
|
||||
|
||||
/// A guest's pin meets no range the Vulkan platform's runtime placed for itself: a buffer
|
||||
/// pinned at the pick after a texture buffer's is made, the texture buffer refused (rt builds
|
||||
/// none).
|
||||
/// pinned at the pick after a texture buffer's is made, the texture buffer refused (rt makes
|
||||
/// none the device places).
|
||||
#[test]
|
||||
fn on_vulkan_a_pin_meets_no_range_of_a_texture_buffer() {
|
||||
use reims_vgpu_graphics::wire::RGFX_CONTEXT_VA_BASE;
|
||||
|
||||
+11
-2
@@ -69,12 +69,21 @@ many times. The pieces, by code:
|
||||
|
||||
A call of a built piece that rt refuses (a limit, Metal's own refusal, a gap of rt's, a failed
|
||||
Vulkan call) answers the same way, counted under the error's kind, `rt-refused-<kind>`
|
||||
(`RtRefusal::ALL`: `loader`, `below-floor`, `vulkan`, `metal`, `limit`, `no-such-block`,
|
||||
(`RtRefusal::ALL`: `loader`, `below-floor`, `vulkan`, `metal`, `ours`, `limit`, `no-such-block`,
|
||||
`thread`, `translation`, `gap`, `quiesced`, `no-device`, `other`), its first line naming the call
|
||||
and rt's error. A texture rt makes none of for its pixel format is counted under its format's
|
||||
code instead, `rt-refused-texture-format-<n>`; a pipeline state's imageblock length rt refuses,
|
||||
`rt-refused-imageblock-length`; and a heap texture rt refuses on its place in its block,
|
||||
`rt-refused-heap-texture-place`. The boot diagnostics (`rt_platform/diag.rs`, lines that start
|
||||
`rt-refused-heap-texture-place`. `rt-refused-metal` counts `Error::Refused`, Metal's refusals
|
||||
and those of rt's own rules that no code of their own names; each refusal's basis, Metal's or
|
||||
rt's, is in metal2vulkan-runtime's `error.rs`. `rt-refused-ours` counts rt's own refusal of a
|
||||
texture buffer the device places (`newTextureWithDescriptor:` of `MTLTextureTypeTextureBuffer`,
|
||||
`Refusal::TextureBufferNotOverBuffer`): rt makes a texture buffer only over a buffer its
|
||||
consumer places, and the host places none for it yet: nil. Among rt's gaps (`rt-refused-gap`),
|
||||
nothing encoded: a blit copy to or from a texture buffer (`Gap::TextureCopy`), and a copy
|
||||
between regions of two textures over one buffer whose bytes meet where rt cannot cut the copy
|
||||
into ordered slabs, or between two textures whose memory meets where one is placed in a heap
|
||||
(`Gap::OverlappingCopy`). The boot diagnostics (`rt_platform/diag.rs`, lines that start
|
||||
`reims-vgpu: rt-diag`) add what the call asked of rt where its site names it. Their refusals
|
||||
line counts the translator's refusals by the feature each refused, `Translation-<feature>`
|
||||
(metal2vulkan's `Feature`'s variant, as `Translation-DivergentInterpolation`), or by its
|
||||
|
||||
Reference in new issue
Block a user