ReShade
A generic post-processing injector for games and video software.
reshade_api_pipeline.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 
9 
10 namespace reshade { namespace api
11 {
15  enum class shader_stage : uint32_t
16  {
17  vertex = 0x1,
18  hull = 0x2,
19  domain = 0x4,
20  geometry = 0x8,
21  pixel = 0x10,
22  compute = 0x20,
23 
24  amplification = 0x40,
25  mesh = 0x80,
26 
27  raygen = 0x0100,
28  any_hit = 0x0200,
29  closest_hit = 0x0400,
30  miss = 0x0800,
31  intersection = 0x1000,
32  callable = 0x2000,
33 
34  all = 0x7FFFFFFF,
38  };
40 
44  enum class pipeline_stage : uint32_t
45  {
46  vertex_shader = 0x8,
47  hull_shader = 0x10,
48  domain_shader = 0x20,
49  geometry_shader = 0x40,
50  pixel_shader = 0x80,
51  compute_shader = 0x800,
52 
53  amplification_shader = 0x80000,
54  mesh_shader = 0x100000,
55 
56  ray_tracing_shader = 0x00200000,
57 
58  input_assembler = 0x2,
59  stream_output = 0x4,
60  rasterizer = 0x100,
61  depth_stencil = 0x200,
62  output_merger = 0x400,
63 
64  all = 0x7FFFFFFF,
69  };
71 
75  enum class descriptor_type : uint32_t
76  {
80  sampler = 0,
106  constant_buffer = 6,
115  };
116 
120  enum class pipeline_layout_param_type : uint32_t
121  {
122  push_constants = 1,
123  descriptor_table = 0,
125  push_descriptors = 2,
128  };
129 
134  {
138  uint32_t binding = 0;
142  uint32_t dx_register_index = 0;
146  uint32_t dx_register_space = 0;
150  uint32_t count = 0;
155  };
156 
161  {
166  uint32_t binding = 0;
170  uint32_t dx_register_index = 0;
174  uint32_t dx_register_space = 0;
179  uint32_t count = 0;
189  uint32_t array_size = 1;
194  };
196  {
200  const sampler_desc *static_samplers = nullptr;
201  };
202 
207  {
214 
219 
220  union
221  {
226 
231 
235  struct
236  {
237  uint32_t count;
240 
244  struct
245  {
246  uint32_t count;
249  };
250  };
251 
257 
261  enum class fill_mode : uint32_t
262  {
263  solid = 0,
264  wireframe = 1,
265  point = 2
266  };
267 
271  enum class cull_mode : uint32_t
272  {
273  none = 0,
274  front = 1,
275  back = 2,
277  };
279 
283  enum class logic_op : uint32_t
284  {
285  clear = 0,
286  bitwise_and = 1,
288  copy = 3,
290  noop = 5,
291  bitwise_xor = 6,
292  bitwise_or = 7,
293  bitwise_nor = 8,
294  equivalent = 9,
295  invert = 10,
296  bitwise_or_reverse = 11,
297  copy_inverted = 12,
298  bitwise_or_inverted = 13,
299  bitwise_nand = 14,
300  set = 15
301  };
302 
306  enum class blend_op : uint32_t
307  {
308  add = 0,
309  subtract = 1,
310  reverse_subtract = 2,
311  min = 3,
312  max = 4
313  };
314 
318  enum class blend_factor : uint32_t
319  {
320  zero = 0,
321  one = 1,
322  source_color = 2,
324  dest_color = 4,
326  source_alpha = 6,
328  dest_alpha = 8,
330  constant_color = 10,
332  constant_alpha = 12,
335  source1_color = 15,
337  source1_alpha = 17,
339  };
340 
344  enum class stencil_op : uint32_t
345  {
346  keep = 0,
347  zero = 1,
348  replace = 2,
349  increment_saturate = 3,
350  decrement_saturate = 4,
351  invert = 5,
352  increment = 6,
353  decrement = 7
354  };
355 
359  enum class primitive_topology : uint32_t
360  {
361  undefined = 0,
362 
363  point_list = 1,
364  line_list = 2,
365  line_strip = 3,
366  triangle_list = 4,
367  triangle_strip = 5,
368  triangle_fan = 6,
369  quad_list = 8,
370  quad_strip = 9,
371  line_list_adj = 10,
372  line_strip_adj = 11,
373  triangle_list_adj = 12,
374  triangle_strip_adj = 13,
375 
376  patch_list_01_cp = 33,
408  };
409 
413  struct shader_desc
414  {
418  const void *code = nullptr;
422  size_t code_size = 0;
427  const char *entry_point = nullptr;
428 
433  uint32_t spec_constants = 0;
437  const uint32_t *spec_constant_ids = nullptr;
441  const uint32_t *spec_constant_values = nullptr;
442  };
443 
447  enum class shader_group_type
448  {
449  raygen = 0,
450  miss = 3,
452  hit_group_aabbs = 2,
453  callable = 4,
454  };
455 
460  {
463 
468 
469  union
470  {
474  struct
475  {
480  uint32_t shader_index = UINT32_MAX;
482 
486  struct
487  {
492  uint32_t shader_index = UINT32_MAX;
493  } miss;
494 
498  struct
499  {
505  uint32_t closest_hit_shader_index = UINT32_MAX;
511  uint32_t any_hit_shader_index = UINT32_MAX;
517  uint32_t intersection_shader_index = UINT32_MAX;
519 
523  struct
524  {
529  uint32_t shader_index = UINT32_MAX;
531  };
532  };
533 
538  {
542  uint32_t location = 0;
546  const char *semantic = nullptr;
550  uint32_t semantic_index = 0;
558  uint32_t buffer_binding = 0;
562  uint32_t offset = 0;
567  uint32_t stride = 0;
573  uint32_t instance_step_rate = 0;
574  };
575 
580  {
584  uint32_t rasterized_stream = 0;
585  };
586 
590  struct blend_desc
591  {
600  bool blend_enable[8] = { false, false, false, false, false, false, false, false };
605  bool logic_op_enable[8] = { false, false, false, false, false, false, false, false };
639  float blend_constant[4] = { 1.0f, 1.0f, 1.0f, 1.0f };
648  uint8_t render_target_write_mask[8] = { 0xF, 0xF, 0xF, 0xF, 0xF, 0xF, 0xF, 0xF };
649  };
650 
655  {
672  float depth_bias = 0.0f;
676  float depth_bias_clamp = 0.0f;
684  bool depth_clip_enable = true;
688  bool scissor_enable = false;
692  bool multisample_enable = false;
702  };
703 
708  {
712  bool depth_enable = true;
716  bool depth_write_mask = true;
724  bool stencil_enable = false;
728  uint8_t front_stencil_read_mask = 0xFF;
732  uint8_t front_stencil_write_mask = 0xFF;
756  uint8_t back_stencil_read_mask = 0xFF;
760  uint8_t back_stencil_write_mask = 0xFF;
781  };
782 
786  enum class pipeline_flags : uint32_t
787  {
788  none = 0,
789  library = (1 << 0),
790  skip_triangles = (1 << 1),
791  skip_aabbs = (1 << 2),
792  };
794 
798  enum class pipeline_subobject_type : uint32_t
799  {
800  unknown,
801 
815  hull_shader,
836  pixel_shader,
849  input_layout,
861  blend_state,
893  sample_mask,
898  sample_count,
927  mesh_shader,
955  miss_shader,
974  libraries,
999  flags
1000  };
1001 
1006  {
1015  uint32_t count = 0;
1020  void *data = nullptr;
1021  };
1022 
1028 
1033  {
1037  resource buffer = { 0 };
1041  uint64_t offset = 0;
1046  uint64_t size = UINT64_MAX;
1047  };
1048 
1053  {
1057  sampler sampler = { 0 };
1062  };
1063 
1069 
1074  {
1082  uint32_t source_binding = 0;
1086  uint32_t source_array_offset = 0;
1094  uint32_t dest_binding = 0;
1098  uint32_t dest_array_offset = 0;
1102  uint32_t count = 0;
1103  };
1104 
1109  {
1118  uint32_t binding = 0;
1123  uint32_t array_offset = 0;
1128  uint32_t count = 0;
1137  const void *descriptors = nullptr;
1138  };
1139 
1145 
1149  enum class query_type
1150  {
1155  occlusion = 0,
1160  binary_occlusion = 1,
1165  timestamp = 2,
1170  pipeline_statistics = 3,
1179  };
1180 
1186 
1191  enum class dynamic_state
1192  {
1193  unknown = 0,
1194 
1195  alpha_test_enable = 15,
1196  alpha_reference_value = 24,
1197  alpha_func = 25,
1198  srgb_write_enable = 194,
1199  primitive_topology = 1000,
1200  sample_mask = 162,
1201 
1202  // Blend state
1203 
1204  alpha_to_coverage_enable = 1003,
1205  blend_enable = 27,
1206  logic_op_enable = 1004,
1209  color_blend_op = 171,
1212  alpha_blend_op = 209,
1213  blend_constant = 193,
1214  logic_op = 1005,
1216 
1217  // Rasterizer state
1218 
1219  fill_mode = 8,
1220  cull_mode = 22,
1221  front_counter_clockwise = 1001,
1222  depth_bias = 195,
1223  depth_bias_clamp = 1002,
1225  depth_clip_enable = 136,
1226  scissor_enable = 174,
1227  multisample_enable = 161,
1229 
1230  // Depth-stencil state
1231 
1232  depth_enable = 7,
1233  depth_write_mask = 14,
1234  depth_func = 23,
1235  stencil_enable = 52,
1239  front_stencil_func = 56,
1240  front_stencil_pass_op = 55,
1241  front_stencil_fail_op = 53,
1243  back_stencil_read_mask = 1006,
1244  back_stencil_write_mask = 1007,
1246  back_stencil_func = 189,
1247  back_stencil_pass_op = 188,
1248  back_stencil_fail_op = 186,
1250 
1251  // Ray tracing state
1252 
1254  };
1255 
1259  struct rect
1260  {
1261  int32_t left = 0;
1262  int32_t top = 0;
1263  int32_t right = 0;
1264  int32_t bottom = 0;
1265 
1266  constexpr uint32_t width() const { return right - left; }
1267  constexpr uint32_t height() const { return bottom - top; }
1268  };
1269 
1273  struct viewport
1274  {
1275  float x = 0.0f;
1276  float y = 0.0f;
1277  float width = 0.0f;
1278  float height = 0.0f;
1279  float min_depth = 0.0f;
1280  float max_depth = 1.0f;
1281  };
1282 
1286  enum class fence_flags : uint32_t
1287  {
1288  none = 0,
1289  shared = (1 << 1),
1290  shared_nt_handle = (1 << 11),
1291  non_monitored = (1 << 3)
1292  };
1294 
1300 } }
pipeline_flags
Flags that specify additional parameters of a pipeline.
Definition: reshade_api_pipeline.hpp:787
query_type
Type of a query.
Definition: reshade_api_pipeline.hpp:1150
@ stream_output_statistics_0
Streaming output statistics for stream 0 between beginning and end of the query. Data is a structure ...
@ binary_occlusion
Zero if no samples passed, one if at least one sample passed the depth and stencil tests between begi...
@ occlusion
Number of samples that passed the depth and stencil tests between beginning and end of the query....
@ pipeline_statistics
Pipeline statistics (such as the number of shader invocations) between beginning and end of the query...
@ timestamp
GPU timestamp at the frequency returned by command_queue::get_timestamp_frequency....
dynamic_state
A list of all possible render pipeline states that can be set independent of pipeline state objects.
Definition: reshade_api_pipeline.hpp:1192
fill_mode
Fill mode to use when rendering triangles.
Definition: reshade_api_pipeline.hpp:262
compare_op
Comparison operations.
Definition: reshade_api_resource.hpp:35
blend_op
Color or alpha blending operations.
Definition: reshade_api_pipeline.hpp:307
primitive_topology
Specifies how the pipeline interprets vertex data that is bound to the vertex input stage and subsequ...
Definition: reshade_api_pipeline.hpp:360
pipeline_stage
Flags that specify the pipeline stages in the render pipeline.
Definition: reshade_api_pipeline.hpp:45
stencil_op
Stencil operations that can be performed during depth-stencil testing.
Definition: reshade_api_pipeline.hpp:345
pipeline_layout_param_type
Type of a pipeline layout parameter.
Definition: reshade_api_pipeline.hpp:121
fence_flags
Flags that specify additional parameters of a fence.
Definition: reshade_api_pipeline.hpp:1287
logic_op
Logic operations.
Definition: reshade_api_pipeline.hpp:284
shader_group_type
Type of a ray tracing shader group.
Definition: reshade_api_pipeline.hpp:448
cull_mode
Indicates triangles facing a particular direction are not drawn.
Definition: reshade_api_pipeline.hpp:272
pipeline_subobject_type
Type of a pipeline sub-object.
Definition: reshade_api_pipeline.hpp:799
@ blend_state
State of the output-merger stage. Sub-object data is a pointer to a blend_desc.
@ sample_count
Number of samples used in rasterization. Sub-object data is a pointer to a 32-bit unsigned integer va...
@ sample_mask
Mask applied to the coverage mask for a fragment during rasterization. Sub-object data is a pointer t...
@ viewport_count
Maximum number of viewports that may be bound via command_list::bind_viewports with this pipeline....
@ mesh_shader
Mesh shader to use. Sub-object data is a pointer to a shader_desc.
@ raygen_shader
Ray generation shader(s) to use. Sub-object data is a pointer to a shader_desc.
@ any_hit_shader
Any-hit shader(s) to use. Sub-object data is a pointer to a shader_desc.
@ compute_shader
Compute shader to use. Sub-object data is a pointer to a shader_desc.
@ rasterizer_state
State of the rasterizer stage. Sub-object data is a pointer to a rasterizer_desc.
@ flags
Additional pipeline creation flags. Sub-object data is a pointer to a pipeline_flags value.
@ libraries
Existing shader libraries added to this pipeline. Sub-object data is a pointer to an array of pipelin...
@ dynamic_pipeline_states
States that may be dynamically updated via command_list::bind_pipeline_states after binding this pipe...
@ closest_hit_shader
Closest-hit shader(s) to use. Sub-object data is a pointer to a shader_desc.
@ domain_shader
Domain shader to use. Sub-object data is a pointer to a shader_desc.
@ max_payload_size
Maximum payload size of shaders executed by this pipeline. Sub-object data is a pointer to a 32-bit u...
@ input_layout
Vertex layout for the input-assembler stage. Sub-object data is a pointer to an array of input_elemen...
@ callable_shader
Callable shader(s) to use. Sub-object data is a pointer to a shader_desc.
@ max_recursion_depth
Maximum recursion depth of shaders executed by this pipeline. Sub-object data is a pointer to a 32-bi...
@ hull_shader
Hull shader to use. Sub-object data is a pointer to a shader_desc.
@ miss_shader
Miss shader(s) to use. Sub-object data is a pointer to a shader_desc.
@ shader_groups
Ray tracing shader groups to use. Sub-object data is a pointer to an array of shader_group values.
@ geometry_shader
Geometry shader to use. Sub-object data is a pointer to a shader_desc.
@ primitive_topology
Primitive topology to use when rendering. Sub-object data is a pointer to a primitive_topology value.
@ max_attribute_size
Maximum hit attribute size of shaders executed by this pipeline. Sub-object data is a pointer to a 32...
@ render_target_formats
Formats of the render target views that may be used with this pipeline. Sub-object data is a pointer ...
@ amplification_shader
Amplification shader to use. Sub-object data is a pointer to a shader_desc.
@ pixel_shader
Pixel shader to use. Sub-object data is a pointer to a shader_desc.
@ intersection_shader
Intersection shader(s) to use. Sub-object data is a pointer to a shader_desc.
@ vertex_shader
Vertex shader to use. Sub-object data is a pointer to a shader_desc.
@ depth_stencil_state
State of the depth-stencil stage. Sub-object data is a pointer to a depth_stencil_desc.
@ depth_stencil_format
Format of the depth-stencil view that may be used with this pipeline. Sub-object data is a pointer to...
@ max_vertex_count
Maximum number of vertices a draw call with this pipeline will draw. Sub-object data is a pointer to ...
@ stream_output_state
State of the stream-output stage. Sub-object data is a pointer to a stream_output_desc.
format
Available data and texture formats. This is mostly compatible with 'DXGI_FORMAT'.
Definition: reshade_api_format.hpp:18
blend_factor
Blend factors in color or alpha blending operations, which modulate values between the pixel shader o...
Definition: reshade_api_pipeline.hpp:319
shader_stage
Flags that specify the shader stages in the render pipeline.
Definition: reshade_api_pipeline.hpp:16
descriptor_type
Type of a descriptor.
Definition: reshade_api_pipeline.hpp:76
@ buffer_shader_resource_view
Descriptors are an array of resource_view.
@ sampler
Descriptors are an array of sampler.
@ texture_shader_resource_view
Descriptors are an array of resource_view.
@ shader_storage_buffer
Descriptors are an array of buffer_range.
@ acceleration_structure
Descriptors are an array of acceleration_structure.
@ texture_unordered_access_view
Descriptors are an array of resource_view.
@ buffer_unordered_access_view
Descriptors are an array of resource_view.
@ constant_buffer
Descriptors are an array of buffer_range.
Definition: reshade.hpp:56
#define RESHADE_DEFINE_ENUM_FLAG_OPERATORS(type)
Definition: reshade_api_resource.hpp:16
#define RESHADE_DEFINE_HANDLE(name)
Definition: reshade_api_resource.hpp:8
Describes the state of the output-merger stage.
Definition: reshade_api_pipeline.hpp:591
blend_factor source_alpha_blend_factor[8]
Source to use for the alpha value that the pixel shader outputs.
Definition: reshade_api_pipeline.hpp:625
bool logic_op_enable[8]
Enable or disable a logical operation for each render target.
Definition: reshade_api_pipeline.hpp:605
blend_factor dest_color_blend_factor[8]
Destination to use for the current RGB value in the render target.
Definition: reshade_api_pipeline.hpp:615
blend_factor dest_alpha_blend_factor[8]
Destination to use for the current alpha value in the render target.
Definition: reshade_api_pipeline.hpp:630
blend_factor source_color_blend_factor[8]
Source to use for the RGB value that the pixel shader outputs.
Definition: reshade_api_pipeline.hpp:610
blend_op color_blend_op[8]
Operation to use to combine source_color_blend_factor and dest_color_blend_factor.
Definition: reshade_api_pipeline.hpp:620
blend_op alpha_blend_op[8]
Operation to use to combine source_alpha_blend_factor and dest_alpha_blend_factor.
Definition: reshade_api_pipeline.hpp:635
bool alpha_to_coverage_enable
Use alpha-to-coverage as a multisampling technique when setting a pixel to a render target.
Definition: reshade_api_pipeline.hpp:595
uint8_t render_target_write_mask[8]
A write mask specifying which color components are written to each render target. Bitwise combination...
Definition: reshade_api_pipeline.hpp:648
bool blend_enable[8]
Enable or disable blending for each render target.
Definition: reshade_api_pipeline.hpp:600
float blend_constant[4]
Constant RGBA value to use when source_color_blend_factor or dest_color_blend_factor is blend_factor:...
Definition: reshade_api_pipeline.hpp:639
A constant buffer resource descriptor.
Definition: reshade_api_pipeline.hpp:1033
uint64_t offset
Offset from the start of the buffer resource (in bytes).
Definition: reshade_api_pipeline.hpp:1041
uint64_t size
Number of elements this range covers in the buffer resource (in bytes). Set to -1 (UINT64_MAX) to ind...
Definition: reshade_api_pipeline.hpp:1046
resource buffer
Constant buffer resource.
Definition: reshade_api_pipeline.hpp:1037
Describes a range of constants in a pipeline layout.
Definition: reshade_api_pipeline.hpp:134
uint32_t count
Number of constants in this range (in 32-bit values).
Definition: reshade_api_pipeline.hpp:150
uint32_t dx_register_index
D3D10/D3D11/D3D12 constant buffer register index.
Definition: reshade_api_pipeline.hpp:142
uint32_t dx_register_space
D3D12 constant buffer register space.
Definition: reshade_api_pipeline.hpp:146
uint32_t binding
OpenGL uniform buffer binding index.
Definition: reshade_api_pipeline.hpp:138
shader_stage visibility
Shader pipeline stages that can make use of the constants in this range.
Definition: reshade_api_pipeline.hpp:154
Describes the state of the depth-stencil stage.
Definition: reshade_api_pipeline.hpp:708
bool stencil_enable
Enable or disable stencil testing.
Definition: reshade_api_pipeline.hpp:724
stencil_op front_stencil_depth_fail_op
Stencil operation to perform when stencil testing passes and depth testing fails for pixels whose sur...
Definition: reshade_api_pipeline.hpp:752
uint8_t front_stencil_read_mask
Mask applied to stencil values read from the depth-stencil buffer for pixels whose surface normal is ...
Definition: reshade_api_pipeline.hpp:728
uint8_t back_stencil_read_mask
Mask applied to stencil values read from the depth-stencil buffer for pixels whose surface normal is ...
Definition: reshade_api_pipeline.hpp:756
bool depth_write_mask
Enable or disable writes to the depth-stencil buffer.
Definition: reshade_api_pipeline.hpp:716
uint8_t front_stencil_write_mask
Mask applied to stencil values written to the depth-stencil buffer for pixels whose surface normal is...
Definition: reshade_api_pipeline.hpp:732
uint8_t back_stencil_write_mask
Mask applied to stencil values written to the depth-stencil buffer for pixels whose surface normal is...
Definition: reshade_api_pipeline.hpp:760
compare_op front_stencil_func
Comparison function to use to compare new stencil value from a fragment against current stencil value...
Definition: reshade_api_pipeline.hpp:740
stencil_op back_stencil_fail_op
Stencil operation to perform when stencil testing fails for pixels whose surface normal is facing awa...
Definition: reshade_api_pipeline.hpp:776
uint8_t back_stencil_reference_value
Reference value to perform against when stencil testing pixels whose surface normal is facing away fr...
Definition: reshade_api_pipeline.hpp:764
compare_op back_stencil_func
Comparison function to use to compare new stencil value from a fragment against current stencil value...
Definition: reshade_api_pipeline.hpp:768
compare_op depth_func
Comparison function to use to compare new depth value from a fragment against current depth value in ...
Definition: reshade_api_pipeline.hpp:720
bool depth_enable
Enable or disable depth testing.
Definition: reshade_api_pipeline.hpp:712
stencil_op front_stencil_fail_op
Stencil operation to perform when stencil testing fails for pixels whose surface normal is towards th...
Definition: reshade_api_pipeline.hpp:748
uint8_t front_stencil_reference_value
Reference value to perform against when stencil testing pixels whose surface normal is towards the ca...
Definition: reshade_api_pipeline.hpp:736
stencil_op back_stencil_depth_fail_op
Stencil operation to perform when stencil testing passes and depth testing fails for pixels whose sur...
Definition: reshade_api_pipeline.hpp:780
stencil_op back_stencil_pass_op
Stencil operation to perform when stencil testing and depth testing both pass for pixels whose surfac...
Definition: reshade_api_pipeline.hpp:772
stencil_op front_stencil_pass_op
Stencil operation to perform when stencil testing and depth testing both pass for pixels whose surfac...
Definition: reshade_api_pipeline.hpp:744
An opaque handle to a descriptor heap.
Definition: reshade_api_pipeline.hpp:1144
Definition: reshade_api_pipeline.hpp:196
const sampler_desc * static_samplers
Optional array of sampler descriptions to statically embed into the descriptor table when the descrip...
Definition: reshade_api_pipeline.hpp:200
Describes a range of descriptors of a descriptor table in a pipeline layout.
Definition: reshade_api_pipeline.hpp:161
uint32_t dx_register_space
D3D12 register space (register(..., spaceX) in HLSL).
Definition: reshade_api_pipeline.hpp:174
uint32_t dx_register_index
D3D9/D3D10/D3D11/D3D12 shader register index (register(xX) in HLSL).
Definition: reshade_api_pipeline.hpp:170
shader_stage visibility
Shader pipeline stages that can make use of the descriptors in this range.
Definition: reshade_api_pipeline.hpp:183
uint32_t binding
OpenGL/Vulkan binding index (layout(binding=X) in GLSL). In D3D this is equivalent to the offset (in ...
Definition: reshade_api_pipeline.hpp:166
uint32_t count
Number of descriptors in this range. Set to -1 (UINT32_MAX) to indicate an unbounded range.
Definition: reshade_api_pipeline.hpp:179
uint32_t array_size
Size of the array in case this is an array binding. Only meaningful in Vulkan, in OpenGL and other AP...
Definition: reshade_api_pipeline.hpp:189
descriptor_type type
Type of the descriptors in this range.
Definition: reshade_api_pipeline.hpp:193
All information needed to copy descriptors between descriptor tables.
Definition: reshade_api_pipeline.hpp:1074
uint32_t source_binding
Index of the binding in the source descriptor table.
Definition: reshade_api_pipeline.hpp:1082
uint32_t dest_binding
Index of the binding in the destination descriptor table.
Definition: reshade_api_pipeline.hpp:1094
uint32_t count
Number of descriptors to copy.
Definition: reshade_api_pipeline.hpp:1102
descriptor_table dest_table
Descriptor table to copy to.
Definition: reshade_api_pipeline.hpp:1090
uint32_t source_array_offset
Array index in the specified source binding to begin copying from.
Definition: reshade_api_pipeline.hpp:1086
descriptor_table source_table
Descriptor table to copy from.
Definition: reshade_api_pipeline.hpp:1078
uint32_t dest_array_offset
Array index in the specified destination binding to begin copying to.
Definition: reshade_api_pipeline.hpp:1098
All information needed to update descriptors in a descriptor table.
Definition: reshade_api_pipeline.hpp:1109
const void * descriptors
Pointer to an array of descriptors to update in the descriptor table (which should be as large as the...
Definition: reshade_api_pipeline.hpp:1137
descriptor_table table
Descriptor table to update.
Definition: reshade_api_pipeline.hpp:1113
uint32_t binding
OpenGL/Vulkan binding index in the descriptor set. In D3D this is equivalent to the offset (in descri...
Definition: reshade_api_pipeline.hpp:1118
uint32_t count
Number of descriptors to update, starting at the specified binding. If the specified binding has fewe...
Definition: reshade_api_pipeline.hpp:1128
uint32_t array_offset
Array index in the specified binding to begin updating at. Only meaningful in Vulkan,...
Definition: reshade_api_pipeline.hpp:1123
descriptor_type type
Type of the specified descriptors.
Definition: reshade_api_pipeline.hpp:1132
An opaque handle to a descriptor table in a descriptor heap.
Definition: reshade_api_pipeline.hpp:1068
An opaque handle to a fence synchronization object.
Definition: reshade_api_pipeline.hpp:1299
Describes a single element in the vertex layout for the input-assembler stage.
Definition: reshade_api_pipeline.hpp:538
uint32_t instance_step_rate
Number of instances to draw using the same per-instance data before advancing by one element....
Definition: reshade_api_pipeline.hpp:573
uint32_t location
GLSL attribute location associated with this element (layout(location = X)).
Definition: reshade_api_pipeline.hpp:542
uint32_t semantic_index
Optional index for the HLSL semantic (e.g. for "TEXCOORD1" set semantic to "TEXCOORD" and semantic_in...
Definition: reshade_api_pipeline.hpp:550
const char * semantic
HLSL semantic associated with this element.
Definition: reshade_api_pipeline.hpp:546
uint32_t buffer_binding
Index of the vertex buffer binding.
Definition: reshade_api_pipeline.hpp:558
uint32_t stride
Stride of the entire vertex (this has to be consistent for all elements per vertex buffer binding)....
Definition: reshade_api_pipeline.hpp:567
uint32_t offset
Offset (in bytes) from the start of the vertex to this element.
Definition: reshade_api_pipeline.hpp:562
Describes a single parameter in a pipeline layout.
Definition: reshade_api_pipeline.hpp:207
descriptor_range push_descriptors
Used when parameter type is pipeline_layout_param_type::push_descriptors.
Definition: reshade_api_pipeline.hpp:230
struct reshade::api::pipeline_layout_param::@0::@3 descriptor_table_with_static_samplers
Used when parameter type is pipeline_layout_param_type::descriptor_table_with_static_samplers or pipe...
constexpr pipeline_layout_param(const constant_range &push_constants)
Definition: reshade_api_pipeline.hpp:209
pipeline_layout_param_type type
Type of the parameter.
Definition: reshade_api_pipeline.hpp:218
const descriptor_range * ranges
Definition: reshade_api_pipeline.hpp:238
constexpr pipeline_layout_param(uint32_t count, const descriptor_range *ranges)
Definition: reshade_api_pipeline.hpp:212
constexpr pipeline_layout_param(const descriptor_range &push_descriptors)
Definition: reshade_api_pipeline.hpp:210
constexpr pipeline_layout_param(const descriptor_range_with_static_samplers &push_descriptors)
Definition: reshade_api_pipeline.hpp:211
constexpr pipeline_layout_param(uint32_t count, const descriptor_range_with_static_samplers *ranges)
Definition: reshade_api_pipeline.hpp:213
constexpr pipeline_layout_param()
Definition: reshade_api_pipeline.hpp:208
struct reshade::api::pipeline_layout_param::@0::@2 descriptor_table
Used when parameter type is pipeline_layout_param_type::descriptor_table or pipeline_layout_param_typ...
const descriptor_range_with_static_samplers * ranges
Definition: reshade_api_pipeline.hpp:247
uint32_t count
Definition: reshade_api_pipeline.hpp:237
constant_range push_constants
Used when parameter type is pipeline_layout_param_type::push_constants.
Definition: reshade_api_pipeline.hpp:225
An opaque handle to a pipeline layout object.
Definition: reshade_api_pipeline.hpp:256
Describes a pipeline sub-object.
Definition: reshade_api_pipeline.hpp:1006
void * data
Pointer to an array of sub-object descriptions (which should be as large as the specified count)....
Definition: reshade_api_pipeline.hpp:1020
uint32_t count
Number of sub-object descriptions. This should usually be 1, except for array sub-objects like pipeli...
Definition: reshade_api_pipeline.hpp:1015
pipeline_subobject_type type
Type of the specified sub-object data.
Definition: reshade_api_pipeline.hpp:1010
An opaque handle to a pipeline state object.
Definition: reshade_api_pipeline.hpp:1027
An opaque handle to a query heap.
Definition: reshade_api_pipeline.hpp:1185
Describes the state of the rasterizer stage.
Definition: reshade_api_pipeline.hpp:655
bool scissor_enable
Enable or disable scissor testing (scissor rectangle culling).
Definition: reshade_api_pipeline.hpp:688
bool front_counter_clockwise
Determines if a triangle is front or back-facing.
Definition: reshade_api_pipeline.hpp:668
float depth_bias
Depth value added to a given pixel.
Definition: reshade_api_pipeline.hpp:672
bool multisample_enable
Use the quadrilateral or alpha line anti-aliasing algorithm on multisample antialiasing render target...
Definition: reshade_api_pipeline.hpp:692
bool depth_clip_enable
Enable or disable clipping based on distance.
Definition: reshade_api_pipeline.hpp:684
bool antialiased_line_enable
Enable or disable line antialiasing. Only applies if doing line drawing and multisample_enable is fal...
Definition: reshade_api_pipeline.hpp:696
uint32_t conservative_rasterization
Enable or disable conservative rasterization mode.
Definition: reshade_api_pipeline.hpp:701
float depth_bias_clamp
Maximum depth bias of a pixel.
Definition: reshade_api_pipeline.hpp:676
float slope_scaled_depth_bias
Scalar on the slope of a given pixel.
Definition: reshade_api_pipeline.hpp:680
Describes a rectangle.
Definition: reshade_api_pipeline.hpp:1260
constexpr uint32_t width() const
Definition: reshade_api_pipeline.hpp:1266
int32_t top
Definition: reshade_api_pipeline.hpp:1262
int32_t left
Definition: reshade_api_pipeline.hpp:1261
int32_t right
Definition: reshade_api_pipeline.hpp:1263
constexpr uint32_t height() const
Definition: reshade_api_pipeline.hpp:1267
int32_t bottom
Definition: reshade_api_pipeline.hpp:1264
An opaque handle to a resource view object (depth-stencil, render target, shader resource view,...
Definition: reshade_api_resource.hpp:432
An opaque handle to a resource object (buffer, texture, ...).
Definition: reshade_api_resource.hpp:336
Describes a sampler state.
Definition: reshade_api_resource.hpp:89
A combined sampler and resource view descriptor.
Definition: reshade_api_pipeline.hpp:1053
resource_view view
Shader resource view.
Definition: reshade_api_pipeline.hpp:1061
An opaque handle to a sampler state object.
Definition: reshade_api_resource.hpp:136
Describes a shader object.
Definition: reshade_api_pipeline.hpp:414
const char * entry_point
Optional entry point name if the shader source code or binary contains multiple entry points....
Definition: reshade_api_pipeline.hpp:427
const uint32_t * spec_constant_values
Pointer to an array of constant values, one for each specialization constant index in spec_constant_i...
Definition: reshade_api_pipeline.hpp:441
const void * code
Shader source code or binary.
Definition: reshade_api_pipeline.hpp:418
size_t code_size
Size (in bytes) of the shader source code or binary.
Definition: reshade_api_pipeline.hpp:422
const uint32_t * spec_constant_ids
Pointer to an array of specialization constant indices.
Definition: reshade_api_pipeline.hpp:437
uint32_t spec_constants
Number of entries in the spec_constant_ids and spec_constant_values arrays. This is meaningful only w...
Definition: reshade_api_pipeline.hpp:433
Describes a ray tracing shader group.
Definition: reshade_api_pipeline.hpp:460
struct reshade::api::shader_group::@4::@7 miss
Used when type is shader_group_type::miss.
uint32_t any_hit_shader_index
Index of the shader in the any-hit shader pipeline subobject. Set to -1 (UINT32_MAX) to indicate that...
Definition: reshade_api_pipeline.hpp:511
struct reshade::api::shader_group::@4::@6 raygen
Used when type is shader_group_type::raygen.
shader_group(shader_group_type type, uint32_t closest_hit_shader_index, uint32_t any_hit_shader_index=UINT32_MAX, uint32_t intersection_shader_index=UINT32_MAX)
Definition: reshade_api_pipeline.hpp:462
uint32_t intersection_shader_index
Index of the shader in the intersection shader pipeline subobject. Set to -1 (UINT32_MAX) to indicate...
Definition: reshade_api_pipeline.hpp:517
uint32_t closest_hit_shader_index
Index of the shader in the closest-hit shader pipeline subobject. Set to -1 (UINT32_MAX) to indicate ...
Definition: reshade_api_pipeline.hpp:505
struct reshade::api::shader_group::@4::@8 hit_group
Used when type is shader_group_type::hit_group_triangles or shader_group_type::hit_group_aabbs.
uint32_t shader_index
Index of the shader in the ray generation shader pipeline subobject.
Definition: reshade_api_pipeline.hpp:480
shader_group()
Definition: reshade_api_pipeline.hpp:461
struct reshade::api::shader_group::@4::@9 callable
Used when type is shader_group_type::callable.
shader_group_type type
Type of the shader group.
Definition: reshade_api_pipeline.hpp:467
Describes the state of the stream-output stage.
Definition: reshade_api_pipeline.hpp:580
uint32_t rasterized_stream
Index of the stream output stream to be sent to the rasterizer stage.
Definition: reshade_api_pipeline.hpp:584
Describes a render viewport.
Definition: reshade_api_pipeline.hpp:1274
float width
Definition: reshade_api_pipeline.hpp:1277
float min_depth
Definition: reshade_api_pipeline.hpp:1279
float height
Definition: reshade_api_pipeline.hpp:1278
float x
Definition: reshade_api_pipeline.hpp:1275
float y
Definition: reshade_api_pipeline.hpp:1276
float max_depth
Definition: reshade_api_pipeline.hpp:1280