From 658d7d2abe8529877477cd960911a76358e413a5 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Sat, 23 Nov 2024 01:26:59 -0800 Subject: [PATCH] Make all sample_buffer() return Option --- src/acceleration_structure_pass.rs | 2 +- src/blitpass.rs | 2 +- src/computepass.rs | 2 +- src/renderpass.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/acceleration_structure_pass.rs b/src/acceleration_structure_pass.rs index b08156a..a9862f2 100644 --- a/src/acceleration_structure_pass.rs +++ b/src/acceleration_structure_pass.rs @@ -72,7 +72,7 @@ impl AccelerationStructurePassSampleBufferAttachmentDescriptor { } impl AccelerationStructurePassSampleBufferAttachmentDescriptorRef { - pub fn sample_buffer(&self) -> &CounterSampleBufferRef { + pub fn sample_buffer(&self) -> Option<&CounterSampleBufferRef> { unsafe { msg_send![self, sampleBuffer] } } diff --git a/src/blitpass.rs b/src/blitpass.rs index 290cadf..cb56186 100644 --- a/src/blitpass.rs +++ b/src/blitpass.rs @@ -66,7 +66,7 @@ impl BlitPassSampleBufferAttachmentDescriptor { } impl BlitPassSampleBufferAttachmentDescriptorRef { - pub fn sample_buffer(&self) -> &CounterSampleBufferRef { + pub fn sample_buffer(&self) -> Option<&CounterSampleBufferRef> { unsafe { msg_send![self, sampleBuffer] } } diff --git a/src/computepass.rs b/src/computepass.rs index bb21a72..d3173e3 100644 --- a/src/computepass.rs +++ b/src/computepass.rs @@ -71,7 +71,7 @@ impl ComputePassSampleBufferAttachmentDescriptor { } impl ComputePassSampleBufferAttachmentDescriptorRef { - pub fn sample_buffer(&self) -> &CounterSampleBufferRef { + pub fn sample_buffer(&self) -> Option<&CounterSampleBufferRef> { unsafe { msg_send![self, sampleBuffer] } } diff --git a/src/renderpass.rs b/src/renderpass.rs index f9aa50b..f23d934 100644 --- a/src/renderpass.rs +++ b/src/renderpass.rs @@ -266,7 +266,7 @@ impl RenderPassSampleBufferAttachmentDescriptor { } impl RenderPassSampleBufferAttachmentDescriptorRef { - pub fn sample_buffer(&self) -> &CounterSampleBufferRef { + pub fn sample_buffer(&self) -> Option<&CounterSampleBufferRef> { unsafe { msg_send![self, sampleBuffer] } }