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 24, 2024
1 parent b8e4231 commit 658d7d2
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 658d7d2

Please sign in to comment.