From 1fa45c69d6e2e1fd6fef19fda6a9aeddf088cafe Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Sat, 23 Sep 2023 15:52:16 -0600 Subject: [PATCH] Checkpoint --- crates/gpui3/src/platform/mac/metal_renderer.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/gpui3/src/platform/mac/metal_renderer.rs b/crates/gpui3/src/platform/mac/metal_renderer.rs index a4f51d9b33..72ab5978e5 100644 --- a/crates/gpui3/src/platform/mac/metal_renderer.rs +++ b/crates/gpui3/src/platform/mac/metal_renderer.rs @@ -132,12 +132,14 @@ impl MetalRenderer { depth_texture_desc.set_pixel_format(metal::MTLPixelFormat::Depth32Float); depth_texture_desc.set_storage_mode(metal::MTLStorageMode::Private); depth_texture_desc.set_usage(metal::MTLTextureUsage::RenderTarget); + depth_texture_desc.set_width(f32::from(viewport_size.width).ceil() as u64); + depth_texture_desc.set_height(f32::from(viewport_size.height).ceil() as u64); let depth_texture = self.device.new_texture(&depth_texture_desc); let depth_attachment = render_pass_descriptor.depth_attachment().unwrap(); - // depth_attachment.set_texture(Some(&depth_texture)); - // depth_attachment.set_clear_depth(1.); - // depth_attachment.set_store_action(metal::MTLStoreAction::Store); + depth_attachment.set_texture(Some(&depth_texture)); + depth_attachment.set_clear_depth(1.); + depth_attachment.set_store_action(metal::MTLStoreAction::Store); let color_attachment = render_pass_descriptor .color_attachments()