MVKImage: Always use texel buffers for linear images in MTLHeaps.
This is particularly important if the resource will be aliased with
another resource; the memory in this case must have a linear layout.
diff --git a/MoltenVK/MoltenVK/GPUObjects/MVKImage.mm b/MoltenVK/MoltenVK/GPUObjects/MVKImage.mm
index f213f47..2bcf413 100644
--- a/MoltenVK/MoltenVK/GPUObjects/MVKImage.mm
+++ b/MoltenVK/MoltenVK/GPUObjects/MVKImage.mm
@@ -402,7 +402,7 @@
// macOS before 10.15.5 cannot use shared memory for texel buffers.
usesTexelBuffer = usesTexelBuffer && (_device->_pMetalFeatures->sharedLinearTextures || !isMemoryHostCoherent());
- if (_image->_isLinearForAtomics) {
+ if (_image->_isLinearForAtomics || (usesTexelBuffer && _device->_pMetalFeatures->placementHeaps)) {
if (usesTexelBuffer && _deviceMemory->ensureMTLBuffer()) {
_mtlTexelBuffer = _deviceMemory->_mtlBuffer;
_mtlTexelBufferOffset = getDeviceMemoryOffset();