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,
112  constant_buffer = 6,
121  };
122 
126  enum class pipeline_layout_param_type : uint32_t
127  {
128  push_constants = 1,
129  descriptor_table = 0,
131  push_descriptors = 2,
134  };
135 
140  {
144  uint32_t binding = 0;
148  uint32_t dx_register_index = 0;
152  uint32_t dx_register_space = 0;
156  uint32_t count = 0;
161  };
162 
167  {
172  uint32_t binding = 0;
176  uint32_t dx_register_index = 0;
180  uint32_t dx_register_space = 0;
185  uint32_t count = 0;
195  uint32_t array_size = 1;
200  };
202  {
206  const sampler_desc *static_samplers = nullptr;
207  };
208 
213  {
220 
225 
226  union
227  {
232 
237 
241  struct
242  {
243  uint32_t count;
246 
250  struct
251  {
252  uint32_t count;
255  };
256  };
257 
273 
277  enum class fill_mode : uint32_t
278  {
279  solid = 0,
280  wireframe = 1,
281  point = 2
282  };
283 
287  enum class cull_mode : uint32_t
288  {
289  none = 0,
290  front = 1,
291  back = 2,
293  };
295 
299  enum class logic_op : uint32_t
300  {
301  clear = 0,
302  bitwise_and = 1,
304  copy = 3,
306  noop = 5,
307  bitwise_xor = 6,
308  bitwise_or = 7,
309  bitwise_nor = 8,
310  equivalent = 9,
311  invert = 10,
312  bitwise_or_reverse = 11,
313  copy_inverted = 12,
314  bitwise_or_inverted = 13,
315  bitwise_nand = 14,
316  set = 15
317  };
318 
322  enum class blend_op : uint32_t
323  {
324  add = 0,
325  subtract = 1,
326  reverse_subtract = 2,
327  min = 3,
328  max = 4
329  };
330 
334  enum class blend_factor : uint32_t
335  {
336  zero = 0,
337  one = 1,
338  source_color = 2,
340  dest_color = 4,
342  source_alpha = 6,
344  dest_alpha = 8,
346  constant_color = 10,
348  constant_alpha = 12,
351  source1_color = 15,
353  source1_alpha = 17,
355  };
356 
360  enum class stencil_op : uint32_t
361  {
362  keep = 0,
363  zero = 1,
364  replace = 2,
365  increment_saturate = 3,
366  decrement_saturate = 4,
367  invert = 5,
368  increment = 6,
369  decrement = 7
370  };
371 
375  enum class primitive_topology : uint32_t
376  {
377  undefined = 0,
378 
379  point_list = 1,
380  line_list = 2,
381  line_strip = 3,
382  triangle_list = 4,
383  triangle_strip = 5,
384  triangle_fan = 6,
385  quad_list = 8,
386  quad_strip = 9,
387  line_list_adj = 10,
388  line_strip_adj = 11,
389  triangle_list_adj = 12,
390  triangle_strip_adj = 13,
391 
392  patch_list_01_cp = 33,
424  };
425 
429  struct shader_desc
430  {
434  const void *code = nullptr;
438  size_t code_size = 0;
443  const char *entry_point = nullptr;
444 
449  uint32_t spec_constants = 0;
453  const uint32_t *spec_constant_ids = nullptr;
457  const uint32_t *spec_constant_values = nullptr;
458  };
459 
463  enum class shader_group_type
464  {
465  raygen = 0,
466  miss = 3,
468  hit_group_aabbs = 2,
469  callable = 4,
470  };
471 
476  {
479 
484 
485  union
486  {
490  struct
491  {
496  uint32_t shader_index = UINT32_MAX;
498 
502  struct
503  {
508  uint32_t shader_index = UINT32_MAX;
509  } miss;
510 
514  struct
515  {
521  uint32_t closest_hit_shader_index = UINT32_MAX;
527  uint32_t any_hit_shader_index = UINT32_MAX;
533  uint32_t intersection_shader_index = UINT32_MAX;
535 
539  struct
540  {
545  uint32_t shader_index = UINT32_MAX;
547  };
548  };
549 
554  {
558  uint32_t location = 0;
562  const char *semantic = nullptr;
566  uint32_t semantic_index = 0;
574  uint32_t buffer_binding = 0;
578  uint32_t offset = 0;
583  uint32_t stride = 0;
589  uint32_t instance_step_rate = 0;
590  };
591 
596  {
600  uint32_t rasterized_stream = 0;
601  };
602 
606  struct blend_desc
607  {
616  bool blend_enable[8] = { false, false, false, false, false, false, false, false };
621  bool logic_op_enable[8] = { false, false, false, false, false, false, false, false };
655  float blend_constant[4] = { 1.0f, 1.0f, 1.0f, 1.0f };
664  uint8_t render_target_write_mask[8] = { 0xF, 0xF, 0xF, 0xF, 0xF, 0xF, 0xF, 0xF };
665  };
666 
671  {
688  float depth_bias = 0.0f;
692  float depth_bias_clamp = 0.0f;
700  bool depth_clip_enable = true;
704  bool scissor_enable = false;
708  bool multisample_enable = false;
718  };
719 
724  {
728  bool depth_enable = true;
732  bool depth_write_mask = true;
740  bool stencil_enable = false;
744  uint8_t front_stencil_read_mask = 0xFF;
748  uint8_t front_stencil_write_mask = 0xFF;
772  uint8_t back_stencil_read_mask = 0xFF;
776  uint8_t back_stencil_write_mask = 0xFF;
797  };
798 
802  enum class pipeline_flags : uint32_t
803  {
804  none = 0,
805  library = (1 << 0),
806  skip_triangles = (1 << 1),
807  skip_aabbs = (1 << 2),
808  };
810 
814  enum class pipeline_subobject_type : uint32_t
815  {
816  unknown,
817 
831  hull_shader,
852  pixel_shader,
865  input_layout,
877  blend_state,
909  sample_mask,
914  sample_count,
943  mesh_shader,
971  miss_shader,
990  libraries,
1015  flags
1016  };
1017 
1022  {
1031  uint32_t count = 0;
1036  void *data = nullptr;
1037  };
1038 
1054 
1059  {
1063  resource buffer = { 0 };
1067  uint64_t offset = 0;
1072  uint64_t size = UINT64_MAX;
1073  };
1074 
1079  {
1083  sampler sampler = { 0 };
1088  };
1089 
1105 
1110  {
1118  uint32_t source_binding = 0;
1122  uint32_t source_array_offset = 0;
1130  uint32_t dest_binding = 0;
1134  uint32_t dest_array_offset = 0;
1138  uint32_t count = 0;
1139  };
1140 
1145  {
1154  uint32_t binding = 0;
1159  uint32_t array_offset = 0;
1164  uint32_t count = 0;
1173  const void *descriptors = nullptr;
1174  };
1175 
1191 
1195  enum class query_type
1196  {
1201  occlusion = 0,
1206  binary_occlusion = 1,
1211  timestamp = 2,
1216  pipeline_statistics = 3,
1249  };
1250 
1266 
1271  enum class dynamic_state
1272  {
1273  unknown = 0,
1274 
1275  alpha_test_enable = 15,
1276  alpha_reference_value = 24,
1277  alpha_func = 25,
1278  srgb_write_enable = 194,
1279  primitive_topology = 1000,
1280  sample_mask = 162,
1281 
1282  // Blend state
1283 
1284  alpha_to_coverage_enable = 1003,
1285  blend_enable = 27,
1286  logic_op_enable = 1004,
1289  color_blend_op = 171,
1292  alpha_blend_op = 209,
1293  blend_constant = 193,
1294  logic_op = 1005,
1296 
1297  // Rasterizer state
1298 
1299  fill_mode = 8,
1300  cull_mode = 22,
1301  front_counter_clockwise = 1001,
1302  depth_bias = 195,
1303  depth_bias_clamp = 1002,
1305  depth_clip_enable = 136,
1306  scissor_enable = 174,
1307  multisample_enable = 161,
1309 
1310  // Depth-stencil state
1311 
1312  depth_enable = 7,
1313  depth_write_mask = 14,
1314  depth_func = 23,
1315  stencil_enable = 52,
1319  front_stencil_func = 56,
1320  front_stencil_pass_op = 55,
1321  front_stencil_fail_op = 53,
1323  back_stencil_read_mask = 1006,
1324  back_stencil_write_mask = 1007,
1326  back_stencil_func = 189,
1327  back_stencil_pass_op = 188,
1328  back_stencil_fail_op = 186,
1330 
1331  // Ray tracing state
1332 
1334  };
1335 
1339  struct rect
1340  {
1341  int32_t left = 0;
1342  int32_t top = 0;
1343  int32_t right = 0;
1344  int32_t bottom = 0;
1345 
1346  constexpr uint32_t width() const { return right - left; }
1347  constexpr uint32_t height() const { return bottom - top; }
1348  };
1349 
1353  struct viewport
1354  {
1355  float x = 0.0f;
1356  float y = 0.0f;
1357  float width = 0.0f;
1358  float height = 0.0f;
1359  float min_depth = 0.0f;
1360  float max_depth = 1.0f;
1361  };
1362 
1366  enum class fence_flags : uint32_t
1367  {
1368  none = 0,
1369  shared = (1 << 1),
1370  shared_nt_handle = (1 << 11),
1371  non_monitored = (1 << 3)
1372  };
1374 
1390 } }
pipeline_flags
Flags that specify additional parameters of a pipeline.
Definition: reshade_api_pipeline.hpp:803
query_type
Type of a query.
Definition: reshade_api_pipeline.hpp:1196
@ stream_output_statistics_0
Streaming output statistics for stream 0 between beginning and end of the query. Data is a structure ...
@ acceleration_structure_compacted_size
Size of the acceleration structure after compaction. Data is a 64-bit unsigned integer value.
@ binary_occlusion
Zero if no samples passed, one if at least one sample passed the depth and stencil tests between begi...
@ acceleration_structure_size
Current size of the acceleration structure. Data is a 64-bit unsigned integer value.
@ occlusion
Number of samples that passed the depth and stencil tests between beginning and end of the query....
@ acceleration_structure_bottom_level_acceleration_structure_pointers
Number of bottom-level acceleration structure pointers in the acceleration structure....
@ acceleration_structure_serialization_size
Size of the serialization data of the acceleration structure. Data is a 64-bit unsigned integer value...
@ 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:1272
fill_mode
Fill mode to use when rendering triangles.
Definition: reshade_api_pipeline.hpp:278
compare_op
Comparison operations.
Definition: reshade_api_resource.hpp:35
blend_op
Color or alpha blending operations.
Definition: reshade_api_pipeline.hpp:323
primitive_topology
Specifies how the pipeline interprets vertex data that is bound to the vertex input stage and subsequ...
Definition: reshade_api_pipeline.hpp:376
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:361
pipeline_layout_param_type
Type of a pipeline layout parameter.
Definition: reshade_api_pipeline.hpp:127
fence_flags
Flags that specify additional parameters of a fence.
Definition: reshade_api_pipeline.hpp:1367
logic_op
Logic operations.
Definition: reshade_api_pipeline.hpp:300
shader_group_type
Type of a ray tracing shader group.
Definition: reshade_api_pipeline.hpp:464
cull_mode
Indicates triangles facing a particular direction are not drawn.
Definition: reshade_api_pipeline.hpp:288
pipeline_subobject_type
Type of a pipeline sub-object.
Definition: reshade_api_pipeline.hpp:815
@ 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:335
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 resource_view.
@ shader_resource_view
Descriptors are either of type buffer_shader_resource_view or texture_shader_resource_view.
@ unordered_access_view
Descriptors are either of type buffer_unordered_access_view or texture_unordered_access_view.
@ 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:607
blend_factor source_alpha_blend_factor[8]
Source to use for the alpha value that the pixel shader outputs.
Definition: reshade_api_pipeline.hpp:641
bool logic_op_enable[8]
Enable or disable a logical operation for each render target.
Definition: reshade_api_pipeline.hpp:621
blend_factor dest_color_blend_factor[8]
Destination to use for the current RGB value in the render target.
Definition: reshade_api_pipeline.hpp:631
blend_factor dest_alpha_blend_factor[8]
Destination to use for the current alpha value in the render target.
Definition: reshade_api_pipeline.hpp:646
blend_factor source_color_blend_factor[8]
Source to use for the RGB value that the pixel shader outputs.
Definition: reshade_api_pipeline.hpp:626
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:636
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:651
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:611
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:664
bool blend_enable[8]
Enable or disable blending for each render target.
Definition: reshade_api_pipeline.hpp:616
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:655
A constant buffer resource descriptor.
Definition: reshade_api_pipeline.hpp:1059
uint64_t offset
Offset from the start of the buffer resource (in bytes).
Definition: reshade_api_pipeline.hpp:1067
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:1072
resource buffer
Constant buffer resource.
Definition: reshade_api_pipeline.hpp:1063
Describes a range of constants in a pipeline layout.
Definition: reshade_api_pipeline.hpp:140
uint32_t count
Number of constants in this range (in 32-bit values).
Definition: reshade_api_pipeline.hpp:156
uint32_t dx_register_index
D3D10/D3D11/D3D12 constant buffer register index.
Definition: reshade_api_pipeline.hpp:148
uint32_t dx_register_space
D3D12 constant buffer register space.
Definition: reshade_api_pipeline.hpp:152
uint32_t binding
OpenGL uniform buffer binding index.
Definition: reshade_api_pipeline.hpp:144
shader_stage visibility
Shader pipeline stages that can make use of the constants in this range.
Definition: reshade_api_pipeline.hpp:160
Describes the state of the depth-stencil stage.
Definition: reshade_api_pipeline.hpp:724
bool stencil_enable
Enable or disable stencil testing.
Definition: reshade_api_pipeline.hpp:740
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:768
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:744
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:772
bool depth_write_mask
Enable or disable writes to the depth-stencil buffer.
Definition: reshade_api_pipeline.hpp:732
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:748
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:776
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:756
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:792
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:780
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:784
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:736
bool depth_enable
Enable or disable depth testing.
Definition: reshade_api_pipeline.hpp:728
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:764
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:752
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:796
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:788
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:760
An opaque handle to a descriptor heap.
Definition: reshade_api_pipeline.hpp:1190
Definition: reshade_api_pipeline.hpp:202
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:206
Describes a range of descriptors of a descriptor table in a pipeline layout.
Definition: reshade_api_pipeline.hpp:167
uint32_t dx_register_space
D3D12 register space (register(..., spaceX) in HLSL).
Definition: reshade_api_pipeline.hpp:180
uint32_t dx_register_index
D3D9/D3D10/D3D11/D3D12 shader register index (register(xX) in HLSL).
Definition: reshade_api_pipeline.hpp:176
shader_stage visibility
Shader pipeline stages that can make use of the descriptors in this range.
Definition: reshade_api_pipeline.hpp:189
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:172
uint32_t count
Number of descriptors in this range. Set to -1 (UINT32_MAX) to indicate an unbounded range.
Definition: reshade_api_pipeline.hpp:185
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:195
descriptor_type type
Type of the descriptors in this range.
Definition: reshade_api_pipeline.hpp:199
All information needed to copy descriptors between descriptor tables.
Definition: reshade_api_pipeline.hpp:1110
uint32_t source_binding
Index of the binding in the source descriptor table.
Definition: reshade_api_pipeline.hpp:1118
uint32_t dest_binding
Index of the binding in the destination descriptor table.
Definition: reshade_api_pipeline.hpp:1130
uint32_t count
Number of descriptors to copy.
Definition: reshade_api_pipeline.hpp:1138
descriptor_table dest_table
Descriptor table to copy to.
Definition: reshade_api_pipeline.hpp:1126
uint32_t source_array_offset
Array index in the specified source binding to begin copying from.
Definition: reshade_api_pipeline.hpp:1122
descriptor_table source_table
Descriptor table to copy from.
Definition: reshade_api_pipeline.hpp:1114
uint32_t dest_array_offset
Array index in the specified destination binding to begin copying to.
Definition: reshade_api_pipeline.hpp:1134
All information needed to update descriptors in a descriptor table.
Definition: reshade_api_pipeline.hpp:1145
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:1173
descriptor_table table
Descriptor table to update.
Definition: reshade_api_pipeline.hpp:1149
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:1154
uint32_t count
Number of descriptors to update, starting at the specified binding. If the specified binding has fewe...
Definition: reshade_api_pipeline.hpp:1164
uint32_t array_offset
Array index in the specified binding to begin updating at. Only meaningful in Vulkan,...
Definition: reshade_api_pipeline.hpp:1159
descriptor_type type
Type of the specified descriptors.
Definition: reshade_api_pipeline.hpp:1168
An opaque handle to a descriptor table in a descriptor heap.
Definition: reshade_api_pipeline.hpp:1104
An opaque handle to a fence synchronization object.
Definition: reshade_api_pipeline.hpp:1389
Describes a single element in the vertex layout for the input-assembler stage.
Definition: reshade_api_pipeline.hpp:554
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:589
uint32_t location
GLSL attribute location associated with this element (layout(location = X)).
Definition: reshade_api_pipeline.hpp:558
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:566
const char * semantic
HLSL semantic associated with this element.
Definition: reshade_api_pipeline.hpp:562
uint32_t buffer_binding
Index of the vertex buffer binding.
Definition: reshade_api_pipeline.hpp:574
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:583
uint32_t offset
Offset (in bytes) from the start of the vertex to this element.
Definition: reshade_api_pipeline.hpp:578
Describes a single parameter in a pipeline layout.
Definition: reshade_api_pipeline.hpp:213
descriptor_range push_descriptors
Used when parameter type is pipeline_layout_param_type::push_descriptors.
Definition: reshade_api_pipeline.hpp:236
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:215
pipeline_layout_param_type type
Type of the parameter.
Definition: reshade_api_pipeline.hpp:224
const descriptor_range * ranges
Definition: reshade_api_pipeline.hpp:244
constexpr pipeline_layout_param(uint32_t count, const descriptor_range *ranges)
Definition: reshade_api_pipeline.hpp:218
constexpr pipeline_layout_param(const descriptor_range &push_descriptors)
Definition: reshade_api_pipeline.hpp:216
constexpr pipeline_layout_param(const descriptor_range_with_static_samplers &push_descriptors)
Definition: reshade_api_pipeline.hpp:217
constexpr pipeline_layout_param(uint32_t count, const descriptor_range_with_static_samplers *ranges)
Definition: reshade_api_pipeline.hpp:219
constexpr pipeline_layout_param()
Definition: reshade_api_pipeline.hpp:214
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:253
uint32_t count
Definition: reshade_api_pipeline.hpp:243
constant_range push_constants
Used when parameter type is pipeline_layout_param_type::push_constants.
Definition: reshade_api_pipeline.hpp:231
An opaque handle to a pipeline layout object.
Definition: reshade_api_pipeline.hpp:272
Describes a pipeline sub-object.
Definition: reshade_api_pipeline.hpp:1022
void * data
Pointer to an array of sub-object descriptions (which should be as large as the specified count)....
Definition: reshade_api_pipeline.hpp:1036
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:1031
pipeline_subobject_type type
Type of the specified sub-object data.
Definition: reshade_api_pipeline.hpp:1026
An opaque handle to a pipeline state object.
Definition: reshade_api_pipeline.hpp:1053
An opaque handle to a query heap.
Definition: reshade_api_pipeline.hpp:1265
Describes the state of the rasterizer stage.
Definition: reshade_api_pipeline.hpp:671
bool scissor_enable
Enable or disable scissor testing (scissor rectangle culling).
Definition: reshade_api_pipeline.hpp:704
bool front_counter_clockwise
Determines if a triangle is front or back-facing.
Definition: reshade_api_pipeline.hpp:684
float depth_bias
Depth value added to a given pixel.
Definition: reshade_api_pipeline.hpp:688
bool multisample_enable
Use the quadrilateral or alpha line anti-aliasing algorithm on multisample antialiasing render target...
Definition: reshade_api_pipeline.hpp:708
bool depth_clip_enable
Enable or disable clipping based on distance.
Definition: reshade_api_pipeline.hpp:700
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:712
uint32_t conservative_rasterization
Enable or disable conservative rasterization mode.
Definition: reshade_api_pipeline.hpp:717
float depth_bias_clamp
Maximum depth bias of a pixel.
Definition: reshade_api_pipeline.hpp:692
float slope_scaled_depth_bias
Scalar on the slope of a given pixel.
Definition: reshade_api_pipeline.hpp:696
Describes a rectangle.
Definition: reshade_api_pipeline.hpp:1340
constexpr uint32_t width() const
Definition: reshade_api_pipeline.hpp:1346
int32_t top
Definition: reshade_api_pipeline.hpp:1342
int32_t left
Definition: reshade_api_pipeline.hpp:1341
int32_t right
Definition: reshade_api_pipeline.hpp:1343
constexpr uint32_t height() const
Definition: reshade_api_pipeline.hpp:1347
int32_t bottom
Definition: reshade_api_pipeline.hpp:1344
An opaque handle to a resource view object (depth-stencil, render target, shader resource view,...
Definition: reshade_api_resource.hpp:462
An opaque handle to a resource object (buffer, texture, ...).
Definition: reshade_api_resource.hpp:356
Describes a sampler state.
Definition: reshade_api_resource.hpp:89
A combined sampler and resource view descriptor.
Definition: reshade_api_pipeline.hpp:1079
resource_view view
Shader resource view.
Definition: reshade_api_pipeline.hpp:1087
An opaque handle to a sampler state object.
Definition: reshade_api_resource.hpp:146
Describes a shader object.
Definition: reshade_api_pipeline.hpp:430
const char * entry_point
Optional entry point name if the shader source code or binary contains multiple entry points....
Definition: reshade_api_pipeline.hpp:443
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:457
const void * code
Shader source code or binary.
Definition: reshade_api_pipeline.hpp:434
size_t code_size
Size (in bytes) of the shader source code or binary.
Definition: reshade_api_pipeline.hpp:438
const uint32_t * spec_constant_ids
Pointer to an array of specialization constant indices.
Definition: reshade_api_pipeline.hpp:453
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:449
Describes a ray tracing shader group.
Definition: reshade_api_pipeline.hpp:476
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:527
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:478
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:533
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:521
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:496
shader_group()
Definition: reshade_api_pipeline.hpp:477
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:483
Describes the state of the stream-output stage.
Definition: reshade_api_pipeline.hpp:596
uint32_t rasterized_stream
Index of the stream output stream to be sent to the rasterizer stage.
Definition: reshade_api_pipeline.hpp:600
Describes a render viewport.
Definition: reshade_api_pipeline.hpp:1354
float width
Definition: reshade_api_pipeline.hpp:1357
float min_depth
Definition: reshade_api_pipeline.hpp:1359
float height
Definition: reshade_api_pipeline.hpp:1358
float x
Definition: reshade_api_pipeline.hpp:1355
float y
Definition: reshade_api_pipeline.hpp:1356
float max_depth
Definition: reshade_api_pipeline.hpp:1360