ReShade
A generic post-processing injector for games and video software.
reshade_events.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 Patrick Mours
3  * SPDX-License-Identifier: BSD-3-Clause OR MIT
4  */
5 
6 #pragma once
7 
8 #include "reshade_api.hpp"
9 
10 namespace reshade
11 {
12  enum class addon_event : uint32_t
13  {
34 
55  create_device = 96,
56 
71  destroy_device = 1,
72 
90 
101 
114 
124 
148 
169  create_swapchain = 97,
170 
191  destroy_swapchain = 8,
192 
198 
204 
220  init_sampler,
221 
240 
254 
323 
390 
410 
449 
486 
505 
522 
537 
553 
569 
599 
638 
685  init_pipeline = 26,
686 
730 
763 
776 
789 
799 
813 
830 
841 
852 
862 
872 
883  barrier,
884 
902 
919 
934 
969 
993 
1011 
1028 
1044 
1099 
1112 
1126 
1146 
1166 
1190  draw,
1191 
1218  draw_indexed,
1219 
1233  dispatch = 54,
1234 
1246  dispatch_mesh = 89,
1247 
1260  dispatch_rays = 90,
1261 
1287 
1304  copy_resource,
1305 
1325 
1342 
1375 
1392 
1415 
1440 
1463 
1477 
1492 
1507 
1520  begin_query,
1521 
1536  end_query,
1537 
1550 
1563 
1578 
1588 
1601  reset_command_list = 70,
1602 
1616 
1631 
1646 
1666  present,
1681  finish_present = 100,
1682 
1695  set_fullscreen_state = 93,
1696 
1701  reshade_present = 75,
1702 
1708 
1714 
1722 
1740 
1750 
1756 
1762 
1771 
1778 
1787 
1796 
1806 
1816 
1817 #if RESHADE_ADDON
1818  max = 101 // Last value used internally by ReShade to determine number of events in this enum
1819 #endif
1820  };
1821 
1822  template <addon_event ev>
1823  struct addon_event_traits;
1824 
1825 #define RESHADE_DEFINE_ADDON_EVENT_TRAITS(ev, ret, ...) \
1826  template <> \
1827  struct addon_event_traits<ev> { \
1828  using decl = ret(*)(__VA_ARGS__); \
1829  using type = ret; \
1830  }
1831 
1832  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::init_device, void, api::device *device);
1835 
1836  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::init_command_list, void, api::command_list *cmd_list);
1837  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::destroy_command_list, void, api::command_list *cmd_list);
1838 
1839  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::init_command_queue, void, api::command_queue *queue);
1841 
1842  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::init_swapchain, void, api::swapchain *swapchain, bool resize);
1843  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::create_swapchain, bool, api::device_api api, api::swapchain_desc &desc, void *hwnd);
1844  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::destroy_swapchain, void, api::swapchain *swapchain, bool resize);
1845 
1846  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::init_effect_runtime, void, api::effect_runtime *runtime);
1847  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::destroy_effect_runtime, void, api::effect_runtime *runtime);
1848 
1849  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::init_sampler, void, api::device *device, const api::sampler_desc &desc, api::sampler sampler);
1850  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::create_sampler, bool, api::device *device, api::sampler_desc &desc);
1851  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::destroy_sampler, void, api::device *device, api::sampler sampler);
1852 
1853  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::init_resource, void, api::device *device, const api::resource_desc &desc, const api::subresource_data *initial_data, api::resource_usage initial_state, api::resource resource);
1854  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::create_resource, bool, api::device *device, api::resource_desc &desc, api::subresource_data *initial_data, api::resource_usage initial_state);
1855  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::destroy_resource, void, api::device *device, api::resource resource);
1856 
1857  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::init_resource_view, void, api::device *device, api::resource resource, api::resource_usage usage_type, const api::resource_view_desc &desc, api::resource_view view);
1858  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::create_resource_view, bool, api::device *device, api::resource resource, api::resource_usage usage_type, api::resource_view_desc &desc);
1859  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::destroy_resource_view, void, api::device *device, api::resource_view view);
1860 
1861  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::map_buffer_region, void, api::device *device, api::resource resource, uint64_t offset, uint64_t size, api::map_access access, void **data);
1862  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::unmap_buffer_region, void, api::device *device, api::resource resource);
1863  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::map_texture_region, void, api::device *device, api::resource resource, uint32_t subresource, const api::subresource_box *box, api::map_access access, api::subresource_data *data);
1864  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::unmap_texture_region, void, api::device *device, api::resource resource, uint32_t subresource);
1865 
1866  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::update_buffer_region, bool, api::device *device, const void *data, api::resource dest, uint64_t dest_offset, uint64_t size);
1867  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::update_texture_region, bool, api::device *device, const api::subresource_data &data, api::resource dest, uint32_t dest_subresource, const api::subresource_box *dest_box);
1868 
1869  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::init_pipeline, void, api::device *device, api::pipeline_layout layout, uint32_t subobject_count, const api::pipeline_subobject *subobjects, api::pipeline pipeline);
1870  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::create_pipeline, bool, api::device *device, api::pipeline_layout layout, uint32_t subobject_count, const api::pipeline_subobject *subobjects);
1871  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::destroy_pipeline, void, api::device *device, api::pipeline pipeline);
1872 
1873  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::init_pipeline_layout, void, api::device *device, uint32_t param_count, const api::pipeline_layout_param *params, api::pipeline_layout layout);
1874  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::create_pipeline_layout, bool, api::device *device, uint32_t &param_count, api::pipeline_layout_param *&params);
1875  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::destroy_pipeline_layout, void, api::device *device, api::pipeline_layout layout);
1876 
1877  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::copy_descriptor_tables, bool, api::device *device, uint32_t count, const api::descriptor_table_copy *copies);
1878  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::update_descriptor_tables, bool, api::device *device, uint32_t count, const api::descriptor_table_update *updates);
1879 
1880  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::init_query_heap, void, api::device *device, api::query_type type, uint32_t count, api::query_heap heap);
1881  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::create_query_heap, bool, api::device *device, api::query_type type, uint32_t &count);
1882  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::destroy_query_heap, void, api::device *device, api::query_heap heap);
1883 
1884  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::get_query_heap_results, bool, api::device *device, api::query_heap heap, api::query_type type, uint32_t first, uint32_t count, void *results, uint32_t stride);
1885 
1886  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::barrier, 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);
1887 
1888  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::begin_render_pass, bool, api::command_list *cmd_list, uint32_t count, const api::render_pass_render_target_desc *rts, const api::render_pass_depth_stencil_desc *ds, api::render_pass_flags flags);
1889  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::end_render_pass, bool, api::command_list *cmd_list);
1890  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::bind_render_targets_and_depth_stencil, void, api::command_list *cmd_list, uint32_t count, const api::resource_view *rtvs, api::resource_view dsv);
1891 
1892  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::bind_pipeline, void, api::command_list *cmd_list, api::pipeline_stage stages, api::pipeline pipeline);
1893  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::bind_pipeline_states, void, api::command_list *cmd_list, uint32_t count, const api::dynamic_state *states, const uint32_t *values);
1894  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::bind_viewports, void, api::command_list *cmd_list, uint32_t first, uint32_t count, const api::viewport *viewports);
1895  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::bind_scissor_rects, void, api::command_list *cmd_list, uint32_t first, uint32_t count, const api::rect *rects);
1896  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::push_constants, 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);
1897  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::push_descriptors, void, api::command_list *cmd_list, api::shader_stage stages, api::pipeline_layout layout, uint32_t layout_param, const api::descriptor_table_update &update);
1898  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::bind_descriptor_tables, 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, uint32_t dynamic_offset_count, const uint32_t *dynamic_offsets);
1899  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::bind_index_buffer, void, api::command_list *cmd_list, api::resource buffer, uint64_t offset, uint32_t index_size);
1900  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::bind_vertex_buffers, void, api::command_list *cmd_list, uint32_t first, uint32_t count, const api::resource *buffers, const uint64_t *offsets, const uint32_t *strides);
1901  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::bind_stream_output_buffers, 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);
1902 
1903  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::draw, bool, api::command_list *cmd_list, uint32_t vertex_count, uint32_t instance_count, uint32_t first_vertex, uint32_t first_instance);
1904  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::draw_indexed, 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);
1905  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::dispatch, bool, api::command_list *cmd_list, uint32_t group_count_x, uint32_t group_count_y, uint32_t group_count_z);
1906  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::dispatch_mesh, bool, api::command_list *cmd_list, uint32_t group_count_x, uint32_t group_count_y, uint32_t group_count_z);
1907  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::dispatch_rays, 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);
1908  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::draw_or_dispatch_indirect, bool, api::command_list *cmd_list, api::indirect_command type, api::resource buffer, uint64_t offset, uint32_t draw_count, uint32_t stride);
1909 
1910  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::copy_resource, bool, api::command_list *cmd_list, api::resource source, api::resource dest);
1911  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::copy_buffer_region, bool, api::command_list *cmd_list, api::resource source, uint64_t source_offset, api::resource dest, uint64_t dest_offset, uint64_t size);
1912  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::copy_buffer_to_texture, 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);
1913  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::copy_texture_region, 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);
1914  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::copy_texture_to_buffer, 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);
1915  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::resolve_texture_region, 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);
1916 
1917  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::clear_depth_stencil_view, 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);
1918  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::clear_render_target_view, bool, api::command_list *cmd_list, api::resource_view rtv, const float color[4], uint32_t rect_count, const api::rect *rects);
1919  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::clear_unordered_access_view_uint, bool, api::command_list *cmd_list, api::resource_view uav, const uint32_t values[4], uint32_t rect_count, const api::rect *rects);
1920  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::clear_unordered_access_view_float, bool, api::command_list *cmd_list, api::resource_view uav, const float values[4], uint32_t rect_count, const api::rect *rects);
1921 
1922  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::generate_mipmaps, bool, api::command_list *cmd_list, api::resource_view srv);
1923 
1924  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::begin_query, bool, api::command_list *cmd_list, api::query_heap heap, api::query_type type, uint32_t index);
1925  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::end_query, bool, api::command_list *cmd_list, api::query_heap heap, api::query_type type, uint32_t index);
1926  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::copy_query_heap_results, 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);
1927 
1928  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::copy_acceleration_structure, bool, api::command_list *cmd_list, api::resource_view source, api::resource_view dest, api::acceleration_structure_copy_mode mode);
1929  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::build_acceleration_structure, 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);
1930  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::query_acceleration_structures, 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);
1931 
1932  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::update_buffer_region_command, bool, api::command_list *cmd_list, const void *data, api::resource dest, uint64_t dest_offset, uint64_t size);
1933  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::update_texture_region_command, bool, api::command_list *cmd_list, const api::subresource_data &data, api::resource dest, uint32_t dest_subresource, const api::subresource_box *dest_box);
1934 
1935  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::reset_command_list, void, api::command_list *cmd_list);
1936  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::close_command_list, void, api::command_list *cmd_list);
1937 
1938  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::execute_command_list, void, api::command_queue *queue, api::command_list *cmd_list);
1939  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::execute_secondary_command_list, void, api::command_list *cmd_list, api::command_list *secondary_cmd_list);
1940 
1941  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::present, 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);
1942  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::finish_present, void, api::command_queue *queue, api::swapchain *swapchain);
1943  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::set_fullscreen_state, bool, api::swapchain *swapchain, bool fullscreen, void *hmonitor);
1944 
1945  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::reshade_present, void, api::effect_runtime *runtime);
1946  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::reshade_begin_effects, void, api::effect_runtime *runtime, api::command_list *cmd_list, api::resource_view rtv, api::resource_view rtv_srgb);
1947  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::reshade_finish_effects, void, api::effect_runtime *runtime, api::command_list *cmd_list, api::resource_view rtv, api::resource_view rtv_srgb);
1948  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::reshade_reloaded_effects, void, api::effect_runtime *runtime);
1949 
1950  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::reshade_set_uniform_value, bool, api::effect_runtime *runtime, api::effect_uniform_variable variable, const void *data, size_t size);
1951  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::reshade_set_technique_state, bool, api::effect_runtime *runtime, api::effect_technique technique, bool enabled);
1952 
1953  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::reshade_overlay, void, api::effect_runtime *runtime);
1954  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::reshade_screenshot, void, api::effect_runtime *runtime, const char *path);
1955 
1956  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::reshade_render_technique, void, api::effect_runtime *runtime, api::effect_technique technique, api::command_list *cmd_list, api::resource_view rtv, api::resource_view rtv_srgb);
1957 
1958  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::reshade_set_effects_state, bool, api::effect_runtime *runtime, bool enabled);
1959  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::reshade_set_current_preset_path, void, api::effect_runtime *runtime, const char *path);
1960  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::reshade_reorder_techniques, bool, api::effect_runtime *runtime, size_t count, api::effect_technique *techniques);
1961 
1962  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::reshade_open_overlay, bool, api::effect_runtime *runtime, bool open, api::input_source source);
1963 
1964  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::reshade_overlay_uniform_variable, bool, api::effect_runtime *runtime, api::effect_uniform_variable variable);
1965  RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::reshade_overlay_technique, bool, api::effect_runtime *runtime, api::effect_technique technique);
1966 }
device_api
Underlying graphics API a device is using.
Definition: reshade_api_device.hpp:17
acceleration_structure_build_mode
Type of an acceleration structure build operation.
Definition: reshade_api_resource.hpp:672
query_type
Type of a query.
Definition: reshade_api_pipeline.hpp:1223
acceleration_structure_type
Type of an acceleration structure.
Definition: reshade_api_resource.hpp:651
dynamic_state
A list of all possible render pipeline states that can be set independent of pipeline state objects.
Definition: reshade_api_pipeline.hpp:1299
pipeline_stage
Flags that specify the pipeline stages in the render pipeline.
Definition: reshade_api_pipeline.hpp:46
indirect_command
Type of an indirect draw/dispatch command.
Definition: reshade_api_device.hpp:672
input_source
Input source for events triggered by user input.
Definition: reshade_api.hpp:38
render_pass_flags
Flags that specify additional parameters of a render pass.
Definition: reshade_api_resource.hpp:561
map_access
Memory mapping access types.
Definition: reshade_api_resource.hpp:152
acceleration_structure_copy_mode
Type of an acceleration structure copy operation.
Definition: reshade_api_resource.hpp:661
acceleration_structure_build_flags
Flags that specify additional parameters to an acceleration structure build operation.
Definition: reshade_api_resource.hpp:681
format
Available data and texture formats. This is mostly compatible with 'DXGI_FORMAT'.
Definition: reshade_api_format.hpp:18
filter_mode
Texture filtering modes available for texture sampling operations.
Definition: reshade_api_resource.hpp:50
shader_stage
Flags that specify the shader stages in the render pipeline.
Definition: reshade_api_pipeline.hpp:17
resource_usage
Flags that specify how a resource is used. This needs to be specified during creation and is also use...
Definition: reshade_api_resource.hpp:255
Definition: reshade.hpp:58
addon_event
Definition: reshade_events.hpp:13
@ execute_secondary_command_list
Called when a secondary command list is executed on a primary command list, before: ID3D11DeviceConte...
@ set_fullscreen_state
Called before: IDXGISwapChain::SetFullscreenState vkAcquireFullScreenExclusiveModeEXT vkReleaseFullSc...
@ destroy_effect_runtime
Called when an effect runtime is reset or destroyed.
@ push_descriptors
Called after: IDirect3DDevice9::SetTexture ID3D10Device::VSSetSamplers ID3D10Device::VSSetShaderResou...
@ bind_pipeline
Called after: IDirect3DDevice9::SetVertexShader IDirect3DDevice9::SetPixelShader IDirect3DDevice9::Se...
@ init_device
Called after successful device creation, from: IDirect3D9::CreateDevice IDirect3D9Ex::CreateDeviceEx ...
@ reshade_present
Called after ReShade has rendered its overlay.
@ clear_render_target_view
Called before: IDirect3DDevice9::Clear IDirect3DDevice9::ColorFill ID3D10Device::ClearRenderTargetVie...
@ reshade_set_technique_state
Called before a technique is enabled or disabled, with the new state.
@ copy_descriptor_tables
Called before: ID3D12Device::CopyDescriptors ID3D12Device::CopyDescriptorsSimple vkUpdateDescriptorSe...
@ execute_command_list
Called when a command list is submitted to a command queue (or an immediate command list is flushed),...
@ bind_index_buffer
Called after: IDirect3DDevice9::SetIndices ID3D10Device::IASetIndexBuffer ID3D11DeviceContext::IASetI...
@ destroy_swapchain
Called on swap chain destruction (with the resize argument set to false), before: IDirect3DDevice9::R...
@ bind_pipeline_states
Called after: IDirect3DDevice9::SetRenderState ID3D10Device::IASetPrimitiveTopology ID3D10Device::OMS...
@ dispatch_rays
Called before: ID3D12GraphicsCommandList::DispatchRays vkCmdTraceRaysKHR
@ reshade_overlay
Called between the ImGui::NewFrame and ImGui::EndFrame calls for the ReShade overlay....
@ init_sampler
Called after successful sampler creation from: ID3D10Device::CreateSamplerState ID3D11Device::CreateS...
@ clear_depth_stencil_view
Called before: IDirect3DDevice9::Clear ID3D10Device::ClearDepthStencilView ID3D11DeviceContext::Clear...
@ init_pipeline
Called after successful pipeline creation from: IDirect3DDevice9::CreateVertexShader IDirect3DDevice9...
@ init_effect_runtime
Called after effect runtime initialization (which happens after swap chain creation or a swap chain b...
@ destroy_command_list
Called on command list destruction, before: ID3D11CommandList::Release ID3D12CommandList::Release vkF...
@ destroy_resource_view
Called on resource view destruction, before: IDirect3DResource9::Release ID3D10View::Release ID3D11Vi...
@ draw_or_dispatch_indirect
Called before: ID3D11DeviceContext::DrawInstancedIndirect ID3D11DeviceContext::DrawIndexedInstancedIn...
@ reshade_overlay_technique
Called when a technique is added to the technique list in the overlay. Can be used to replace with cu...
@ close_command_list
Called before: ID3D11DeviceContext::FinishCommandList ID3D12GraphicsCommandList::Close vkEndCommandBu...
@ draw_indexed
Called before: IDirect3DDevice9::DrawIndexedPrimitive IDirect3DDevice9::DrawIndexedPrimitiveUP ID3D10...
@ unmap_texture_region
Called before: IDirect3DSurface9::UnlockRect IDirect3DVolume9::UnlockBox IDirect3DTexture9::UnlockRec...
@ reshade_overlay_uniform_variable
Called when a uniform variable widget is added to the variable list in the overlay....
@ reshade_screenshot
Called after a screenshot was taken and saved to disk, with the path to the saved image file.
@ finish_present
Called after successful presentation, from: IDirect3DDevice9::Present IDirect3DDevice9Ex::PresentEx I...
@ map_buffer_region
Called after: IDirect3DVertexBuffer9::Lock IDirect3DIndexBuffer9::Lock ID3D10Resource::Map ID3D11Devi...
@ bind_descriptor_tables
Called after: ID3D12GraphicsCommandList::SetComputeRootSignature ID3D12GraphicsCommandList::SetGraphi...
@ reshade_reloaded_effects
Called right after all ReShade effects were reloaded. This occurs during effect runtime initializatio...
@ get_query_heap_results
Called before: ID3D12Device15::ResolveQueryData vkGetQueryPoolResults
@ generate_mipmaps
Called before: ID3D10Device::GenerateMips ID3D11DeviceContext::GenerateMips glGenerateMipmap glGenera...
@ present
Called before: IDirect3DDevice9::Present IDirect3DDevice9Ex::PresentEx IDirect3DSwapChain9::Present I...
@ bind_viewports
Called after: IDirect3DDevice9::SetViewport IDirect3DDevice9::SetRenderTarget (implicitly updates the...
@ reshade_begin_effects
Called right before ReShade effects are rendered.
@ init_swapchain
Called after successful swap chain creation (with the resize argument set to false),...
@ create_query_heap
Called on query heap creation, before: ID3D12Device::CreateQueryHeap ID3D12Device15::CreateQueryHeap1...
@ copy_texture_to_buffer
Called before: ID3D12GraphicsCommandList::CopyTextureRegion vkCmdCopyImageToBuffer vkCmdCopyImageToBu...
@ init_command_list
Called after successful command list creation, from: ID3D11Device::CreateDeferredContext ID3D11Device...
@ begin_query
Called before: ID3D12GraphicsCommandList::BeginQuery vkCmdBeginQuery vkCmdBeginQueryIndexedEXT
@ reshade_render_technique
Called for each technique after it was rendered, usually between reshade_begin_effects and reshade_fi...
@ create_sampler
Called on sampler creation, before: ID3D10Device::CreateSamplerState ID3D11Device::CreateSamplerState...
@ bind_vertex_buffers
Called after: IDirect3DDevice9::SetStreamSource ID3D10Device::IASetVertexBuffers ID3D11DeviceContext:...
@ reshade_set_uniform_value
Called before a uniform variable is changed, with the new value.
@ bind_scissor_rects
Called after: IDirect3DDevice9::SetScissorRect ID3D10Device::RSSetScissorRects ID3D11DeviceContext::R...
@ update_descriptor_tables
Called before: ID3D12Device::CreateConstantBufferView ID3D12Device::CreateShaderResourceView ID3D12De...
@ create_device
Called on device creation, before: IDirect3D9::CreateDevice IDirect3D9Ex::CreateDeviceEx D3D10CreateD...
@ copy_resource
Called before: IDirect3DDevice9::UpdateTexture IDirect3DDevice9::GetRenderTargetData ID3D10Device::Co...
@ query_acceleration_structures
Called before: ID3D12GraphicsCommandList4::EmitRaytracingAccelerationStructurePostbuildInfo vkCmdWrit...
@ clear_unordered_access_view_uint
Called before: ID3D11DeviceContext::ClearUnorderedAccessViewUint ID3D12GraphicsCommandList::ClearUnor...
@ resolve_texture_region
Called before: IDirect3DDevice9::StretchRect ID3D10Device::ResolveSubresource ID3D11DeviceContext::Re...
@ init_command_queue
Called after successful command queue creation, from: ID3D12Device::CreateCommandQueue vkCreateDevice...
@ destroy_resource
Called on resource destruction, before: IDirect3DResource9::Release ID3D10Resource::Release ID3D11Res...
@ dispatch_mesh
Called before: ID3D12GraphicsCommandList::DispatchMesh vkCmdDrawMeshTasksEXT
@ clear_unordered_access_view_float
Called before: ID3D11DeviceContext::ClearUnorderedAccessViewFloat ID3D11DeviceContext1::ClearView (fo...
@ update_texture_region
Called before: ID3D10Device::UpdateSubresource ID3D11DeviceContext::UpdateSubresource ID3D11DeviceCon...
@ map_texture_region
Called after: IDirect3DSurface9::LockRect IDirect3DVolume9::LockBox IDirect3DTexture9::LockRect IDire...
@ build_acceleration_structure
Called before: ID3D12GraphicsCommandList4::BuildRaytracingAccelerationStructure vkCmdBuildAcceleratio...
@ reset_command_list
Called before: ID3D11DeviceContext::FinishCommandList ID3D12GraphicsCommandList::Reset vkBeginCommand...
@ copy_buffer_region
Called before: ID3D11DeviceContext::CopySubresourceRegion ID3D11DeviceContext1::CopySubresourceRegion...
@ init_resource_view
Called after successful resource view creation from: IDirect3DDevice9::CreateTexture IDirect3DDevice9...
@ draw
Called before: IDirect3DDevice9::DrawPrimitive IDirect3DDevice9::DrawPrimitiveUP IDirect3DDevice9::Pr...
@ update_buffer_region_command
Called before: ID3D11DeviceContext::UpdateSubresource (on deferred device contexts) ID3D11DeviceConte...
@ destroy_command_queue
Called on command queue destruction, before: ID3D12CommandQueue::Release vkDestroyDevice (for every q...
@ destroy_pipeline_layout
Called on pipeline layout destruction, before: ID3D12RootSignature::Release VkDestroyPipelineLayout
@ copy_acceleration_structure
Called before: ID3D12GraphicsCommandList4::CopyRaytracingAccelerationStructure vkCmdCopyAccelerationS...
@ update_buffer_region
Called before: ID3D10Device::UpdateSubresource ID3D11DeviceContext::UpdateSubresource ID3D11DeviceCon...
@ bind_render_targets_and_depth_stencil
Called after: IDirect3DDevice9::SetRenderTarget IDirect3DDevice9::SetDepthStencilSurface ID3D10Device...
@ dispatch
Called before: ID3D11DeviceContext::Dispatch ID3D12GraphicsCommandList::Dispatch glDispatchCompute vk...
@ end_query
Called before: ID3D12GraphicsCommandList::EndQuery vkCmdEndQuery vkCmdEndQueryIndexedEXT vkCmdWriteTi...
@ init_query_heap
Called after successful query heap creation from: ID3D12Device::CreateQueryHeap ID3D12Device15::Creat...
@ update_texture_region_command
Called before: ID3D11DeviceContext::UpdateSubresource (on deferred device contexts) ID3D11DeviceConte...
@ init_pipeline_layout
Called after successful pipeline layout creation from: ID3D12Device::CreateRootSignature vkCreatePipe...
@ copy_buffer_to_texture
Called before: ID3D12GraphicsCommandList::CopyTextureRegion vkCmdCopyBufferToImage vkCmdCopyBufferToI...
@ end_render_pass
Called before: ID3D12GraphicsCommandList4::EndRenderPass vkCmdEndRenderPass vkCmdEndRenderPass2 vkCmd...
@ destroy_pipeline
Called on pipeline destruction, before: ID3D10VertexShader::Release ID3D10GeometryShader::Release ID3...
@ begin_render_pass
Called before: ID3D12GraphicsCommandList4::BeginRenderPass vkCmdBeginRenderPass vkCmdBeginRenderPass2...
@ reshade_set_effects_state
Called when all effects are about to be enabled or disabled.
@ destroy_query_heap
Called on query heap destruction, before: ID3D12QueryHeap::Release vkDestroyQueryPool
@ reshade_set_current_preset_path
Called after a preset was loaded and applied. This occurs after effect reloading or when the user cho...
@ unmap_buffer_region
Called before: IDirect3DVertexBuffer9::Unlock IDirect3DIndexBuffer9::Unlock ID3D10Resource::Unmap ID3...
@ push_constants
Called after: IDirect3DDevice9::SetVertexShaderConstantF IDirect3DDevice9::SetPixelShaderConstantF ID...
@ reshade_finish_effects
Called right after ReShade effects were rendered.
@ create_pipeline_layout
Called on pipeline layout creation, before: ID3D12Device::CreateRootSignature vkCreatePipelineLayout
@ destroy_sampler
Called on sampler destruction, before: ID3D10SamplerState::Release ID3D11SamplerState::Release vkDest...
@ destroy_device
Called on device destruction, before: IDirect3DDevice9::Reset IDirect3DDevice9Ex::ResetEx IDirect3DDe...
@ init_resource
Called after successful resource creation from: IDirect3DDevice9::CreateVertexBuffer IDirect3DDevice9...
@ reshade_open_overlay
Called when the ReShade overlay is about to be opened or closed.
@ create_swapchain
Called on swap chain creation, before: IDirect3D9::CreateDevice (for the implicit swap chain) IDirect...
@ reshade_reorder_techniques
Called when the rendering order of loaded techniques is changed, with a handle array specifying the n...
@ copy_query_heap_results
Called before: ID3D12GraphicsCommandList::ResolveQueryData vkCmdCopyQueryPoolResults
@ create_resource
Called on resource creation, before: IDirect3DDevice9::CreateVertexBuffer IDirect3DDevice9::CreateInd...
@ bind_stream_output_buffers
Called after: IDirect3DDevice9::ProcessVertices ID3D10Device::SOSetTargets ID3D11DeviceContext::SOSet...
@ create_pipeline
Called on pipeline creation, before: IDirect3DDevice9::CreateVertexShader IDirect3DDevice9::CreatePix...
@ copy_texture_region
Called before: IDirect3DDevice9::UpdateSurface IDirect3DDevice9::StretchRect ID3D10Device::CopySubres...
@ barrier
Called after: ID3D12GraphicsCommandList::ResourceBarrier ID3D12GraphicsCommandList7::Barrier vkCmdPip...
@ create_resource_view
Called on resource view creation, before: ID3D10Device::CreateShaderResourceView ID3D10Device::Create...
#define RESHADE_DEFINE_ADDON_EVENT_TRAITS(ev, ret,...)
Definition: reshade_events.hpp:1825