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 
267 
271  enum class fill_mode : uint32_t
272  {
273  solid = 0,
274  wireframe = 1,
275  point = 2
276  };
277 
281  enum class cull_mode : uint32_t
282  {
283  none = 0,
284  front = 1,
285  back = 2,
287  };
289 
293  enum class logic_op : uint32_t
294  {
295  clear = 0,
296  bitwise_and = 1,
298  copy = 3,
300  noop = 5,
301  bitwise_xor = 6,
302  bitwise_or = 7,
303  bitwise_nor = 8,
304  equivalent = 9,
305  invert = 10,
306  bitwise_or_reverse = 11,
307  copy_inverted = 12,
308  bitwise_or_inverted = 13,
309  bitwise_nand = 14,
310  set = 15
311  };
312 
316  enum class blend_op : uint32_t
317  {
318  add = 0,
319  subtract = 1,
320  reverse_subtract = 2,
321  min = 3,
322  max = 4
323  };
324 
328  enum class blend_factor : uint32_t
329  {
330  zero = 0,
331  one = 1,
332  source_color = 2,
334  dest_color = 4,
336  source_alpha = 6,
338  dest_alpha = 8,
340  constant_color = 10,
342  constant_alpha = 12,
345  source1_color = 15,
347  source1_alpha = 17,
349  };
350 
354  enum class stencil_op : uint32_t
355  {
356  keep = 0,
357  zero = 1,
358  replace = 2,
359  increment_saturate = 3,
360  decrement_saturate = 4,
361  invert = 5,
362  increment = 6,
363  decrement = 7
364  };
365 
369  enum class primitive_topology : uint32_t
370  {
371  undefined = 0,
372 
373  point_list = 1,
374  line_list = 2,
375  line_strip = 3,
376  triangle_list = 4,
377  triangle_strip = 5,
378  triangle_fan = 6,
379  quad_list = 8,
380  quad_strip = 9,
381  line_list_adj = 10,
382  line_strip_adj = 11,
383  triangle_list_adj = 12,
384  triangle_strip_adj = 13,
385 
386  patch_list_01_cp = 33,
418  };
419 
423  struct shader_desc
424  {
428  const void *code = nullptr;
432  size_t code_size = 0;
437  const char *entry_point = nullptr;
438 
443  uint32_t spec_constants = 0;
447  const uint32_t *spec_constant_ids = nullptr;
451  const uint32_t *spec_constant_values = nullptr;
452  };
453 
457  enum class shader_group_type
458  {
459  raygen = 0,
460  miss = 3,
462  hit_group_aabbs = 2,
463  callable = 4,
464  };
465 
470  {
473 
478 
479  union
480  {
484  struct
485  {
490  uint32_t shader_index = UINT32_MAX;
492 
496  struct
497  {
502  uint32_t shader_index = UINT32_MAX;
503  } miss;
504 
508  struct
509  {
515  uint32_t closest_hit_shader_index = UINT32_MAX;
521  uint32_t any_hit_shader_index = UINT32_MAX;
527  uint32_t intersection_shader_index = UINT32_MAX;
529 
533  struct
534  {
539  uint32_t shader_index = UINT32_MAX;
541  };
542  };
543 
548  {
552  uint32_t location = 0;
556  const char *semantic = nullptr;
560  uint32_t semantic_index = 0;
568  uint32_t buffer_binding = 0;
572  uint32_t offset = 0;
577  uint32_t stride = 0;
583  uint32_t instance_step_rate = 0;
584  };
585 
590  {
594  uint32_t rasterized_stream = 0;
595  };
596 
600  struct blend_desc
601  {
610  bool blend_enable[8] = { false, false, false, false, false, false, false, false };
615  bool logic_op_enable[8] = { false, false, false, false, false, false, false, false };
649  float blend_constant[4] = { 1.0f, 1.0f, 1.0f, 1.0f };
658  uint8_t render_target_write_mask[8] = { 0xF, 0xF, 0xF, 0xF, 0xF, 0xF, 0xF, 0xF };
659  };
660 
665  {
682  float depth_bias = 0.0f;
686  float depth_bias_clamp = 0.0f;
694  bool depth_clip_enable = true;
698  bool scissor_enable = false;
702  bool multisample_enable = false;
712  };
713 
718  {
722  bool depth_enable = true;
726  bool depth_write_mask = true;
734  bool stencil_enable = false;
738  uint8_t front_stencil_read_mask = 0xFF;
742  uint8_t front_stencil_write_mask = 0xFF;
766  uint8_t back_stencil_read_mask = 0xFF;
770  uint8_t back_stencil_write_mask = 0xFF;
791  };
792 
796  enum class pipeline_flags : uint32_t
797  {
798  none = 0,
799  library = (1 << 0),
800  skip_triangles = (1 << 1),
801  skip_aabbs = (1 << 2),
802  };
804 
808  enum class pipeline_subobject_type : uint32_t
809  {
810  unknown,
811 
825  hull_shader,
846  pixel_shader,
859  input_layout,
871  blend_state,
903  sample_mask,
908  sample_count,
937  mesh_shader,
965  miss_shader,
984  libraries,
1009  flags
1010  };
1011 
1016  {
1025  uint32_t count = 0;
1030  void *data = nullptr;
1031  };
1032 
1048 
1053  {
1057  resource buffer = { 0 };
1061  uint64_t offset = 0;
1066  uint64_t size = UINT64_MAX;
1067  };
1068 
1073  {
1077  sampler sampler = { 0 };
1082  };
1083 
1099 
1104  {
1112  uint32_t source_binding = 0;
1116  uint32_t source_array_offset = 0;
1124  uint32_t dest_binding = 0;
1128  uint32_t dest_array_offset = 0;
1132  uint32_t count = 0;
1133  };
1134 
1139  {
1148  uint32_t binding = 0;
1153  uint32_t array_offset = 0;
1158  uint32_t count = 0;
1167  const void *descriptors = nullptr;
1168  };
1169 
1185 
1189  enum class query_type
1190  {
1195  occlusion = 0,
1200  binary_occlusion = 1,
1205  timestamp = 2,
1210  pipeline_statistics = 3,
1243  };
1244 
1260 
1265  enum class dynamic_state
1266  {
1267  unknown = 0,
1268 
1269  alpha_test_enable = 15,
1270  alpha_reference_value = 24,
1271  alpha_func = 25,
1272  srgb_write_enable = 194,
1273  primitive_topology = 1000,
1274  sample_mask = 162,
1275 
1276  // Blend state
1277 
1278  alpha_to_coverage_enable = 1003,
1279  blend_enable = 27,
1280  logic_op_enable = 1004,
1283  color_blend_op = 171,
1286  alpha_blend_op = 209,
1287  blend_constant = 193,
1288  logic_op = 1005,
1290 
1291  // Rasterizer state
1292 
1293  fill_mode = 8,
1294  cull_mode = 22,
1295  front_counter_clockwise = 1001,
1296  depth_bias = 195,
1297  depth_bias_clamp = 1002,
1299  depth_clip_enable = 136,
1300  scissor_enable = 174,
1301  multisample_enable = 161,
1303 
1304  // Depth-stencil state
1305 
1306  depth_enable = 7,
1307  depth_write_mask = 14,
1308  depth_func = 23,
1309  stencil_enable = 52,
1313  front_stencil_func = 56,
1314  front_stencil_pass_op = 55,
1315  front_stencil_fail_op = 53,
1317  back_stencil_read_mask = 1006,
1318  back_stencil_write_mask = 1007,
1320  back_stencil_func = 189,
1321  back_stencil_pass_op = 188,
1322  back_stencil_fail_op = 186,
1324 
1325  // Ray tracing state
1326 
1328  };
1329 
1333  struct rect
1334  {
1335  int32_t left = 0;
1336  int32_t top = 0;
1337  int32_t right = 0;
1338  int32_t bottom = 0;
1339 
1340  constexpr uint32_t width() const { return right - left; }
1341  constexpr uint32_t height() const { return bottom - top; }
1342  };
1343 
1347  struct viewport
1348  {
1349  float x = 0.0f;
1350  float y = 0.0f;
1351  float width = 0.0f;
1352  float height = 0.0f;
1353  float min_depth = 0.0f;
1354  float max_depth = 1.0f;
1355  };
1356 
1360  enum class fence_flags : uint32_t
1361  {
1362  none = 0,
1363  shared = (1 << 1),
1364  shared_nt_handle = (1 << 11),
1365  non_monitored = (1 << 3)
1366  };
1368 
1384 } }
pipeline_flags
Flags that specify additional parameters of a pipeline.
Definition: reshade_api_pipeline.hpp:797
query_type
Type of a query.
Definition: reshade_api_pipeline.hpp:1190
@ 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:1266
fill_mode
Fill mode to use when rendering triangles.
Definition: reshade_api_pipeline.hpp:272
compare_op
Comparison operations.
Definition: reshade_api_resource.hpp:35
blend_op
Color or alpha blending operations.
Definition: reshade_api_pipeline.hpp:317
primitive_topology
Specifies how the pipeline interprets vertex data that is bound to the vertex input stage and subsequ...
Definition: reshade_api_pipeline.hpp:370
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:355
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:1361
logic_op
Logic operations.
Definition: reshade_api_pipeline.hpp:294
shader_group_type
Type of a ray tracing shader group.
Definition: reshade_api_pipeline.hpp:458
cull_mode
Indicates triangles facing a particular direction are not drawn.
Definition: reshade_api_pipeline.hpp:282
pipeline_subobject_type
Type of a pipeline sub-object.
Definition: reshade_api_pipeline.hpp:809
@ 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:329
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:601
blend_factor source_alpha_blend_factor[8]
Source to use for the alpha value that the pixel shader outputs.
Definition: reshade_api_pipeline.hpp:635
bool logic_op_enable[8]
Enable or disable a logical operation for each render target.
Definition: reshade_api_pipeline.hpp:615
blend_factor dest_color_blend_factor[8]
Destination to use for the current RGB value in the render target.
Definition: reshade_api_pipeline.hpp:625
blend_factor dest_alpha_blend_factor[8]
Destination to use for the current alpha value in the render target.
Definition: reshade_api_pipeline.hpp:640
blend_factor source_color_blend_factor[8]
Source to use for the RGB value that the pixel shader outputs.
Definition: reshade_api_pipeline.hpp:620
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:630
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:645
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:605
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:658
bool blend_enable[8]
Enable or disable blending for each render target.
Definition: reshade_api_pipeline.hpp:610
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:649
A constant buffer resource descriptor.
Definition: reshade_api_pipeline.hpp:1053
uint64_t offset
Offset from the start of the buffer resource (in bytes).
Definition: reshade_api_pipeline.hpp:1061
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:1066
resource buffer
Constant buffer resource.
Definition: reshade_api_pipeline.hpp:1057
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:718
bool stencil_enable
Enable or disable stencil testing.
Definition: reshade_api_pipeline.hpp:734
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:762
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:738
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:766
bool depth_write_mask
Enable or disable writes to the depth-stencil buffer.
Definition: reshade_api_pipeline.hpp:726
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:742
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:770
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:750
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:786
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:774
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:778
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:730
bool depth_enable
Enable or disable depth testing.
Definition: reshade_api_pipeline.hpp:722
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:758
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:746
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:790
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:782
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:754
An opaque handle to a descriptor heap.
Definition: reshade_api_pipeline.hpp:1184
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:1104
uint32_t source_binding
Index of the binding in the source descriptor table.
Definition: reshade_api_pipeline.hpp:1112
uint32_t dest_binding
Index of the binding in the destination descriptor table.
Definition: reshade_api_pipeline.hpp:1124
uint32_t count
Number of descriptors to copy.
Definition: reshade_api_pipeline.hpp:1132
descriptor_table dest_table
Descriptor table to copy to.
Definition: reshade_api_pipeline.hpp:1120
uint32_t source_array_offset
Array index in the specified source binding to begin copying from.
Definition: reshade_api_pipeline.hpp:1116
descriptor_table source_table
Descriptor table to copy from.
Definition: reshade_api_pipeline.hpp:1108
uint32_t dest_array_offset
Array index in the specified destination binding to begin copying to.
Definition: reshade_api_pipeline.hpp:1128
All information needed to update descriptors in a descriptor table.
Definition: reshade_api_pipeline.hpp:1139
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:1167
descriptor_table table
Descriptor table to update.
Definition: reshade_api_pipeline.hpp:1143
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:1148
uint32_t count
Number of descriptors to update, starting at the specified binding. If the specified binding has fewe...
Definition: reshade_api_pipeline.hpp:1158
uint32_t array_offset
Array index in the specified binding to begin updating at. Only meaningful in Vulkan,...
Definition: reshade_api_pipeline.hpp:1153
descriptor_type type
Type of the specified descriptors.
Definition: reshade_api_pipeline.hpp:1162
An opaque handle to a descriptor table in a descriptor heap.
Definition: reshade_api_pipeline.hpp:1098
An opaque handle to a fence synchronization object.
Definition: reshade_api_pipeline.hpp:1383
Describes a single element in the vertex layout for the input-assembler stage.
Definition: reshade_api_pipeline.hpp:548
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:583
uint32_t location
GLSL attribute location associated with this element (layout(location = X)).
Definition: reshade_api_pipeline.hpp:552
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:560
const char * semantic
HLSL semantic associated with this element.
Definition: reshade_api_pipeline.hpp:556
uint32_t buffer_binding
Index of the vertex buffer binding.
Definition: reshade_api_pipeline.hpp:568
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:577
uint32_t offset
Offset (in bytes) from the start of the vertex to this element.
Definition: reshade_api_pipeline.hpp:572
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:266
Describes a pipeline sub-object.
Definition: reshade_api_pipeline.hpp:1016
void * data
Pointer to an array of sub-object descriptions (which should be as large as the specified count)....
Definition: reshade_api_pipeline.hpp:1030
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:1025
pipeline_subobject_type type
Type of the specified sub-object data.
Definition: reshade_api_pipeline.hpp:1020
An opaque handle to a pipeline state object.
Definition: reshade_api_pipeline.hpp:1047
An opaque handle to a query heap.
Definition: reshade_api_pipeline.hpp:1259
Describes the state of the rasterizer stage.
Definition: reshade_api_pipeline.hpp:665
bool scissor_enable
Enable or disable scissor testing (scissor rectangle culling).
Definition: reshade_api_pipeline.hpp:698
bool front_counter_clockwise
Determines if a triangle is front or back-facing.
Definition: reshade_api_pipeline.hpp:678
float depth_bias
Depth value added to a given pixel.
Definition: reshade_api_pipeline.hpp:682
bool multisample_enable
Use the quadrilateral or alpha line anti-aliasing algorithm on multisample antialiasing render target...
Definition: reshade_api_pipeline.hpp:702
bool depth_clip_enable
Enable or disable clipping based on distance.
Definition: reshade_api_pipeline.hpp:694
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:706
uint32_t conservative_rasterization
Enable or disable conservative rasterization mode.
Definition: reshade_api_pipeline.hpp:711
float depth_bias_clamp
Maximum depth bias of a pixel.
Definition: reshade_api_pipeline.hpp:686
float slope_scaled_depth_bias
Scalar on the slope of a given pixel.
Definition: reshade_api_pipeline.hpp:690
Describes a rectangle.
Definition: reshade_api_pipeline.hpp:1334
constexpr uint32_t width() const
Definition: reshade_api_pipeline.hpp:1340
int32_t top
Definition: reshade_api_pipeline.hpp:1336
int32_t left
Definition: reshade_api_pipeline.hpp:1335
int32_t right
Definition: reshade_api_pipeline.hpp:1337
constexpr uint32_t height() const
Definition: reshade_api_pipeline.hpp:1341
int32_t bottom
Definition: reshade_api_pipeline.hpp:1338
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:1073
resource_view view
Shader resource view.
Definition: reshade_api_pipeline.hpp:1081
An opaque handle to a sampler state object.
Definition: reshade_api_resource.hpp:146
Describes a shader object.
Definition: reshade_api_pipeline.hpp:424
const char * entry_point
Optional entry point name if the shader source code or binary contains multiple entry points....
Definition: reshade_api_pipeline.hpp:437
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:451
const void * code
Shader source code or binary.
Definition: reshade_api_pipeline.hpp:428
size_t code_size
Size (in bytes) of the shader source code or binary.
Definition: reshade_api_pipeline.hpp:432
const uint32_t * spec_constant_ids
Pointer to an array of specialization constant indices.
Definition: reshade_api_pipeline.hpp:447
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:443
Describes a ray tracing shader group.
Definition: reshade_api_pipeline.hpp:470
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:521
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:472
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:527
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:515
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:490
shader_group()
Definition: reshade_api_pipeline.hpp:471
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:477
Describes the state of the stream-output stage.
Definition: reshade_api_pipeline.hpp:590
uint32_t rasterized_stream
Index of the stream output stream to be sent to the rasterizer stage.
Definition: reshade_api_pipeline.hpp:594
Describes a render viewport.
Definition: reshade_api_pipeline.hpp:1348
float width
Definition: reshade_api_pipeline.hpp:1351
float min_depth
Definition: reshade_api_pipeline.hpp:1353
float height
Definition: reshade_api_pipeline.hpp:1352
float x
Definition: reshade_api_pipeline.hpp:1349
float y
Definition: reshade_api_pipeline.hpp:1350
float max_depth
Definition: reshade_api_pipeline.hpp:1354