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 #include <cstddef>
10 
11 namespace reshade::api
12 {
16  enum class shader_stage : uint32_t
17  {
18  vertex = 0x1,
19  hull = 0x2,
20  domain = 0x4,
21  geometry = 0x8,
22  pixel = 0x10,
23  compute = 0x20,
24 
25  amplification = 0x40,
26  mesh = 0x80,
27 
28  raygen = 0x0100,
29  any_hit = 0x0200,
30  closest_hit = 0x0400,
31  miss = 0x0800,
32  intersection = 0x1000,
33  callable = 0x2000,
34 
35  all = 0x7FFFFFFF,
39  };
41 
45  enum class pipeline_stage : uint32_t
46  {
47  vertex_shader = 0x8,
48  hull_shader = 0x10,
49  domain_shader = 0x20,
50  geometry_shader = 0x40,
51  pixel_shader = 0x80,
52  compute_shader = 0x800,
53 
54  amplification_shader = 0x80000,
55  mesh_shader = 0x100000,
56 
57  ray_tracing_shader = 0x00200000,
58 
59  input_assembler = 0x2,
60  stream_output = 0x4,
61  rasterizer = 0x100,
62  depth_stencil = 0x200,
63  output_merger = 0x400,
64 
65  all = 0x7FFFFFFF,
70  };
72 
76  enum class descriptor_type : uint32_t
77  {
81  sampler = 0,
113  constant_buffer = 6,
124  };
125 
129  enum class descriptor_range_flags : uint32_t
130  {
131  none = 0,
132  descriptors_volatile = 0x1,
133  data_volatile = 0x2,
135  data_static = 0x8,
136  partially_bound = 0x10,
137  };
139 
143  enum class pipeline_layout_param_type : uint32_t
144  {
145  push_constants = 1,
146  descriptor_table = 0,
148  push_descriptors = 2,
151 
152  descriptor_table_with_static_samplers [[deprecated("use 'pipeline_layout_param_type::descriptor_table_with_flags' instead")]] = descriptor_table_with_flags,
153  push_descriptors_with_static_samplers [[deprecated("use 'pipeline_layout_param_type::push_descriptors_with_ranges_and_flags' instead")]] = push_descriptors_with_ranges_and_flags,
154  };
155 
160  {
165  uint32_t binding = 0;
169  uint32_t dx_register_index = 0;
173  uint32_t dx_register_space = 0;
177  uint32_t count = 0;
182  };
183 
188  {
193  uint32_t binding = 0;
197  uint32_t dx_register_index = 0;
201  uint32_t dx_register_space = 0;
206  uint32_t count = 0;
216  uint32_t array_size = 1;
221  };
223  {
231  const sampler_desc *static_samplers = nullptr;
232  };
233 
235 
240  {
247 
252 
253  union
254  {
259 
264 
268  struct
269  {
270  uint32_t count;
273 
277  struct
278  {
279  uint32_t count;
282  };
283  };
284 
300 
304  enum class fill_mode : uint32_t
305  {
306  solid = 0,
307  wireframe = 1,
308  point = 2,
309  };
310 
314  enum class cull_mode : uint32_t
315  {
316  none = 0,
317  front = 1,
318  back = 2,
320  };
322 
326  enum class logic_op : uint32_t
327  {
328  clear = 0,
329  bitwise_and = 1,
331  copy = 3,
333  noop = 5,
334  bitwise_xor = 6,
335  bitwise_or = 7,
336  bitwise_nor = 8,
337  equivalent = 9,
338  invert = 10,
339  bitwise_or_reverse = 11,
340  copy_inverted = 12,
341  bitwise_or_inverted = 13,
342  bitwise_nand = 14,
343  set = 15,
344  };
345 
349  enum class blend_op : uint32_t
350  {
351  add = 0,
352  subtract = 1,
353  reverse_subtract = 2,
354  min = 3,
355  max = 4,
356  };
357 
361  enum class blend_factor : uint32_t
362  {
363  zero = 0,
364  one = 1,
365  source_color = 2,
367  dest_color = 4,
369  source_alpha = 6,
371  dest_alpha = 8,
373  constant_color = 10,
375  constant_alpha = 12,
378  source1_color = 15,
380  source1_alpha = 17,
382  };
383 
387  enum class stencil_op : uint32_t
388  {
389  keep = 0,
390  zero = 1,
391  replace = 2,
392  increment_saturate = 3,
393  decrement_saturate = 4,
394  invert = 5,
395  increment = 6,
396  decrement = 7,
397  };
398 
402  enum class primitive_topology : uint32_t
403  {
404  undefined = 0,
405 
406  point_list = 1,
407  line_list = 2,
408  line_strip = 3,
409  triangle_list = 4,
410  triangle_strip = 5,
411  triangle_fan = 6,
412  quad_list = 8,
413  quad_strip = 9,
414  line_list_adj = 10,
415  line_strip_adj = 11,
416  triangle_list_adj = 12,
417  triangle_strip_adj = 13,
418 
419  patch_list_01_cp = 33,
451  };
452 
456  struct shader_desc
457  {
461  const void *code = nullptr;
465  size_t code_size = 0;
470  const char *entry_point = nullptr;
471 
476  uint32_t spec_constants = 0;
480  const uint32_t *spec_constant_ids = nullptr;
484  const uint32_t *spec_constant_values = nullptr;
485  };
486 
490  enum class shader_group_type
491  {
492  raygen = 0,
493  miss = 3,
495  hit_group_aabbs = 2,
496  callable = 4,
497  };
498 
503  {
506 
511 
512  union
513  {
517  struct
518  {
523  uint32_t shader_index = UINT32_MAX;
525 
529  struct
530  {
535  uint32_t shader_index = UINT32_MAX;
536  } miss;
537 
541  struct
542  {
548  uint32_t closest_hit_shader_index = UINT32_MAX;
554  uint32_t any_hit_shader_index = UINT32_MAX;
560  uint32_t intersection_shader_index = UINT32_MAX;
562 
566  struct
567  {
572  uint32_t shader_index = UINT32_MAX;
574  };
575  };
576 
581  {
585  uint32_t location = 0;
589  const char *semantic = nullptr;
593  uint32_t semantic_index = 0;
601  uint32_t buffer_binding = 0;
605  uint32_t offset = 0;
611  uint32_t stride = 0;
617  uint32_t instance_step_rate = 0;
618  };
619 
624  {
628  uint32_t rasterized_stream = 0;
629  };
630 
634  struct blend_desc
635  {
644  bool blend_enable[8] = { false, false, false, false, false, false, false, false };
649  bool logic_op_enable[8] = { false, false, false, false, false, false, false, false };
683  float blend_constant[4] = { 1.0f, 1.0f, 1.0f, 1.0f };
692  uint8_t render_target_write_mask[8] = { 0xF, 0xF, 0xF, 0xF, 0xF, 0xF, 0xF, 0xF };
693  };
694 
699  {
716  float depth_bias = 0.0f;
720  float depth_bias_clamp = 0.0f;
728  bool depth_clip_enable = true;
732  bool scissor_enable = false;
736  bool multisample_enable = false;
746  };
747 
752  {
756  bool depth_enable = true;
760  bool depth_write_mask = true;
768  bool stencil_enable = false;
772  uint8_t front_stencil_read_mask = 0xFF;
776  uint8_t front_stencil_write_mask = 0xFF;
800  uint8_t back_stencil_read_mask = 0xFF;
804  uint8_t back_stencil_write_mask = 0xFF;
825  };
826 
830  enum class pipeline_flags : uint32_t
831  {
832  none = 0,
833  library = 0x1,
834  skip_triangles = 0x2,
835  skip_aabbs = 0x4,
836  };
838 
842  enum class pipeline_subobject_type : uint32_t
843  {
844  unknown,
858  hull_shader,
879  pixel_shader,
892  input_layout,
904  blend_state,
936  sample_mask,
941  sample_count,
970  mesh_shader,
998  miss_shader,
1017  libraries,
1022  shader_groups,
1042  flags,
1043  };
1044 
1049  {
1058  uint32_t count = 0;
1063  void *data = nullptr;
1064  };
1065 
1081 
1086  {
1090  resource buffer = { 0 };
1094  uint64_t offset = 0;
1099  uint64_t size = UINT64_MAX;
1100  };
1101 
1106  {
1110  sampler sampler = { 0 };
1115  };
1116 
1132 
1137  {
1145  uint32_t source_binding = 0;
1149  uint32_t source_array_offset = 0;
1157  uint32_t dest_binding = 0;
1161  uint32_t dest_array_offset = 0;
1165  uint32_t count = 0;
1166  };
1167 
1172  {
1181  uint32_t binding = 0;
1186  uint32_t array_offset = 0;
1191  uint32_t count = 0;
1200  const void *descriptors = nullptr;
1201  };
1202 
1218 
1222  enum class query_type
1223  {
1228  occlusion = 0,
1233  binary_occlusion = 1,
1238  timestamp = 2,
1243  pipeline_statistics = 3,
1276  };
1277 
1293 
1298  enum class dynamic_state
1299  {
1300  unknown = 0,
1301 
1302  alpha_test_enable = 15,
1303  alpha_reference_value = 24,
1304  alpha_func = 25,
1305  srgb_write_enable = 194,
1306  primitive_topology = 1000,
1307  input_element_stride = 1009,
1308  sample_mask = 162,
1309 
1310  // Blend state
1311 
1312  alpha_to_coverage_enable = 1003,
1313  blend_enable = 27,
1314  logic_op_enable = 1004,
1317  color_blend_op = 171,
1320  alpha_blend_op = 209,
1321  blend_constant = 193,
1322  logic_op = 1005,
1324 
1325  // Rasterizer state
1326 
1327  fill_mode = 8,
1328  cull_mode = 22,
1329  front_counter_clockwise = 1001,
1330  depth_bias = 195,
1331  depth_bias_clamp = 1002,
1333  depth_clip_enable = 136,
1334  scissor_enable = 174,
1335  multisample_enable = 161,
1337 
1338  // Depth-stencil state
1339 
1340  depth_enable = 7,
1341  depth_write_mask = 14,
1342  depth_func = 23,
1343  stencil_enable = 52,
1347  front_stencil_func = 56,
1348  front_stencil_pass_op = 55,
1349  front_stencil_fail_op = 53,
1351  back_stencil_read_mask = 1006,
1352  back_stencil_write_mask = 1007,
1354  back_stencil_func = 189,
1355  back_stencil_pass_op = 188,
1356  back_stencil_fail_op = 186,
1358 
1359  // Ray tracing state
1360 
1362  };
1363 
1367  struct rect
1368  {
1369  int32_t left = 0;
1370  int32_t top = 0;
1371  int32_t right = 0;
1372  int32_t bottom = 0;
1373 
1374  constexpr uint32_t width() const { return right - left; }
1375  constexpr uint32_t height() const { return bottom - top; }
1376  };
1377 
1381  struct viewport
1382  {
1383  float x = 0.0f;
1384  float y = 0.0f;
1385  float width = 0.0f;
1386  float height = 0.0f;
1387  float min_depth = 0.0f;
1388  float max_depth = 1.0f;
1389  };
1390 
1394  enum class fence_flags : uint32_t
1395  {
1396  none = 0,
1397  non_monitored = 0x8,
1402  shared = 0x2,
1403  shared_nt_handle = 0x800,
1404  };
1406 
1422 }
Definition: reshade_api.hpp:11
pipeline_flags
Flags that specify additional parameters of a pipeline.
Definition: reshade_api_pipeline.hpp:831
query_type
Type of a query.
Definition: reshade_api_pipeline.hpp:1223
@ 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:1299
fill_mode
Fill mode to use when rendering triangles.
Definition: reshade_api_pipeline.hpp:305
compare_op
Comparison operations.
Definition: reshade_api_resource.hpp:35
blend_op
Color or alpha blending operations.
Definition: reshade_api_pipeline.hpp:350
primitive_topology
Specifies how the pipeline interprets vertex data that is bound to the vertex input stage and subsequ...
Definition: reshade_api_pipeline.hpp:403
pipeline_stage
Flags that specify the pipeline stages in the render pipeline.
Definition: reshade_api_pipeline.hpp:46
stencil_op
Stencil operations that can be performed during depth-stencil testing.
Definition: reshade_api_pipeline.hpp:388
pipeline_layout_param_type
Type of a pipeline layout parameter.
Definition: reshade_api_pipeline.hpp:144
fence_flags
Flags that specify additional parameters of a fence.
Definition: reshade_api_pipeline.hpp:1395
@ shared
Shared fences can be imported/exported from/to different graphics APIs and/or processes....
logic_op
Logic operations.
Definition: reshade_api_pipeline.hpp:327
shader_group_type
Type of a ray tracing shader group.
Definition: reshade_api_pipeline.hpp:491
cull_mode
Indicates triangles facing a particular direction are not drawn.
Definition: reshade_api_pipeline.hpp:315
descriptor_range_flags
Flags that specify the volatility of descriptors and the data they reference.
Definition: reshade_api_pipeline.hpp:130
pipeline_subobject_type
Type of a pipeline sub-object.
Definition: reshade_api_pipeline.hpp:843
@ 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:362
shader_stage
Flags that specify the shader stages in the render pipeline.
Definition: reshade_api_pipeline.hpp:17
descriptor_type
Type of a descriptor.
Definition: reshade_api_pipeline.hpp:77
@ 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.
#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:635
blend_factor source_alpha_blend_factor[8]
Source to use for the alpha value that the pixel shader outputs.
Definition: reshade_api_pipeline.hpp:669
bool logic_op_enable[8]
Enable or disable a logical operation for each render target.
Definition: reshade_api_pipeline.hpp:649
blend_factor dest_color_blend_factor[8]
Destination to use for the current RGB value in the render target.
Definition: reshade_api_pipeline.hpp:659
blend_factor dest_alpha_blend_factor[8]
Destination to use for the current alpha value in the render target.
Definition: reshade_api_pipeline.hpp:674
blend_factor source_color_blend_factor[8]
Source to use for the RGB value that the pixel shader outputs.
Definition: reshade_api_pipeline.hpp:654
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:664
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:679
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:639
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:692
bool blend_enable[8]
Enable or disable blending for each render target.
Definition: reshade_api_pipeline.hpp:644
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:683
A constant buffer resource descriptor.
Definition: reshade_api_pipeline.hpp:1086
uint64_t offset
Offset from the start of the buffer resource (in bytes).
Definition: reshade_api_pipeline.hpp:1094
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:1099
resource buffer
Constant buffer resource.
Definition: reshade_api_pipeline.hpp:1090
Describes a range of constants in a pipeline layout.
Definition: reshade_api_pipeline.hpp:160
uint32_t count
Number of constants in this range (in 32-bit values).
Definition: reshade_api_pipeline.hpp:177
uint32_t dx_register_index
D3D10/D3D11/D3D12 constant buffer register index.
Definition: reshade_api_pipeline.hpp:169
uint32_t dx_register_space
D3D12 constant buffer register space.
Definition: reshade_api_pipeline.hpp:173
uint32_t binding
OpenGL uniform buffer binding index. In Vulkan this is equivalent to an offset for the range (in 32-b...
Definition: reshade_api_pipeline.hpp:165
shader_stage visibility
Shader pipeline stages that can make use of the constants in this range.
Definition: reshade_api_pipeline.hpp:181
Describes the state of the depth-stencil stage.
Definition: reshade_api_pipeline.hpp:752
bool stencil_enable
Enable or disable stencil testing.
Definition: reshade_api_pipeline.hpp:768
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:796
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:772
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:800
bool depth_write_mask
Enable or disable writes to the depth-stencil buffer.
Definition: reshade_api_pipeline.hpp:760
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:776
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:804
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:784
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:820
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:808
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:812
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:764
bool depth_enable
Enable or disable depth testing.
Definition: reshade_api_pipeline.hpp:756
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:792
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:780
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:824
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:816
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:788
An opaque handle to a descriptor heap.
Definition: reshade_api_pipeline.hpp:1217
Definition: reshade_api_pipeline.hpp:223
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:231
descriptor_range_flags flags
Optional flags specifying the volatility of the descriptors and data they reference.
Definition: reshade_api_pipeline.hpp:227
Describes a range of descriptors of a descriptor table in a pipeline layout.
Definition: reshade_api_pipeline.hpp:188
uint32_t dx_register_space
D3D12 register space (register(..., spaceX) in HLSL).
Definition: reshade_api_pipeline.hpp:201
uint32_t dx_register_index
D3D9/D3D10/D3D11/D3D12 shader register index (register(xX) in HLSL).
Definition: reshade_api_pipeline.hpp:197
shader_stage visibility
Shader pipeline stages that can make use of the descriptors in this range.
Definition: reshade_api_pipeline.hpp:210
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:193
uint32_t count
Number of descriptors in this range. Set to -1 (UINT32_MAX) to indicate an unbounded range.
Definition: reshade_api_pipeline.hpp:206
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:216
descriptor_type type
Type of the descriptors in this range.
Definition: reshade_api_pipeline.hpp:220
All information needed to copy descriptors between descriptor tables.
Definition: reshade_api_pipeline.hpp:1137
uint32_t source_binding
Index of the binding in the source descriptor table.
Definition: reshade_api_pipeline.hpp:1145
uint32_t dest_binding
Index of the binding in the destination descriptor table.
Definition: reshade_api_pipeline.hpp:1157
uint32_t count
Number of descriptors to copy.
Definition: reshade_api_pipeline.hpp:1165
descriptor_table dest_table
Descriptor table to copy to.
Definition: reshade_api_pipeline.hpp:1153
uint32_t source_array_offset
Array index in the specified source binding to begin copying from.
Definition: reshade_api_pipeline.hpp:1149
descriptor_table source_table
Descriptor table to copy from.
Definition: reshade_api_pipeline.hpp:1141
uint32_t dest_array_offset
Array index in the specified destination binding to begin copying to.
Definition: reshade_api_pipeline.hpp:1161
All information needed to update descriptors in a descriptor table.
Definition: reshade_api_pipeline.hpp:1172
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:1200
descriptor_table table
Descriptor table to update.
Definition: reshade_api_pipeline.hpp:1176
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:1181
uint32_t count
Number of descriptors to update, starting at the specified binding. If the specified binding has fewe...
Definition: reshade_api_pipeline.hpp:1191
uint32_t array_offset
Array index in the specified binding to begin updating at. Only meaningful in Vulkan,...
Definition: reshade_api_pipeline.hpp:1186
descriptor_type type
Type of the specified descriptors.
Definition: reshade_api_pipeline.hpp:1195
An opaque handle to a descriptor table in a descriptor heap.
Definition: reshade_api_pipeline.hpp:1131
An opaque handle to a fence synchronization object.
Definition: reshade_api_pipeline.hpp:1421
Describes a single element in the vertex layout for the input-assembler stage.
Definition: reshade_api_pipeline.hpp:581
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:617
uint32_t location
GLSL attribute location associated with this element (layout(location = X)).
Definition: reshade_api_pipeline.hpp:585
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:593
const char * semantic
HLSL semantic associated with this element.
Definition: reshade_api_pipeline.hpp:589
uint32_t buffer_binding
Index of the vertex buffer binding.
Definition: reshade_api_pipeline.hpp:601
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:611
uint32_t offset
Offset (in bytes) from the start of the vertex to this element.
Definition: reshade_api_pipeline.hpp:605
Describes a single parameter in a pipeline layout.
Definition: reshade_api_pipeline.hpp:240
descriptor_range push_descriptors
Used when parameter type is pipeline_layout_param_type::push_descriptors.
Definition: reshade_api_pipeline.hpp:263
constexpr pipeline_layout_param(const descriptor_range_with_flags &push_descriptors)
Definition: reshade_api_pipeline.hpp:244
const descriptor_range_with_flags * ranges
Definition: reshade_api_pipeline.hpp:280
constexpr pipeline_layout_param(const constant_range &push_constants)
Definition: reshade_api_pipeline.hpp:242
pipeline_layout_param_type type
Type of the parameter.
Definition: reshade_api_pipeline.hpp:251
const descriptor_range * ranges
Definition: reshade_api_pipeline.hpp:271
constexpr pipeline_layout_param(uint32_t count, const descriptor_range *ranges)
Definition: reshade_api_pipeline.hpp:245
constexpr pipeline_layout_param(const descriptor_range &push_descriptors)
Definition: reshade_api_pipeline.hpp:243
constexpr pipeline_layout_param()
Definition: reshade_api_pipeline.hpp:241
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:270
constexpr pipeline_layout_param(uint32_t count, const descriptor_range_with_flags *ranges)
Definition: reshade_api_pipeline.hpp:246
struct reshade::api::pipeline_layout_param::@0::@3 descriptor_table_with_flags
Used when parameter type is pipeline_layout_param_type::descriptor_table_with_flags or pipeline_layou...
constant_range push_constants
Used when parameter type is pipeline_layout_param_type::push_constants.
Definition: reshade_api_pipeline.hpp:258
An opaque handle to a pipeline layout object.
Definition: reshade_api_pipeline.hpp:299
Describes a pipeline sub-object.
Definition: reshade_api_pipeline.hpp:1049
void * data
Pointer to an array of sub-object descriptions (which should be as large as the specified count)....
Definition: reshade_api_pipeline.hpp:1063
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:1058
pipeline_subobject_type type
Type of the specified sub-object data.
Definition: reshade_api_pipeline.hpp:1053
An opaque handle to a pipeline state object.
Definition: reshade_api_pipeline.hpp:1080
An opaque handle to a query heap.
Definition: reshade_api_pipeline.hpp:1292
Describes the state of the rasterizer stage.
Definition: reshade_api_pipeline.hpp:699
bool scissor_enable
Enable or disable scissor testing (scissor rectangle culling).
Definition: reshade_api_pipeline.hpp:732
bool front_counter_clockwise
Determines if a triangle is front or back-facing.
Definition: reshade_api_pipeline.hpp:712
float depth_bias
Depth value added to a given pixel.
Definition: reshade_api_pipeline.hpp:716
bool multisample_enable
Use the quadrilateral or alpha line anti-aliasing algorithm on multisample antialiasing render target...
Definition: reshade_api_pipeline.hpp:736
bool depth_clip_enable
Enable or disable clipping based on distance.
Definition: reshade_api_pipeline.hpp:728
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:740
uint32_t conservative_rasterization
Enable or disable conservative rasterization mode.
Definition: reshade_api_pipeline.hpp:745
float depth_bias_clamp
Maximum depth bias of a pixel.
Definition: reshade_api_pipeline.hpp:720
float slope_scaled_depth_bias
Scalar on the slope of a given pixel.
Definition: reshade_api_pipeline.hpp:724
Describes a rectangle.
Definition: reshade_api_pipeline.hpp:1368
constexpr uint32_t width() const
Definition: reshade_api_pipeline.hpp:1374
int32_t top
Definition: reshade_api_pipeline.hpp:1370
int32_t left
Definition: reshade_api_pipeline.hpp:1369
int32_t right
Definition: reshade_api_pipeline.hpp:1371
constexpr uint32_t height() const
Definition: reshade_api_pipeline.hpp:1375
int32_t bottom
Definition: reshade_api_pipeline.hpp:1372
An opaque handle to a resource view object (depth-stencil, render target, shader resource view,...
Definition: reshade_api_resource.hpp:517
An opaque handle to a resource object (buffer, texture, ...).
Definition: reshade_api_resource.hpp:390
Describes a sampler state.
Definition: reshade_api_resource.hpp:89
A combined sampler and resource view descriptor.
Definition: reshade_api_pipeline.hpp:1106
resource_view view
Shader resource view.
Definition: reshade_api_pipeline.hpp:1114
An opaque handle to a sampler state object.
Definition: reshade_api_resource.hpp:146
Describes a shader object.
Definition: reshade_api_pipeline.hpp:457
const char * entry_point
Optional entry point name if the shader source code or binary contains multiple entry points....
Definition: reshade_api_pipeline.hpp:470
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:484
const void * code
Shader source code or binary.
Definition: reshade_api_pipeline.hpp:461
size_t code_size
Size (in bytes) of the shader source code or binary.
Definition: reshade_api_pipeline.hpp:465
const uint32_t * spec_constant_ids
Pointer to an array of specialization constant indices.
Definition: reshade_api_pipeline.hpp:480
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:476
Describes a ray tracing shader group.
Definition: reshade_api_pipeline.hpp:503
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:554
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:505
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:560
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:548
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:523
shader_group()
Definition: reshade_api_pipeline.hpp:504
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:510
Describes the state of the stream-output stage.
Definition: reshade_api_pipeline.hpp:624
uint32_t rasterized_stream
Index of the stream output stream to be sent to the rasterizer stage.
Definition: reshade_api_pipeline.hpp:628
Describes a render viewport.
Definition: reshade_api_pipeline.hpp:1382
float width
Definition: reshade_api_pipeline.hpp:1385
float min_depth
Definition: reshade_api_pipeline.hpp:1387
float height
Definition: reshade_api_pipeline.hpp:1386
float x
Definition: reshade_api_pipeline.hpp:1383
float y
Definition: reshade_api_pipeline.hpp:1384
float max_depth
Definition: reshade_api_pipeline.hpp:1388