Skip to content

Commit

Permalink
fix compiling errors
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Pollind <[email protected]>
  • Loading branch information
pollend committed Sep 5, 2024
1 parent e7dbc7e commit 51a6f96
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 36 deletions.
34 changes: 8 additions & 26 deletions Include/Extensions/NRIWrapperMTL.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

13 changes: 3 additions & 10 deletions Include/NRIDescs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 51a6f96

Please sign in to comment.