git.s-ol.nu forks/DiligentCore / 5e9b0dd
Reworked C inteface method calls to use CALL_IFACE_METHOD macro assiduous 3 years ago
65 changed file(s) with 244 addition(s) and 247 deletion(s). Raw diff Collapse all Expand all
257257
258258 # define IBuffer_GetDesc(This) (const struct BufferDesc*)IDeviceObject_GetDesc(This)
259259
260 # define IBuffer_CreateView(This, ...) (This)->pVtbl->Buffer.CreateView ((IBuffer*)(This), __VA_ARGS__)
261 # define IBuffer_GetDefaultView(This, ...) (This)->pVtbl->Buffer.GetDefaultView ((IBuffer*)(This), __VA_ARGS__)
262 # define IBuffer_GetNativeHandle(This) (This)->pVtbl->Buffer.GetNativeHandle((IBuffer*)(This))
263 # define IBuffer_SetState(This, ...) (This)->pVtbl->Buffer.SetState ((IBuffer*)(This), __VA_ARGS__)
264 # define IBuffer_GetState(This) (This)->pVtbl->Buffer.GetState ((IBuffer*)(This))
260 # define IBuffer_CreateView(This, ...) CALL_IFACE_METHOD(Buffer, CreateView, This, __VA_ARGS__)
261 # define IBuffer_GetDefaultView(This, ...) CALL_IFACE_METHOD(Buffer, GetDefaultView, This, __VA_ARGS__)
262 # define IBuffer_GetNativeHandle(This) CALL_IFACE_METHOD(Buffer, GetNativeHandle, This)
263 # define IBuffer_SetState(This, ...) CALL_IFACE_METHOD(Buffer, SetState, This, __VA_ARGS__)
264 # define IBuffer_GetState(This) CALL_IFACE_METHOD(Buffer, GetState, This)
265265
266266 // clang-format on
267267
183183
184184 # define IBufferView_GetDesc(This) (const struct BufferViewDesc*)IDeviceObject_GetDesc(This)
185185
186 # define IBufferView_GetBuffer(This) (This)->pVtbl->BufferView.GetBuffer((IBufferView*)(This))
186 # define IBufferView_GetBuffer(This) CALL_IFACE_METHOD(BufferView, GetBuffer, This)
187187
188188 // clang-format on
189189
13321332
13331333 // clang-format off
13341334
1335 # define IDeviceContext_SetPipelineState(This, ...) (This)->pVtbl->DeviceContext.SetPipelineState ((IDeviceContext*)(This), __VA_ARGS__)
1336 # define IDeviceContext_TransitionShaderResources(This, ...) (This)->pVtbl->DeviceContext.TransitionShaderResources ((IDeviceContext*)(This), __VA_ARGS__)
1337 # define IDeviceContext_CommitShaderResources(This, ...) (This)->pVtbl->DeviceContext.CommitShaderResources ((IDeviceContext*)(This), __VA_ARGS__)
1338 # define IDeviceContext_SetStencilRef(This, ...) (This)->pVtbl->DeviceContext.SetStencilRef ((IDeviceContext*)(This), __VA_ARGS__)
1339 # define IDeviceContext_SetBlendFactors(This, ...) (This)->pVtbl->DeviceContext.SetBlendFactors ((IDeviceContext*)(This), __VA_ARGS__)
1340 # define IDeviceContext_SetVertexBuffers(This, ...) (This)->pVtbl->DeviceContext.SetVertexBuffers ((IDeviceContext*)(This), __VA_ARGS__)
1341 # define IDeviceContext_InvalidateState(This) (This)->pVtbl->DeviceContext.InvalidateState ((IDeviceContext*)(This))
1342 # define IDeviceContext_SetIndexBuffer(This, ...) (This)->pVtbl->DeviceContext.SetIndexBuffer ((IDeviceContext*)(This), __VA_ARGS__)
1343 # define IDeviceContext_SetViewports(This, ...) (This)->pVtbl->DeviceContext.SetViewports ((IDeviceContext*)(This), __VA_ARGS__)
1344 # define IDeviceContext_SetScissorRects(This, ...) (This)->pVtbl->DeviceContext.SetScissorRects ((IDeviceContext*)(This), __VA_ARGS__)
1345 # define IDeviceContext_SetRenderTargets(This, ...) (This)->pVtbl->DeviceContext.SetRenderTargets ((IDeviceContext*)(This), __VA_ARGS__)
1346 # define IDeviceContext_Draw(This, ...) (This)->pVtbl->DeviceContext.Draw ((IDeviceContext*)(This), __VA_ARGS__)
1347 # define IDeviceContext_DrawIndexed(This, ...) (This)->pVtbl->DeviceContext.DrawIndexed ((IDeviceContext*)(This), __VA_ARGS__)
1348 # define IDeviceContext_DrawIndirect(This, ...) (This)->pVtbl->DeviceContext.DrawIndirect ((IDeviceContext*)(This), __VA_ARGS__)
1349 # define IDeviceContext_DrawIndexedIndirect(This, ...) (This)->pVtbl->DeviceContext.DrawIndexedIndirect ((IDeviceContext*)(This), __VA_ARGS__)
1350 # define IDeviceContext_DispatchCompute(This, ...) (This)->pVtbl->DeviceContext.DispatchCompute ((IDeviceContext*)(This), __VA_ARGS__)
1351 # define IDeviceContext_DispatchComputeIndirect(This, ...) (This)->pVtbl->DeviceContext.DispatchComputeIndirect ((IDeviceContext*)(This), __VA_ARGS__)
1352 # define IDeviceContext_ClearDepthStencil(This, ...) (This)->pVtbl->DeviceContext.ClearDepthStencil ((IDeviceContext*)(This), __VA_ARGS__)
1353 # define IDeviceContext_ClearRenderTarget(This, ...) (This)->pVtbl->DeviceContext.ClearRenderTarget ((IDeviceContext*)(This), __VA_ARGS__)
1354 # define IDeviceContext_FinishCommandList(This, ...) (This)->pVtbl->DeviceContext.FinishCommandList ((IDeviceContext*)(This), __VA_ARGS__)
1355 # define IDeviceContext_ExecuteCommandList(This, ...) (This)->pVtbl->DeviceContext.ExecuteCommandList ((IDeviceContext*)(This), __VA_ARGS__)
1356 # define IDeviceContext_SignalFence(This, ...) (This)->pVtbl->DeviceContext.SignalFence ((IDeviceContext*)(This), __VA_ARGS__)
1357 # define IDeviceContext_WaitForFence(This, ...) (This)->pVtbl->DeviceContext.WaitForFence ((IDeviceContext*)(This), __VA_ARGS__)
1358 # define IDeviceContext_WaitForIdle(This, ...) (This)->pVtbl->DeviceContext.WaitForIdle ((IDeviceContext*)(This), __VA_ARGS__)
1359 # define IDeviceContext_BeginQuery(This, ...) (This)->pVtbl->DeviceContext.BeginQuery ((IDeviceContext*)(This), __VA_ARGS__)
1360 # define IDeviceContext_EndQuery(This, ...) (This)->pVtbl->DeviceContext.EndQuery ((IDeviceContext*)(This), __VA_ARGS__)
1361 # define IDeviceContext_Flush(This, ...) (This)->pVtbl->DeviceContext.Flush ((IDeviceContext*)(This), __VA_ARGS__)
1362 # define IDeviceContext_UpdateBuffer(This, ...) (This)->pVtbl->DeviceContext.UpdateBuffer ((IDeviceContext*)(This), __VA_ARGS__)
1363 # define IDeviceContext_CopyBuffer(This, ...) (This)->pVtbl->DeviceContext.CopyBuffer ((IDeviceContext*)(This), __VA_ARGS__)
1364 # define IDeviceContext_MapBuffer(This, ...) (This)->pVtbl->DeviceContext.MapBuffer ((IDeviceContext*)(This), __VA_ARGS__)
1365 # define IDeviceContext_UnmapBuffer(This, ...) (This)->pVtbl->DeviceContext.UnmapBuffer ((IDeviceContext*)(This), __VA_ARGS__)
1366 # define IDeviceContext_UpdateTexture(This, ...) (This)->pVtbl->DeviceContext.UpdateTexture ((IDeviceContext*)(This), __VA_ARGS__)
1367 # define IDeviceContext_CopyTexture(This, ...) (This)->pVtbl->DeviceContext.CopyTexture ((IDeviceContext*)(This), __VA_ARGS__)
1368 # define IDeviceContext_MapTextureSubresource(This, ...) (This)->pVtbl->DeviceContext.MapTextureSubresource ((IDeviceContext*)(This), __VA_ARGS__)
1369 # define IDeviceContext_UnmapTextureSubresource(This, ...) (This)->pVtbl->DeviceContext.UnmapTextureSubresource ((IDeviceContext*)(This), __VA_ARGS__)
1370 # define IDeviceContext_GenerateMips(This, ...) (This)->pVtbl->DeviceContext.GenerateMips ((IDeviceContext*)(This), __VA_ARGS__)
1371 # define IDeviceContext_FinishFrame(This) (This)->pVtbl->DeviceContext.FinishFrame ((IDeviceContext*)(This))
1372 # define IDeviceContext_TransitionResourceStates(This, ...) (This)->pVtbl->DeviceContext.TransitionResourceStates ((IDeviceContext*)(This), __VA_ARGS__)
1373 # define IDeviceContext_ResolveTextureSubresource(This, ...) (This)->pVtbl->DeviceContext.ResolveTextureSubresource ((IDeviceContext*)(This), __VA_ARGS__)
1335 # define IDeviceContext_SetPipelineState(This, ...) CALL_IFACE_METHOD(DeviceContext, SetPipelineState, This, __VA_ARGS__)
1336 # define IDeviceContext_TransitionShaderResources(This, ...) CALL_IFACE_METHOD(DeviceContext, TransitionShaderResources, This, __VA_ARGS__)
1337 # define IDeviceContext_CommitShaderResources(This, ...) CALL_IFACE_METHOD(DeviceContext, CommitShaderResources, This, __VA_ARGS__)
1338 # define IDeviceContext_SetStencilRef(This, ...) CALL_IFACE_METHOD(DeviceContext, SetStencilRef, This, __VA_ARGS__)
1339 # define IDeviceContext_SetBlendFactors(This, ...) CALL_IFACE_METHOD(DeviceContext, SetBlendFactors, This, __VA_ARGS__)
1340 # define IDeviceContext_SetVertexBuffers(This, ...) CALL_IFACE_METHOD(DeviceContext, SetVertexBuffers, This, __VA_ARGS__)
1341 # define IDeviceContext_InvalidateState(This) CALL_IFACE_METHOD(DeviceContext, InvalidateState, This)
1342 # define IDeviceContext_SetIndexBuffer(This, ...) CALL_IFACE_METHOD(DeviceContext, SetIndexBuffer, This, __VA_ARGS__)
1343 # define IDeviceContext_SetViewports(This, ...) CALL_IFACE_METHOD(DeviceContext, SetViewports, This, __VA_ARGS__)
1344 # define IDeviceContext_SetScissorRects(This, ...) CALL_IFACE_METHOD(DeviceContext, SetScissorRects, This, __VA_ARGS__)
1345 # define IDeviceContext_SetRenderTargets(This, ...) CALL_IFACE_METHOD(DeviceContext, SetRenderTargets, This, __VA_ARGS__)
1346 # define IDeviceContext_Draw(This, ...) CALL_IFACE_METHOD(DeviceContext, Draw, This, __VA_ARGS__)
1347 # define IDeviceContext_DrawIndexed(This, ...) CALL_IFACE_METHOD(DeviceContext, DrawIndexed, This, __VA_ARGS__)
1348 # define IDeviceContext_DrawIndirect(This, ...) CALL_IFACE_METHOD(DeviceContext, DrawIndirect, This, __VA_ARGS__)
1349 # define IDeviceContext_DrawIndexedIndirect(This, ...) CALL_IFACE_METHOD(DeviceContext, DrawIndexedIndirect, This, __VA_ARGS__)
1350 # define IDeviceContext_DispatchCompute(This, ...) CALL_IFACE_METHOD(DeviceContext, DispatchCompute, This, __VA_ARGS__)
1351 # define IDeviceContext_DispatchComputeIndirect(This, ...) CALL_IFACE_METHOD(DeviceContext, DispatchComputeIndirect, This, __VA_ARGS__)
1352 # define IDeviceContext_ClearDepthStencil(This, ...) CALL_IFACE_METHOD(DeviceContext, ClearDepthStencil, This, __VA_ARGS__)
1353 # define IDeviceContext_ClearRenderTarget(This, ...) CALL_IFACE_METHOD(DeviceContext, ClearRenderTarget, This, __VA_ARGS__)
1354 # define IDeviceContext_FinishCommandList(This, ...) CALL_IFACE_METHOD(DeviceContext, FinishCommandList, This, __VA_ARGS__)
1355 # define IDeviceContext_ExecuteCommandList(This, ...) CALL_IFACE_METHOD(DeviceContext, ExecuteCommandList, This, __VA_ARGS__)
1356 # define IDeviceContext_SignalFence(This, ...) CALL_IFACE_METHOD(DeviceContext, SignalFence, This, __VA_ARGS__)
1357 # define IDeviceContext_WaitForFence(This, ...) CALL_IFACE_METHOD(DeviceContext, WaitForFence, This, __VA_ARGS__)
1358 # define IDeviceContext_WaitForIdle(This, ...) CALL_IFACE_METHOD(DeviceContext, WaitForIdle, This, __VA_ARGS__)
1359 # define IDeviceContext_BeginQuery(This, ...) CALL_IFACE_METHOD(DeviceContext, BeginQuery, This, __VA_ARGS__)
1360 # define IDeviceContext_EndQuery(This, ...) CALL_IFACE_METHOD(DeviceContext, EndQuery, This, __VA_ARGS__)
1361 # define IDeviceContext_Flush(This, ...) CALL_IFACE_METHOD(DeviceContext, Flush, This, __VA_ARGS__)
1362 # define IDeviceContext_UpdateBuffer(This, ...) CALL_IFACE_METHOD(DeviceContext, UpdateBuffer, This, __VA_ARGS__)
1363 # define IDeviceContext_CopyBuffer(This, ...) CALL_IFACE_METHOD(DeviceContext, CopyBuffer, This, __VA_ARGS__)
1364 # define IDeviceContext_MapBuffer(This, ...) CALL_IFACE_METHOD(DeviceContext, MapBuffer, This, __VA_ARGS__)
1365 # define IDeviceContext_UnmapBuffer(This, ...) CALL_IFACE_METHOD(DeviceContext, UnmapBuffer, This, __VA_ARGS__)
1366 # define IDeviceContext_UpdateTexture(This, ...) CALL_IFACE_METHOD(DeviceContext, UpdateTexture, This, __VA_ARGS__)
1367 # define IDeviceContext_CopyTexture(This, ...) CALL_IFACE_METHOD(DeviceContext, CopyTexture, This, __VA_ARGS__)
1368 # define IDeviceContext_MapTextureSubresource(This, ...) CALL_IFACE_METHOD(DeviceContext, MapTextureSubresource, This, __VA_ARGS__)
1369 # define IDeviceContext_UnmapTextureSubresource(This, ...) CALL_IFACE_METHOD(DeviceContext, UnmapTextureSubresource, This, __VA_ARGS__)
1370 # define IDeviceContext_GenerateMips(This, ...) CALL_IFACE_METHOD(DeviceContext, GenerateMips, This, __VA_ARGS__)
1371 # define IDeviceContext_FinishFrame(This) CALL_IFACE_METHOD(DeviceContext, FinishFrame, This)
1372 # define IDeviceContext_TransitionResourceStates(This, ...) CALL_IFACE_METHOD(DeviceContext, TransitionResourceStates, This, __VA_ARGS__)
1373 # define IDeviceContext_ResolveTextureSubresource(This, ...) CALL_IFACE_METHOD(DeviceContext, ResolveTextureSubresource, This, __VA_ARGS__)
13741374
13751375 // clang-format on
13761376
8787
8888 // clang-format off
8989
90 # define IDeviceObject_GetDesc(This) (This)->pVtbl->DeviceObject.GetDesc ((IDeviceObject*)(This))
91 # define IDeviceObject_GetUniqueID(This) (This)->pVtbl->DeviceObject.GetUniqueID((IDeviceObject*)(This))
90 # define IDeviceObject_GetDesc(This) CALL_IFACE_METHOD(DeviceObject, GetDesc, This)
91 # define IDeviceObject_GetUniqueID(This) CALL_IFACE_METHOD(DeviceObject, GetUniqueID, This)
9292
9393 // clang-format on
9494
9090
9191 // clang-format off
9292
93 # define IEngineFactory_GetAPIInfo(This) (This)->pVtbl->EngineFactory.GetAPIInfo ((IEngineFactory*)(This))
94 # define IEngineFactory_CreateDefaultShaderSourceStreamFactory(This, ...) (This)->pVtbl->EngineFactory.CreateDefaultShaderSourceStreamFactory((IEngineFactory*)(This), __VA_ARGS__)
95 # define IEngineFactory_InitAndroidFileSystem(This, ...) (This)->pVtbl->EngineFactory.InitAndroidFileSystem ((IEngineFactory*)(This), __VA_ARGS__)
93 # define IEngineFactory_GetAPIInfo(This) CALL_IFACE_METHOD(EngineFactory, GetAPIInfo, This)
94 # define IEngineFactory_CreateDefaultShaderSourceStreamFactory(This, ...) CALL_IFACE_METHOD(EngineFactory, CreateDefaultShaderSourceStreamFactory, This, __VA_ARGS__)
95 # define IEngineFactory_InitAndroidFileSystem(This, ...) CALL_IFACE_METHOD(EngineFactory, InitAndroidFileSystem, This, __VA_ARGS__)
9696
9797 // clang-format on
9898
9696
9797 # define IFence_GetDesc(This) (const struct FenceDesc*)IDeviceObject_GetDesc(This)
9898
99 # define IFence_GetCompletedValue(This) (This)->pVtbl->Fence.GetCompletedValue((IFence*)(This))
100 # define IFence_Reset(This, ...) (This)->pVtbl->Fence.Reset ((IFence*)(This), __VA_ARGS__)
99 # define IFence_GetCompletedValue(This) CALL_IFACE_METHOD(Fence, GetCompletedValue, This)
100 # define IFence_Reset(This, ...) CALL_IFACE_METHOD(Fence, Reset, This, __VA_ARGS__)
101101
102102 // clang-format on
103103
368368
369369 # define IPipelineState_GetDesc(This) (const struct PipelineStateDesc*)IDeviceObject_GetDesc(This)
370370
371 # define IPipelineState_BindStaticResources(This, ...) (This)->pVtbl->PipelineState.BindStaticResources ((IPipelineState*)(This), __VA_ARGS__)
372 # define IPipelineState_GetStaticVariableCount(This, ...) (This)->pVtbl->PipelineState.GetStaticVariableCount ((IPipelineState*)(This), __VA_ARGS__)
373 # define IPipelineState_GetStaticVariableByName(This, ...) (This)->pVtbl->PipelineState.GetStaticVariableByName ((IPipelineState*)(This), __VA_ARGS__)
374 # define IPipelineState_GetStaticVariableByIndex(This, ...) (This)->pVtbl->PipelineState.GetStaticVariableByIndex ((IPipelineState*)(This), __VA_ARGS__)
375 # define IPipelineState_CreateShaderResourceBinding(This, ...) (This)->pVtbl->PipelineState.CreateShaderResourceBinding((IPipelineState*)(This), __VA_ARGS__)
376 # define IPipelineState_IsCompatibleWith(This, ...) (This)->pVtbl->PipelineState.IsCompatibleWith ((IPipelineState*)(This), __VA_ARGS__)
371 # define IPipelineState_BindStaticResources(This, ...) CALL_IFACE_METHOD(PipelineState, BindStaticResources, This, __VA_ARGS__)
372 # define IPipelineState_GetStaticVariableCount(This, ...) CALL_IFACE_METHOD(PipelineState, GetStaticVariableCount, This, __VA_ARGS__)
373 # define IPipelineState_GetStaticVariableByName(This, ...) CALL_IFACE_METHOD(PipelineState, GetStaticVariableByName, This, __VA_ARGS__)
374 # define IPipelineState_GetStaticVariableByIndex(This, ...) CALL_IFACE_METHOD(PipelineState, GetStaticVariableByIndex, This, __VA_ARGS__)
375 # define IPipelineState_CreateShaderResourceBinding(This, ...) CALL_IFACE_METHOD(PipelineState, CreateShaderResourceBinding, This, __VA_ARGS__)
376 # define IPipelineState_IsCompatibleWith(This, ...) CALL_IFACE_METHOD(PipelineState, IsCompatibleWith, This, __VA_ARGS__)
377377
378378 // clang-format on
379379
238238
239239 # define IQuery_GetDesc(This) (const struct QueryDesc*)IDeviceObject_GetDesc(This)
240240
241 # define IQuery_GetData(This, ...) (This)->pVtbl->Query.GetData ((IQuery*)(This), __VA_ARGS__)
242 # define IQuery_Invalidate(This) (This)->pVtbl->Query.Invalidate((IQuery*)(This))
241 # define IQuery_GetData(This, ...) CALL_IFACE_METHOD(Query, GetData, This, __VA_ARGS__)
242 # define IQuery_Invalidate(This) CALL_IFACE_METHOD(Query, Invalidate, This)
243243
244244 // clang-format on
245245
255255
256256 // clang-format off
257257
258 # define IRenderDevice_CreateBuffer(This, ...) (This)->pVtbl->RenderDevice.CreateBuffer ((IRenderDevice*)(This), __VA_ARGS__)
259 # define IRenderDevice_CreateShader(This, ...) (This)->pVtbl->RenderDevice.CreateShader ((IRenderDevice*)(This), __VA_ARGS__)
260 # define IRenderDevice_CreateTexture(This, ...) (This)->pVtbl->RenderDevice.CreateTexture ((IRenderDevice*)(This), __VA_ARGS__)
261 # define IRenderDevice_CreateSampler(This, ...) (This)->pVtbl->RenderDevice.CreateSampler ((IRenderDevice*)(This), __VA_ARGS__)
262 # define IRenderDevice_CreateResourceMapping(This, ...) (This)->pVtbl->RenderDevice.CreateResourceMapping ((IRenderDevice*)(This), __VA_ARGS__)
263 # define IRenderDevice_CreatePipelineState(This, ...) (This)->pVtbl->RenderDevice.CreatePipelineState ((IRenderDevice*)(This), __VA_ARGS__)
264 # define IRenderDevice_CreateFence(This, ...) (This)->pVtbl->RenderDevice.CreateFence ((IRenderDevice*)(This), __VA_ARGS__)
265 # define IRenderDevice_CreateQuery(This, ...) (This)->pVtbl->RenderDevice.CreateQuery ((IRenderDevice*)(This), __VA_ARGS__)
266 # define IRenderDevice_GetDeviceCaps(This) (This)->pVtbl->RenderDevice.GetDeviceCaps ((IRenderDevice*)(This))
267 # define IRenderDevice_GetTextureFormatInfo(This, ...) (This)->pVtbl->RenderDevice.GetTextureFormatInfo ((IRenderDevice*)(This), __VA_ARGS__)
268 # define IRenderDevice_GetTextureFormatInfoExt(This, ...) (This)->pVtbl->RenderDevice.GetTextureFormatInfoExt((IRenderDevice*)(This), __VA_ARGS__)
269 # define IRenderDevice_ReleaseStaleResources(This, ...) (This)->pVtbl->RenderDevice.ReleaseStaleResources ((IRenderDevice*)(This), __VA_ARGS__)
270 # define IRenderDevice_IdleGPU(This) (This)->pVtbl->RenderDevice.IdleGPU ((IRenderDevice*)(This))
271 # define IRenderDevice_GetEngineFactory(This) (This)->pVtbl->RenderDevice.GetEngineFactory ((IRenderDevice*)(This))
258 # define IRenderDevice_CreateBuffer(This, ...) CALL_IFACE_METHOD(RenderDevice, CreateBuffer, This, __VA_ARGS__)
259 # define IRenderDevice_CreateShader(This, ...) CALL_IFACE_METHOD(RenderDevice, CreateShader, This, __VA_ARGS__)
260 # define IRenderDevice_CreateTexture(This, ...) CALL_IFACE_METHOD(RenderDevice, CreateTexture, This, __VA_ARGS__)
261 # define IRenderDevice_CreateSampler(This, ...) CALL_IFACE_METHOD(RenderDevice, CreateSampler, This, __VA_ARGS__)
262 # define IRenderDevice_CreateResourceMapping(This, ...) CALL_IFACE_METHOD(RenderDevice, CreateResourceMapping, This, __VA_ARGS__)
263 # define IRenderDevice_CreatePipelineState(This, ...) CALL_IFACE_METHOD(RenderDevice, CreatePipelineState, This, __VA_ARGS__)
264 # define IRenderDevice_CreateFence(This, ...) CALL_IFACE_METHOD(RenderDevice, CreateFence, This, __VA_ARGS__)
265 # define IRenderDevice_CreateQuery(This, ...) CALL_IFACE_METHOD(RenderDevice, CreateQuery, This, __VA_ARGS__)
266 # define IRenderDevice_GetDeviceCaps(This) CALL_IFACE_METHOD(RenderDevice, GetDeviceCaps, This)
267 # define IRenderDevice_GetTextureFormatInfo(This, ...) CALL_IFACE_METHOD(RenderDevice, GetTextureFormatInfo, This, __VA_ARGS__)
268 # define IRenderDevice_GetTextureFormatInfoExt(This, ...) CALL_IFACE_METHOD(RenderDevice, GetTextureFormatInfoExt,This, __VA_ARGS__)
269 # define IRenderDevice_ReleaseStaleResources(This, ...) CALL_IFACE_METHOD(RenderDevice, ReleaseStaleResources, This, __VA_ARGS__)
270 # define IRenderDevice_IdleGPU(This) CALL_IFACE_METHOD(RenderDevice, IdleGPU, This)
271 # define IRenderDevice_GetEngineFactory(This) CALL_IFACE_METHOD(RenderDevice, GetEngineFactory, This)
272272
273273 // clang-format on
274274
183183
184184 // clang-format off
185185
186 # define IResourceMapping_AddResource(This, ...) (This)->pVtbl->ResourceMapping.AddResource ((IResourceMapping*)(This), __VA_ARGS__)
187 # define IResourceMapping_AddResourceArray(This, ...) (This)->pVtbl->ResourceMapping.AddResourceArray ((IResourceMapping*)(This), __VA_ARGS__)
188 # define IResourceMapping_RemoveResourceByName(This, ...) (This)->pVtbl->ResourceMapping.RemoveResourceByName((IResourceMapping*)(This), __VA_ARGS__)
189 # define IResourceMapping_GetResource(This, ...) (This)->pVtbl->ResourceMapping.GetResource ((IResourceMapping*)(This), __VA_ARGS__)
190 # define IResourceMapping_GetSize(This) (This)->pVtbl->ResourceMapping.GetSize ((IResourceMapping*)(This))
186 # define IResourceMapping_AddResource(This, ...) CALL_IFACE_METHOD(ResourceMapping, AddResource, This, __VA_ARGS__)
187 # define IResourceMapping_AddResourceArray(This, ...) CALL_IFACE_METHOD(ResourceMapping, AddResourceArray, This, __VA_ARGS__)
188 # define IResourceMapping_RemoveResourceByName(This, ...) CALL_IFACE_METHOD(ResourceMapping, RemoveResourceByName, This, __VA_ARGS__)
189 # define IResourceMapping_GetResource(This, ...) CALL_IFACE_METHOD(ResourceMapping, GetResource, This, __VA_ARGS__)
190 # define IResourceMapping_GetSize(This) CALL_IFACE_METHOD(ResourceMapping, GetSize, This)
191191
192192 // clang-format on
193193
114114 struct IShaderSourceInputStreamFactoryVtbl* pVtbl;
115115 } IShaderSourceInputStreamFactory;
116116
117 # define IShaderSourceInputStreamFactory_CreateInputStream(This, ...) (This)->pVtbl->ShaderSourceInputStreamFactory.CreateInputStream((IShaderSourceInputStreamFactory*)(This), __VA_ARGS__)
117 # define IShaderSourceInputStreamFactory_CreateInputStream(This, ...) CALL_IFACE_METHOD(ShaderSourceInputStreamFactory, CreateInputStream, This, __VA_ARGS__)
118118
119119 #endif
120120
360360
361361 # define IShader_GetDesc(This) (const struct ShaderDesc*)IDeviceObject_GetDesc(This)
362362
363 # define IShader_GetResourceCount(This) (This)->pVtbl->Shader.GetResourceCount((IShader*)(This))
364 # define IShader_GetResourceDesc(This, ...) (This)->pVtbl->Shader.GetResourceDesc ((IShader*)(This), __VA_ARGS__)
363 # define IShader_GetResourceCount(This) CALL_IFACE_METHOD(Shader, GetResourceCount, This)
364 # define IShader_GetResourceDesc(This, ...) CALL_IFACE_METHOD(Shader, GetResourceDesc, This, __VA_ARGS__)
365365
366366 // clang-format on
367367
146146
147147 // clang-format off
148148
149 # define IShaderResourceBinding_GetPipelineState(This) (This)->pVtbl->ShaderResourceBinding.GetPipelineState ((IShaderResourceBinding*)(This))
150 # define IShaderResourceBinding_BindResources(This, ...) (This)->pVtbl->ShaderResourceBinding.BindResources ((IShaderResourceBinding*)(This), __VA_ARGS__)
151 # define IShaderResourceBinding_GetVariableByName(This, ...) (This)->pVtbl->ShaderResourceBinding.GetVariableByName ((IShaderResourceBinding*)(This), __VA_ARGS__)
152 # define IShaderResourceBinding_GetVariableCount(This, ...) (This)->pVtbl->ShaderResourceBinding.GetVariableCount ((IShaderResourceBinding*)(This), __VA_ARGS__)
153 # define IShaderResourceBinding_GetVariableByIndex(This, ...) (This)->pVtbl->ShaderResourceBinding.GetVariableByIndex ((IShaderResourceBinding*)(This), __VA_ARGS__)
154 # define IShaderResourceBinding_InitializeStaticResources(This, ...) (This)->pVtbl->ShaderResourceBinding.InitializeStaticResources((IShaderResourceBinding*)(This), __VA_ARGS__)
149 # define IShaderResourceBinding_GetPipelineState(This) CALL_IFACE_METHOD(ShaderResourceBinding, GetPipelineState, This)
150 # define IShaderResourceBinding_BindResources(This, ...) CALL_IFACE_METHOD(ShaderResourceBinding, BindResources, This, __VA_ARGS__)
151 # define IShaderResourceBinding_GetVariableByName(This, ...) CALL_IFACE_METHOD(ShaderResourceBinding, GetVariableByName, This, __VA_ARGS__)
152 # define IShaderResourceBinding_GetVariableCount(This, ...) CALL_IFACE_METHOD(ShaderResourceBinding, GetVariableCount, This, __VA_ARGS__)
153 # define IShaderResourceBinding_GetVariableByIndex(This, ...) CALL_IFACE_METHOD(ShaderResourceBinding, GetVariableByIndex, This, __VA_ARGS__)
154 # define IShaderResourceBinding_InitializeStaticResources(This, ...) CALL_IFACE_METHOD(ShaderResourceBinding, InitializeStaticResources, This, __VA_ARGS__)
155155
156156 // clang-format on
157157
172172
173173 // clang-format off
174174
175 # define IShaderResourceVariable_Set(This, ...) (This)->pVtbl->ShaderResourceVariable.Set ((IShaderResourceVariable*)(This), __VA_ARGS__)
176 # define IShaderResourceVariable_SetArray(This, ...) (This)->pVtbl->ShaderResourceVariable.SetArray ((IShaderResourceVariable*)(This), __VA_ARGS__)
177 # define IShaderResourceVariable_GetType(This) (This)->pVtbl->ShaderResourceVariable.GetType ((IShaderResourceVariable*)(This))
178 # define IShaderResourceVariable_GetResourceDesc(This, ...) (This)->pVtbl->ShaderResourceVariable.GetResourceDesc((IShaderResourceVariable*)(This), __VA_ARGS__)
179 # define IShaderResourceVariable_GetIndex(This) (This)->pVtbl->ShaderResourceVariable.GetIndex ((IShaderResourceVariable*)(This))
180 # define IShaderResourceVariable_IsBound(This, ...) (This)->pVtbl->ShaderResourceVariable.IsBound ((IShaderResourceVariable*)(This), __VA_ARGS__)
175 # define IShaderResourceVariable_Set(This, ...) CALL_IFACE_METHOD(ShaderResourceVariable, Set, This, __VA_ARGS__)
176 # define IShaderResourceVariable_SetArray(This, ...) CALL_IFACE_METHOD(ShaderResourceVariable, SetArray, This, __VA_ARGS__)
177 # define IShaderResourceVariable_GetType(This) CALL_IFACE_METHOD(ShaderResourceVariable, GetType, This)
178 # define IShaderResourceVariable_GetResourceDesc(This, ...) CALL_IFACE_METHOD(ShaderResourceVariable, GetResourceDesc, This, __VA_ARGS__)
179 # define IShaderResourceVariable_GetIndex(This) CALL_IFACE_METHOD(ShaderResourceVariable, GetIndex, This)
180 # define IShaderResourceVariable_IsBound(This, ...) CALL_IFACE_METHOD(ShaderResourceVariable, IsBound, This, __VA_ARGS__)
181181
182182 // clang-format on
183183
113113
114114 // clang-format off
115115
116 # define ISwapChain_Present(This, ...) (This)->pVtbl->SwapChain.Present ((ISwapChain*)(This), __VA_ARGS__)
117 # define ISwapChain_GetDesc(This) (This)->pVtbl->SwapChain.GetDesc ((ISwapChain*)(This))
118 # define ISwapChain_Resize(This, ...) (This)->pVtbl->SwapChain.Resize ((ISwapChain*)(This), __VA_ARGS__)
119 # define ISwapChain_SetFullscreenMode(This, ...) (This)->pVtbl->SwapChain.SetFullscreenMode ((ISwapChain*)(This), __VA_ARGS__)
120 # define ISwapChain_SetWindowedMode(This) (This)->pVtbl->SwapChain.SetWindowedMode ((ISwapChain*)(This))
121 # define ISwapChain_GetCurrentBackBufferRTV(This) (This)->pVtbl->SwapChain.GetCurrentBackBufferRTV((ISwapChain*)(This))
122 # define ISwapChain_GetDepthBufferDSV(This) (This)->pVtbl->SwapChain.GetDepthBufferDSV ((ISwapChain*)(This))
116 # define ISwapChain_Present(This, ...) CALL_IFACE_METHOD(SwapChain, Present, This, __VA_ARGS__)
117 # define ISwapChain_GetDesc(This) CALL_IFACE_METHOD(SwapChain, GetDesc, This)
118 # define ISwapChain_Resize(This, ...) CALL_IFACE_METHOD(SwapChain, Resize, This, __VA_ARGS__)
119 # define ISwapChain_SetFullscreenMode(This, ...) CALL_IFACE_METHOD(SwapChain, SetFullscreenMode, This, __VA_ARGS__)
120 # define ISwapChain_SetWindowedMode(This) CALL_IFACE_METHOD(SwapChain, SetWindowedMode, This)
121 # define ISwapChain_GetCurrentBackBufferRTV(This) CALL_IFACE_METHOD(SwapChain, GetCurrentBackBufferRTV, This)
122 # define ISwapChain_GetDepthBufferDSV(This) CALL_IFACE_METHOD(SwapChain, GetDepthBufferDSV, This)
123123
124124 // clang-format on
125125
397397
398398 # define ITexture_GetDesc(This) (const struct TextureDesc*)IDeviceObject_GetDesc(This)
399399
400 # define ITexture_CreateView(This, ...) (This)->pVtbl->Texture.CreateView ((ITexture*)(This), __VA_ARGS__)
401 # define ITexture_GetDefaultView(This, ...) (This)->pVtbl->Texture.GetDefaultView ((ITexture*)(This), __VA_ARGS__)
402 # define ITexture_GetNativeHandle(This) (This)->pVtbl->Texture.GetNativeHandle((ITexture*)(This))
403 # define ITexture_SetState(This, ...) (This)->pVtbl->Texture.SetState ((ITexture*)(This), __VA_ARGS__)
404 # define ITexture_GetState(This) (This)->pVtbl->Texture.GetState ((ITexture*)(This))
400 # define ITexture_CreateView(This, ...) CALL_IFACE_METHOD(Texture, CreateView, This, __VA_ARGS__)
401 # define ITexture_GetDefaultView(This, ...) CALL_IFACE_METHOD(Texture, GetDefaultView, This, __VA_ARGS__)
402 # define ITexture_GetNativeHandle(This) CALL_IFACE_METHOD(Texture, GetNativeHandle, This)
403 # define ITexture_SetState(This, ...) CALL_IFACE_METHOD(Texture, SetState, This, __VA_ARGS__)
404 # define ITexture_GetState(This) CALL_IFACE_METHOD(Texture, GetState, This)
405405
406406 // clang-format on
407407
245245
246246 // clang-format off
247247
248 # define ITextureView_SetSampler(This, ...) (This)->pVtbl->TextureView.SetSampler((ITextureView*)(This), __VA_ARGS__)
249 # define ITextureView_GetSampler(This) (This)->pVtbl->TextureView.GetSampler((ITextureView*)(This))
250 # define ITextureView_GetTexture(This) (This)->pVtbl->TextureView.GetTexture((ITextureView*)(This))
248 # define ITextureView_SetSampler(This, ...) CALL_IFACE_METHOD(TextureView, SetSampler, This, __VA_ARGS__)
249 # define ITextureView_GetSampler(This) CALL_IFACE_METHOD(TextureView, GetSampler, This)
250 # define ITextureView_GetTexture(This) CALL_IFACE_METHOD(TextureView, GetTexture, This)
251251
252252 // clang-format on
253253
6767 struct IBufferD3D11Vtbl* pVtbl;
6868 } IBufferD3D11;
6969
70 # define IBufferD3D11_GetD3D11Buffer(This) (This)->pVtbl->BufferD3D11.GetD3D11Buffer((IBufferD3D11*)(This))
70 # define IBufferD3D11_GetD3D11Buffer(This) CALL_IFACE_METHOD(BufferD3D11, GetD3D11Buffer, This)
7171
7272 #endif
7373
6767 struct IBufferViewD3D11Vtbl* pVtbl;
6868 } IBufferViewD3D11;
6969
70 # define IBufferViewD3D11_GetD3D11View(This) (This)->pVtbl->BufferViewD3D11.GetD3D11View((IBufferViewD3D11*)(This))
70 # define IBufferViewD3D11_GetD3D11View(This) CALL_IFACE_METHOD(BufferViewD3D11, GetD3D11View, This)
7171
7272 #endif
7373
6767 struct IDeviceContextD3D11Vtbl* pVtbl;
6868 } IDeviceContextD3D11;
6969
70 # define IDeviceContextD3D11_GetD3D11DeviceContext(This) (This)->pVtbl->DeviceContextD3D11.GetD3D11DeviceContext((IDeviceContextD3D11*)(This))
70 # define IDeviceContextD3D11_GetD3D11DeviceContext(This) CALL_IFACE_METHOD(DeviceContextD3D11, GetD3D11DeviceContext, This)
7171
7272 #endif
7373
169169
170170 // clang-format off
171171
172 # define IEngineFactoryD3D11_CreateDeviceAndContextsD3D11(This, ...) (This)->pVtbl->EngineFactoryD3D11.CreateDeviceAndContextsD3D11((IEngineFactoryD3D11*)(This), __VA_ARGS__)
173 # define IEngineFactoryD3D11_CreateSwapChainD3D11(This, ...) (This)->pVtbl->EngineFactoryD3D11.CreateSwapChainD3D11 ((IEngineFactoryD3D11*)(This), __VA_ARGS__)
174 # define IEngineFactoryD3D11_AttachToD3D11Device(This, ...) (This)->pVtbl->EngineFactoryD3D11.AttachToD3D11Device ((IEngineFactoryD3D11*)(This), __VA_ARGS__)
175 # define IEngineFactoryD3D11_EnumerateAdapters(This, ...) (This)->pVtbl->EngineFactoryD3D11.EnumerateAdapters ((IEngineFactoryD3D11*)(This), __VA_ARGS__)
176 # define IEngineFactoryD3D11_EnumerateDisplayModes(This, ...) (This)->pVtbl->EngineFactoryD3D11.EnumerateDisplayModes ((IEngineFactoryD3D11*)(This), __VA_ARGS__)
172 # define IEngineFactoryD3D11_CreateDeviceAndContextsD3D11(This, ...) CALL_IFACE_METHOD(EngineFactoryD3D11, CreateDeviceAndContextsD3D11, This, __VA_ARGS__)
173 # define IEngineFactoryD3D11_CreateSwapChainD3D11(This, ...) CALL_IFACE_METHOD(EngineFactoryD3D11, CreateSwapChainD3D11, This, __VA_ARGS__)
174 # define IEngineFactoryD3D11_AttachToD3D11Device(This, ...) CALL_IFACE_METHOD(EngineFactoryD3D11, AttachToD3D11Device, This, __VA_ARGS__)
175 # define IEngineFactoryD3D11_EnumerateAdapters(This, ...) CALL_IFACE_METHOD(EngineFactoryD3D11, EnumerateAdapters, This, __VA_ARGS__)
176 # define IEngineFactoryD3D11_EnumerateDisplayModes(This, ...) CALL_IFACE_METHOD(EngineFactoryD3D11, EnumerateDisplayModes, This, __VA_ARGS__)
177177
178178 // clang-format on
179179
126126
127127 // clang-format off
128128
129 # define IPipelineStateD3D11_GetD3D11BlendState(This) (This)->pVtbl->PipelineStateD3D11.GetD3D11BlendState ((IPipelineStateD3D11*)(This))
130 # define IPipelineStateD3D11_GetD3D11RasterizerState(This) (This)->pVtbl->PipelineStateD3D11.GetD3D11RasterizerState ((IPipelineStateD3D11*)(This))
131 # define IPipelineStateD3D11_GetD3D11DepthStencilState(This) (This)->pVtbl->PipelineStateD3D11.GetD3D11DepthStencilState((IPipelineStateD3D11*)(This))
132 # define IPipelineStateD3D11_GetD3D11InputLayout(This) (This)->pVtbl->PipelineStateD3D11.GetD3D11InputLayout ((IPipelineStateD3D11*)(This))
133 # define IPipelineStateD3D11_GetD3D11VertexShader(This) (This)->pVtbl->PipelineStateD3D11.GetD3D11VertexShader ((IPipelineStateD3D11*)(This))
134 # define IPipelineStateD3D11_GetD3D11PixelShader(This) (This)->pVtbl->PipelineStateD3D11.GetD3D11PixelShader ((IPipelineStateD3D11*)(This))
135 # define IPipelineStateD3D11_GetD3D11GeometryShader(This) (This)->pVtbl->PipelineStateD3D11.GetD3D11GeometryShader ((IPipelineStateD3D11*)(This))
136 # define IPipelineStateD3D11_GetD3D11DomainShader(This) (This)->pVtbl->PipelineStateD3D11.GetD3D11DomainShader ((IPipelineStateD3D11*)(This))
137 # define IPipelineStateD3D11_GetD3D11HullShader(This) (This)->pVtbl->PipelineStateD3D11.GetD3D11HullShader ((IPipelineStateD3D11*)(This))
138 # define IPipelineStateD3D11_GetD3D11ComputeShader(This) (This)->pVtbl->PipelineStateD3D11.GetD3D11ComputeShader ((IPipelineStateD3D11*)(This))
129 # define IPipelineStateD3D11_GetD3D11BlendState(This) CALL_IFACE_METHOD(PipelineStateD3D11, GetD3D11BlendState, This)
130 # define IPipelineStateD3D11_GetD3D11RasterizerState(This) CALL_IFACE_METHOD(PipelineStateD3D11, GetD3D11RasterizerState, This)
131 # define IPipelineStateD3D11_GetD3D11DepthStencilState(This) CALL_IFACE_METHOD(PipelineStateD3D11, GetD3D11DepthStencilState, This)
132 # define IPipelineStateD3D11_GetD3D11InputLayout(This) CALL_IFACE_METHOD(PipelineStateD3D11, GetD3D11InputLayout, This)
133 # define IPipelineStateD3D11_GetD3D11VertexShader(This) CALL_IFACE_METHOD(PipelineStateD3D11, GetD3D11VertexShader, This)
134 # define IPipelineStateD3D11_GetD3D11PixelShader(This) CALL_IFACE_METHOD(PipelineStateD3D11, GetD3D11PixelShader, This)
135 # define IPipelineStateD3D11_GetD3D11GeometryShader(This) CALL_IFACE_METHOD(PipelineStateD3D11, GetD3D11GeometryShader, This)
136 # define IPipelineStateD3D11_GetD3D11DomainShader(This) CALL_IFACE_METHOD(PipelineStateD3D11, GetD3D11DomainShader, This)
137 # define IPipelineStateD3D11_GetD3D11HullShader(This) CALL_IFACE_METHOD(PipelineStateD3D11, GetD3D11HullShader, This)
138 # define IPipelineStateD3D11_GetD3D11ComputeShader(This) CALL_IFACE_METHOD(PipelineStateD3D11, GetD3D11ComputeShader, This)
139139
140140 // clang-format on
141141
6464 struct IQueryD3D11Vtbl* pVtbl;
6565 } IQueryD3D11;
6666
67 # define IQueryD3D11_GetD3D11Query(This) (This)->pVtbl->QueryD3D11.GetD3D11Query((IQueryD3D11*)(This))
67 # define IQueryD3D11_GetD3D11Query(This) CALL_IFACE_METHOD(QueryD3D11, GetD3D11Query, This)
6868
6969 #endif
7070
129129
130130 // clang-format off
131131
132 # define IRenderDeviceD3D11_GetD3D11Device(This) (This)->pVtbl->RenderDeviceD3D11.GetD3D11Device ((IRenderDeviceD3D11*)(This))
133 # define IRenderDeviceD3D11_CreateBufferFromD3DResource(This, ...) (This)->pVtbl->RenderDeviceD3D11.CreateBufferFromD3DResource ((IRenderDeviceD3D11*)(This), __VA_ARGS__)
134 # define IRenderDeviceD3D11_CreateTexture1DFromD3DResource(This, ...) (This)->pVtbl->RenderDeviceD3D11.CreateTexture1DFromD3DResource((IRenderDeviceD3D11*)(This), __VA_ARGS__)
135 # define IRenderDeviceD3D11_CreateTexture2DFromD3DResource(This, ...) (This)->pVtbl->RenderDeviceD3D11.CreateTexture2DFromD3DResource((IRenderDeviceD3D11*)(This), __VA_ARGS__)
136 # define IRenderDeviceD3D11_CreateTexture3DFromD3DResource(This, ...) (This)->pVtbl->RenderDeviceD3D11.CreateTexture3DFromD3DResource((IRenderDeviceD3D11*)(This), __VA_ARGS__)
132 # define IRenderDeviceD3D11_GetD3D11Device(This) CALL_IFACE_METHOD(RenderDeviceD3D11, GetD3D11Device, This)
133 # define IRenderDeviceD3D11_CreateBufferFromD3DResource(This, ...) CALL_IFACE_METHOD(RenderDeviceD3D11, CreateBufferFromD3DResource, This, __VA_ARGS__)
134 # define IRenderDeviceD3D11_CreateTexture1DFromD3DResource(This, ...) CALL_IFACE_METHOD(RenderDeviceD3D11, CreateTexture1DFromD3DResource, This, __VA_ARGS__)
135 # define IRenderDeviceD3D11_CreateTexture2DFromD3DResource(This, ...) CALL_IFACE_METHOD(RenderDeviceD3D11, CreateTexture2DFromD3DResource, This, __VA_ARGS__)
136 # define IRenderDeviceD3D11_CreateTexture3DFromD3DResource(This, ...) CALL_IFACE_METHOD(RenderDeviceD3D11, CreateTexture3DFromD3DResource, This, __VA_ARGS__)
137137
138138 // clang-format on
139139
6767 struct ISamplerD3D11Vtbl* pVtbl;
6868 } ISamplerD3D11;
6969
70 # define ISamplerD3D11_GetD3D11SamplerState(This) (This)->pVtbl->SamplerD3D11.GetD3D11SamplerState((ISamplerD3D11*)(This))
70 # define ISamplerD3D11_GetD3D11SamplerState(This) CALL_IFACE_METHOD(SamplerD3D11, GetD3D11SamplerState, This)
7171
7272 #endif
7373
6767 struct IShaderD3D11Vtbl* pVtbl;
6868 } IShaderD3D11;
6969
70 # define IShaderD3D11_GetD3D11Shader(This) (This)->pVtbl->ShaderD3D11.GetD3D11Shader((IShaderD3D11*)(This))
70 # define IShaderD3D11_GetD3D11Shader(This) CALL_IFACE_METHOD(ShaderD3D11, GetD3D11Shader, This)
7171
7272 #endif
7373
7676
7777 // clang-format off
7878
79 # define ISwapChainD3D11_GetCurrentBackBufferRTV(This) (This)->pVtbl->SwapChainD3D11.GetCurrentBackBufferRTV((ISwapChainD3D11*)(This))
80 # define ISwapChainD3D11_GetDepthBufferDSV(This) (This)->pVtbl->SwapChainD3D11.GetDepthBufferDSV ((ISwapChainD3D11*)(This))
81 # define ISwapChainD3D11_GetDXGISwapChain(This) (This)->pVtbl->SwapChainD3D11.GetDXGISwapChain ((ISwapChainD3D11*)(This))
79 # define ISwapChainD3D11_GetCurrentBackBufferRTV(This) CALL_IFACE_METHOD(SwapChainD3D11, GetCurrentBackBufferRTV, This)
80 # define ISwapChainD3D11_GetDepthBufferDSV(This) CALL_IFACE_METHOD(SwapChainD3D11, GetDepthBufferDSV, This)
81 # define ISwapChainD3D11_GetDXGISwapChain(This) CALL_IFACE_METHOD(SwapChainD3D11, GetDXGISwapChain, This)
8282
8383 // clang-format on
8484
6767 struct ITextureD3D11Vtbl* pVtbl;
6868 } ITextureD3D11;
6969
70 # define ITextureD3D11_GetD3D11Texture(This) (This)->pVtbl->TextureD3D11.GetD3D11Texture((ITextureD3D11*)(This))
70 # define ITextureD3D11_GetD3D11Texture(This) CALL_IFACE_METHOD(TextureD3D11, GetD3D11Texture, This)
7171
7272 #endif
7373
6767 struct ITextureViewD3D11Vtbl* pVtbl;
6868 } ITextureViewD3D11;
6969
70 # define ITextureViewD3D11_GetD3D11View(This) (This)->pVtbl->TextureViewD3D11.GetD3D11View((ITextureViewD3D11*)(This))
70 # define ITextureViewD3D11_GetD3D11View(This) CALL_IFACE_METHOD(TextureViewD3D11, GetD3D11View, This)
7171
7272 #endif
7373
8888 struct IBufferD3D12Vtbl* pVtbl;
8989 } IBufferD3D12;
9090
91 # define IBufferD3D12_GetD3D12Buffer(This, ...) (This)->pVtbl->BufferD3D12.GetD3D12Buffer ((IBufferD3D12*)(This), __VA_ARGS__)
92 # define IBufferD3D12_SetD3D12ResourceState(This, ...) (This)->pVtbl->BufferD3D12.SetD3D12ResourceState((IBufferD3D12*)(This), __VA_ARGS__)
93 # define IBufferD3D12_GetD3D12ResourceState(This) (This)->pVtbl->BufferD3D12.GetD3D12ResourceState((IBufferD3D12*)(This))
91 # define IBufferD3D12_GetD3D12Buffer(This, ...) CALL_IFACE_METHOD(BufferD3D12, GetD3D12Buffer, This, __VA_ARGS__)
92 # define IBufferD3D12_SetD3D12ResourceState(This, ...) CALL_IFACE_METHOD(BufferD3D12, SetD3D12ResourceState, This, __VA_ARGS__)
93 # define IBufferD3D12_GetD3D12ResourceState(This) CALL_IFACE_METHOD(BufferD3D12, GetD3D12ResourceState, This)
9494
9595 #endif
9696
6464 struct IBufferViewD3D12Vtbl* pVtbl;
6565 } IBufferViewD3D12;
6666
67 # define IBufferViewD3D12_GetCPUDescriptorHandle(This) (This)->pVtbl->BufferViewD3D12.GetCPUDescriptorHandle((IBufferViewD3D12*)(This))
67 # define IBufferViewD3D12_GetCPUDescriptorHandle(This) CALL_IFACE_METHOD(BufferViewD3D12, GetCPUDescriptorHandle, This)
6868
6969 #endif
7070
8888
8989 // clang-format off
9090
91 # define ICommandQueueD3D12_GetNextFenceValue(This) (This)->pVtbl->CommandQueueD3D12.GetNextFenceValue ((ICommandQueueD3D12*)(This))
92 # define ICommandQueueD3D12_Submit(This, ...) (This)->pVtbl->CommandQueueD3D12.Submit ((ICommandQueueD3D12*)(This), __VA_ARGS__)
93 # define ICommandQueueD3D12_GetD3D12CommandQueue(This) (This)->pVtbl->CommandQueueD3D12.GetD3D12CommandQueue ((ICommandQueueD3D12*)(This))
94 # define ICommandQueueD3D12_GetCompletedFenceValue(This) (This)->pVtbl->CommandQueueD3D12.GetCompletedFenceValue((ICommandQueueD3D12*)(This))
95 # define ICommandQueueD3D12_WaitForIdle(This) (This)->pVtbl->CommandQueueD3D12.WaitForIdle ((ICommandQueueD3D12*)(This))
96 # define ICommandQueueD3D12_SignalFence(This, ...) (This)->pVtbl->CommandQueueD3D12.SignalFence ((ICommandQueueD3D12*)(This), __VA_ARGS__)
91 # define ICommandQueueD3D12_GetNextFenceValue(This) CALL_IFACE_METHOD(CommandQueueD3D12, GetNextFenceValue, This)
92 # define ICommandQueueD3D12_Submit(This, ...) CALL_IFACE_METHOD(CommandQueueD3D12, Submit, This, __VA_ARGS__)
93 # define ICommandQueueD3D12_GetD3D12CommandQueue(This) CALL_IFACE_METHOD(CommandQueueD3D12, GetD3D12CommandQueue, This)
94 # define ICommandQueueD3D12_GetCompletedFenceValue(This) CALL_IFACE_METHOD(CommandQueueD3D12, GetCompletedFenceValue,This)
95 # define ICommandQueueD3D12_WaitForIdle(This) CALL_IFACE_METHOD(CommandQueueD3D12, WaitForIdle, This)
96 # define ICommandQueueD3D12_SignalFence(This, ...) CALL_IFACE_METHOD(CommandQueueD3D12, SignalFence, This, __VA_ARGS__)
9797
9898 // clang-format on
9999
124124
125125 // clang-format off
126126
127 # define IDeviceContextD3D12_TransitionTextureState(This, ...) (This)->pVtbl->DeviceContextD3D12.TransitionTextureState((IDeviceContextD3D12*)(This), __VA_ARGS__)
128 # define IDeviceContextD3D12_TransitionBufferState(This, ...) (This)->pVtbl->DeviceContextD3D12.TransitionBufferState ((IDeviceContextD3D12*)(This), __VA_ARGS__)
129 # define IDeviceContextD3D12_GetD3D12CommandList(This) (This)->pVtbl->DeviceContextD3D12.GetD3D12CommandList ((IDeviceContextD3D12*)(This))
130 # define IDeviceContextD3D12_LockCommandQueue(This) (This)->pVtbl->DeviceContextD3D12.LockCommandQueue ((IDeviceContextD3D12*)(This))
131 # define IDeviceContextD3D12_UnlockCommandQueue(This) (This)->pVtbl->DeviceContextD3D12.UnlockCommandQueue ((IDeviceContextD3D12*)(This))
127 # define IDeviceContextD3D12_TransitionTextureState(This, ...) CALL_IFACE_METHOD(DeviceContextD3D12, TransitionTextureState,This, __VA_ARGS__)
128 # define IDeviceContextD3D12_TransitionBufferState(This, ...) CALL_IFACE_METHOD(DeviceContextD3D12, TransitionBufferState, This, __VA_ARGS__)
129 # define IDeviceContextD3D12_GetD3D12CommandList(This) CALL_IFACE_METHOD(DeviceContextD3D12, GetD3D12CommandList, This)
130 # define IDeviceContextD3D12_LockCommandQueue(This) CALL_IFACE_METHOD(DeviceContextD3D12, LockCommandQueue, This)
131 # define IDeviceContextD3D12_UnlockCommandQueue(This) CALL_IFACE_METHOD(DeviceContextD3D12, UnlockCommandQueue, This)
132132
133133 // clang-format on
134134
190190
191191 // clang-format off
192192
193 # define IEngineFactoryD3D12_LoadD3D12(This, ...) (This)->pVtbl->EngineFactoryD3D12.LoadD3D12 ((IEngineFactoryD3D12*)(This), __VA_ARGS__)
194 # define IEngineFactoryD3D12_CreateDeviceAndContextsD3D12(This, ...) (This)->pVtbl->EngineFactoryD3D12.CreateDeviceAndContextsD3D12((IEngineFactoryD3D12*)(This), __VA_ARGS__)
195 # define IEngineFactoryD3D12_CreateSwapChainD3D12(This, ...) (This)->pVtbl->EngineFactoryD3D12.CreateSwapChainD3D12 ((IEngineFactoryD3D12*)(This), __VA_ARGS__)
196 # define IEngineFactoryD3D12_AttachToD3D12Device(This, ...) (This)->pVtbl->EngineFactoryD3D12.AttachToD3D12Device ((IEngineFactoryD3D12*)(This), __VA_ARGS__)
197 # define IEngineFactoryD3D12_EnumerateAdapters(This, ...) (This)->pVtbl->EngineFactoryD3D12.EnumerateAdapters ((IEngineFactoryD3D12*)(This), __VA_ARGS__)
198 # define IEngineFactoryD3D12_EnumerateDisplayModes(This, ...) (This)->pVtbl->EngineFactoryD3D12.EnumerateDisplayModes ((IEngineFactoryD3D12*)(This), __VA_ARGS__)
193 # define IEngineFactoryD3D12_LoadD3D12(This, ...) CALL_IFACE_METHOD(EngineFactoryD3D12, LoadD3D12, This, __VA_ARGS__)
194 # define IEngineFactoryD3D12_CreateDeviceAndContextsD3D12(This, ...) CALL_IFACE_METHOD(EngineFactoryD3D12, CreateDeviceAndContextsD3D12, This, __VA_ARGS__)
195 # define IEngineFactoryD3D12_CreateSwapChainD3D12(This, ...) CALL_IFACE_METHOD(EngineFactoryD3D12, CreateSwapChainD3D12, This, __VA_ARGS__)
196 # define IEngineFactoryD3D12_AttachToD3D12Device(This, ...) CALL_IFACE_METHOD(EngineFactoryD3D12, AttachToD3D12Device, This, __VA_ARGS__)
197 # define IEngineFactoryD3D12_EnumerateAdapters(This, ...) CALL_IFACE_METHOD(EngineFactoryD3D12, EnumerateAdapters, This, __VA_ARGS__)
198 # define IEngineFactoryD3D12_EnumerateDisplayModes(This, ...) CALL_IFACE_METHOD(EngineFactoryD3D12, EnumerateDisplayModes, This, __VA_ARGS__)
199199
200200 // clang-format on
201201
7777
7878 // clang-format off
7979
80 # define IFenceD3D12_GetD3D12Fence(This) (This)->pVtbl->FenceD3D12.GetD3D12Fence ((IFenceD3D12*)(This))
81 # define IFenceD3D12_WaitForCompletion(This, ...) (This)->pVtbl->FenceD3D12.WaitForCompletion((IFenceD3D12*)(This), __VA_ARGS__)
80 # define IFenceD3D12_GetD3D12Fence(This) CALL_IFACE_METHOD(FenceD3D12, GetD3D12Fence, This)
81 # define IFenceD3D12_WaitForCompletion(This, ...) CALL_IFACE_METHOD(FenceD3D12, WaitForCompletion, This, __VA_ARGS__)
8282
8383 // clang-format on
8484
7676
7777 // clang-format off
7878
79 # define IPipelineStateD3D12_GetD3D12PipelineState(This) (This)->pVtbl->PipelineStateD3D12.GetD3D12PipelineState((IPipelineStateD3D12*)(This))
80 # define IPipelineStateD3D12_GetD3D12RootSignature(This) (This)->pVtbl->PipelineStateD3D12.GetD3D12RootSignature((IPipelineStateD3D12*)(This))
79 # define IPipelineStateD3D12_GetD3D12PipelineState(This) CALL_IFACE_METHOD(PipelineStateD3D12, GetD3D12PipelineState, This)
80 # define IPipelineStateD3D12_GetD3D12RootSignature(This) CALL_IFACE_METHOD(PipelineStateD3D12, GetD3D12RootSignature, This)
8181
8282 // clang-format on
8383
6767 struct IQueryD3D12Vtbl* pVtbl;
6868 } IQueryD3D12;
6969
70 # define IQueryD3D12_GetD3D12QueryHeap(This) (This)->pVtbl->QueryD3D12.GetD3D12QueryHeap((IQueryD3D12*)(This))
71 # define IQueryD3D12_GetQueryHeapIndex(This) (This)->pVtbl->QueryD3D12.GetQueryHeapIndex((IQueryD3D12*)(This))
70 # define IQueryD3D12_GetD3D12QueryHeap(This) CALL_IFACE_METHOD(QueryD3D12, GetD3D12QueryHeap, This)
71 # define IQueryD3D12_GetQueryHeapIndex(This) CALL_IFACE_METHOD(QueryD3D12, GetQueryHeapIndex, This)
7272
7373 #endif
7474
116116
117117 // clang-format off
118118
119 # define IRenderDeviceD3D12_GetD3D12Device(This) (This)->pVtbl->RenderDeviceD3D12.GetD3D12Device ((IRenderDeviceD3D12*)(This))
120 # define IRenderDeviceD3D12_GetNextFenceValue(This, ...) (This)->pVtbl->RenderDeviceD3D12.GetNextFenceValue ((IRenderDeviceD3D12*)(This), __VA_ARGS__)
121 # define IRenderDeviceD3D12_GetCompletedFenceValue(This, ...) (This)->pVtbl->RenderDeviceD3D12.GetCompletedFenceValue ((IRenderDeviceD3D12*)(This), __VA_ARGS__)
122 # define IRenderDeviceD3D12_IsFenceSignaled(This, ...) (This)->pVtbl->RenderDeviceD3D12.IsFenceSignaled ((IRenderDeviceD3D12*)(This), __VA_ARGS__)
123 # define IRenderDeviceD3D12_CreateTextureFromD3DResource(This, ...) (This)->pVtbl->RenderDeviceD3D12.CreateTextureFromD3DResource((IRenderDeviceD3D12*)(This), __VA_ARGS__)
124 # define IRenderDeviceD3D12_CreateBufferFromD3DResource(This, ...) (This)->pVtbl->RenderDeviceD3D12.CreateBufferFromD3DResource ((IRenderDeviceD3D12*)(This), __VA_ARGS__)
119 # define IRenderDeviceD3D12_GetD3D12Device(This) CALL_IFACE_METHOD(RenderDeviceD3D12, GetD3D12Device, This)
120 # define IRenderDeviceD3D12_GetNextFenceValue(This, ...) CALL_IFACE_METHOD(RenderDeviceD3D12, GetNextFenceValue, This, __VA_ARGS__)
121 # define IRenderDeviceD3D12_GetCompletedFenceValue(This, ...) CALL_IFACE_METHOD(RenderDeviceD3D12, GetCompletedFenceValue, This, __VA_ARGS__)
122 # define IRenderDeviceD3D12_IsFenceSignaled(This, ...) CALL_IFACE_METHOD(RenderDeviceD3D12, IsFenceSignaled, This, __VA_ARGS__)
123 # define IRenderDeviceD3D12_CreateTextureFromD3DResource(This, ...) CALL_IFACE_METHOD(RenderDeviceD3D12, CreateTextureFromD3DResource, This, __VA_ARGS__)
124 # define IRenderDeviceD3D12_CreateBufferFromD3DResource(This, ...) CALL_IFACE_METHOD(RenderDeviceD3D12, CreateBufferFromD3DResource, This, __VA_ARGS__)
125125
126126 // clang-format on
127127
6767 struct ISamplerD3D12Vtbl* pVtbl;
6868 } ISamplerD3D12;
6969
70 # define ISamplerD3D12_GetCPUDescriptorHandle(This) (This)->pVtbl->SamplerD3D12.GetCPUDescriptorHandle((ISamplerD3D12*)(This))
70 # define ISamplerD3D12_GetCPUDescriptorHandle(This) CALL_IFACE_METHOD(SamplerD3D12, GetCPUDescriptorHandle, This)
7171
7272 #endif
7373
7272
7373 // clang-format off
7474
75 # define ISwapChainD3D12_GetDXGISwapChain(This) (This)->pVtbl->SwapChainD3D12.GetDXGISwapChain((ISwapChainD3D12*)(This))
75 # define ISwapChainD3D12_GetDXGISwapChain(This) CALL_IFACE_METHOD(SwapChainD3D12, GetDXGISwapChain, This)
7676
7777 // clang-format on
7878
8484
8585 // clang-format off
8686
87 # define ITextureD3D12_GetD3D12Texture(This) (This)->pVtbl->TextureD3D12.GetD3D12Texture ((ITextureD3D12*)(This))
88 # define ITextureD3D12_SetD3D12ResourceState(This, ...) (This)->pVtbl->TextureD3D12.SetD3D12ResourceState((ITextureD3D12*)(This), __VA_ARGS__)
89 # define ITextureD3D12_GetD3D12ResourceState(This) (This)->pVtbl->TextureD3D12.GetD3D12ResourceState((ITextureD3D12*)(This))
87 # define ITextureD3D12_GetD3D12Texture(This) CALL_IFACE_METHOD(TextureD3D12, GetD3D12Texture, This)
88 # define ITextureD3D12_SetD3D12ResourceState(This, ...) CALL_IFACE_METHOD(TextureD3D12, SetD3D12ResourceState, This, __VA_ARGS__)
89 # define ITextureD3D12_GetD3D12ResourceState(This) CALL_IFACE_METHOD(TextureD3D12, GetD3D12ResourceState, This)
9090
9191 // clang-format ons
9292
6565 struct ITextureViewD3D12Vtbl* pVtbl;
6666 } ITextureViewD3D12;
6767
68 # define ITextureViewD3D12_GetCPUDescriptorHandle(This) (This)->pVtbl->TextureViewD3D12.GetCPUDescriptorHandle((ITextureViewD3D12*)(This))
68 # define ITextureViewD3D12_GetCPUDescriptorHandle(This) CALL_IFACE_METHOD(TextureViewD3D12, GetCPUDescriptorHandle, This)
6969
7070 #endif
7171
6464 struct IBufferGLVtbl* pVtbl;
6565 } IBufferGL;
6666
67 # define IBufferGL_GetGLBufferHandle(This) (This)->pVtbl->BufferGL.GetGLBufferHandle((IBufferGL*)(This))
67 # define IBufferGL_GetGLBufferHandle(This) CALL_IFACE_METHOD(BufferGL, GetGLBufferHandle, This)
6868
6969 #endif
7070
8383
8484 // clang-format off
8585
86 # define IDeviceContextGL_UpdateCurrentGLContext(This) (This)->pVtbl->DeviceContextGL.UpdateCurrentGLContext((IDeviceContextGL*)(This))
87 # define IDeviceContextGL_SetSwapChain(This, ...) (This)->pVtbl->DeviceContextGL.SetSwapChain((IDeviceContextGL*)(This), __VA_ARGS__)
86 # define IDeviceContextGL_UpdateCurrentGLContext(This) CALL_IFACE_METHOD(DeviceContextGL, UpdateCurrentGLContext, This)
87 # define IDeviceContextGL_SetSwapChain(This, ...) CALL_IFACE_METHOD(DeviceContextGL, SetSwapChain, This, __VA_ARGS__)
8888
8989 // clang-format on
9090
100100
101101 // clang-format off
102102
103 # define IEngineFactoryOpenGL_CreateDeviceAndSwapChainGL(This, ...) (This)->pVtbl->EngineFactoryOpenGL.CreateDeviceAndSwapChainGL((IEngineFactoryOpenGL*)(This), __VA_ARGS__)
104 # define IEngineFactoryOpenGL_CreateHLSL2GLSLConverter(This, ...) (This)->pVtbl->EngineFactoryOpenGL.CreateHLSL2GLSLConverter ((IEngineFactoryOpenGL*)(This), __VA_ARGS__)
105 # define IEngineFactoryOpenGL_AttachToActiveGLContext(This, ...) (This)->pVtbl->EngineFactoryOpenGL.AttachToActiveGLContext ((IEngineFactoryOpenGL*)(This), __VA_ARGS__)
103 # define IEngineFactoryOpenGL_CreateDeviceAndSwapChainGL(This, ...) CALL_IFACE_METHOD(EngineFactoryOpenGL, CreateDeviceAndSwapChainGL, This, __VA_ARGS__)
104 # define IEngineFactoryOpenGL_CreateHLSL2GLSLConverter(This, ...) CALL_IFACE_METHOD(EngineFactoryOpenGL, CreateHLSL2GLSLConverter, This, __VA_ARGS__)
105 # define IEngineFactoryOpenGL_AttachToActiveGLContext(This, ...) CALL_IFACE_METHOD(EngineFactoryOpenGL, AttachToActiveGLContext, This, __VA_ARGS__)
106106
107107 // clang-format on
108108
6565 struct IQueryGLVtbl* pVtbl;
6666 } IQueryGL;
6767
68 # define IQueryGL_GetGlQueryHandle(This) (This)->pVtbl->QueryGL.GetGlQueryHandle((IQueryGL*)(This))
68 # define IQueryGL_GetGlQueryHandle(This) CALL_IFACE_METHOD(QueryGL, GetGlQueryHandle, This)
6969
7070 #endif
7171
125125
126126 // clang-format off
127127
128 # define IRenderDeviceGL_CreateTextureFromGLHandle(This, ...)(This)->pVtbl->RenderDeviceGL.CreateTextureFromGLHandle ((IRenderDeviceGL*)(This), __VA_ARGS__)
129 # define IRenderDeviceGL_CreateBufferFromGLHandle(This, ...) (This)->pVtbl->RenderDeviceGL.CreateBufferFromGLHandle((IRenderDeviceGL*)(This), __VA_ARGS__)
130 # define IRenderDeviceGL_CreateDummyTexture(This, ...) (This)->pVtbl->RenderDeviceGL.CreateDummyTexture((IRenderDeviceGL*)(This), __VA_ARGS__)
128 # define IRenderDeviceGL_CreateTextureFromGLHandle(This, ...)CALL_IFACE_METHOD(RenderDeviceGL, CreateTextureFromGLHandle, This, __VA_ARGS__)
129 # define IRenderDeviceGL_CreateBufferFromGLHandle(This, ...) CALL_IFACE_METHOD(RenderDeviceGL, CreateBufferFromGLHandle, This, __VA_ARGS__)
130 # define IRenderDeviceGL_CreateDummyTexture(This, ...) CALL_IFACE_METHOD(RenderDeviceGL, CreateDummyTexture, This, __VA_ARGS__)
131131
132132 // clang-format on
133133
6666
6767 // clang-format off
6868
69 # define ISwapChainGL_GetDefaultFBO(This) (This)->pVtbl->SwapChainGL.GetDefaultFBO((ISwapChainGL*)(This))
69 # define ISwapChainGL_GetDefaultFBO(This) CALL_IFACE_METHOD(SwapChainGL, GetDefaultFBO, This)
7070
7171 // clang-format on
7272
6969
7070 // clang-format off
7171
72 # define ITextureGL_GetGLTextureHandle(This) (This)->pVtbl->TextureGL.GetGLTextureHandle((ITextureGL*)(This))
73 # define ITextureGL_GetBindTarget(This) (This)->pVtbl->TextureGL.GetBindTarget ((ITextureGL*)(This))
72 # define ITextureGL_GetGLTextureHandle(This) CALL_IFACE_METHOD(TextureGL, GetGLTextureHandle, This)
73 # define ITextureGL_GetBindTarget(This) CALL_IFACE_METHOD(TextureGL, GetBindTarget, This)
7474
7575 // clang-format on
7676
7171
7272 // clang-format off
7373
74 # define IBufferViewVk_GetVkBufferView(This) (This)->pVtbl->BufferViewVk.GetVkBufferView((IBufferViewVk*)(This))
74 # define IBufferViewVk_GetVkBufferView(This) CALL_IFACE_METHOD(BufferViewVk, GetVkBufferView, This)
7575
7676 // clang-format on
7777
7878 struct IBufferVkVtbl* pVtbl;
7979 } IBufferVk;
8080
81
82 // clang-format off
83
84 # define IBufferVk_GetVkBuffer(This, ...) (This)->pVtbl->BufferVk.GetVkBuffer ((IBufferVk*)(This), __VA_ARGS__)
85 # define IBufferVk_SetAccessFlags(This, ...) (This)->pVtbl->BufferVk.SetAccessFlags((IBufferVk*)(This), __VA_ARGS__)
86 # define IBufferVk_GetAccessFlags(This) (This)->pVtbl->BufferVk.GetAccessFlags((IBufferVk*)(This))
87
88 // clang-format on
81 # define IBufferVk_GetVkBuffer(This) CALL_IFACE_METHOD(BufferVk, GetVkBuffer, This)
82 # define IBufferVk_SetAccessFlags(This, ...) CALL_IFACE_METHOD(BufferVk, SetAccessFlags, This, __VA_ARGS__)
83 # define IBufferVk_GetAccessFlags(This) CALL_IFACE_METHOD(BufferVk, GetAccessFlags, This)
8984
9085 #endif
9186
102102
103103 // clang-format off
104104
105 # define ICommandQueueVk_GetNextFenceValue(This) (This)->pVtbl->CommandQueueVk.GetNextFenceValue ((ICommandQueueVk*)(This))
106 # define ICommandQueueVk_SubmitCmdBuffer(This, ...) (This)->pVtbl->CommandQueueVk.SubmitCmdBuffer ((ICommandQueueVk*)(This), __VA_ARGS__)
107 # define ICommandQueueVk_Submit(This, ...) (This)->pVtbl->CommandQueueVk.Submit ((ICommandQueueVk*)(This), __VA_ARGS__)
108 # define ICommandQueueVk_Present(This, ...) (This)->pVtbl->CommandQueueVk.Present ((ICommandQueueVk*)(This), __VA_ARGS__)
109 # define ICommandQueueVk_GetVkQueue(This) (This)->pVtbl->CommandQueueVk.GetVkQueue ((ICommandQueueVk*)(This))
110 # define ICommandQueueVk_GetQueueFamilyIndex(This) (This)->pVtbl->CommandQueueVk.GetQueueFamilyIndex ((ICommandQueueVk*)(This))
111 # define ICommandQueueVk_GetCompletedFenceValue(This) (This)->pVtbl->CommandQueueVk.GetCompletedFenceValue((ICommandQueueVk*)(This))
112 # define ICommandQueueVk_WaitForIdle(This) (This)->pVtbl->CommandQueueVk.WaitForIdle ((ICommandQueueVk*)(This))
113 # define ICommandQueueVk_SignalFence(This, ...) (This)->pVtbl->CommandQueueVk.SignalFence ((ICommandQueueVk*)(This), __VA_ARGS__)
105 # define ICommandQueueVk_GetNextFenceValue(This) CALL_IFACE_METHOD(CommandQueueVk, GetNextFenceValue, This)
106 # define ICommandQueueVk_SubmitCmdBuffer(This, ...) CALL_IFACE_METHOD(CommandQueueVk, SubmitCmdBuffer, This, __VA_ARGS__)
107 # define ICommandQueueVk_Submit(This, ...) CALL_IFACE_METHOD(CommandQueueVk, Submit, This, __VA_ARGS__)
108 # define ICommandQueueVk_Present(This, ...) CALL_IFACE_METHOD(CommandQueueVk, Present, This, __VA_ARGS__)
109 # define ICommandQueueVk_GetVkQueue(This) CALL_IFACE_METHOD(CommandQueueVk, GetVkQueue, This)
110 # define ICommandQueueVk_GetQueueFamilyIndex(This) CALL_IFACE_METHOD(CommandQueueVk, GetQueueFamilyIndex, This)
111 # define ICommandQueueVk_GetCompletedFenceValue(This) CALL_IFACE_METHOD(CommandQueueVk, GetCompletedFenceValue, This)
112 # define ICommandQueueVk_WaitForIdle(This) CALL_IFACE_METHOD(CommandQueueVk, WaitForIdle, This)
113 # define ICommandQueueVk_SignalFence(This, ...) CALL_IFACE_METHOD(CommandQueueVk, SignalFence, This, __VA_ARGS__)
114114
115115 // clang-format on
116116
107107
108108 // clang-format off
109109
110 # define IDeviceContextVk_TransitionImageLayout(This, ...) (This)->pVtbl->DeviceContextVk.TransitionImageLayout((IDeviceContextVk*)(This), __VA_ARGS__)
111 # define IDeviceContextVk_BufferMemoryBarrier(This, ...) (This)->pVtbl->DeviceContextVk.BufferMemoryBarrier ((IDeviceContextVk*)(This), __VA_ARGS__)
112 # define IDeviceContextVk_LockCommandQueue(This) (This)->pVtbl->DeviceContextVk.LockCommandQueue ((IDeviceContextVk*)(This))
113 # define IDeviceContextVk_UnlockCommandQueue(This) (This)->pVtbl->DeviceContextVk.UnlockCommandQueue ((IDeviceContextVk*)(This))
110 # define IDeviceContextVk_TransitionImageLayout(This, ...) CALL_IFACE_METHOD(DeviceContextVk, TransitionImageLayout, This, __VA_ARGS__)
111 # define IDeviceContextVk_BufferMemoryBarrier(This, ...) CALL_IFACE_METHOD(DeviceContextVk, BufferMemoryBarrier, This, __VA_ARGS__)
112 # define IDeviceContextVk_LockCommandQueue(This) CALL_IFACE_METHOD(DeviceContextVk, LockCommandQueue, This)
113 # define IDeviceContextVk_UnlockCommandQueue(This) CALL_IFACE_METHOD(DeviceContextVk, UnlockCommandQueue, This)
114114
115115 // clang-format on
116116
100100
101101 // clang-format off
102102
103 # define IEngineFactoryVk_CreateDeviceAndContextsVk(This, ...) (This)->pVtbl->EngineFactoryVk.CreateDeviceAndContextsVk((IEngineFactoryVk*)(This), __VA_ARGS__)
104 # define IEngineFactoryVk_CreateSwapChainVk(This, ...) (This)->pVtbl->EngineFactoryVk.CreateSwapChainVk ((IEngineFactoryVk*)(This), __VA_ARGS__)
103 # define IEngineFactoryVk_CreateDeviceAndContextsVk(This, ...) CALL_IFACE_METHOD(EngineFactoryVk, CreateDeviceAndContextsVk, This, __VA_ARGS__)
104 # define IEngineFactoryVk_CreateSwapChainVk(This, ...) CALL_IFACE_METHOD(EngineFactoryVk, CreateSwapChainVk, This, __VA_ARGS__)
105105
106106 // clang-format on
107107
6969
7070 // clang-format off
7171
72 # define IPipelineStateVk_GetVkRenderPass(This) (This)->pVtbl->PipelineStateVk.GetVkRenderPass((IPipelineStateVk*)(This))
73 # define IPipelineStateVk_GetVkPipeline(This) (This)->pVtbl->PipelineStateVk.GetVkPipeline((IPipelineStateVk*)(This))
72 # define IPipelineStateVk_GetVkRenderPass(This) CALL_IFACE_METHOD(PipelineStateVk, GetVkRenderPass, This)
73 # define IPipelineStateVk_GetVkPipeline(This) CALL_IFACE_METHOD(PipelineStateVk, GetVkPipeline, This)
7474
7575 // clang-format on
7676
129129
130130 // clang-format off
131131
132 # define IRenderDeviceVk_GetVkDevice(This) (This)->pVtbl->RenderDeviceVk.GetVkDevice ((IRenderDeviceVk*)(This))
133 # define IRenderDeviceVk_GetVkPhysicalDevice(This) (This)->pVtbl->RenderDeviceVk.GetVkPhysicalDevice ((IRenderDeviceVk*)(This))
134 # define IRenderDeviceVk_GetVkInstance(This) (This)->pVtbl->RenderDeviceVk.GetVkInstance ((IRenderDeviceVk*)(This))
135 # define IRenderDeviceVk_GetNextFenceValue(This, ...) (This)->pVtbl->RenderDeviceVk.GetNextFenceValue ((IRenderDeviceVk*)(This), __VA_ARGS__)
136 # define IRenderDeviceVk_GetCompletedFenceValue(This, ...) (This)->pVtbl->RenderDeviceVk.GetCompletedFenceValue ((IRenderDeviceVk*)(This), __VA_ARGS__)
137 # define IRenderDeviceVk_IsFenceSignaled(This, ...) (This)->pVtbl->RenderDeviceVk.IsFenceSignaled ((IRenderDeviceVk*)(This), __VA_ARGS__)
138 # define IRenderDeviceVk_CreateTextureFromVulkanImage(This, ...) (This)->pVtbl->RenderDeviceVk.CreateTextureFromVulkanImage ((IRenderDeviceVk*)(This), __VA_ARGS__)
139 # define IRenderDeviceVk_CreateBufferFromVulkanResource(This, ...) (This)->pVtbl->RenderDeviceVk.CreateBufferFromVulkanResource ((IRenderDeviceVk*)(This), __VA_ARGS__)
132 # define IRenderDeviceVk_GetVkDevice(This) CALL_IFACE_METHOD(RenderDeviceVk, GetVkDevice, This)
133 # define IRenderDeviceVk_GetVkPhysicalDevice(This) CALL_IFACE_METHOD(RenderDeviceVk, GetVkPhysicalDevice, This)
134 # define IRenderDeviceVk_GetVkInstance(This) CALL_IFACE_METHOD(RenderDeviceVk, GetVkInstance, This)
135 # define IRenderDeviceVk_GetNextFenceValue(This, ...) CALL_IFACE_METHOD(RenderDeviceVk, GetNextFenceValue, This, __VA_ARGS__)
136 # define IRenderDeviceVk_GetCompletedFenceValue(This, ...) CALL_IFACE_METHOD(RenderDeviceVk, GetCompletedFenceValue, This, __VA_ARGS__)
137 # define IRenderDeviceVk_IsFenceSignaled(This, ...) CALL_IFACE_METHOD(RenderDeviceVk, IsFenceSignaled, This, __VA_ARGS__)
138 # define IRenderDeviceVk_CreateTextureFromVulkanImage(This, ...) CALL_IFACE_METHOD(RenderDeviceVk, CreateTextureFromVulkanImage, This, __VA_ARGS__)
139 # define IRenderDeviceVk_CreateBufferFromVulkanResource(This, ...) CALL_IFACE_METHOD(RenderDeviceVk, CreateBufferFromVulkanResource, This, __VA_ARGS__)
140140
141141 // clang-format on
142142
6464 struct ISamplerVkVtbl* pVtbl;
6565 } ISamplerVk;
6666
67 # define ISamplerVk_GetVkSampler(This) (This)->pVtbl->SamplerVk.GetVkSampler((ISamplerVk*)(This))
67 # define ISamplerVk_GetVkSampler(This) CALL_IFACE_METHOD(SamplerVk, GetVkSampler, This)
6868
6969 #endif
7070
6969
7070 // clang-format off
7171
72 # define ISwapChainVk_GetVkSwapChain(This) (This)->pVtbl->SwapChainVk.GetVkSwapChain((ISwapChainVk*)(This))
72 # define ISwapChainVk_GetVkSwapChain(This) CALL_IFACE_METHOD(SwapChainVk, GetVkSwapChain, This)
7373
7474 // clang-format on
7575
7070
7171 // clang-format off
7272
73 # define ITextureViewVk_GetVulkanImageView(This) (This)->pVtbl->TextureViewVk.GetVulkanImageView((ITextureViewVk*)(This))
73 # define ITextureViewVk_GetVulkanImageView(This) CALL_IFACE_METHOD(TextureViewVk, GetVulkanImageView, This)
7474
7575 // clang-format ons
7676
8383
8484 // clang-format off
8585
86 # define ITextureVk_GetVkImage(This) (This)->pVtbl->TextureVk.GetVkImage((ITextureVk*)(This))
87 # define ITextureVk_SetLayout(This, ...) (This)->pVtbl->TextureVk.SetLayout ((ITextureVk*)(This), __VA_ARGS__)
88 # define ITextureVk_GetLayout(This) (This)->pVtbl->TextureVk.GetLayout ((ITextureVk*)(This))
86 # define ITextureVk_GetVkImage(This) CALL_IFACE_METHOD(TextureVk, GetVkImage,This)
87 # define ITextureVk_SetLayout(This, ...) CALL_IFACE_METHOD(TextureVk, SetLayout, This, __VA_ARGS__)
88 # define ITextureVk_GetLayout(This) CALL_IFACE_METHOD(TextureVk, GetLayout, This)
8989
9090 // clang-format ons
9191
7474
7575 // clang-format off
7676
77 # define IHLSL2GLSLConversionStream_Convert(This, ...) (This)->pVtbl->HLSL2GLSLConversionStream.Convert((IHLSL2GLSLConversionStream*)(This), __VA_ARGS__)
77 # define IHLSL2GLSLConversionStream_Convert(This, ...) CALL_IFACE_METHOD(HLSL2GLSLConversionStream, Convert, This, __VA_ARGS__)
7878
7979 // clang-format on
8080
120120
121121 // clang-format off
122122
123 # define IHLSL2GLSLConverter_CreateStream(This, ...) (This)->pVtbl->HLSL2GLSLConverter.CreateStream((IHLSL2GLSLConverter*)(This), __VA_ARGS__)
123 # define IHLSL2GLSLConverter_CreateStream(This, ...) CALL_IFACE_METHOD(HLSL2GLSLConverter, CreateStream, This, __VA_ARGS__)
124124
125125 // clang-format on
126126
6060
6161 # define DEFAULT_VALUE(x)
6262
63 # define CALL_IFACE_METHOD(Iface, Method, This, ...) (This)->pVtbl->Iface.Method((I##Iface*)(This), ##__VA_ARGS__)
64
6365 #else
6466
6567 # define DILIGENT_BEGIN_NAMESPACE(Name) \
7979
8080 // clang-format off
8181
82 # define IDataBlob_Resize(This, ...) (This)->pVtbl->DataBlob.Resize ((IDataBlob*)(This), __VA_ARGS__)
83 # define IDataBlob_GetSize(This) (This)->pVtbl->DataBlob.GetSize ((IDataBlob*)(This))
84 # define IDataBlob_GetDataPtr(This) (This)->pVtbl->DataBlob.GetDataPtr((IDataBlob*)(This))
82 # define IDataBlob_Resize(This, ...) CALL_IFACE_METHOD(DataBlob, Resize, This, __VA_ARGS__)
83 # define IDataBlob_GetSize(This) CALL_IFACE_METHOD(DataBlob, GetSize, This)
84 # define IDataBlob_GetDataPtr(This) CALL_IFACE_METHOD(DataBlob, GetDataPtr, This)
8585
8686 // clang-format on
8787
8787
8888 // clang-format off
8989
90 # define IFileStream_Read(This, ...) (This)->pVtbl->FileStream.Read ((IFileStream*)(This), __VA_ARGS__)
91 # define IFileStream_ReadBlob(This, ...) (This)->pVtbl->FileStream.ReadBlob((IFileStream*)(This), __VA_ARGS__)
92 # define IFileStream_Write(This, ...) (This)->pVtbl->FileStream.Write ((IFileStream*)(This), __VA_ARGS__)
93 # define IFileStream_GetSize(This) (This)->pVtbl->FileStream.GetSize ((IFileStream*)(This))
94 # define IFileStream_IsValid(This) (This)->pVtbl->FileStream.IsValid ((IFileStream*)(This))
90 # define IFileStream_Read(This, ...) CALL_IFACE_METHOD(FileStream, Read, This, __VA_ARGS__)
91 # define IFileStream_ReadBlob(This, ...) CALL_IFACE_METHOD(FileStream, ReadBlob, This, __VA_ARGS__)
92 # define IFileStream_Write(This, ...) CALL_IFACE_METHOD(FileStream, Write, This, __VA_ARGS__)
93 # define IFileStream_GetSize(This) CALL_IFACE_METHOD(FileStream, GetSize, This)
94 # define IFileStream_IsValid(This) CALL_IFACE_METHOD(FileStream, IsValid, This)
9595
9696 // clang-format on
9797
7272
7373 // clang-format off
7474
75 # define IMemoryAllocator_Allocate(This, ...) (This)->pVtbl->MemoryAllocator.Allocate((IMemoryAllocator*)(This), __VA_ARGS__)
76 # define IMemoryAllocator_Free(This, ...) (This)->pVtbl->MemoryAllocator.Free ((IMemoryAllocator*)(This), __VA_ARGS__)
75 # define IMemoryAllocator_Allocate(This, ...) CALL_IFACE_METHOD(MemoryAllocator, Allocate, This, __VA_ARGS__)
76 # define IMemoryAllocator_Free(This, ...) CALL_IFACE_METHOD(MemoryAllocator, Free, This, __VA_ARGS__)
7777
7878 #endif
7979
106106
107107 // clang-format off
108108
109 # define IObject_QueryInterface(This, ...) (This)->pVtbl->Object.QueryInterface((struct IObject*)(This), __VA_ARGS__)
110 # define IObject_AddRef(This) (This)->pVtbl->Object.AddRef ((struct IObject*)(This))
111 # define IObject_Release(This) (This)->pVtbl->Object.Release ((struct IObject*)(This))
109 # define IObject_QueryInterface(This, ...) CALL_IFACE_METHOD(Object, QueryInterface, This, __VA_ARGS__)
110 # define IObject_AddRef(This) CALL_IFACE_METHOD(Object, AddRef, This)
111 # define IObject_Release(This) CALL_IFACE_METHOD(Object, Release, This)
112112
113113 // clang-format on
114114