mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 21:10:42 +00:00
MTLComputePassSampleBufferAttachmentDescriptor
SampleBufferAttachemnt Correction
This commit is contained in:
committed by
Jake Turner
parent
c9f8757497
commit
115d27a028
@@ -378,6 +378,15 @@ void DoSerialise(SerialiserType &ser, RDMTL::RenderPassDescriptor &el)
|
||||
SERIALISE_MEMBER(sampleBufferAttachments);
|
||||
};
|
||||
|
||||
template <typename SerialiserType>
|
||||
void DoSerialise(SerialiserType &ser, RDMTL::ComputePassSampleBufferAttachmentDescriptor &el)
|
||||
{
|
||||
// TODO: when WrappedCounterSampleBuffer exists
|
||||
// SERIALISE_MEMBER(sampleBuffer);
|
||||
SERIALISE_MEMBER(startOfEncoderSampleIndex);
|
||||
SERIALISE_MEMBER(endOfEncoderSampleIndex);
|
||||
}
|
||||
|
||||
INSTANTIATE_SERIALISE_TYPE(NS::String *);
|
||||
INSTANTIATE_SERIALISE_TYPE(NS::Range)
|
||||
INSTANTIATE_SERIALISE_TYPE(MTL::TextureSwizzleChannels);
|
||||
@@ -404,3 +413,4 @@ INSTANTIATE_SERIALISE_TYPE(RDMTL::RenderPassColorAttachmentDescriptor);
|
||||
INSTANTIATE_SERIALISE_TYPE(RDMTL::RenderPassDepthAttachmentDescriptor);
|
||||
INSTANTIATE_SERIALISE_TYPE(RDMTL::RenderPassStencilAttachmentDescriptor);
|
||||
INSTANTIATE_SERIALISE_TYPE(RDMTL::RenderPassDescriptor);
|
||||
INSTANTIATE_SERIALISE_TYPE(RDMTL::ComputePassSampleBufferAttachmentDescriptor);
|
||||
|
||||
@@ -665,4 +665,20 @@ RenderPassDescriptor::operator MTL::RenderPassDescriptor *()
|
||||
return objc;
|
||||
}
|
||||
|
||||
ComputePassSampleBufferAttachmentDescriptor::ComputePassSampleBufferAttachmentDescriptor(
|
||||
MTL::ComputePassSampleBufferAttachmentDescriptor *objc)
|
||||
: startOfEncoderSampleIndex(objc->startOfEncoderSampleIndex()),
|
||||
endOfEncoderSampleIndex(objc->endOfEncoderSampleIndex())
|
||||
{
|
||||
}
|
||||
|
||||
void ComputePassSampleBufferAttachmentDescriptor::CopyTo(
|
||||
MTL::ComputePassSampleBufferAttachmentDescriptor *objc)
|
||||
{
|
||||
// TODO: when WrappedMTLCounterSampleBuffer exists
|
||||
// objc->setSampleBuffer(Unwrap(sampleBuffer));
|
||||
objc->setStartOfEncoderSampleIndex(startOfEncoderSampleIndex);
|
||||
objc->setEndOfEncoderSampleIndex(endOfEncoderSampleIndex);
|
||||
}
|
||||
|
||||
} // namespace RDMTL
|
||||
|
||||
@@ -474,6 +474,19 @@ struct RenderPassDescriptor
|
||||
rdcarray<RenderPassSampleBufferAttachmentDescriptor> sampleBufferAttachments;
|
||||
};
|
||||
|
||||
// MTLComputePassSampleBufferAttachmentDescriptor : based on the interface defined in
|
||||
// Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePass.h
|
||||
struct ComputePassSampleBufferAttachmentDescriptor
|
||||
{
|
||||
ComputePassSampleBufferAttachmentDescriptor() = default;
|
||||
ComputePassSampleBufferAttachmentDescriptor(MTL::ComputePassSampleBufferAttachmentDescriptor *objc);
|
||||
void CopyTo(MTL::ComputePassSampleBufferAttachmentDescriptor *objc);
|
||||
// TODO: when WrappedMTLCounterSampleBuffer exists
|
||||
// MTLCounterSampleBuffer *sampleBuffer = NULL;
|
||||
NS::UInteger startOfEncoderSampleIndex = MTLCounterDontSample;
|
||||
NS::UInteger endOfEncoderSampleIndex = MTLCounterDontSample;
|
||||
};
|
||||
|
||||
} // namespace RDMTL
|
||||
|
||||
template <>
|
||||
@@ -511,3 +524,4 @@ RDMTL_DECLARE_REFLECTION_STRUCT(RenderPassDepthAttachmentDescriptor);
|
||||
RDMTL_DECLARE_REFLECTION_STRUCT(RenderPassStencilAttachmentDescriptor);
|
||||
RDMTL_DECLARE_REFLECTION_STRUCT(RenderPassSampleBufferAttachmentDescriptor);
|
||||
RDMTL_DECLARE_REFLECTION_STRUCT(RenderPassDescriptor);
|
||||
RDMTL_DECLARE_REFLECTION_STRUCT(ComputePassSampleBufferAttachmentDescriptor);
|
||||
|
||||
Reference in New Issue
Block a user