| Enumerator | 
|---|
| init_device  | Called after successful device creation, from:  
- 
IDirect3D9::CreateDevice 
 
- 
IDirect3D9Ex::CreateDeviceEx 
 
- 
IDirect3DDevice9::Reset 
 
- 
IDirect3DDevice9Ex::ResetEx 
 
- 
D3D10CreateDevice 
 
- 
D3D10CreateDevice1 
 
- 
D3D10CreateDeviceAndSwapChain 
 
- 
D3D10CreateDeviceAndSwapChain1 
 
- 
D3D11CreateDevice 
 
- 
D3D11CreateDeviceAndSwapChain 
 
- 
D3D12CreateDevice 
 
- 
glMakeCurrent 
 
- 
vkCreateDevice 
 
 
Callback function signature: void (api::device *device) 
 | 
| create_device  | Called on device creation, before:  
- 
IDirect3D9::CreateDevice 
 
- 
IDirect3D9Ex::CreateDeviceEx 
 
- 
D3D10CreateDevice 
 
- 
D3D10CreateDevice1 
 
- 
D3D10CreateDeviceAndSwapChain 
 
- 
D3D10CreateDeviceAndSwapChain1 
 
- 
D3D11CreateDevice 
 
- 
D3D11CreateDeviceAndSwapChain 
 
- 
D3D12CreateDevice 
 
- 
wglCreateContextAttribsARB 
 
- 
vkCreateInstance 
 
 
Callback function signature: bool (api::device_api api, uint32_t &api_version) 
To overwrite the API version, modify api_version in the callback and return true, otherwise return false.  
 | 
| destroy_device  | Called on device destruction, before:  
- 
IDirect3DDevice9::Reset 
 
- 
IDirect3DDevice9Ex::ResetEx 
 
- 
IDirect3DDevice9::Release 
 
- 
ID3D10Device::Release 
 
- 
ID3D11Device::Release 
 
- 
ID3D12Device::Release 
 
- 
wglDeleteContext 
 
- 
vkDestroyDevice 
 
 
Callback function signature: void (api::device *device) 
 | 
| init_command_list  | Called after successful command list creation, from:  
- 
ID3D11Device::CreateDeferredContext 
 
- 
ID3D11Device1::CreateDeferredContext1 
 
- 
ID3D11Device2::CreateDeferredContext2 
 
- 
ID3D11Device3::CreateDeferredContext3 
 
- 
ID3D12Device::CreateCommandList 
 
- 
ID3D12Device4::CreateCommandList1 
 
- 
vkAllocateCommandBuffers 
 
 
Callback function signature: void (api::command_list *cmd_list) 
In case of D3D9, D3D10, D3D11 and OpenGL this is called during device initialization as well and behaves as if an implicit immediate command list was created.  
 | 
| destroy_command_list  | Called on command list destruction, before:  
- 
ID3D11CommandList::Release 
 
- 
ID3D12CommandList::Release 
 
- 
vkFreeCommandBuffers 
 
 
Callback function signature: void (api::command_list *cmd_list) 
 | 
| init_command_queue  | Called after successful command queue creation, from:  
- 
ID3D12Device::CreateCommandQueue 
 
- 
vkCreateDevice (for every queue associated with the device) 
 
 
Callback function signature: void (api::command_queue *queue) 
In case of D3D9, D3D10, D3D11 and OpenGL this is called during device initialization as well and behaves as if an implicit command queue was created.  
 | 
| destroy_command_queue  | Called on command queue destruction, before:  
- 
ID3D12CommandQueue::Release 
 
- 
vkDestroyDevice (for every queue associated with the device) 
 
 
Callback function signature: void (api::command_queue *queue) 
 | 
| init_swapchain  | Called after successful swap chain creation (with the resize argument set to false), from:  
- 
IDirect3D9::CreateDevice (for the implicit swap chain) 
 
- 
IDirect3D9Ex::CreateDeviceEx (for the implicit swap chain) 
 
- 
IDirect3D9Device::CreateAdditionalSwapChain 
 
- 
IDXGIFactory::CreateSwapChain 
 
- 
IDXGIFactory2::CreateSwapChain(...) 
 
- 
wglMakeCurrent 
 
- 
vkCreateSwapchainKHR 
 
- 
xrCreateSession 
 
 
In addition, called when swap chain is resized (with the resize argument set to true, in which case the object is reused), after:  
- 
IDirect3DDevice9::Reset (for the implicit swap chain) 
 
- 
IDirect3DDevice9Ex::ResetEx (for the implicit swap chain) 
 
- 
IDXGISwapChain::ResizeBuffers 
 
- 
IDXGISwapChain3::ResizeBuffers1 
 
- 
wglSwapBuffers (after window was resized) 
 
 
Callback function signature: void (api::swapchain *swapchain, bool resize) 
 | 
| create_swapchain  | Called on swap chain creation, before:  
- 
IDirect3D9::CreateDevice (for the implicit swap chain) 
 
- 
IDirect3D9Ex::CreateDeviceEx (for the implicit swap chain) 
 
- 
IDirect3D9Device::CreateAdditionalSwapChain 
 
- 
IDirect3D9Device::Reset (for the implicit swap chain) 
 
- 
IDirect3D9DeviceEx::ResetEx (for the implicit swap chain) 
 
- 
IDXGIFactory::CreateSwapChain 
 
- 
IDXGIFactory2::CreateSwapChain(...) 
 
- 
IDXGISwapChain::ResizeBuffers 
 
- 
IDXGISwapChain3::ResizeBuffers1 
 
- 
wglSetPixelFormat 
 
- 
vkCreateSwapchainKHR 
 
 
Callback function signature: bool (api::device_api api, api::swapchain_desc &desc, void *hwnd) 
To overwrite the swap chain description, modify desc in the callback and return true, otherwise return false.  
 | 
| destroy_swapchain  | Called on swap chain destruction (with the resize argument set to false), before:  
- 
IDirect3DDevice9::Release (for the implicit swap chain) 
 
- 
IDirect3DSwapChain9::Release 
 
- 
IDXGISwapChain::Release 
 
- 
wglDeleteContext 
 
- 
vkDestroySwapchainKHR 
 
- 
xrDestroySession 
 
 
In addition, called when swap chain is resized (with the resize argument set to true, in which case the object will be reused), before:  
- 
IDirect3DDevice9::Reset (for the implicit swap chain) 
 
- 
IDirect3DDevice9Ex::ResetEx (for the implicit swap chain) 
 
- 
IDXGISwapChain::ResizeBuffers 
 
- 
IDXGISwapChain1::ResizeBuffers1 
 
- 
wglSwapBuffers (after window was resized) 
 
 
Callback function signature: void (api::swapchain *swapchain, bool resize) 
 | 
| init_effect_runtime  | Called after effect runtime initialization (which happens after swap chain creation or a swap chain buffer resize).  
Callback function signature: void (api::effect_runtime *runtime) 
 | 
| destroy_effect_runtime  | Called when an effect runtime is reset or destroyed.  
Callback function signature: void (api::effect_runtime *runtime) 
 | 
| init_sampler  | Called after successful sampler creation from:  
- 
ID3D10Device::CreateSamplerState 
 
- 
ID3D11Device::CreateSamplerState 
 
- 
ID3D12Device::CreateSampler 
 
- 
vkCreateSampler 
 
 
Callback function signature: void (api::device *device, const api::sampler_desc &desc, api::sampler sampler) 
Is not called in D3D9 (since samplers are loose state there) or OpenGL.  
 | 
| create_sampler  | Called on sampler creation, before:  
- 
ID3D10Device::CreateSamplerState 
 
- 
ID3D11Device::CreateSamplerState 
 
- 
ID3D12Device::CreateSampler 
 
- 
ID3D12Device::CreateRootSignature 
 
- 
vkCreateSampler 
 
 
Callback function signature: bool (api::device *device, api::sampler_desc &desc) 
To overwrite the sampler description, modify desc in the callback and return true, otherwise return false. Is not called in D3D9 (since samplers are loose state there) or OpenGL.  
 | 
| destroy_sampler  | Called on sampler destruction, before:  
- 
ID3D10SamplerState::Release 
 
- 
ID3D11SamplerState::Release 
 
- 
glDeleteSamplers 
 
- 
vkDestroySampler 
 
 
Callback function signature: void (api::device *device, api::sampler sampler) 
Is not called in D3D9 (since samplers are loose state there), D3D12 (since samplers are descriptor handles instead of objects there) or OpenGL.  
 | 
| init_resource  | Called after successful resource creation from:  
- 
IDirect3DDevice9::CreateVertexBuffer 
 
- 
IDirect3DDevice9::CreateIndexBuffer 
 
- 
IDirect3DDevice9::CreateTexture 
 
- 
IDirect3DDevice9::CreateCubeTexture 
 
- 
IDirect3DDevice9::CreateVolumeTexture 
 
- 
IDirect3DDevice9::CreateRenderTargetSurface 
 
- 
IDirect3DDevice9::CreateDepthStencilSurface 
 
- 
IDirect3DDevice9::CreateOffscreenPlainSurface 
 
- 
IDirect3DDevice9Ex::CreateRenderTargetSurfaceEx 
 
- 
IDirect3DDevice9Ex::CreateDepthStencilSurfaceEx 
 
- 
IDirect3DDevice9Ex::CreateOffscreenPlainSurfaceEx 
 
- 
ID3D10Device::CreateBuffer 
 
- 
ID3D10Device::CreateTexture1D 
 
- 
ID3D10Device::CreateTexture2D 
 
- 
ID3D10Device::CreateTexture2D 
 
- 
ID3D11Device::CreateBuffer 
 
- 
ID3D11Device::CreateTexture1D 
 
- 
ID3D11Device::CreateTexture2D 
 
- 
ID3D11Device::CreateTexture3D 
 
- 
ID3D11Device3::CreateTexture2D 
 
- 
ID3D11Device3::CreateTexture3D 
 
- 
ID3D12Device::CreateCommittedResource 
 
- 
ID3D12Device::CreatePlacedResource 
 
- 
ID3D12Device::CreateReservedResource 
 
- 
ID3D12Device4::CreateCommittedResource1 
 
- 
ID3D12Device4::CreateReservedResource1 
 
- 
glBufferData 
 
- 
glBufferStorage 
 
- 
glNamedBufferData 
 
- 
glNamedBufferStorage 
 
- 
glTexImage1D 
 
- 
glTexImage2D 
 
- 
glTexImage2DMultisample 
 
- 
glTexImage3D 
 
- 
glTexImage3DMultisample 
 
- 
glCompressedTexImage1D 
 
- 
glCompressedTexImage2D 
 
- 
glCompressedTexImage3D 
 
- 
glTexStorage1D 
 
- 
glTexStorage2D 
 
- 
glTexStorage2DMultisample 
 
- 
glTexStorage3D 
 
- 
glTexStorage3DMultisample 
 
- 
glTextureStorage1D 
 
- 
glTextureStorage2D 
 
- 
glTextureStorage2DMultisample 
 
- 
glTextureStorage3D 
 
- 
glTextureStorage3DMultisample 
 
- 
glRenderbufferStorage 
 
- 
glRenderbufferStorageMultisample 
 
- 
glNamedRenderbufferStorage 
 
- 
glNamedRenderbufferStorageMultisample 
 
- 
vkBindBufferMemory 
 
- 
vkBindBufferMemory2 
 
- 
vkBindImageMemory 
 
- 
vkBindImageMemory2 
 
 
Callback function signature: void (api::device *device, const api::resource_desc &desc, const api::subresource_data *initial_data, api::resource_usage initial_state, api::resource resource) 
May be called multiple times with the same resource handle (whenever the resource is updated or its reference count is incremented).  
 | 
| create_resource  | Called on resource creation, before:  
- 
IDirect3DDevice9::CreateVertexBuffer 
 
- 
IDirect3DDevice9::CreateIndexBuffer 
 
- 
IDirect3DDevice9::CreateTexture 
 
- 
IDirect3DDevice9::CreateCubeTexture 
 
- 
IDirect3DDevice9::CreateVolumeTexture 
 
- 
IDirect3DDevice9::CreateRenderTargetSurface 
 
- 
IDirect3DDevice9::CreateDepthStencilSurface 
 
- 
IDirect3DDevice9::CreateOffscreenPlainSurface 
 
- 
IDirect3DDevice9Ex::CreateRenderTargetSurfaceEx 
 
- 
IDirect3DDevice9Ex::CreateDepthStencilSurfaceEx 
 
- 
IDirect3DDevice9Ex::CreateOffscreenPlainSurfaceEx 
 
- 
ID3D10Device::CreateBuffer 
 
- 
ID3D10Device::CreateTexture1D 
 
- 
ID3D10Device::CreateTexture2D 
 
- 
ID3D10Device::CreateTexture2D 
 
- 
ID3D11Device::CreateBuffer 
 
- 
ID3D11Device::CreateTexture1D 
 
- 
ID3D11Device::CreateTexture2D 
 
- 
ID3D11Device::CreateTexture3D 
 
- 
ID3D11Device3::CreateTexture2D 
 
- 
ID3D11Device3::CreateTexture3D 
 
- 
ID3D12Device::CreateCommittedResource 
 
- 
ID3D12Device::CreatePlacedResource 
 
- 
ID3D12Device::CreateReservedResource 
 
- 
ID3D12Device4::CreateCommittedResource1 
 
- 
ID3D12Device4::CreateReservedResource1 
 
- 
glBufferData 
 
- 
glBufferStorage 
 
- 
glNamedBufferData 
 
- 
glNamedBufferStorage 
 
- 
glTexImage1D 
 
- 
glTexImage2D 
 
- 
glTexImage2DMultisample 
 
- 
glTexImage3D 
 
- 
glTexImage3DMultisample 
 
- 
glCompressedTexImage1D 
 
- 
glCompressedTexImage2D 
 
- 
glCompressedTexImage3D 
 
- 
glTexStorage1D 
 
- 
glTexStorage2D 
 
- 
glTexStorage2DMultisample 
 
- 
glTexStorage3D 
 
- 
glTexStorage3DMultisample 
 
- 
glTextureStorage1D 
 
- 
glTextureStorage2D 
 
- 
glTextureStorage2DMultisample 
 
- 
glTextureStorage3D 
 
- 
glTextureStorage3DMultisample 
 
- 
glRenderbufferStorage 
 
- 
glRenderbufferStorageMultisample 
 
- 
glNamedRenderbufferStorage 
 
- 
glNamedRenderbufferStorageMultisample 
 
- 
vkCreateBuffer 
 
- 
vkCreateImage 
 
 
Callback function signature: bool (api::device *device, api::resource_desc &desc, api::subresource_data *initial_data, api::resource_usage initial_state) 
To overwrite the resource description, modify desc in the callback and return true, otherwise return false.  
 | 
| destroy_resource  | Called on resource destruction, before:  
- 
IDirect3DResource9::Release 
 
- 
ID3D10Resource::Release 
 
- 
ID3D11Resource::Release 
 
- 
ID3D12Resource::Release 
 
- 
glDeleteBuffers 
 
- 
glDeleteTextures 
 
- 
glDeleteRenderbuffers 
 
- 
vkDestroyBuffer 
 
- 
vkDestroyImage 
 
 
Callback function signature: void (api::device *device, api::resource resource) 
 | 
| init_resource_view  | Called after successful resource view creation from:  
- 
IDirect3DDevice9::CreateTexture 
 
- 
IDirect3DDevice9::CreateCubeTexture 
 
- 
IDirect3DDevice9::CreateVolumeTexture 
 
- 
ID3D10Device::CreateShaderResourceView 
 
- 
ID3D10Device::CreateRenderTargetView 
 
- 
ID3D10Device::CreateDepthStencilView 
 
- 
ID3D10Device1::CreateShaderResourceView1 
 
- 
ID3D11Device::CreateShaderResourceView 
 
- 
ID3D11Device::CreateUnorderedAccessView 
 
- 
ID3D11Device::CreateRenderTargetView 
 
- 
ID3D11Device::CreateDepthStencilView 
 
- 
ID3D11Device3::CreateShaderResourceView1 
 
- 
ID3D11Device3::CreateUnorderedAccessView1 
 
- 
ID3D11Device3::CreateRenderTargetView1 
 
- 
ID3D12Device::CreateShaderResourceView 
 
- 
ID3D12Device::CreateUnorderedAccessView 
 
- 
ID3D12Device::CreateRenderTargetView 
 
- 
ID3D12Device::CreateDepthStencilView 
 
- 
glTexBuffer 
 
- 
glTextureBuffer 
 
- 
glTextureView 
 
- 
vkCreateBufferView 
 
- 
vkCreateImageView 
 
- 
vkCreateAccelerationStructureKHR 
 
 
Callback function signature: void (api::device *device, api::resource resource, api::resource_usage usage_type, const api::resource_view_desc &desc, api::resource_view view) 
May be called multiple times with the same resource view handle (whenever the resource view is updated).  
 | 
| create_resource_view  | Called on resource view creation, before:  
- 
ID3D10Device::CreateShaderResourceView 
 
- 
ID3D10Device::CreateRenderTargetView 
 
- 
ID3D10Device::CreateDepthStencilView 
 
- 
ID3D10Device1::CreateShaderResourceView1 
 
- 
ID3D11Device::CreateShaderResourceView 
 
- 
ID3D11Device::CreateUnorderedAccessView 
 
- 
ID3D11Device::CreateRenderTargetView 
 
- 
ID3D11Device::CreateDepthStencilView 
 
- 
ID3D11Device3::CreateShaderResourceView1 
 
- 
ID3D11Device3::CreateUnorderedAccessView1 
 
- 
ID3D11Device3::CreateRenderTargetView1 
 
- 
ID3D12Device::CreateShaderResourceView 
 
- 
ID3D12Device::CreateUnorderedAccessView 
 
- 
ID3D12Device::CreateRenderTargetView 
 
- 
ID3D12Device::CreateDepthStencilView 
 
- 
glTexBuffer 
 
- 
glTextureBuffer 
 
- 
glTextureView 
 
- 
vkCreateBufferView 
 
- 
vkCreateImageView 
 
- 
vkCreateAccelerationStructureKHR 
 
 
Callback function signature: bool (api::device *device, api::resource resource, api::resource_usage usage_type, api::resource_view_desc &desc) 
To overwrite the resource view description, modify desc in the callback and return true, otherwise return false. Is not called in D3D9 (since resource views are tied to resources there).  
 | 
| destroy_resource_view  | Called on resource view destruction, before:  
- 
IDirect3DResource9::Release 
 
- 
ID3D10View::Release 
 
- 
ID3D11View::Release 
 
- 
glDeleteTextures 
 
- 
vkDestroyBufferView 
 
- 
vkDestroyImageView 
 
- 
vkDestroyAccelerationStructureKHR 
 
 
Callback function signature: void (api::device *device, api::resource_view view) 
Is not called in D3D12 (since resource views are descriptor handles instead of objects there).  
 | 
| map_buffer_region  | Called after:  
- 
IDirect3DVertexBuffer9::Lock 
 
- 
IDirect3DIndexBuffer9::Lock 
 
- 
ID3D10Resource::Map 
 
- 
ID3D11DeviceContext::Map 
 
- 
ID3D12Resource::Map 
 
- 
glMapBuffer 
 
- 
glMapBufferRange 
 
- 
glMapNamedBuffer 
 
- 
glMapNamedBufferRange 
 
 
Callback function signature: void (api::device *device, api::resource resource, uint64_t offset, uint64_t size, api::map_access access, void **data) 
 | 
| unmap_buffer_region  | Called before:  
- 
IDirect3DVertexBuffer9::Unlock 
 
- 
IDirect3DIndexBuffer9::Unlock 
 
- 
ID3D10Resource::Unmap 
 
- 
ID3D11DeviceContext::Unmap 
 
- 
ID3D12Resource::Unmap 
 
- 
glUnmapBuffer 
 
- 
glUnmapNamedBuffer 
 
 
Callback function signature: void (api::device *device, api::resource resource) 
 | 
| map_texture_region  | Called after:  
- 
IDirect3DSurface9::LockRect 
 
- 
IDirect3DVolume9::LockBox 
 
- 
IDirect3DTexture9::LockRect 
 
- 
IDirect3DVolumeTexture9::LockBox 
 
- 
IDirect3DCubeTexture9::LockRect 
 
- 
ID3D10Resource::Map 
 
- 
ID3D11DeviceContext::Map 
 
- 
ID3D12Resource::Map 
 
 
Callback function signature: void (api::device *device, api::resource resource, uint32_t subresource, const api::subresource_box *box, api::map_access access, api::subresource_data *data) 
 | 
| unmap_texture_region  | Called before:  
- 
IDirect3DSurface9::UnlockRect 
 
- 
IDirect3DVolume9::UnlockBox 
 
- 
IDirect3DTexture9::UnlockRect 
 
- 
IDirect3DVolumeTexture9::UnlockBox 
 
- 
IDirect3DCubeTexture9::UnlockRect 
 
- 
ID3D10Resource::Unmap 
 
- 
ID3D11DeviceContext::Unmap 
 
- 
ID3D12Resource::Unmap 
 
 
Callback function signature: void (api::device *device, api::resource resource, uint32_t subresource) 
 | 
| update_buffer_region  | Called before:  
- 
ID3D10Device::UpdateSubresource 
 
- 
ID3D11DeviceContext::UpdateSubresource 
 
- 
ID3D11DeviceContext1::UpdateSubresource1 
 
- 
glBufferSubData 
 
- 
glNamedBufferSubData 
 
 
Callback function signature: bool (api::device *device, const void *data, api::resource resource, uint64_t offset, uint64_t size) 
To prevent this action from being executed, return true, otherwise return false.  
 | 
| update_buffer_region_command  | Called before:  
- 
ID3D11DeviceContext::UpdateSubresource (on deferred device contexts) 
 
- 
ID3D11DeviceContext1::UpdateSubresource1 (on deferred device contexts) 
 
- 
vkCmdUpdateBuffer 
 
 
Callback function signature: bool (api::command_list *cmd_list, const void *data, api::resource dest, uint64_t dest_offset, uint64_t size) 
To prevent this command from being executed, return true, otherwise return false. Destination resource will be in the api::resource_usage::copy_dest state.  
 | 
| update_texture_region  | Called before:  
- 
ID3D10Device::UpdateSubresource 
 
- 
ID3D11DeviceContext::UpdateSubresource 
 
- 
ID3D11DeviceContext1::UpdateSubresource1 
 
- 
glTexSubData1D 
 
- 
glTexSubData2D 
 
- 
glTexSubData3D 
 
- 
glTextureSubData1D 
 
- 
glTextureSubData2D 
 
- 
glTextureSubData3D 
 
- 
glCompressedTexSubData1D 
 
- 
glCompressedTexSubData2D 
 
- 
glCompressedTexSubData3D 
 
- 
glCompressedTextureSubData1D 
 
- 
glCompressedTextureSubData2D 
 
- 
glCompressedTextureSubData3D 
 
 
Callback function signature: bool (api::device *device, const api::subresource_data &data, api::resource resource, uint32_t subresource, const api::subresource_box *box) 
To prevent this action from being executed, return true, otherwise return false.  
 | 
| update_texture_region_command  | Called before:  
- 
ID3D11DeviceContext::UpdateSubresource (on deferred device contexts) 
 
- 
ID3D11DeviceContext1::UpdateSubresource1 (on deferred device contexts) 
 
 
Callback function signature: bool (api::command_list *cmd_list, const api::subresource_data &data, api::resource dest, uint32_t dest_subresource, const api::subresource_box *dest_box) 
To prevent this command from being executed, return true, otherwise return false. Destination resource will be in the api::resource_usage::copy_dest state.  
 | 
| init_pipeline  | Called after successful pipeline creation from:  
- 
IDirect3DDevice9::CreateVertexShader 
 
- 
IDirect3DDevice9::CreatePixelShader 
 
- 
IDirect3DDevice9::CreateVertexDeclaration 
 
- 
ID3D10Device::CreateVertexShader 
 
- 
ID3D10Device::CreateGeometryShader 
 
- 
ID3D10Device::CreateGeometryShaderWithStreamOutput 
 
- 
ID3D10Device::CreatePixelShader 
 
- 
ID3D10Device::CreateInputLayout 
 
- 
ID3D10Device::CreateBlendState 
 
- 
ID3D10Device::CreateDepthStencilState 
 
- 
ID3D10Device::CreateRasterizerState 
 
- 
ID3D10Device1::CreateBlendState1 
 
- 
ID3D11Device::CreateVertexShader 
 
- 
ID3D11Device::CreateHullShader 
 
- 
ID3D11Device::CreateDomainShader 
 
- 
ID3D11Device::CreateGeometryShader 
 
- 
ID3D11Device::CreateGeometryShaderWithStreamOutput 
 
- 
ID3D11Device::CreatePixelShader 
 
- 
ID3D11Device::CreateComputeShader 
 
- 
ID3D11Device::CreateInputLayout 
 
- 
ID3D11Device::CreateBlendState 
 
- 
ID3D11Device::CreateDepthStencilState 
 
- 
ID3D11Device::CreateRasterizerState 
 
- 
ID3D11Device1::CreateBlendState1 
 
- 
ID3D11Device1::CreateRasterizerState1 
 
- 
ID3D11Device3::CreateRasterizerState2 
 
- 
ID3D12Device::CreateComputePipelineState 
 
- 
ID3D12Device::CreateGraphicsPipelineState 
 
- 
ID3D12Device2::CreatePipelineState 
 
- 
ID3D12Device5::CreateStateObject 
 
- 
ID3D12Device7::AddToStateObject 
 
- 
ID3D12PipelineLibrary::LoadComputePipeline 
 
- 
ID3D12PipelineLibrary::LoadGraphicsPipeline 
 
- 
ID3D12PipelineLibrary1::LoadPipeline 
 
- 
glLinkProgram 
 
- 
vkCreateComputePipelines 
 
- 
vkCreateGraphicsPipelines 
 
 
Callback function signature: void (api::device *device, api::pipeline_layout layout, uint32_t subobject_count, const api::pipeline_subobject *subobjects, api::pipeline pipeline) 
May be called multiple times with the same pipeline handle (whenever the pipeline is updated or its reference count is incremented).  
 | 
| create_pipeline  | Called on pipeline creation, before:  
- 
IDirect3DDevice9::CreateVertexShader 
 
- 
IDirect3DDevice9::CreatePixelShader 
 
- 
IDirect3DDevice9::CreateVertexDeclaration 
 
- 
ID3D10Device::CreateVertexShader 
 
- 
ID3D10Device::CreateGeometryShader 
 
- 
ID3D10Device::CreateGeometryShaderWithStreamOutput 
 
- 
ID3D10Device::CreatePixelShader 
 
- 
ID3D10Device::CreateInputLayout 
 
- 
ID3D10Device::CreateBlendState 
 
- 
ID3D10Device::CreateDepthStencilState 
 
- 
ID3D10Device::CreateRasterizerState 
 
- 
ID3D10Device1::CreateBlendState1 
 
- 
ID3D11Device::CreateVertexShader 
 
- 
ID3D11Device::CreateHullShader 
 
- 
ID3D11Device::CreateDomainShader 
 
- 
ID3D11Device::CreateGeometryShader 
 
- 
ID3D11Device::CreateGeometryShaderWithStreamOutput 
 
- 
ID3D11Device::CreatePixelShader 
 
- 
ID3D11Device::CreateComputeShader 
 
- 
ID3D11Device::CreateInputLayout 
 
- 
ID3D11Device::CreateBlendState 
 
- 
ID3D11Device::CreateDepthStencilState 
 
- 
ID3D11Device::CreateRasterizerState 
 
- 
ID3D11Device1::CreateBlendState1 
 
- 
ID3D11Device1::CreateRasterizerState1 
 
- 
ID3D11Device3::CreateRasterizerState2 
 
- 
ID3D12Device::CreateComputePipelineState 
 
- 
ID3D12Device::CreateGraphicsPipelineState 
 
- 
ID3D12Device2::CreatePipelineState 
 
- 
ID3D12Device5::CreateStateObject 
 
- 
glShaderSource 
 
- 
vkCreateComputePipelines 
 
- 
vkCreateGraphicsPipelines 
 
 
Callback function signature: bool (api::device *device, api::pipeline_layout layout, uint32_t subobject_count, const api::pipeline_subobject *subobjects) 
To overwrite the pipeline description, modify desc in the callback and return true, otherwise return false.  
 | 
| destroy_pipeline  | Called on pipeline destruction, before:  
- 
ID3D10VertexShader::Release 
 
- 
ID3D10GeometryShader::Release 
 
- 
ID3D10PixelShader::Release 
 
- 
ID3D10InputLayout::Release 
 
- 
ID3D10BlendState::Release 
 
- 
ID3D10DepthStencilState::Release 
 
- 
ID3D10RasterizerState::Release 
 
- 
ID3D11VertexShader::Release 
 
- 
ID3D11HullShader::Release 
 
- 
ID3D11DomainShader::Release 
 
- 
ID3D11GeometryShader::Release 
 
- 
ID3D11PixelShader::Release 
 
- 
ID3D11ComputeShader::Release 
 
- 
ID3D11InputLayout::Release 
 
- 
ID3D11BlendState::Release 
 
- 
ID3D11DepthStencilState::Release 
 
- 
ID3D11RasterizerState::Release 
 
- 
ID3D12PipelineState::Release 
 
- 
ID3D12StateObject::Release 
 
- 
glDeleteProgram 
 
- 
vkDestroyPipeline 
 
 
Callback function signature: void (api::device *device, api::pipeline pipeline) 
Is not called in D3D9.  
 | 
| init_pipeline_layout  | Called after successful pipeline layout creation from:  
- 
ID3D12Device::CreateRootSignature 
 
- 
vkCreatePipelineLayout 
 
 
Callback function signature: void (api::device *device, uint32_t param_count, const api::pipeline_layout_param *params, api::pipeline_layout layout) 
In case of D3D9, D3D10, D3D11 and OpenGL this is called during device initialization as well and behaves as if an implicit global pipeline layout was created.  
 | 
| create_pipeline_layout  | Called on pipeline layout creation, before:  
- 
ID3D12Device::CreateRootSignature 
 
- 
vkCreatePipelineLayout 
 
 
Callback function signature: bool (api::device *device, uint32_t ¶m_count, api::pipeline_layout_param *¶ms) 
Is not called in D3D9, D3D10, D3D11 or OpenGL.  
 | 
| destroy_pipeline_layout  | Called on pipeline layout destruction, before:  
- 
ID3D12RootSignature::Release 
 
- 
VkDestroyPipelineLayout 
 
 
Callback function signature: void (api::device *device, api::pipeline_layout layout) 
 | 
| copy_descriptor_tables  | Called before:  
- 
ID3D12Device::CopyDescriptors 
 
- 
ID3D12Device::CopyDescriptorsSimple 
 
- 
vkUpdateDescriptorSets 
 
 
Callback function signature: bool (api::device *device, uint32_t count, const api::descriptor_table_copy *copies) 
To prevent this command from being executed, return true, otherwise return false.  
 | 
| update_descriptor_tables  | Called before:  
- 
ID3D12Device::CreateConstantBufferView 
 
- 
ID3D12Device::CreateShaderResourceView 
 
- 
ID3D12Device::CreateUnorderedAccessView 
 
- 
ID3D12Device::CreateSampler 
 
- 
vkUpdateDescriptorSets 
 
- 
vkUpdateDescriptorSetWithTemplate 
 
 
Callback function signature: bool (api::device *device, uint32_t count, const api::descriptor_table_update *updates) 
To prevent this command from being executed, return true, otherwise return false.  
 | 
| init_query_heap  | Called after successful query heap creation from:  
- 
ID3D12Device::CreateQueryHeap 
 
- 
vkCreateQueryPool 
 
 
Callback function signature: void (api::device *device, api::query_type type, uint32_t count, api::query_heap heap) 
 | 
| create_query_heap  | Called on query heap creation, before:  
- 
ID3D12Device::CreateQueryHeap 
 
- 
vkCreateQueryPool 
 
 
Callback function signature: bool (api::device *device, api::query_type type, uint32_t &count) 
 | 
| destroy_query_heap  | Called on query heap destruction, before:  
- 
ID3D12QueryHeap::Release 
 
- 
vkDestroyQueryPool 
 
 
Callback function signature: void (api::device *device, api::query_heap heap) 
 | 
| get_query_heap_results  | Called before:  
Callback function signature: bool (api::device *device, api::query_heap heap, uint32_t first, uint32_t count, void *results, uint32_t stride) 
 | 
| barrier  | Called after:  
- 
ID3D12GraphicsCommandList::ResourceBarrier 
 
- 
ID3D12GraphicsCommandList7::Barrier 
 
- 
vkCmdPipelineBarrier 
 
- 
vkCmdPipelineBarrier2 
 
 
Callback function signature: void (api::command_list *cmd_list, uint32_t count, const api::resource *resources, const api::resource_usage *old_states, const api::resource_usage *new_states) 
 | 
| begin_render_pass  | Called before:  
- 
ID3D12GraphicsCommandList4::BeginRenderPass 
 
- 
vkCmdBeginRenderPass 
 
- 
vkCmdBeginRenderPass2 
 
- 
vkCmdNextSubpass 
 
- 
vkCmdNextSubpass2 
 
- 
vkCmdBeginRendering 
 
 
Callback function signature: void (api::command_list *cmd_list, uint32_t count, const api::render_pass_render_target_desc *rts, const api::render_pass_depth_stencil_desc *ds) 
The depth-stencil description argument is optional and may be nullptr (which indicates that no depth-stencil is used).  
 | 
| end_render_pass  | Called before:  
- 
ID3D12GraphicsCommandList4::EndRenderPass 
 
- 
vkCmdEndRenderPass 
 
- 
vkCmdEndRenderPass2 
 
- 
vkCmdNextSubpass 
 
- 
vkCmdNextSubpass2 
 
- 
vkCmdEndRendering 
 
 
Callback function signature: void (api::command_list *cmd_list) 
 | 
| bind_render_targets_and_depth_stencil  | Called after:  
- 
IDirect3DDevice9::SetRenderTarget 
 
- 
IDirect3DDevice9::SetDepthStencilSurface 
 
- 
ID3D10Device::OMSetRenderTargets 
 
- 
ID3D11DeviceContext::OMSetRenderTargets 
 
- 
ID3D11DeviceContext::OMSetRenderTargetsAndUnorderedAccessViews 
 
- 
ID3D12GraphicsCommandList::OMSetRenderTargets 
 
- 
glBindFramebuffer 
 
 
Callback function signature: void (api::command_list *cmd_list, uint32_t count, const api::resource_view *rtvs, api::resource_view dsv) 
 | 
| bind_pipeline  | Called after:  
- 
IDirect3DDevice9::SetVertexShader 
 
- 
IDirect3DDevice9::SetPixelShader 
 
- 
IDirect3DDevice9::SetVertexDeclaration 
 
- 
IDirect3DDevice9::ProcessVertices 
 
- 
ID3D10Device::VSSetShader 
 
- 
ID3D10Device::GSSetShader 
 
- 
ID3D10Device::PSSetShader 
 
- 
ID3D10Device::IASetInputLayout 
 
- 
ID3D10Device::OMSetBlendState 
 
- 
ID3D10Device::OMSetDepthStencilState 
 
- 
ID3D10Device::RSSetState 
 
- 
ID3D11DeviceContext::VSSetShader 
 
- 
ID3D11DeviceContext::HSSetShader 
 
- 
ID3D11DeviceContext::DSSetShader 
 
- 
ID3D11DeviceContext::GSSetShader 
 
- 
ID3D11DeviceContext::PSSetShader 
 
- 
ID3D11DeviceContext::CSSetShader 
 
- 
ID3D11DeviceContext::IASetInputLayout 
 
- 
ID3D11DeviceContext::OMSetBlendState 
 
- 
ID3D11DeviceContext::OMSetDepthStencilState 
 
- 
ID3D11DeviceContext::RSSetState 
 
- 
ID3D12GraphicsCommandList::Reset 
 
- 
ID3D12GraphicsCommandList::SetPipelineState 
 
- 
ID3D12GraphicsCommandList4::SetPipelineState1 
 
- 
glUseProgram 
 
- 
glBindVertexArray 
 
- 
vkCmdBindPipeline 
 
 
Callback function signature: void (api::command_list *cmd_list, api::pipeline_stage stages, api::pipeline pipeline) 
 | 
| bind_pipeline_states  | Called after:  
- 
IDirect3DDevice9::SetRenderState 
 
- 
ID3D10Device::IASetPrimitiveTopology 
 
- 
ID3D10Device::OMSetBlendState 
 
- 
ID3D10Device::OMSetDepthStencilState 
 
- 
ID3D11DeviceContext::IASetPrimitiveTopology 
 
- 
ID3D11DeviceContext::OMSetBlendState 
 
- 
ID3D11DeviceContext::OMSetDepthStencilState 
 
- 
ID3D12GraphicsCommandList::IASetPrimitiveTopology 
 
- 
ID3D12GraphicsCommandList::OMSetBlendFactor 
 
- 
ID3D12GraphicsCommandList::OMSetStencilRef 
 
- 
gl(...) 
 
- 
vkCmdSetDepthBias 
 
- 
vkCmdSetBlendConstants 
 
- 
vkCmdSetStencilCompareMask 
 
- 
vkCmdSetStencilWriteMask 
 
- 
vkCmdSetStencilReference 
 
 
Callback function signature: void (api::command_list *cmd_list, uint32_t count, const api::dynamic_state *states, const uint32_t *values) 
 | 
| bind_viewports  | Called after:  
- 
IDirect3DDevice9::SetViewport 
 
- 
IDirect3DDevice9::SetRenderTarget (implicitly updates the viewport) 
 
- 
ID3D10Device::RSSetViewports 
 
- 
ID3D11DeviceContext::RSSetViewports 
 
- 
ID3D12GraphicsCommandList::RSSetViewports 
 
- 
glViewport 
 
- 
glViewportArrayv 
 
- 
glViewportIndexedf 
 
- 
glViewportIndexedfv 
 
- 
vkCmdSetViewport 
 
 
Callback function signature: void (api::command_list *cmd_list, uint32_t first, uint32_t count, const api::viewport *viewports) 
 | 
| bind_scissor_rects  | Called after:  
- 
IDirect3DDevice9::SetScissorRect 
 
- 
ID3D10Device::RSSetScissorRects 
 
- 
ID3D11DeviceContext::RSSetScissorRects 
 
- 
ID3D12GraphicsCommandList::RSSetScissorRects 
 
- 
glScissor 
 
- 
glScissorArrayv 
 
- 
glScissorIndexed 
 
- 
glScissorIndexedv 
 
- 
vkCmdSetScissor 
 
 
Callback function signature: void (api::command_list *cmd_list, uint32_t first, uint32_t count, const api::rect *rects) 
 | 
| push_constants  | Called after:  
- 
IDirect3DDevice9::SetVertexShaderConstantF 
 
- 
IDirect3DDevice9::SetPixelShaderConstantF 
 
- 
ID3D12GraphicsCommandList::SetComputeRoot32BitConstant 
 
- 
ID3D12GraphicsCommandList::SetComputeRoot32BitConstants 
 
- 
ID3D12GraphicsCommandList::SetGraphicsRoot32BitConstant 
 
- 
ID3D12GraphicsCommandList::SetGraphicsRoot32BitConstants 
 
- 
glUniform(...) 
 
- 
vkCmdPushConstants 
 
 
Callback function signature: void (api::command_list *cmd_list, api::shader_stage stages, api::pipeline_layout layout, uint32_t layout_param, uint32_t first, uint32_t count, const void *values) 
 | 
| push_descriptors  | Called after:  
- 
IDirect3DDevice9::SetTexture 
 
- 
ID3D10Device::VSSetSamplers 
 
- 
ID3D10Device::VSSetShaderResources 
 
- 
ID3D10Device::VSSetConstantBuffers 
 
- 
ID3D10Device::GSSetSamplers 
 
- 
ID3D10Device::GSSetShaderResources 
 
- 
ID3D10Device::GSSetConstantBuffers 
 
- 
ID3D10Device::PSSetSamplers 
 
- 
ID3D10Device::PSSetShaderResources 
 
- 
ID3D10Device::PSSetConstantBuffers 
 
- 
ID3D11DeviceContext::VSSetSamplers 
 
- 
ID3D11DeviceContext::VSSetShaderResources 
 
- 
ID3D11DeviceContext::VSSetConstantBuffers 
 
- 
ID3D11DeviceContext::HSSetSamplers 
 
- 
ID3D11DeviceContext::HSSetShaderResources 
 
- 
ID3D11DeviceContext::HSSetConstantBuffers 
 
- 
ID3D11DeviceContext::DSSetSamplers 
 
- 
ID3D11DeviceContext::DSSetShaderResources 
 
- 
ID3D11DeviceContext::DSSetConstantBuffers 
 
- 
ID3D11DeviceContext::GSSetSamplers 
 
- 
ID3D11DeviceContext::GSSetShaderResources 
 
- 
ID3D11DeviceContext::GSSetConstantBuffers 
 
- 
ID3D11DeviceContext::PSSetSamplers 
 
- 
ID3D11DeviceContext::PSSetShaderResources 
 
- 
ID3D11DeviceContext::PSSetConstantBuffers 
 
- 
ID3D11DeviceContext::CSSetSamplers 
 
- 
ID3D11DeviceContext::CSSetShaderResources 
 
- 
ID3D11DeviceContext::CSSetUnorderedAccessViews 
 
- 
ID3D11DeviceContext::CSSetConstantBuffers 
 
- 
ID3D12GraphicsCommandList::SetComputeRootConstantBufferView 
 
- 
ID3D12GraphicsCommandList::SetGraphicsRootConstantBufferView 
 
- 
ID3D12GraphicsCommandList::SetComputeRootShaderResourceView 
 
- 
ID3D12GraphicsCommandList::SetGraphicsRootShaderResourceView 
 
- 
ID3D12GraphicsCommandList::SetComputeRootUnorderedAccessView 
 
- 
ID3D12GraphicsCommandList::SetGraphicsRootUnorderedAccessView 
 
- 
glBindBufferBase 
 
- 
glBindBufferRange 
 
- 
glBindBuffersBase 
 
- 
glBindBuffersRange 
 
- 
glBindTexture 
 
- 
glBindImageTexture 
 
- 
glBindTextures 
 
- 
glBindImageTextures 
 
- 
glBindTextureUnit 
 
- 
glBindMultiTextureEXT 
 
- 
vkCmdPushDescriptorSetKHR 
 
- 
vkCmdPushDescriptorSetWithTemplateKHR 
 
 
Callback function signature: void (api::command_list *cmd_list, api::shader_stage stages, api::pipeline_layout layout, uint32_t layout_param, const api::descriptor_table_update &update) 
 | 
| bind_descriptor_tables  | Called after:  
- 
ID3D12GraphicsCommandList::SetComputeRootSignature 
 
- 
ID3D12GraphicsCommandList::SetGraphicsRootSignature 
 
- 
ID3D12GraphicsCommandList::SetComputeRootDescriptorTable 
 
- 
ID3D12GraphicsCommandList::SetGraphicsRootDescriptorTable 
 
- 
vkCmdBindDescriptorSets 
 
 
Callback function signature: void (api::command_list *cmd_list, api::shader_stage stages, api::pipeline_layout layout, uint32_t first, uint32_t count, const api::descriptor_table *tables) 
 | 
| bind_index_buffer  | Called after:  
- 
IDirect3DDevice9::SetIndices 
 
- 
ID3D10Device::IASetIndexBuffer 
 
- 
ID3D11DeviceContext::IASetIndexBuffer 
 
- 
ID3D12GraphicsCommandList::IASetIndexBuffer 
 
- 
glBindBuffer 
 
- 
vkCmdBindIndexBuffer 
 
 
Callback function signature: void (api::command_list *cmd_list, api::resource buffer, uint64_t offset, uint32_t index_size) 
 | 
| bind_vertex_buffers  | Called after:  
- 
IDirect3DDevice9::SetStreamSource 
 
- 
ID3D10Device::IASetVertexBuffers 
 
- 
ID3D11DeviceContext::IASetVertexBuffers 
 
- 
ID3D12GraphicsCommandList::IASetVertexBuffers 
 
- 
glBindBuffer 
 
- 
glBindVertexBuffer 
 
- 
glBindVertexBuffers 
 
- 
vkCmdBindVertexBuffers 
 
- 
vkCmdBindVertexBuffers2 
 
 
Callback function signature: void (api::command_list *cmd_list, uint32_t first, uint32_t count, const api::resource *buffers, const uint64_t *offsets, const uint32_t *strides) 
The strides argument is optional and may be nullptr.  
 | 
| bind_stream_output_buffers  | Called after:  
- 
IDirect3DDevice9::ProcessVertices 
 
- 
ID3D10Device::SOSetTargets 
 
- 
ID3D11DeviceContext::SOSetTargets 
 
- 
ID3D12GraphicsCommandList::SOSetTargets 
 
- 
glBindBufferBase 
 
- 
glBindBufferRange 
 
- 
glBindBuffersBase 
 
- 
glBindBuffersRange 
 
- 
vkCmdBindTransformFeedbackBuffersEXT 
 
 
Callback function signature: void (api::command_list *cmd_list, uint32_t first, uint32_t count, const api::resource *buffers, const uint64_t *offsets, const uint64_t *max_sizes, const api::resource *counter_buffers, const uint64_t *counter_offsets) 
The counter arguments are optional and may be nullptr.  
 | 
| draw  | Called before:  
- 
IDirect3DDevice9::DrawPrimitive 
 
- 
IDirect3DDevice9::DrawPrimitiveUP 
 
- 
IDirect3DDevice9::ProcessVertices 
 
- 
ID3D10Device::Draw 
 
- 
ID3D10Device::DrawInstanced 
 
- 
ID3D11DeviceContext::Draw 
 
- 
ID3D11DeviceContext::DrawInstanced 
 
- 
ID3D12GraphicsCommandList::DrawInstanced 
 
- 
glDrawArrays 
 
- 
glDrawArraysInstanced 
 
- 
glDrawArraysInstancedBaseInstance 
 
- 
glMultiDrawArrays 
 
- 
vkCmdDraw 
 
- 
vkCmdDrawMultiEXT 
 
 
Callback function signature: bool (api::command_list *cmd_list, uint32_t vertex_count, uint32_t instance_count, uint32_t first_vertex, uint32_t first_instance) 
To prevent this command from being executed, return true, otherwise return false.  
 | 
| draw_indexed  | Called before:  
- 
IDirect3DDevice9::DrawIndexedPrimitive 
 
- 
IDirect3DDevice9::DrawIndexedPrimitiveUP 
 
- 
ID3D10Device::DrawIndexed 
 
- 
ID3D10Device::DrawIndexedInstanced 
 
- 
ID3D11DeviceContext::DrawIndexed 
 
- 
ID3D11DeviceContext::DrawIndexedInstanced 
 
- 
ID3D12GraphicsCommandList::DrawIndexedInstanced 
 
- 
glDrawElements 
 
- 
glDrawElementsBaseVertex 
 
- 
glDrawElementsInstanced 
 
- 
glDrawElementsInstancedBaseVertex 
 
- 
glDrawElementsInstancedBaseInstance 
 
- 
glDrawElementsInstancedBaseVertexBaseInstance 
 
- 
glMultiDrawElements 
 
- 
glMultiDrawElementsBaseVertex 
 
- 
vkCmdDrawIndexed 
 
- 
vkCmdDrawMultiIndexedEXT 
 
 
Callback function signature: bool (api::command_list *cmd_list, uint32_t index_count, uint32_t instance_count, uint32_t first_index, int32_t vertex_offset, uint32_t first_instance) 
To prevent this command from being executed, return true, otherwise return false.  
 | 
| dispatch  | Called before:  
- 
ID3D11DeviceContext::Dispatch 
 
- 
ID3D12GraphicsCommandList::Dispatch 
 
- 
glDispatchCompute 
 
- 
vkCmdDispatch 
 
 
Callback function signature: bool (api::command_list *cmd_list, uint32_t group_count_x, uint32_t group_count_y, uint32_t group_count_z) 
To prevent this command from being executed, return true, otherwise return false.  
 | 
| dispatch_mesh  | Called before:  
- 
ID3D12GraphicsCommandList::DispatchMesh 
 
- 
vkCmdDrawMeshTasksEXT 
 
 
Callback function signature: bool (api::command_list *cmd_list, uint32_t group_count_x, uint32_t group_count_y, uint32_t group_count_z) 
To prevent this command from being executed, return true, otherwise return false.  
 | 
| dispatch_rays  | Called before:  
- 
ID3D12GraphicsCommandList::DispatchRays 
 
- 
vkCmdTraceRaysKHR 
 
 
Callback function signature: bool (api::command_list *cmd_list, api::resource raygen, uint64_t raygen_offset, uint64_t raygen_size, api::resource miss, uint64_t miss_offset, uint64_t miss_size, uint64_t miss_stride, api::resource hit_group, uint64_t hit_group_offset, uint64_t hit_group_size, uint64_t hit_group_stride, api::resource callable, uint64_t callable_offset, uint64_t callable_size, uint64_t callable_stride, uint32_t width, uint32_t height, uint32_t depth) 
To prevent this command from being executed, return true, otherwise return false. In case of D3D12 and Vulkan, the shader handle buffer handles may be zero with the buffers instead referred to via a device address passed in the related offset argument.  
 | 
| draw_or_dispatch_indirect  | Called before:  
- 
ID3D11DeviceContext::DrawInstancedIndirect 
 
- 
ID3D11DeviceContext::DrawIndexedInstancedIndirect 
 
- 
ID3D11DeviceContext::DispatchIndirect 
 
- 
ID3D12GraphicsCommandList::ExecuteIndirect 
 
- 
glDrawArraysIndirect 
 
- 
glDrawElementsIndirect 
 
- 
glMultiDrawArraysIndirect 
 
- 
glMultiDrawElementsIndirect 
 
- 
glDispatchComputeIndirect 
 
- 
vkCmdDrawIndirect 
 
- 
vkCmdDrawIndexedIndirect 
 
- 
vkCmdDispatchIndirect 
 
- 
vkCmdTraceRaysIndirect2KHR 
 
- 
vkCmdDrawMeshTasksIndirectEXT 
 
- 
vkCmdDrawMeshTasksIndirectCountEXT 
 
 
Callback function signature: bool (api::command_list *cmd_list, api::indirect_command type, api::resource buffer, uint64_t offset, uint32_t draw_count, uint32_t stride) 
To prevent this command from being executed, return true, otherwise return false.  
 | 
| copy_resource  | Called before:  
- 
IDirect3DDevice9::UpdateTexture 
 
- 
IDirect3DDevice9::GetRenderTargetData 
 
- 
ID3D10Device::CopyResource 
 
- 
ID3D11DeviceContext::CopyResource 
 
- 
ID3D12GraphicsCommandList::CopyResource 
 
 
Callback function signature: bool (api::command_list *cmd_list, api::resource source, api::resource dest) 
To prevent this command from being executed, return true, otherwise return false. Source resource will be in the api::resource_usage::copy_source state. Destination resource will be in the api::resource_usage::copy_dest state.  
 | 
| copy_buffer_region  | Called before:  
- 
ID3D11DeviceContext::CopySubresourceRegion 
 
- 
ID3D11DeviceContext1::CopySubresourceRegion1 
 
- 
ID3D12GraphicsCommandList::CopyBufferRegion 
 
- 
glCopyBufferSubData 
 
- 
glCopyNamedBufferSubData 
 
- 
vkCmdCopyBuffer 
 
- 
vkCmdCopyBuffer2 
 
 
Callback function signature: bool (api::command_list *cmd_list, api::resource source, uint64_t source_offset, api::resource dest, uint64_t dest_offset, uint64_t size) 
To prevent this command from being executed, return true, otherwise return false. Source resource will be in the api::resource_usage::copy_source state. Destination resource will be in the api::resource_usage::copy_dest state.  
 | 
| copy_buffer_to_texture  | Called before:  
- 
ID3D12GraphicsCommandList::CopyTextureRegion 
 
- 
vkCmdCopyBufferToImage 
 
- 
vkCmdCopyBufferToImage2 
 
 
Callback function signature: bool (api::command_list *cmd_list, api::resource source, uint64_t source_offset, uint32_t row_length, uint32_t slice_height, api::resource dest, uint32_t dest_subresource, const api::subresource_box *dest_box) 
To prevent this command from being executed, return true, otherwise return false. Source resource will be in the api::resource_usage::copy_source state. Destination resource will be in the api::resource_usage::copy_dest state. The subresource box argument is optional and may be nullptr (which indicates the entire subresource is referenced).  
 | 
| copy_texture_region  | Called before:  
- 
IDirect3DDevice9::UpdateSurface 
 
- 
IDirect3DDevice9::StretchRect 
 
- 
ID3D10Device::CopySubresourceRegion 
 
- 
ID3D11DeviceContext::CopySubresourceRegion 
 
- 
ID3D11DeviceContext1::CopySubresourceRegion1 
 
- 
ID3D12GraphicsCommandList::CopyTextureRegion 
 
- 
glBlitFramebuffer 
 
- 
glBlitNamedFramebuffer 
 
- 
glCopyImageSubData 
 
- 
glCopyTexSubImage1D 
 
- 
glCopyTexSubImage2D 
 
- 
glCopyTexSubImage3D 
 
- 
glCopyTextureSubImage1D 
 
- 
glCopyTextureSubImage2D 
 
- 
glCopyTextureSubImage3D 
 
- 
vkCmdBlitImage 
 
- 
vkCmdBlitImage2 
 
- 
vkCmdCopyImage 
 
- 
vkCmdCopyImage2 
 
 
Callback function signature: bool (api::command_list *cmd_list, api::resource source, uint32_t source_subresource, const api::subresource_box *source_box, api::resource dest, uint32_t dest_subresource, const api::subresource_box *dest_box, api::filter_mode filter) 
To prevent this command from being executed, return true, otherwise return false. Source resource will be in the api::resource_usage::copy_source state. Destination resource will be in the api::resource_usage::copy_dest state. The subresource box arguments are optional and may be nullptr (which indicates the entire subresource is used).  
 | 
| copy_texture_to_buffer  | Called before:  
- 
ID3D12GraphicsCommandList::CopyTextureRegion 
 
- 
vkCmdCopyImageToBuffer 
 
- 
vkCmdCopyImageToBuffer2 
 
 
Callback function signature: bool (api::command_list *cmd_list, api::resource source, uint32_t source_subresource, const api::subresource_box *source_box, api::resource dest, uint64_t dest_offset, uint32_t row_length, uint32_t slice_height) 
To prevent this command from being executed, return true, otherwise return false. Source resource will be in the api::resource_usage::copy_source state. Destination resource will be in the api::resource_usage::copy_dest state. The subresource box argument is optional and may be nullptr (which indicates the entire subresource is used).  
 | 
| resolve_texture_region  | Called before:  
- 
IDirect3DDevice9::StretchRect 
 
- 
ID3D10Device::ResolveSubresource 
 
- 
ID3D11DeviceContext::ResolveSubresource 
 
- 
ID3D12GraphicsCommandList::ResolveSubresource 
 
- 
ID3D12GraphicsCommandList1::ResolveSubresourceRegion 
 
- 
glBlitFramebuffer 
 
- 
glBlitNamedFramebuffer 
 
- 
vkCmdResolveImage 
 
- 
vkCmdResolveImage2 
 
 
Callback function signature: bool (api::command_list *cmd_list, api::resource source, uint32_t source_subresource, const api::subresource_box *source_box, api::resource dest, uint32_t dest_subresource, uint32_t dest_x, uint32_t dest_y, uint32_t dest_z, api::format format) 
To prevent this command from being executed, return true, otherwise return false. Source resource will be in the api::resource_usage::resolve_source state. Destination resource will be in the api::resource_usage::resolve_dest state. The subresource box argument is optional and may be nullptr (which indicates the entire subresource is used).  
 | 
| clear_depth_stencil_view  | Called before:  
- 
IDirect3DDevice9::Clear 
 
- 
ID3D10Device::ClearDepthStencilView 
 
- 
ID3D11DeviceContext::ClearDepthStencilView 
 
- 
ID3D11DeviceContext1::ClearView (for depth-stencil views) 
 
- 
ID3D12GraphicsCommandList::ClearDepthStencilView 
 
- 
glClear 
 
- 
glClearBufferfi 
 
- 
glClearBufferfv 
 
- 
glClearNamedFramebufferfi 
 
- 
glClearNamedFramebufferfv 
 
- 
vkCmdClearDepthStencilImage 
 
- 
vkCmdClearAttachments 
 
 
Callback function signature: bool (api::command_list *cmd_list, api::resource_view dsv, const float *depth, const uint8_t *stencil, uint32_t rect_count, const api::rect *rects) 
To prevent this command from being executed, return true, otherwise return false. Resource will be in the api::resource_usage::depth_stencil_write state. One of the depth or stencil clear value arguments may be nullptr when the respective component is not cleared.  
 | 
| clear_render_target_view  | Called before:  
- 
IDirect3DDevice9::Clear 
 
- 
IDirect3DDevice9::ColorFill 
 
- 
ID3D10Device::ClearRenderTargetView 
 
- 
ID3D11DeviceContext::ClearRenderTargetView 
 
- 
ID3D11DeviceContext1::ClearView (for render target views) 
 
- 
ID3D12GraphicsCommandList::ClearRenderTargetView 
 
- 
glClear 
 
- 
glClearBufferfv 
 
- 
glClearNamedFramebufferfv 
 
- 
vkCmdClearColorImage 
 
- 
vkCmdClearAttachments 
 
 
Callback function signature: bool (api::command_list *cmd_list, api::resource_view rtv, const float color[4], uint32_t rect_count, const api::rect *rects) 
To prevent this command from being executed, return true, otherwise return false. Resources will be in the api::resource_usage::render_target state.  
 | 
| clear_unordered_access_view_uint  | Called before:  
- 
ID3D11DeviceContext::ClearUnorderedAccessViewUint 
 
- 
ID3D12GraphicsCommandList::ClearUnorderedAccessViewUint 
 
 
Callback function signature: bool (api::command_list *cmd_list, api::resource_view uav, const uint32_t values[4], uint32_t rect_count, const api::rect *rects) 
To prevent this command from being executed, return true, otherwise return false. Resource will be in the api::resource_usage::unordered_access state.  
 | 
| clear_unordered_access_view_float  | Called before:  
- 
ID3D11DeviceContext::ClearUnorderedAccessViewFloat 
 
- 
ID3D11DeviceContext1::ClearView (for unordered access views) 
 
- 
ID3D12GraphicsCommandList::ClearUnorderedAccessViewFloat 
 
 
Callback function signature: bool (api::command_list *cmd_list, api::resource_view uav, const float values[4], uint32_t rect_count, const api::rect *rects) 
To prevent this command from being executed, return true, otherwise return false. Resource will be in the api::resource_usage::unordered_access state.  
 | 
| generate_mipmaps  | Called before:  
- 
ID3D10Device::GenerateMips 
 
- 
ID3D11DeviceContext::GenerateMips 
 
- 
glGenerateMipmap 
 
- 
glGenerateTextureMipmap 
 
 
Callback function signature: bool (api::command_list *cmd_list, api::resource_view srv) 
To prevent this command from being executed, return true, otherwise return false.  
 | 
| begin_query  | Called before:  
- 
ID3D12GraphicsCommandList::BeginQuery 
 
- 
vkCmdBeginQuery 
 
- 
vkCmdBeginQueryIndexedEXT 
 
 
Callback function signature: bool (api::command_list *cmd_list, api::query_heap heap, api::query_type type, uint32_t index) 
To prevent this command from being executed, return true, otherwise return false.  
 | 
| end_query  | Called before:  
- 
ID3D12GraphicsCommandList::EndQuery 
 
- 
vkCmdEndQuery 
 
- 
vkCmdEndQueryIndexedEXT 
 
- 
vkCmdWriteTimestamp 
 
- 
vkCmdWriteTimestamp2 
 
 
Callback function signature: bool (api::command_list *cmd_list, api::query_heap heap, api::query_type type, uint32_t index) 
To prevent this command from being executed, return true, otherwise return false.  
 | 
| copy_query_heap_results  | Called before:  
- 
ID3D12GraphicsCommandList::ResolveQueryData 
 
- 
vkCmdCopyQueryPoolResults 
 
 
Callback function signature: bool (api::command_list *cmd_list, api::query_heap heap, api::query_type type, uint32_t first, uint32_t count, api::resource dest, uint64_t dest_offset, uint32_t stride) 
To prevent this command from being executed, return true, otherwise return false.  
 | 
| copy_acceleration_structure  | Called before:  
- 
ID3D12GraphicsCommandList4::CopyRaytracingAccelerationStructure 
 
- 
vkCmdCopyAccelerationStructureKHR 
 
 
Callback function signature: bool (api::command_list *cmd_list, api::resource_view source, api::resource_view dest, api::acceleration_structure_copy_mode mode) 
To prevent this command from being executed, return true, otherwise return false.  
 | 
| build_acceleration_structure  | Called before:  
- 
ID3D12GraphicsCommandList4::BuildRaytracingAccelerationStructure 
 
- 
vkCmdBuildAccelerationStructuresKHR 
 
 
Callback function signature: bool (api::command_list *cmd_list, api::acceleration_structure_type type, api::acceleration_structure_build_flags flags, uint32_t input_count, const api::acceleration_structure_build_input *inputs, api::resource scratch, uint64_t scratch_offset, api::resource_view source, api::resource_view dest, api::acceleration_structure_build_mode mode) 
To prevent this command from being executed, return true, otherwise return false. In case of D3D12 and Vulkan, the scratch buffer handle may be zero with the buffer instead referred to via a device address passed in the related offset argument. Scratch buffer will be in the api::resource_usage::unordered_access resource state.  
 | 
| query_acceleration_structures  | Called before:  
- 
ID3D12GraphicsCommandList4::EmitRaytracingAccelerationStructurePostbuildInfo 
 
- 
vkCmdWriteAccelerationStructuresPropertiesKHR 
 
 
Callback function signature: bool (api::command_list *cmd_list, uint32_t count, const api::resource_view *acceleration_structures, api::query_heap heap, api::query_type type, uint32_t first) 
 | 
| reset_command_list  | Called before:  
- 
ID3D11DeviceContext::FinishCommandList 
 
- 
ID3D12GraphicsCommandList::Reset 
 
- 
vkBeginCommandBuffer 
 
 
Callback function signature: void (api::command_list *cmd_list) 
Is not called for immediate command lists (since they cannot be reset).  
 | 
| close_command_list  | Called before:  
- 
ID3D11DeviceContext::FinishCommandList 
 
- 
ID3D12GraphicsCommandList::Close 
 
- 
vkEndCommandBuffer 
 
 
Callback function signature: void (api::command_list *cmd_list) 
Is not called for immediate command lists (since they cannot be closed).  
 | 
| execute_command_list  | Called when a command list is submitted to a command queue (or an immediate command list is flushed), before:  
- 
IDirect3DDevice9::EndScene 
 
- 
ID3D10Device::Flush 
 
- 
ID3D11DeviceContext::Flush 
 
- 
ID3D11DeviceContext3::Flush1 
 
- 
ID3D12CommandQueue::ExecuteCommandLists 
 
- 
glFlush 
 
- 
vkQueueSubmit 
 
 
Callback function signature: void (api::command_queue *queue, api::command_list *cmd_list) 
 | 
| execute_secondary_command_list  | Called when a secondary command list is executed on a primary command list, before:  
- 
ID3D11DeviceContext::ExecuteCommandList 
 
- 
ID3D12GraphicsCommandList::ExecuteBundle 
 
- 
vkCmdExecuteCommands 
 
 
In addition, called after:  
- 
ID3D11DeviceContext::FinishCommandList 
 
 
Callback function signature: void (api::command_list *cmd_list, api::command_list *secondary_cmd_list) 
 | 
| present  | Called before:  
- 
IDirect3DDevice9::Present 
 
- 
IDirect3DDevice9Ex::PresentEx 
 
- 
IDirect3DSwapChain9::Present 
 
- 
IDXGISwapChain::Present 
 
- 
IDXGISwapChain3::Present1 
 
- 
ID3D12CommandQueueDownlevel::Present 
 
- 
wglSwapBuffers 
 
- 
vkQueuePresentKHR 
 
- 
IVRCompositor::Submit 
 
- 
xrEndFrame 
 
 
Callback function signature: void (api::command_queue *queue, api::swapchain *swapchain, const api::rect *source_rect, const api::rect *dest_rect, uint32_t dirty_rect_count, const api::rect *dirty_rects) 
The source and destination rectangle arguments are optional and may be nullptr (which indicates the swap chain is presented in its entirety).  
 | 
| finish_present  | Called after successful presentation, from:  
- 
IDirect3DDevice9::Present 
 
- 
IDirect3DDevice9Ex::PresentEx 
 
- 
IDirect3DSwapChain9::Present 
 
- 
IDXGISwapChain::Present 
 
- 
IDXGISwapChain3::Present1 
 
- 
ID3D12CommandQueueDownlevel::Present 
 
- 
wglSwapBuffers 
 
- 
vkQueuePresentKHR 
 
 
Callback function signature: void (api::command_queue *queue, api::swapchain *swapchain) 
 | 
| set_fullscreen_state  | Called before:  
- 
IDXGISwapChain::SetFullscreenState 
 
- 
vkAcquireFullScreenExclusiveModeEXT 
 
- 
vkReleaseFullScreenExclusiveModeEXT 
 
 
Callback function signature: bool (api::swapchain *swapchain, bool fullscreen, void *hmonitor) 
To prevent the fullscreen state from being changed, return true, otherwise return false.  
 | 
| reshade_present  | Called after ReShade has rendered its overlay.  
Callback function signature: void (api::effect_runtime *runtime) 
 | 
| reshade_begin_effects  | Called right before ReShade effects are rendered.  
Callback function signature: void (api::effect_runtime *runtime, api::command_list *cmd_list, api::resource_view rtv, api::resource_view rtv_srgb) 
 | 
| reshade_finish_effects  | Called right after ReShade effects were rendered.  
Callback function signature: void (api::effect_runtime *runtime, api::command_list *cmd_list, api::resource_view rtv, api::resource_view rtv_srgb) 
 | 
| reshade_reloaded_effects  | Called right after all ReShade effects were reloaded. This occurs during effect runtime initialization or because the user pressed the "Reload" button in the overlay. Any api::effect_technique, api::effect_texture_variable and api::effect_uniform_variable handles are invalidated when this event occurs and need to be queried again.  
Callback function signature: void (api::effect_runtime *runtime) 
 | 
| reshade_set_uniform_value  | Called before a uniform variable is changed, with the new value.  
Callback function signature: bool (api::effect_runtime *runtime, api::effect_uniform_variable variable, const void *new_value, size_t new_value_size) 
To prevent the variable value from being changed, return true, otherwise return false. The new value has the data type reported by api::effect_runtime::get_uniform_variable_type. The new value size is in bytes.  
 | 
| reshade_set_technique_state  | Called before a technique is enabled or disabled, with the new state.  
Callback function signature: bool (api::effect_runtime *runtime, api::effect_technique technique, bool enabled) 
To prevent the technique state from being changed, return true, otherwise return false.  
 | 
| reshade_overlay  | Called between the ImGui::NewFrame and ImGui::EndFrame calls for the ReShade overlay. Can be used to perform custom Dear ImGui calls, but it is recommended to instead use register_overlay to register a dedicated overlay.  
Callback function signature: void (api::effect_runtime *runtime) 
This is not called for effect runtimes in VR.  
 | 
| reshade_screenshot  | Called after a screenshot was taken and saved to disk, with the path to the saved image file.  
Callback function signature: void (api::effect_runtime *runtime, const char *path) 
 | 
| reshade_render_technique  | Called for each technique after it was rendered, usually between reshade_begin_effects and reshade_finish_effects.  
Callback function signature: void (api::effect_runtime *runtime, api::effect_technique technique, api::command_list *cmd_list, api::resource_view rtv, api::resource_view rtv_srgb) 
 | 
| reshade_set_effects_state  | Called when all effects are about to be enabled or disabled.  
Callback function signature: bool (api::effect_runtime *runtime, bool enabled) 
To prevent the effects state from being changed, return true, otherwise return false.  
 | 
| reshade_set_current_preset_path  | Called after a preset was loaded and applied. This occurs after effect reloading or when the user chooses a new preset in the overlay.  
Callback function signature: void (api::effect_runtime *runtime, const char *path) 
 | 
| reshade_reorder_techniques  | Called when the rendering order of loaded techniques is changed, with a handle array specifying the new order.  
Callback function signature: bool (api::effect_runtime *runtime, size_t count, api::effect_technique *techniques) 
To prevent the order from being changed, return true, otherwise return false.  
 | 
| reshade_open_overlay  | Called when the ReShade overlay is about to be opened or closed.  
Callback function signature: bool (api::effect_runtime *runtime, bool open, api::input_source source) 
To prevent the overlay state from being changed, return true, otherwise return false.  
 | 
| reshade_overlay_uniform_variable  | Called when a uniform variable widget is added to the variable list in the overlay. Can be used to replace with custom one or add widgets for specific uniform variables.  
Callback function signature: bool (api::effect_runtime *runtime, api::effect_uniform_variable variable) 
To prevent the normal widget from being added to the overlay, return true, otherwise return false.  
 | 
| reshade_overlay_technique  | Called when a technique is added to the technique list in the overlay. Can be used to replace with custom one or add widgets for specific techniques.  
Callback function signature: bool (api::effect_runtime *runtime, api::effect_technique technique) 
To prevent the normal widget from being added to the overlay, return true, otherwise return false.  
 |