✅ Place the blit seam's test target at a granted index
metal2vulkan's runtime places a colour render target at a texture index from development b676eda182 on, as a fragment function reads a colour target through its attachment, and refuses one made with no index (Refusal::TextureIndex). The blit seam's two tests made their RGBA8Unorm render target with none, on the earlier rule that rt takes no index for a texture with no shader usage, so both failed on every rt device. The test's device now grants the first texture index and makes the target there. The copies under test are unchanged. The tests are ignored on macOS (no rt device under MoltenVK), so only the Linux and Windows legs reach them.
This commit is contained in:
1 parent
303d8ef4a9
commit
47f29ca3d0
1 file changed
+8
-4
@@ -1,6 +1,6 @@
|
||||
use metal2vulkan_rt::{
|
||||
CommandBuffer, CommandBufferStatus, Device, MemoryClass, PixelFormat, TextureDescriptor,
|
||||
TextureType, TextureUsage,
|
||||
CommandBuffer, CommandBufferStatus, Device, IndexClass, MemoryClass, PixelFormat,
|
||||
TextureDescriptor, TextureType, TextureUsage,
|
||||
};
|
||||
|
||||
use super::*;
|
||||
@@ -22,12 +22,16 @@ fn device() -> Device {
|
||||
device
|
||||
}
|
||||
|
||||
/// A texture the copies reach, with no shader usage, so rt takes no index for it.
|
||||
/// A texture the copies reach: a colour render target, which rt places at an index, as a fragment
|
||||
/// function reads a colour target through its attachment; at the first index of the class, which
|
||||
/// the test's own device grants.
|
||||
fn texture(device: &Device) -> Texture {
|
||||
let mut descriptor =
|
||||
TextureDescriptor::new(TextureType::Type2D, PixelFormat::RGBA8Unorm, SIDE, SIDE);
|
||||
descriptor.usage = TextureUsage::RENDER_TARGET;
|
||||
device.new_texture(&descriptor, None).unwrap()
|
||||
let first = IndexClass::Texture.range().start;
|
||||
let grant = device.grant_indices(IndexClass::Texture, first, 1).unwrap();
|
||||
device.new_texture(&descriptor, Some(grant.first)).unwrap()
|
||||
}
|
||||
|
||||
/// The whole texture's bytes from a buffer's first, row after row.
|
||||
|
||||
Reference in new issue
Block a user