Skip to content

Commit

Permalink
Make all sample_buffer() return Option
Browse files Browse the repository at this point in the history
  • Loading branch information
kvark committed Nov 23, 2024
1 parent a91fb3e commit 37b4828
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/acceleration_structure_pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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] }
}

Expand Down
2 changes: 1 addition & 1 deletion src/blitpass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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] }
}

Expand Down
2 changes: 1 addition & 1 deletion src/computepass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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] }
}

Expand Down
2 changes: 1 addition & 1 deletion src/renderpass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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] }
}

Expand Down

0 comments on commit 37b4828

Please sign in to comment.