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,
124  push_descriptors = 2,
126  };
127 
132  {
136  uint32_t binding = 0;
140  uint32_t dx_register_index = 0;
144  uint32_t dx_register_space = 0;
148  uint32_t count = 0;
153  };
154 
159  {
164  uint32_t binding = 0;
168  uint32_t dx_register_index = 0;
172  uint32_t dx_register_space = 0;
177  uint32_t count = 0;
187  uint32_t array_size = 1;
192  };
193 
198  {
203 
208 
209  union
210  {
215 
220 
224  struct
225  {
226  uint32_t count;
229  };
230  };
231 
237 
241  enum class fill_mode : uint32_t
242  {
243  solid = 0,
244  wireframe = 1,
245  point = 2
246  };
247 
251  enum class cull_mode : uint32_t
252  {
253  none = 0,
254  front = 1,
255  back = 2,
257  };
259 
263  enum class logic_op : uint32_t
264  {
265  clear = 0,
266  bitwise_and = 1,
268  copy = 3,
270  noop = 5,
271  bitwise_xor = 6,
272  bitwise_or = 7,
273  bitwise_nor = 8,
274  equivalent = 9,
275  invert = 10,
276  bitwise_or_reverse = 11,
277  copy_inverted = 12,
278  bitwise_or_inverted = 13,
279  bitwise_nand = 14,
280  set = 15
281  };
282 
286  enum class blend_op : uint32_t
287  {
288  add = 0,
289  subtract = 1,
290  reverse_subtract = 2,
291  min = 3,
292  max = 4
293  };
294 
298  enum class blend_factor : uint32_t
299  {
300  zero = 0,
301  one = 1,
302  source_color = 2,
304  dest_color = 4,
306  source_alpha = 6,
308  dest_alpha = 8,
310  constant_color = 10,
312  constant_alpha = 12,
315  source1_color = 15,
317  source1_alpha = 17,
319  };
320 
324  enum class stencil_op : uint32_t
325  {
326  keep = 0,
327  zero = 1,
328  replace = 2,
329  increment_saturate = 3,
330  decrement_saturate = 4,
331  invert = 5,
332  increment = 6,
333  decrement = 7
334  };
335 
339  enum class primitive_topology : uint32_t
340  {
341  undefined = 0,
342 
343  point_list = 1,
344  line_list = 2,
345  line_strip = 3,
346  triangle_list = 4,
347  triangle_strip = 5,
348  triangle_fan = 6,
349  quad_list = 8,
350  quad_strip = 9,
351  line_list_adj = 10,
352  line_strip_adj = 11,
353  triangle_list_adj = 12,
354  triangle_strip_adj = 13,
355 
356  patch_list_01_cp = 33,
388  };
389 
393  struct shader_desc
394  {
398  const void *code = nullptr;
402  size_t code_size = 0;
407  const char *entry_point = nullptr;
408 
413  uint32_t spec_constants = 0;
417  const uint32_t *spec_constant_ids = nullptr;
421  const uint32_t *spec_constant_values = nullptr;
422  };
423 
427  enum class shader_group_type
428  {
429  raygen = 0,
430  miss = 3,
432  hit_group_aabbs = 2,
433  callable = 4,
434  };
435 
440  {
443 
448 
449  union
450  {
454  struct
455  {
460  uint32_t shader_index = UINT32_MAX;
462 
466  struct
467  {
472  uint32_t shader_index = UINT32_MAX;
473  } miss;
474 
478  struct
479  {
485  uint32_t closest_hit_shader_index = UINT32_MAX;
491  uint32_t any_hit_shader_index = UINT32_MAX;
497  uint32_t intersection_shader_index = UINT32_MAX;
499 
503  struct
504  {
509  uint32_t shader_index = UINT32_MAX;
511  };
512  };
513 
518  {
522  uint32_t location = 0;
526  const char *semantic = nullptr;
530  uint32_t semantic_index = 0;
538  uint32_t buffer_binding = 0;
542  uint32_t offset = 0;
547  uint32_t stride = 0;
553  uint32_t instance_step_rate = 0;
554  };
555 
560  {
564  uint32_t rasterized_stream = 0;
565  };
566 
570  struct blend_desc
571  {
580  bool blend_enable[8] = { false, false, false, false, false, false, false, false };
585  bool logic_op_enable[8] = { false, false, false, false, false, false, false, false };
619  float blend_constant[4] = { 1.0f, 1.0f, 1.0f, 1.0f };
628  uint8_t render_target_write_mask[8] = { 0xF, 0xF, 0xF, 0xF, 0xF, 0xF, 0xF, 0xF };
629  };
630 
635  {
652  float depth_bias = 0.0f;
656  float depth_bias_clamp = 0.0f;
664  bool depth_clip_enable = true;
668  bool scissor_enable = false;
672  bool multisample_enable = false;
682  };
683 
688  {
692  bool depth_enable = true;
696  bool depth_write_mask = true;
704  bool stencil_enable = false;
708  uint8_t front_stencil_read_mask = 0xFF;
712  uint8_t front_stencil_write_mask = 0xFF;
736  uint8_t back_stencil_read_mask = 0xFF;
740  uint8_t back_stencil_write_mask = 0xFF;
761  };
762 
766  enum class pipeline_flags : uint32_t
767  {
768  none = 0,
769  library = (1 << 0),
770  skip_triangles = (1 << 1),
771  skip_aabbs = (1 << 2),
772  };
774 
778  enum class pipeline_subobject_type : uint32_t
779  {
780  unknown,
781 
795  hull_shader,
816  pixel_shader,
829  input_layout,
841  blend_state,
873  sample_mask,
878  sample_count,
907  mesh_shader,
935  miss_shader,
954  libraries,
979  flags
980  };
981 
986  {
995  uint32_t count = 0;
1000  void *data = nullptr;
1001  };
1002 
1008 
1013  {
1017  resource buffer = { 0 };
1021  uint64_t offset = 0;
1026  uint64_t size = UINT64_MAX;
1027  };
1028 
1033  {
1037  sampler sampler = { 0 };
1042  };
1043 
1049 
1054  {
1062  uint32_t source_binding = 0;
1066  uint32_t source_array_offset = 0;
1074  uint32_t dest_binding = 0;
1078  uint32_t dest_array_offset = 0;
1082  uint32_t count = 0;
1083  };
1084 
1089  {
1098  uint32_t binding = 0;
1103  uint32_t array_offset = 0;
1108  uint32_t count = 0;
1117  const void *descriptors = nullptr;
1118  };
1119 
1125 
1129  enum class query_type
1130  {
1135  occlusion = 0,
1140  binary_occlusion = 1,
1145  timestamp = 2,
1150  pipeline_statistics = 3,
1159  };
1160 
1166 
1171  enum class dynamic_state
1172  {
1173  unknown = 0,
1174 
1175  alpha_test_enable = 15,
1176  alpha_reference_value = 24,
1177  alpha_func = 25,
1178  srgb_write_enable = 194,
1179  primitive_topology = 1000,
1180  sample_mask = 162,
1181 
1182  // Blend state
1183 
1184  alpha_to_coverage_enable = 1003,
1185  blend_enable = 27,
1186  logic_op_enable = 1004,
1189  color_blend_op = 171,
1192  alpha_blend_op = 209,
1193  blend_constant = 193,
1194  logic_op = 1005,
1196 
1197  // Rasterizer state
1198 
1199  fill_mode = 8,
1200  cull_mode = 22,
1201  front_counter_clockwise = 1001,
1202  depth_bias = 195,
1203  depth_bias_clamp = 1002,
1205  depth_clip_enable = 136,
1206  scissor_enable = 174,
1207  multisample_enable = 161,
1209 
1210  // Depth-stencil state
1211 
1212  depth_enable = 7,
1213  depth_write_mask = 14,
1214  depth_func = 23,
1215  stencil_enable = 52,
1219  front_stencil_func = 56,
1220  front_stencil_pass_op = 55,
1221  front_stencil_fail_op = 53,
1223  back_stencil_read_mask = 1006,
1224  back_stencil_write_mask = 1007,
1226  back_stencil_func = 189,
1227  back_stencil_pass_op = 188,
1228  back_stencil_fail_op = 186,
1230 
1231  // Ray tracing state
1232 
1234  };
1235 
1239  struct rect
1240  {
1241  int32_t left = 0;
1242  int32_t top = 0;
1243  int32_t right = 0;
1244  int32_t bottom = 0;
1245 
1246  constexpr uint32_t width() const { return right - left; }
1247  constexpr uint32_t height() const { return bottom - top; }
1248  };
1249 
1253  struct viewport
1254  {
1255  float x = 0.0f;
1256  float y = 0.0f;
1257  float width = 0.0f;
1258  float height = 0.0f;
1259  float min_depth = 0.0f;
1260  float max_depth = 1.0f;
1261  };
1262 
1266  enum class fence_flags : uint32_t
1267  {
1268  none = 0,
1269  shared = (1 << 1),
1270  shared_nt_handle = (1 << 11),
1271  non_monitored = (1 << 3)
1272  };
1274 
1280 } }
pipeline_flags
The available pipeline creation flags.
Definition: reshade_api_pipeline.hpp:767
query_type
The available query types.
Definition: reshade_api_pipeline.hpp:1130
@ 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:1172
fill_mode
The fill mode to use when rendering triangles.
Definition: reshade_api_pipeline.hpp:242
compare_op
The available comparison types.
Definition: reshade_api_resource.hpp:35
blend_op
The available color or alpha blending operations.
Definition: reshade_api_pipeline.hpp:287
primitive_topology
Specifies how the pipeline interprets vertex data that is bound to the vertex input stage and subsequ...
Definition: reshade_api_pipeline.hpp:340
pipeline_stage
A list of flags that represent the available pipeline stages in the render pipeline.
Definition: reshade_api_pipeline.hpp:45
stencil_op
The available stencil operations that can be performed during depth-stencil testing.
Definition: reshade_api_pipeline.hpp:325
pipeline_layout_param_type
The available pipeline layout parameter types.
Definition: reshade_api_pipeline.hpp:121
fence_flags
A list of flags that describe fence creation options.
Definition: reshade_api_pipeline.hpp:1267
logic_op
The available logic operations.
Definition: reshade_api_pipeline.hpp:264
shader_group_type
The available ray tracing shader group types.
Definition: reshade_api_pipeline.hpp:428
cull_mode
Indicates triangles facing a particular direction are not drawn.
Definition: reshade_api_pipeline.hpp:252
pipeline_subobject_type
The available pipeline sub-object types.
Definition: reshade_api_pipeline.hpp:779
@ 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
The available data and texture formats. This is mostly compatible with 'DXGI_FORMAT'.
Definition: reshade_api_format.hpp:18
blend_factor
The available blend factors in color or alpha blending operations.
Definition: reshade_api_pipeline.hpp:299
shader_stage
A list of flags that represent the available shader stages in the render pipeline.
Definition: reshade_api_pipeline.hpp:16
descriptor_type
The available descriptor types.
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:52
#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:571
blend_factor source_alpha_blend_factor[8]
Source to use for the alpha value that the pixel shader outputs.
Definition: reshade_api_pipeline.hpp:605
bool logic_op_enable[8]
Enable or disable a logical operation for each render target.
Definition: reshade_api_pipeline.hpp:585
blend_factor dest_color_blend_factor[8]
Destination to use for the current RGB value in the render target.
Definition: reshade_api_pipeline.hpp:595
blend_factor dest_alpha_blend_factor[8]
Destination to use for the current alpha value in the render target.
Definition: reshade_api_pipeline.hpp:610
blend_factor source_color_blend_factor[8]
Source to use for the RGB value that the pixel shader outputs.
Definition: reshade_api_pipeline.hpp:590
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:600
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:615
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:575
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:628
bool blend_enable[8]
Enable or disable blending for each render target.
Definition: reshade_api_pipeline.hpp:580
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:619
A constant buffer resource descriptor.
Definition: reshade_api_pipeline.hpp:1013
uint64_t offset
Offset from the start of the buffer resource (in bytes).
Definition: reshade_api_pipeline.hpp:1021
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:1026
resource buffer
Constant buffer resource.
Definition: reshade_api_pipeline.hpp:1017
Describes a range of constants in a pipeline layout.
Definition: reshade_api_pipeline.hpp:132
uint32_t count
Number of constants in this range (in 32-bit values).
Definition: reshade_api_pipeline.hpp:148
uint32_t dx_register_index
D3D10/D3D11/D3D12 constant buffer register index.
Definition: reshade_api_pipeline.hpp:140
uint32_t dx_register_space
D3D12 constant buffer register space.
Definition: reshade_api_pipeline.hpp:144
uint32_t binding
OpenGL uniform buffer binding index.
Definition: reshade_api_pipeline.hpp:136
shader_stage visibility
Shader pipeline stages that can make use of the constants in this range.
Definition: reshade_api_pipeline.hpp:152
Describes the state of the depth-stencil stage.
Definition: reshade_api_pipeline.hpp:688
bool stencil_enable
Enable or disable stencil testing.
Definition: reshade_api_pipeline.hpp:704
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:732
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:708
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:736
bool depth_write_mask
Enable or disable writes to the depth-stencil buffer.
Definition: reshade_api_pipeline.hpp:696
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:712
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:740
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:720
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:756
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:744
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:748
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:700
bool depth_enable
Enable or disable depth testing.
Definition: reshade_api_pipeline.hpp:692
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:728
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:716
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:760
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:752
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:724
An opaque handle to a descriptor heap.
Definition: reshade_api_pipeline.hpp:1124
Describes a range of descriptors of a descriptor table in a pipeline layout.
Definition: reshade_api_pipeline.hpp:159
uint32_t dx_register_space
D3D12 register space (register(..., spaceX) in HLSL).
Definition: reshade_api_pipeline.hpp:172
uint32_t dx_register_index
D3D9/D3D10/D3D11/D3D12 shader register index (register(xX) in HLSL).
Definition: reshade_api_pipeline.hpp:168
shader_stage visibility
Shader pipeline stages that can make use of the descriptors in this range.
Definition: reshade_api_pipeline.hpp:181
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:164
uint32_t count
Number of descriptors in this range. Set to -1 (UINT32_MAX) to indicate an unbounded range.
Definition: reshade_api_pipeline.hpp:177
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:187
descriptor_type type
Type of the descriptors in this range.
Definition: reshade_api_pipeline.hpp:191
All information needed to copy descriptors between descriptor tables.
Definition: reshade_api_pipeline.hpp:1054
uint32_t source_binding
Index of the binding in the source descriptor table.
Definition: reshade_api_pipeline.hpp:1062
uint32_t dest_binding
Index of the binding in the destination descriptor table.
Definition: reshade_api_pipeline.hpp:1074
uint32_t count
Number of descriptors to copy.
Definition: reshade_api_pipeline.hpp:1082
descriptor_table dest_table
Descriptor table to copy to.
Definition: reshade_api_pipeline.hpp:1070
uint32_t source_array_offset
Array index in the specified source binding to begin copying from.
Definition: reshade_api_pipeline.hpp:1066
descriptor_table source_table
Descriptor table to copy from.
Definition: reshade_api_pipeline.hpp:1058
uint32_t dest_array_offset
Array index in the specified destination binding to begin copying to.
Definition: reshade_api_pipeline.hpp:1078
All information needed to update descriptors in a descriptor table.
Definition: reshade_api_pipeline.hpp:1089
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:1117
descriptor_table table
Descriptor table to update.
Definition: reshade_api_pipeline.hpp:1093
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:1098
uint32_t count
Number of descriptors to update, starting at the specified binding. If the specified binding has fewe...
Definition: reshade_api_pipeline.hpp:1108
uint32_t array_offset
Array index in the specified binding to begin updating at. Only meaningful in Vulkan,...
Definition: reshade_api_pipeline.hpp:1103
descriptor_type type
Type of the specified descriptors.
Definition: reshade_api_pipeline.hpp:1112
An opaque handle to a descriptor table in a descriptor heap.
Definition: reshade_api_pipeline.hpp:1048
An opaque handle to a fence synchronization object.
Definition: reshade_api_pipeline.hpp:1279
Describes a single element in the vertex layout for the input-assembler stage.
Definition: reshade_api_pipeline.hpp:518
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:553
uint32_t location
GLSL attribute location associated with this element (layout(location = X)).
Definition: reshade_api_pipeline.hpp:522
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:530
const char * semantic
HLSL semantic associated with this element.
Definition: reshade_api_pipeline.hpp:526
uint32_t buffer_binding
Index of the vertex buffer binding.
Definition: reshade_api_pipeline.hpp:538
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:547
uint32_t offset
Offset (in bytes) from the start of the vertex to this element.
Definition: reshade_api_pipeline.hpp:542
Describes a single parameter in a pipeline layout.
Definition: reshade_api_pipeline.hpp:198
descriptor_range push_descriptors
Used when parameter type is pipeline_layout_param_type::push_descriptors.
Definition: reshade_api_pipeline.hpp:219
constexpr pipeline_layout_param(const constant_range &push_constants)
Definition: reshade_api_pipeline.hpp:200
pipeline_layout_param_type type
Type of the parameter.
Definition: reshade_api_pipeline.hpp:207
const descriptor_range * ranges
Definition: reshade_api_pipeline.hpp:227
constexpr pipeline_layout_param(uint32_t count, const descriptor_range *ranges)
Definition: reshade_api_pipeline.hpp:202
constexpr pipeline_layout_param(const descriptor_range &push_descriptors)
Definition: reshade_api_pipeline.hpp:201
constexpr pipeline_layout_param()
Definition: reshade_api_pipeline.hpp:199
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...
uint32_t count
Definition: reshade_api_pipeline.hpp:226
constant_range push_constants
Used when parameter type is pipeline_layout_param_type::push_constants.
Definition: reshade_api_pipeline.hpp:214
An opaque handle to a pipeline layout object.
Definition: reshade_api_pipeline.hpp:236
Describes a pipeline sub-object.
Definition: reshade_api_pipeline.hpp:986
void * data
Pointer to an array of sub-object descriptions (which should be as large as the specified count)....
Definition: reshade_api_pipeline.hpp:1000
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:995
pipeline_subobject_type type
Type of the specified sub-object data.
Definition: reshade_api_pipeline.hpp:990
An opaque handle to a pipeline state object.
Definition: reshade_api_pipeline.hpp:1007
An opaque handle to a query heap.
Definition: reshade_api_pipeline.hpp:1165
Describes the state of the rasterizer stage.
Definition: reshade_api_pipeline.hpp:635
bool scissor_enable
Enable or disable scissor testing (scissor rectangle culling).
Definition: reshade_api_pipeline.hpp:668
bool front_counter_clockwise
Determines if a triangle is front or back-facing.
Definition: reshade_api_pipeline.hpp:648
float depth_bias
Depth value added to a given pixel.
Definition: reshade_api_pipeline.hpp:652
bool multisample_enable
Use the quadrilateral or alpha line anti-aliasing algorithm on multisample antialiasing render target...
Definition: reshade_api_pipeline.hpp:672
bool depth_clip_enable
Enable or disable clipping based on distance.
Definition: reshade_api_pipeline.hpp:664
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:676
uint32_t conservative_rasterization
Enable or disable conservative rasterization mode.
Definition: reshade_api_pipeline.hpp:681
float depth_bias_clamp
Maximum depth bias of a pixel.
Definition: reshade_api_pipeline.hpp:656
float slope_scaled_depth_bias
Scalar on the slope of a given pixel.
Definition: reshade_api_pipeline.hpp:660
Describes a rectangle.
Definition: reshade_api_pipeline.hpp:1240
constexpr uint32_t width() const
Definition: reshade_api_pipeline.hpp:1246
int32_t top
Definition: reshade_api_pipeline.hpp:1242
int32_t left
Definition: reshade_api_pipeline.hpp:1241
int32_t right
Definition: reshade_api_pipeline.hpp:1243
constexpr uint32_t height() const
Definition: reshade_api_pipeline.hpp:1247
int32_t bottom
Definition: reshade_api_pipeline.hpp:1244
An opaque handle to a resource view object (depth-stencil, render target, shader resource view,...
Definition: reshade_api_resource.hpp:416
An opaque handle to a resource object (buffer, texture, ...).
Definition: reshade_api_resource.hpp:320
A combined sampler and resource view descriptor.
Definition: reshade_api_pipeline.hpp:1033
resource_view view
Shader resource view.
Definition: reshade_api_pipeline.hpp:1041
An opaque handle to a sampler state object.
Definition: reshade_api_resource.hpp:136
Describes a shader object.
Definition: reshade_api_pipeline.hpp:394
const char * entry_point
Optional entry point name if the shader source code or binary contains multiple entry points....
Definition: reshade_api_pipeline.hpp:407
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:421
const void * code
Shader source code or binary.
Definition: reshade_api_pipeline.hpp:398
size_t code_size
Size (in bytes) of the shader source code or binary.
Definition: reshade_api_pipeline.hpp:402
const uint32_t * spec_constant_ids
Pointer to an array of specialization constant indices.
Definition: reshade_api_pipeline.hpp:417
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:413
Describes a ray tracing shader group.
Definition: reshade_api_pipeline.hpp:440
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:491
struct reshade::api::shader_group::@3::@7 hit_group
Used when type is shader_group_type::hit_group_triangles or shader_group_type::hit_group_aabbs.
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:442
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:497
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:485
uint32_t shader_index
Index of the shader in the ray generation shader pipeline subobject.
Definition: reshade_api_pipeline.hpp:460
shader_group()
Definition: reshade_api_pipeline.hpp:441
struct reshade::api::shader_group::@3::@8 callable
Used when type is shader_group_type::callable.
struct reshade::api::shader_group::@3::@6 miss
Used when type is shader_group_type::miss.
shader_group_type type
Type of the shader group.
Definition: reshade_api_pipeline.hpp:447
struct reshade::api::shader_group::@3::@5 raygen
Used when type is shader_group_type::raygen.
Describes the state of the stream-output stage.
Definition: reshade_api_pipeline.hpp:560
uint32_t rasterized_stream
Index of the stream output stream to be sent to the rasterizer stage.
Definition: reshade_api_pipeline.hpp:564
Describes a render viewport.
Definition: reshade_api_pipeline.hpp:1254
float width
Definition: reshade_api_pipeline.hpp:1257
float min_depth
Definition: reshade_api_pipeline.hpp:1259
float height
Definition: reshade_api_pipeline.hpp:1258
float x
Definition: reshade_api_pipeline.hpp:1255
float y
Definition: reshade_api_pipeline.hpp:1256
float max_depth
Definition: reshade_api_pipeline.hpp:1260