@@ -17,7 +17,8 @@ static const TextureDesc& NRI_CALL GetTextureDesc(const Texture& texture) {
1717}
1818
1919static FormatSupportBits NRI_CALL GetFormatSupport (const Device& device, Format format) {
20- return ((const DeviceDesc&)device).GetFormatSupport (format);
20+ return (FormatSupportBits)0 ;
21+ // return ((const DeviceDesc&)device).GetFormatSupport(format);
2122}
2223
2324static void NRI_CALL GetBufferMemoryDesc (const Device& device, const BufferDesc& bufferDesc, MemoryLocation memoryLocation, MemoryDesc& memoryDesc) {
@@ -45,18 +46,16 @@ static Result NRI_CALL CreateCommandAllocator(const CommandQueue& commandQueue,
4546}
4647
4748static Result NRI_CALL CreateDescriptorPool (Device& device, const DescriptorPoolDesc& descriptorPoolDesc, DescriptorPool*& descriptorPool) {
48- // return ((DeviceMTL&)device).CreateImplementation<DescriptorPoolD3D12 >(descriptorPool, descriptorPoolDesc);
49+ // return ((DeviceMTL&)device).CreateImplementation<DescriptorPoolMTL >(descriptorPool, descriptorPoolDesc);
4950 return Result::SUCCESS;
5051}
5152
5253static Result NRI_CALL CreateBuffer (Device& device, const BufferDesc& bufferDesc, Buffer*& buffer) {
53- // return ((DeviceMTL&)device).CreateImplementation<BufferD3D12>(buffer, bufferDesc);
54- return Result::SUCCESS;
54+ return ((DeviceMTL&)device).CreateImplementation <BufferMTL>(buffer, bufferDesc);
5555}
5656
5757static Result NRI_CALL CreateTexture (Device& device, const TextureDesc& textureDesc, Texture*& texture) {
58- // return ((DeviceMTL&)device).CreateImplementation<TextureD3D12>(texture, textureDesc);
59- return Result::SUCCESS;
58+ return ((DeviceMTL&)device).CreateImplementation <TextureMTL>(texture, textureDesc);
6059}
6160
6261static Result NRI_CALL CreateBufferView (const BufferViewDesc& bufferViewDesc, Descriptor*& bufferView) {
@@ -65,7 +64,12 @@ static Result NRI_CALL CreateBufferView(const BufferViewDesc& bufferViewDesc, De
6564 return Result::SUCCESS;
6665}
6766
67+
6868static Result NRI_CALL CreateTexture1DView (const Texture1DViewDesc& textureViewDesc, Descriptor*& textureView) {
69+ // DeviceMTL& device = ((const TextureMTL*)textureViewDesc.texture)->GetDevice();
70+ // return device.CreateImplementation<DescriptorMTL>(textureView, textureViewDesc);
71+
72+
6973 // DeviceMTL& device = ((const TextureD3D12*)textureViewDesc.texture)->GetDevice();
7074 // return device.CreateImplementation<DescriptorD3D12>(textureView, textureViewDesc);
7175 return Result::SUCCESS;
@@ -150,7 +154,7 @@ static void NRI_CALL DestroyQueryPool(QueryPool& queryPool) {
150154}
151155
152156static void NRI_CALL DestroyFence (Fence& fence) {
153- // Destroy((FenceD3D12 *)&fence);
157+ Destroy ((FenceMTL *)&fence);
154158}
155159
156160static Result NRI_CALL AllocateMemory (Device& device, const AllocateMemoryDesc& allocateMemoryDesc, Memory*& memory) {
@@ -191,12 +195,12 @@ static void NRI_CALL SetMemoryDebugName(Memory& memory, const char* name) {
191195static void * NRI_CALL GetDeviceNativeObject (const Device& device) {
192196 if (!(&device))
193197 return nullptr ;
194- return (MTLDevice*) ((DeviceMTL&)device);
198+ return (DeviceMTL*)& ((DeviceMTL&)device);
195199
196200 // return ((DeviceMetal&)device).GetNativeObject();
197201}
198202
199- Result DeviceMetal ::FillFunctionTable (CoreInterface& table) const {
203+ Result DeviceMTL ::FillFunctionTable (CoreInterface& table) const {
200204 table = {};
201205 Core_Device_PartiallyFillFunctionTableMTL (table);
202206 Core_Buffer_PartiallyFillFunctionTableMTL (table);
@@ -214,44 +218,44 @@ Result DeviceMetal::FillFunctionTable(CoreInterface& table) const {
214218
215219#pragma endregion
216220
217- Result DeviceMetal ::FillFunctionTable (HelperInterface& table) const {
221+ Result DeviceMTL ::FillFunctionTable (HelperInterface& table) const {
218222 table = {};
219- return ResVult ::UNSUPPORTED;
223+ return Result ::UNSUPPORTED;
220224}
221225
222- Result DeviceMetal ::FillFunctionTable (LowLatencyInterface& table) const {
226+ Result DeviceMTL ::FillFunctionTable (LowLatencyInterface& table) const {
223227 table = {};
224- return ResVult ::UNSUPPORTED;
228+ return Result ::UNSUPPORTED;
225229}
226230
227- Result DeviceMetal ::FillFunctionTable (MeshShaderInterface& table) const {
228- table = {};
229- return ResVult ::UNSUPPORTED;
230- }
231+ // Result DeviceMTL ::FillFunctionTable(MeshShaderInterface& table) const {
232+ // table = {};
233+ // return Result ::UNSUPPORTED;
234+ // }
231235
232- Result DeviceMetal ::FillFunctionTable (RayTracingInterface& table) const {
236+ Result DeviceMTL ::FillFunctionTable (RayTracingInterface& table) const {
233237 table = {};
234- return ResVult ::UNSUPPORTED;
238+ return Result ::UNSUPPORTED;
235239}
236240
237- Result DeviceMetal ::FillFunctionTable (StreamerInterface& table) const {
241+ Result DeviceMTL ::FillFunctionTable (StreamerInterface& table) const {
238242 table = {};
239- return ResVult ::UNSUPPORTED;
243+ return Result ::UNSUPPORTED;
240244}
241245
242- Result DeviceMetal ::FillFunctionTable (SwapChainInterface& table) const {
246+ Result DeviceMTL ::FillFunctionTable (SwapChainInterface& table) const {
243247 table = {};
244- return ResVult ::UNSUPPORTED;
248+ return Result ::UNSUPPORTED;
245249}
246250
247- Result DeviceMetal ::FillFunctionTable (ResourceAllocatorInterface& table) const {
251+ Result DeviceMTL ::FillFunctionTable (ResourceAllocatorInterface& table) const {
248252 table = {};
249- return ResVult ::UNSUPPORTED;
253+ return Result ::UNSUPPORTED;
250254}
251255
252256Define_Core_Device_PartiallyFillFunctionTable (MTL);
253- Define_Helper_Device_PartiallyFillFunctionTable (MTL);
254- Define_RayTracing_Device_PartiallyFillFunctionTable (MTL);
255- Define_Streamer_Device_PartiallyFillFunctionTable (MTL);
256- Define_SwapChain_Device_PartiallyFillFunctionTable (MTL);
257- Define_ResourceAllocator_Device_PartiallyFillFunctionTable (MTL);
257+ // Define_Helper_Device_PartiallyFillFunctionTable(MTL);
258+ // Define_RayTracing_Device_PartiallyFillFunctionTable(MTL);
259+ // Define_Streamer_Device_PartiallyFillFunctionTable(MTL);
260+ // Define_SwapChain_Device_PartiallyFillFunctionTable(MTL);
261+ // Define_ResourceAllocator_Device_PartiallyFillFunctionTable(MTL);
0 commit comments