mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 16:56:09 +03:00
renderer/metal: only set shared texture mode on aarch64
This setting is only supported on aarch64.
This commit is contained in:
@ -2162,7 +2162,16 @@ fn initAtlasTexture(device: objc.Object, atlas: *const font.Atlas) !objc.Object
|
||||
desc.setProperty("pixelFormat", @intFromEnum(pixel_format));
|
||||
desc.setProperty("width", @as(c_ulong, @intCast(atlas.size)));
|
||||
desc.setProperty("height", @as(c_ulong, @intCast(atlas.size)));
|
||||
desc.setProperty("storageMode", @as(c_ulong, mtl.MTLResourceStorageModeShared));
|
||||
|
||||
// Xcode tells us that this texture should be shared mode on
|
||||
// aarch64. This configuration is not supported on x86_64 so
|
||||
// we only set it on aarch64.
|
||||
if (comptime builtin.target.cpu.arch == .aarch64) {
|
||||
desc.setProperty(
|
||||
"storageMode",
|
||||
@as(c_ulong, mtl.MTLResourceStorageModeShared),
|
||||
);
|
||||
}
|
||||
|
||||
// Initialize
|
||||
const id = device.msgSend(
|
||||
|
Reference in New Issue
Block a user