From 51a6f96a17ec61313064b96443b11a4f8d60fa04 Mon Sep 17 00:00:00 2001 From: Michael Pollind Date: Wed, 4 Sep 2024 21:59:30 -0700 Subject: [PATCH] fix compiling errors Signed-off-by: Michael Pollind --- Include/Extensions/NRIWrapperMTL.h | 34 +++++++----------------------- Include/NRIDescs.h | 13 +++--------- 2 files changed, 11 insertions(+), 36 deletions(-) diff --git a/Include/Extensions/NRIWrapperMTL.h b/Include/Extensions/NRIWrapperMTL.h index 96a8fc0c..3425a15e 100644 --- a/Include/Extensions/NRIWrapperMTL.h +++ b/Include/Extensions/NRIWrapperMTL.h @@ -4,62 +4,44 @@ #include "NRIDeviceCreation.h" -NRI_NAMESPACE_BEGIN - +NriNamespaceBegin typedef void* MTLBufferHandle; typedef void* MTLTextureHandle; typedef void* MTLDeviceHandle; -//NRI_ENUM -//( -// MTLGPUFamily, uint8_t, - - // Apple1, -// Apple2, -// Apple3, -// Apple4, -// Apple5, -// Apple6, -// Apple7, -// Mac1, -// Mac2, - -// MAX_APPLE_FAMILY_NUM -//); - -NRI_STRUCT(DeviceCreationMTLDesc) +NriStruct(DeviceCreationMTLDesc) { bool enableNRIValidation; MTLDeviceHandle MtlDevice; }; -NRI_STRUCT(CommandBufferMTLDesc) +NriStruct(CommandBufferMTLDesc) { }; -NRI_STRUCT(BufferMTLDesc) +NriStruct(BufferMTLDesc) { MTLBufferHandle buffer; void* mappedMemory; //MTLResourceOptions options; }; -NRI_STRUCT(TextureMTLDesc) +NriStruct(TextureMTLDesc) { //MTLTextureHandle mtlTexture; //MTLTextureDescriptor* descriptor; }; -NRI_STRUCT(MemoryMTLDesc) +NriStruct(MemoryMTLDesc) { MTLBufferHandle buffer; void* mappedMemory; //MTLResourceOptions options; }; -NRI_API NRI_NAME(Result) NRI_CALL nriCreateDeviceFromMtlDevice(const NRI_NAME_REF(DeviceCreationMTLDesc) deviceDesc, NRI_NAME_REF(Device*) device); +NRI_API Nri(Result) NRI_CALL nriCreateDeviceFromMtlDevice(const NriRef(DeviceCreationMTLDesc) deviceDesc, NriRef(Device*) device); -NRI_NAMESPACE_END +NriNamespaceEnd diff --git a/Include/NRIDescs.h b/Include/NRIDescs.h index 51420551..5018db5a 100644 --- a/Include/NRIDescs.h +++ b/Include/NRIDescs.h @@ -1211,26 +1211,19 @@ NriEnum(GraphicsAPI, uint8_t, D3D11, D3D12, VK, - MTL, - - MAX_NUM + MTL ); // defined in apple framework #undef INTEL #undef AMD -NRI_ENUM -( - - Vendor, uint8_t, +NriEnum(Vendor, uint8_t, UNKNOWN, NVIDIA, AMD, INTEL, - APPLE, - - MAX_NUM + APPLE ); NriStruct(AdapterDesc) {