blade: tune belt alignment to match Intel Iris Xe

This commit is contained in:
Dzmitry Malyshau 2024-02-04 10:18:00 -08:00
parent 13ba8b6b54
commit aae532987f
2 changed files with 2 additions and 2 deletions

View file

@ -58,7 +58,7 @@ impl BladeAtlas {
upload_belt: BladeBelt::new(BladeBeltDescriptor { upload_belt: BladeBelt::new(BladeBeltDescriptor {
memory: gpu::Memory::Upload, memory: gpu::Memory::Upload,
min_chunk_size: 0x10000, min_chunk_size: 0x10000,
alignment: 4, alignment: 64, // Vulkan `optimalBufferCopyOffsetAlignment` on Intel XE
}), }),
monochrome_textures: Default::default(), monochrome_textures: Default::default(),
polychrome_textures: Default::default(), polychrome_textures: Default::default(),

View file

@ -251,7 +251,7 @@ impl BladeRenderer {
let instance_belt = BladeBelt::new(BladeBeltDescriptor { let instance_belt = BladeBelt::new(BladeBeltDescriptor {
memory: gpu::Memory::Shared, memory: gpu::Memory::Shared,
min_chunk_size: 0x1000, min_chunk_size: 0x1000,
alignment: 0x100, // required by DX12 alignment: 0x40, // Vulkan `minStorageBufferOffsetAlignment` on Intel Xe
}); });
let atlas = Arc::new(BladeAtlas::new(&gpu)); let atlas = Arc::new(BladeAtlas::new(&gpu));
let atlas_sampler = gpu.create_sampler(gpu::SamplerDesc { let atlas_sampler = gpu.create_sampler(gpu::SamplerDesc {