vkd3d: include/vkd3d_shader.h Source File

vkd3d 1.19 The vkd3d 3D Graphics Library

Loading...
Searching...
No Matches
vkd3d_shader.h
Go to the documentation of this file.
1/*
2 * Copyright 2017-2019 Józef Kucia for CodeWeavers
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19#ifndef __VKD3D_SHADER_H
20#define __VKD3D_SHADER_H
21
22#include <stdbool.h>
23#include <stdint.h>
24#include <stddef.h>
25#include <vkd3d_types.h>
26
27#ifdef __cplusplus
28extern "C" {
29#endif /* __cplusplus */
30
41
43 enum vkd3d_shader_api_version
44{
45 VKD3D_SHADER_API_VERSION_1_0,
46 VKD3D_SHADER_API_VERSION_1_1,
47 VKD3D_SHADER_API_VERSION_1_2,
48 VKD3D_SHADER_API_VERSION_1_3,
49 VKD3D_SHADER_API_VERSION_1_4,
50 VKD3D_SHADER_API_VERSION_1_5,
51 VKD3D_SHADER_API_VERSION_1_6,
52 VKD3D_SHADER_API_VERSION_1_7,
53 VKD3D_SHADER_API_VERSION_1_8,
54 VKD3D_SHADER_API_VERSION_1_9,
55 VKD3D_SHADER_API_VERSION_1_10,
56 VKD3D_SHADER_API_VERSION_1_11,
57 VKD3D_SHADER_API_VERSION_1_12,
58 VKD3D_SHADER_API_VERSION_1_13,
59 VKD3D_SHADER_API_VERSION_1_14,
60 VKD3D_SHADER_API_VERSION_1_15,
61 VKD3D_SHADER_API_VERSION_1_16,
62 VKD3D_SHADER_API_VERSION_1_17,
63 VKD3D_SHADER_API_VERSION_1_18,
64 VKD3D_SHADER_API_VERSION_1_19,
65
66 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_API_VERSION),
67};
68
70 enum vkd3d_shader_structure_type
71{
73 VKD3D_SHADER_STRUCTURE_TYPE_COMPILE_INFO,
75 VKD3D_SHADER_STRUCTURE_TYPE_INTERFACE_INFO,
77 VKD3D_SHADER_STRUCTURE_TYPE_SCAN_DESCRIPTOR_INFO,
79 VKD3D_SHADER_STRUCTURE_TYPE_SPIRV_DOMAIN_SHADER_TARGET_INFO,
81 VKD3D_SHADER_STRUCTURE_TYPE_SPIRV_TARGET_INFO,
83 VKD3D_SHADER_STRUCTURE_TYPE_TRANSFORM_FEEDBACK_INFO,
84
89 VKD3D_SHADER_STRUCTURE_TYPE_HLSL_SOURCE_INFO,
94 VKD3D_SHADER_STRUCTURE_TYPE_PREPROCESS_INFO,
99 VKD3D_SHADER_STRUCTURE_TYPE_DESCRIPTOR_OFFSET_INFO,
104 VKD3D_SHADER_STRUCTURE_TYPE_SCAN_SIGNATURE_INFO,
109 VKD3D_SHADER_STRUCTURE_TYPE_VARYING_MAP_INFO,
114 VKD3D_SHADER_STRUCTURE_TYPE_SCAN_COMBINED_RESOURCE_SAMPLER_INFO,
119 VKD3D_SHADER_STRUCTURE_TYPE_PARAMETER_INFO,
124 VKD3D_SHADER_STRUCTURE_TYPE_SCAN_HULL_SHADER_TESSELLATION_INFO,
129 VKD3D_SHADER_STRUCTURE_TYPE_SCAN_THREAD_GROUP_SIZE_INFO,
134 VKD3D_SHADER_STRUCTURE_TYPE_D3DBC_SOURCE_INFO,
135
136 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_STRUCTURE_TYPE),
137};
138
145 enum vkd3d_shader_compile_option_buffer_uav
146{
148 VKD3D_SHADER_COMPILE_OPTION_BUFFER_UAV_STORAGE_TEXEL_BUFFER = 0x00000000,
150 VKD3D_SHADER_COMPILE_OPTION_BUFFER_UAV_STORAGE_BUFFER = 0x00000001,
151
152 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_COMPILE_OPTION_BUFFER_UAV),
153};
154
159 enum vkd3d_shader_compile_option_typed_uav
160{
162 VKD3D_SHADER_COMPILE_OPTION_TYPED_UAV_READ_FORMAT_R32 = 0x00000000,
167 VKD3D_SHADER_COMPILE_OPTION_TYPED_UAV_READ_FORMAT_UNKNOWN = 0x00000001,
168
169 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_COMPILE_OPTION_TYPED_UAV),
170};
171
172 enum vkd3d_shader_compile_option_formatting_flags
173{
174 VKD3D_SHADER_COMPILE_OPTION_FORMATTING_NONE = 0x00000000,
175 VKD3D_SHADER_COMPILE_OPTION_FORMATTING_COLOUR = 0x00000001,
176 VKD3D_SHADER_COMPILE_OPTION_FORMATTING_INDENT = 0x00000002,
177 VKD3D_SHADER_COMPILE_OPTION_FORMATTING_OFFSETS = 0x00000004,
178 VKD3D_SHADER_COMPILE_OPTION_FORMATTING_HEADER = 0x00000008,
179 VKD3D_SHADER_COMPILE_OPTION_FORMATTING_RAW_IDS = 0x00000010,
185 VKD3D_SHADER_COMPILE_OPTION_FORMATTING_IO_SIGNATURES = 0x00000020,
186
187 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_COMPILE_OPTION_FORMATTING_FLAGS),
188};
189
191 enum vkd3d_shader_compile_option_pack_matrix_order
192{
193 VKD3D_SHADER_COMPILE_OPTION_PACK_MATRIX_ROW_MAJOR = 0x00000001,
194 VKD3D_SHADER_COMPILE_OPTION_PACK_MATRIX_COLUMN_MAJOR = 0x00000002,
195
196 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_COMPILE_OPTION_PACK_MATRIX_ORDER),
197};
198
200 enum vkd3d_shader_compile_option_backward_compatibility
201{
213 VKD3D_SHADER_COMPILE_OPTION_BACKCOMPAT_MAP_SEMANTIC_NAMES = 0x00000001,
224 VKD3D_SHADER_COMPILE_OPTION_DOUBLE_AS_FLOAT_ALIAS = 0x00000002,
225
226 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_COMPILE_OPTION_BACKWARD_COMPATIBILITY),
227};
228
234 enum vkd3d_shader_compile_option_fragment_coordinate_origin
235{
238 VKD3D_SHADER_COMPILE_OPTION_FRAGMENT_COORDINATE_ORIGIN_UPPER_LEFT = 0x00000000,
241 VKD3D_SHADER_COMPILE_OPTION_FRAGMENT_COORDINATE_ORIGIN_LOWER_LEFT = 0x00000001,
242
243 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_COMPILE_OPTION_FRAGMENT_COORDINATE_ORIGIN),
244};
245
247 enum vkd3d_shader_compile_option_feature_flags
248{
252 VKD3D_SHADER_COMPILE_OPTION_FEATURE_INT64 = 0x00000001,
256 VKD3D_SHADER_COMPILE_OPTION_FEATURE_FLOAT64 = 0x00000002,
265 VKD3D_SHADER_COMPILE_OPTION_FEATURE_WAVE_OPS = 0x00000004,
269 VKD3D_SHADER_COMPILE_OPTION_FEATURE_ZERO_INITIALIZE_WORKGROUP_MEMORY = 0x00000008,
270
271 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_COMPILE_OPTION_FEATURE_FLAGS),
272};
273
279 enum vkd3d_shader_parse_dxbc_flags
280{
283 VKD3D_SHADER_PARSE_DXBC_IGNORE_CHECKSUM = 0x00000001,
284
285 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_PARSE_DXBC_FLAGS),
286};
287
288 enum vkd3d_shader_compile_option_name
289{
297 VKD3D_SHADER_COMPILE_OPTION_STRIP_DEBUG = 0x00000001,
299 VKD3D_SHADER_COMPILE_OPTION_BUFFER_UAV = 0x00000002,
301 VKD3D_SHADER_COMPILE_OPTION_FORMATTING = 0x00000003,
303 VKD3D_SHADER_COMPILE_OPTION_API_VERSION = 0x00000004,
305 VKD3D_SHADER_COMPILE_OPTION_TYPED_UAV = 0x00000005,
317 VKD3D_SHADER_COMPILE_OPTION_WRITE_TESS_GEOM_POINT_SIZE = 0x00000006,
326 VKD3D_SHADER_COMPILE_OPTION_PACK_MATRIX_ORDER = 0x00000007,
334 VKD3D_SHADER_COMPILE_OPTION_BACKWARD_COMPATIBILITY = 0x00000008,
344 VKD3D_SHADER_COMPILE_OPTION_FRAGMENT_COORDINATE_ORIGIN = 0x00000009,
354 VKD3D_SHADER_COMPILE_OPTION_FEATURE = 0x0000000a,
365 VKD3D_SHADER_COMPILE_OPTION_CHILD_EFFECT = 0x0000000b,
376 VKD3D_SHADER_COMPILE_OPTION_WARN_IMPLICIT_TRUNCATION = 0x0000000c,
384 VKD3D_SHADER_COMPILE_OPTION_INCLUDE_EMPTY_BUFFERS_IN_EFFECTS = 0x0000000d,
385
386 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_COMPILE_OPTION_NAME),
387};
388
394 struct vkd3d_shader_compile_option
395{
397 enum vkd3d_shader_compile_option_name name;
402 unsigned int value;
403};
404
406 enum vkd3d_shader_visibility
407{
409 VKD3D_SHADER_VISIBILITY_ALL = 0,
411 VKD3D_SHADER_VISIBILITY_VERTEX = 1,
413 VKD3D_SHADER_VISIBILITY_HULL = 2,
415 VKD3D_SHADER_VISIBILITY_DOMAIN = 3,
417 VKD3D_SHADER_VISIBILITY_GEOMETRY = 4,
419 VKD3D_SHADER_VISIBILITY_PIXEL = 5,
420
422 VKD3D_SHADER_VISIBILITY_COMPUTE = 1000000000,
423
424 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_VISIBILITY),
425};
426
428 struct vkd3d_shader_code
429{
444 const void *code;
446 size_t size;
447};
448
450 enum vkd3d_shader_descriptor_type
451{
456 VKD3D_SHADER_DESCRIPTOR_TYPE_SRV = 0x0,
461 VKD3D_SHADER_DESCRIPTOR_TYPE_UAV = 0x1,
466 VKD3D_SHADER_DESCRIPTOR_TYPE_CBV = 0x2,
471 VKD3D_SHADER_DESCRIPTOR_TYPE_SAMPLER = 0x3,
472
473 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_DESCRIPTOR_TYPE),
474};
475
480 struct vkd3d_shader_descriptor_binding
481{
486 unsigned int set;
488 unsigned int binding;
494 unsigned int count;
495};
496
497enum vkd3d_shader_binding_flag
498{
499 VKD3D_SHADER_BINDING_FLAG_BUFFER = 0x00000001,
500 VKD3D_SHADER_BINDING_FLAG_IMAGE = 0x00000002,
501
502 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_BINDING_FLAG),
503};
504
521 enum vkd3d_shader_fog_fragment_mode
522{
528 VKD3D_SHADER_FOG_FRAGMENT_NONE = 0x0,
541 VKD3D_SHADER_FOG_FRAGMENT_EXP = 0x1,
554 VKD3D_SHADER_FOG_FRAGMENT_EXP2 = 0x2,
568 VKD3D_SHADER_FOG_FRAGMENT_LINEAR = 0x3,
569
570 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_FOG_FRAGMENT_MODE),
571};
572
583 enum vkd3d_shader_fog_source
584{
589 VKD3D_SHADER_FOG_SOURCE_FOG = 0x0,
597 VKD3D_SHADER_FOG_SOURCE_FOG_OR_SPECULAR_W = 0x1,
602 VKD3D_SHADER_FOG_SOURCE_Z = 0x2,
607 VKD3D_SHADER_FOG_SOURCE_W = 0x3,
608
609 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_FOG_SOURCE),
610};
611
616 enum vkd3d_shader_parameter_type
617{
618 VKD3D_SHADER_PARAMETER_TYPE_UNKNOWN,
620 VKD3D_SHADER_PARAMETER_TYPE_IMMEDIATE_CONSTANT,
625 VKD3D_SHADER_PARAMETER_TYPE_SPECIALIZATION_CONSTANT,
632 VKD3D_SHADER_PARAMETER_TYPE_BUFFER,
633
634 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_PARAMETER_TYPE),
635};
636
641 enum vkd3d_shader_parameter_data_type
642{
643 VKD3D_SHADER_PARAMETER_DATA_TYPE_UNKNOWN,
645 VKD3D_SHADER_PARAMETER_DATA_TYPE_UINT32,
647 VKD3D_SHADER_PARAMETER_DATA_TYPE_FLOAT32,
654 VKD3D_SHADER_PARAMETER_DATA_TYPE_FLOAT32_VEC4,
655
656 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_PARAMETER_DATA_TYPE),
657};
658
663 enum vkd3d_shader_parameter_name
664{
665 VKD3D_SHADER_PARAMETER_NAME_UNKNOWN,
678 VKD3D_SHADER_PARAMETER_NAME_RASTERIZER_SAMPLE_COUNT,
703 VKD3D_SHADER_PARAMETER_NAME_ALPHA_TEST_FUNC,
713 VKD3D_SHADER_PARAMETER_NAME_ALPHA_TEST_REF,
737 VKD3D_SHADER_PARAMETER_NAME_FLAT_INTERPOLATION,
765 VKD3D_SHADER_PARAMETER_NAME_CLIP_PLANE_MASK,
782 VKD3D_SHADER_PARAMETER_NAME_CLIP_PLANE_0,
783 VKD3D_SHADER_PARAMETER_NAME_CLIP_PLANE_1,
784 VKD3D_SHADER_PARAMETER_NAME_CLIP_PLANE_2,
785 VKD3D_SHADER_PARAMETER_NAME_CLIP_PLANE_3,
786 VKD3D_SHADER_PARAMETER_NAME_CLIP_PLANE_4,
787 VKD3D_SHADER_PARAMETER_NAME_CLIP_PLANE_5,
788 VKD3D_SHADER_PARAMETER_NAME_CLIP_PLANE_6,
789 VKD3D_SHADER_PARAMETER_NAME_CLIP_PLANE_7,
808 VKD3D_SHADER_PARAMETER_NAME_POINT_SIZE,
831 VKD3D_SHADER_PARAMETER_NAME_POINT_SIZE_MIN,
841 VKD3D_SHADER_PARAMETER_NAME_POINT_SIZE_MAX,
874 VKD3D_SHADER_PARAMETER_NAME_POINT_SPRITE,
902 VKD3D_SHADER_PARAMETER_NAME_FOG_FRAGMENT_MODE,
915 VKD3D_SHADER_PARAMETER_NAME_FOG_COLOUR,
928 VKD3D_SHADER_PARAMETER_NAME_FOG_END,
941 VKD3D_SHADER_PARAMETER_NAME_FOG_SCALE,
965 VKD3D_SHADER_PARAMETER_NAME_FOG_SOURCE,
989 VKD3D_SHADER_PARAMETER_NAME_BUMP_MATRIX_0,
990 VKD3D_SHADER_PARAMETER_NAME_BUMP_MATRIX_1,
991 VKD3D_SHADER_PARAMETER_NAME_BUMP_MATRIX_2,
992 VKD3D_SHADER_PARAMETER_NAME_BUMP_MATRIX_3,
993 VKD3D_SHADER_PARAMETER_NAME_BUMP_MATRIX_4,
994 VKD3D_SHADER_PARAMETER_NAME_BUMP_MATRIX_5,
1013 VKD3D_SHADER_PARAMETER_NAME_BUMP_LUMINANCE_SCALE_0,
1014 VKD3D_SHADER_PARAMETER_NAME_BUMP_LUMINANCE_SCALE_1,
1015 VKD3D_SHADER_PARAMETER_NAME_BUMP_LUMINANCE_SCALE_2,
1016 VKD3D_SHADER_PARAMETER_NAME_BUMP_LUMINANCE_SCALE_3,
1017 VKD3D_SHADER_PARAMETER_NAME_BUMP_LUMINANCE_SCALE_4,
1018 VKD3D_SHADER_PARAMETER_NAME_BUMP_LUMINANCE_SCALE_5,
1037 VKD3D_SHADER_PARAMETER_NAME_BUMP_LUMINANCE_OFFSET_0,
1038 VKD3D_SHADER_PARAMETER_NAME_BUMP_LUMINANCE_OFFSET_1,
1039 VKD3D_SHADER_PARAMETER_NAME_BUMP_LUMINANCE_OFFSET_2,
1040 VKD3D_SHADER_PARAMETER_NAME_BUMP_LUMINANCE_OFFSET_3,
1041 VKD3D_SHADER_PARAMETER_NAME_BUMP_LUMINANCE_OFFSET_4,
1042 VKD3D_SHADER_PARAMETER_NAME_BUMP_LUMINANCE_OFFSET_5,
1061 VKD3D_SHADER_PARAMETER_NAME_PROJECTED_TEXTURE_MASK,
1062
1063 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_PARAMETER_NAME),
1064};
1065
1070 struct vkd3d_shader_parameter_immediate_constant
1071{
1072 union
1073 {
1078 uint32_t u32;
1085 float f32;
1086 } u;
1087};
1088
1095 struct vkd3d_shader_parameter_immediate_constant1
1096{
1097 union
1098 {
1103 uint32_t u32;
1108 float f32;
1115 float f32_vec4[4];
1116 void *_pointer_pad;
1117 uint32_t _pad[4];
1118 } u;
1119};
1120
1125 struct vkd3d_shader_parameter_specialization_constant
1126{
1134 uint32_t id;
1135};
1136
1141 struct vkd3d_shader_parameter_buffer
1142{
1147 unsigned int set;
1149 unsigned int binding;
1151 uint32_t offset;
1152};
1153
1166 struct vkd3d_shader_parameter
1167{
1168 enum vkd3d_shader_parameter_name name;
1169 enum vkd3d_shader_parameter_type type;
1170 enum vkd3d_shader_parameter_data_type data_type;
1171 union
1172 {
1173 struct vkd3d_shader_parameter_immediate_constant immediate_constant;
1174 struct vkd3d_shader_parameter_specialization_constant specialization_constant;
1175 } u;
1176};
1177
1195 struct vkd3d_shader_parameter1
1196{
1198 enum vkd3d_shader_parameter_name name;
1200 enum vkd3d_shader_parameter_type type;
1205 enum vkd3d_shader_parameter_data_type data_type;
1206 union
1207 {
1212 struct vkd3d_shader_parameter_immediate_constant1 immediate_constant;
1217 struct vkd3d_shader_parameter_specialization_constant specialization_constant;
1222 struct vkd3d_shader_parameter_buffer buffer;
1223 void *_pointer_pad;
1224 uint32_t _pad[4];
1225 } u;
1226};
1227
1237 enum vkd3d_shader_d3dbc_constant_register
1238{
1240 VKD3D_SHADER_D3DBC_FLOAT_CONSTANT_REGISTER = 0x0,
1242 VKD3D_SHADER_D3DBC_INT_CONSTANT_REGISTER = 0x1,
1244 VKD3D_SHADER_D3DBC_BOOL_CONSTANT_REGISTER = 0x2,
1245
1246 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_D3DBC_CONSTANT_REGISTER),
1247};
1248
1264 struct vkd3d_shader_resource_binding
1265{
1267 enum vkd3d_shader_descriptor_type type;
1272 unsigned int register_space;
1281 unsigned int register_index;
1283 enum vkd3d_shader_visibility shader_visibility;
1285 unsigned int flags;
1286
1288 struct vkd3d_shader_descriptor_binding binding;
1289};
1290
1291#define VKD3D_SHADER_DUMMY_SAMPLER_INDEX ~0u
1292
1299 struct vkd3d_shader_combined_resource_sampler
1300{
1305 unsigned int resource_space;
1307 unsigned int resource_index;
1312 unsigned int sampler_space;
1314 unsigned int sampler_index;
1316 enum vkd3d_shader_visibility shader_visibility;
1318 unsigned int flags;
1319
1321 struct vkd3d_shader_descriptor_binding binding;
1322};
1323
1329 struct vkd3d_shader_uav_counter_binding
1330{
1335 unsigned int register_space;
1337 unsigned int register_index;
1339 enum vkd3d_shader_visibility shader_visibility;
1340
1342 struct vkd3d_shader_descriptor_binding binding;
1343 unsigned int offset;
1344};
1345
1352 struct vkd3d_shader_push_constant_buffer
1353{
1358 unsigned int register_space;
1360 unsigned int register_index;
1362 enum vkd3d_shader_visibility shader_visibility;
1363
1365 unsigned int offset;
1367 unsigned int size;
1368};
1369
1386 struct vkd3d_shader_interface_info
1387{
1389 enum vkd3d_shader_structure_type type;
1391 const void *next;
1392
1394 const struct vkd3d_shader_resource_binding *bindings;
1396 unsigned int binding_count;
1397
1399 const struct vkd3d_shader_push_constant_buffer *push_constant_buffers;
1401 unsigned int push_constant_buffer_count;
1402
1404 const struct vkd3d_shader_combined_resource_sampler *combined_samplers;
1406 unsigned int combined_sampler_count;
1407
1409 const struct vkd3d_shader_uav_counter_binding *uav_counters;
1411 unsigned int uav_counter_count;
1412};
1413
1414 struct vkd3d_shader_transform_feedback_element
1415{
1416 unsigned int stream_index;
1417 const char *semantic_name;
1418 unsigned int semantic_index;
1419 uint8_t component_index;
1420 uint8_t component_count;
1421 uint8_t output_slot;
1422};
1423
1424/* Extends vkd3d_shader_interface_info. */
1425 struct vkd3d_shader_transform_feedback_info
1426{
1427 enum vkd3d_shader_structure_type type;
1428 const void *next;
1429
1430 const struct vkd3d_shader_transform_feedback_element *elements;
1431 unsigned int element_count;
1432 const unsigned int *buffer_strides;
1433 unsigned int buffer_stride_count;
1434};
1435
1436 struct vkd3d_shader_descriptor_offset
1437{
1438 unsigned int static_offset;
1439 unsigned int dynamic_offset_index;
1440};
1441
1453 struct vkd3d_shader_descriptor_offset_info
1454{
1456 enum vkd3d_shader_structure_type type;
1458 const void *next;
1459
1465 unsigned int descriptor_table_offset;
1467 unsigned int descriptor_table_count;
1468
1510 const struct vkd3d_shader_descriptor_offset *binding_offsets;
1511
1517 const struct vkd3d_shader_descriptor_offset *uav_counter_offsets;
1518};
1519
1521 enum vkd3d_shader_source_type
1522{
1527 VKD3D_SHADER_SOURCE_NONE,
1532 VKD3D_SHADER_SOURCE_DXBC_TPF,
1534 VKD3D_SHADER_SOURCE_HLSL,
1539 VKD3D_SHADER_SOURCE_D3D_BYTECODE,
1544 VKD3D_SHADER_SOURCE_DXBC_DXIL,
1549 VKD3D_SHADER_SOURCE_FX,
1554 VKD3D_SHADER_SOURCE_TX,
1555
1556 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_SOURCE_TYPE),
1557};
1558
1560 enum vkd3d_shader_target_type
1561{
1566 VKD3D_SHADER_TARGET_NONE,
1571 VKD3D_SHADER_TARGET_SPIRV_BINARY,
1572 VKD3D_SHADER_TARGET_SPIRV_TEXT,
1576 VKD3D_SHADER_TARGET_D3D_ASM,
1581 VKD3D_SHADER_TARGET_D3D_BYTECODE,
1586 VKD3D_SHADER_TARGET_DXBC_TPF,
1590 VKD3D_SHADER_TARGET_GLSL,
1595 VKD3D_SHADER_TARGET_FX,
1599 VKD3D_SHADER_TARGET_MSL,
1600
1601 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_TARGET_TYPE),
1602};
1603
1608 enum vkd3d_shader_log_level
1609{
1611 VKD3D_SHADER_LOG_NONE,
1613 VKD3D_SHADER_LOG_ERROR,
1615 VKD3D_SHADER_LOG_WARNING,
1619 VKD3D_SHADER_LOG_INFO,
1620
1621 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_LOG_LEVEL),
1622};
1623
1627 struct vkd3d_shader_compile_info
1628{
1630 enum vkd3d_shader_structure_type type;
1636 const void *next;
1637
1639 struct vkd3d_shader_code source;
1640
1642 enum vkd3d_shader_source_type source_type;
1644 enum vkd3d_shader_target_type target_type;
1645
1656 const struct vkd3d_shader_compile_option *options;
1658 unsigned int option_count;
1659
1661 enum vkd3d_shader_log_level log_level;
1666 const char *source_name;
1667};
1668
1669 enum vkd3d_shader_spirv_environment
1670{
1671 VKD3D_SHADER_SPIRV_ENVIRONMENT_NONE,
1672 VKD3D_SHADER_SPIRV_ENVIRONMENT_OPENGL_4_5,
1673 VKD3D_SHADER_SPIRV_ENVIRONMENT_VULKAN_1_0, /* default target */
1675 VKD3D_SHADER_SPIRV_ENVIRONMENT_VULKAN_1_1,
1676
1677 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_SPIRV_ENVIRONMENT),
1678};
1679
1680 enum vkd3d_shader_spirv_extension
1681{
1682 VKD3D_SHADER_SPIRV_EXTENSION_NONE,
1683 VKD3D_SHADER_SPIRV_EXTENSION_EXT_DEMOTE_TO_HELPER_INVOCATION,
1685 VKD3D_SHADER_SPIRV_EXTENSION_EXT_DESCRIPTOR_INDEXING,
1687 VKD3D_SHADER_SPIRV_EXTENSION_EXT_STENCIL_EXPORT,
1689 VKD3D_SHADER_SPIRV_EXTENSION_EXT_VIEWPORT_INDEX_LAYER,
1691 VKD3D_SHADER_SPIRV_EXTENSION_EXT_FRAGMENT_SHADER_INTERLOCK,
1692
1693 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_SPIRV_EXTENSION),
1694};
1695
1696/* Extends vkd3d_shader_compile_info. */
1697 struct vkd3d_shader_spirv_target_info
1698{
1699 enum vkd3d_shader_structure_type type;
1700 const void *next;
1701
1702 const char *entry_point; /* "main" if NULL. */
1703
1704 enum vkd3d_shader_spirv_environment environment;
1705
1706 const enum vkd3d_shader_spirv_extension *extensions;
1707 unsigned int extension_count;
1708
1709 const struct vkd3d_shader_parameter *parameters;
1710 unsigned int parameter_count;
1711
1712 bool dual_source_blending;
1713 const unsigned int *output_swizzles;
1714 unsigned int output_swizzle_count;
1715};
1716
1717enum vkd3d_shader_tessellator_output_primitive
1718{
1719 VKD3D_SHADER_TESSELLATOR_OUTPUT_POINT = 0x1,
1720 VKD3D_SHADER_TESSELLATOR_OUTPUT_LINE = 0x2,
1721 VKD3D_SHADER_TESSELLATOR_OUTPUT_TRIANGLE_CW = 0x3,
1722 VKD3D_SHADER_TESSELLATOR_OUTPUT_TRIANGLE_CCW = 0x4,
1723
1724 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_TESSELLATOR_OUTPUT_PRIMITIVE),
1725};
1726
1727enum vkd3d_shader_tessellator_partitioning
1728{
1729 VKD3D_SHADER_TESSELLATOR_PARTITIONING_INTEGER = 0x1,
1730 VKD3D_SHADER_TESSELLATOR_PARTITIONING_POW2 = 0x2,
1731 VKD3D_SHADER_TESSELLATOR_PARTITIONING_FRACTIONAL_ODD = 0x3,
1732 VKD3D_SHADER_TESSELLATOR_PARTITIONING_FRACTIONAL_EVEN = 0x4,
1733
1734 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_TESSELLATOR_PARTITIONING),
1735};
1736
1737/* Extends vkd3d_shader_spirv_target_info. */
1738 struct vkd3d_shader_spirv_domain_shader_target_info
1739{
1740 enum vkd3d_shader_structure_type type;
1741 const void *next;
1742
1743 enum vkd3d_shader_tessellator_output_primitive output_primitive;
1744 enum vkd3d_shader_tessellator_partitioning partitioning;
1745};
1746
1751 struct vkd3d_shader_macro
1752{
1758 const char *name;
1764 const char *value;
1765};
1766
1795 typedef int (*PFN_vkd3d_shader_open_include)(const char *filename, bool local,
1796 const char *parent_data, void *context, struct vkd3d_shader_code *out);
1811 typedef void (*PFN_vkd3d_shader_close_include)(const struct vkd3d_shader_code *code, void *context);
1812
1824 struct vkd3d_shader_preprocess_info
1825{
1827 enum vkd3d_shader_structure_type type;
1829 const void *next;
1830
1839 const struct vkd3d_shader_macro *macros;
1841 unsigned int macro_count;
1842
1855 PFN_vkd3d_shader_open_include pfn_open_include;
1865 PFN_vkd3d_shader_close_include pfn_close_include;
1870 void *include_context;
1871};
1872
1884 struct vkd3d_shader_hlsl_source_info
1885{
1887 enum vkd3d_shader_structure_type type;
1889 const void *next;
1890
1897 const char *entry_point;
1898 struct vkd3d_shader_code secondary_code;
1903 const char *profile;
1904};
1905
1906/* root signature 1.0 */
1907enum vkd3d_shader_filter
1908{
1909 VKD3D_SHADER_FILTER_MIN_MAG_MIP_POINT = 0x000,
1910 VKD3D_SHADER_FILTER_MIN_MAG_POINT_MIP_LINEAR = 0x001,
1911 VKD3D_SHADER_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x004,
1912 VKD3D_SHADER_FILTER_MIN_POINT_MAG_MIP_LINEAR = 0x005,
1913 VKD3D_SHADER_FILTER_MIN_LINEAR_MAG_MIP_POINT = 0x010,
1914 VKD3D_SHADER_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x011,
1915 VKD3D_SHADER_FILTER_MIN_MAG_LINEAR_MIP_POINT = 0x014,
1916 VKD3D_SHADER_FILTER_MIN_MAG_MIP_LINEAR = 0x015,
1917 VKD3D_SHADER_FILTER_ANISOTROPIC = 0x055,
1918 VKD3D_SHADER_FILTER_COMPARISON_MIN_MAG_MIP_POINT = 0x080,
1919 VKD3D_SHADER_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR = 0x081,
1920 VKD3D_SHADER_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x084,
1921 VKD3D_SHADER_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR = 0x085,
1922 VKD3D_SHADER_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT = 0x090,
1923 VKD3D_SHADER_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x091,
1924 VKD3D_SHADER_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT = 0x094,
1925 VKD3D_SHADER_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR = 0x095,
1926 VKD3D_SHADER_FILTER_COMPARISON_ANISOTROPIC = 0x0d5,
1927 VKD3D_SHADER_FILTER_MINIMUM_MIN_MAG_MIP_POINT = 0x100,
1928 VKD3D_SHADER_FILTER_MINIMUM_MIN_MAG_POINT_MIP_LINEAR = 0x101,
1929 VKD3D_SHADER_FILTER_MINIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x104,
1930 VKD3D_SHADER_FILTER_MINIMUM_MIN_POINT_MAG_MIP_LINEAR = 0x105,
1931 VKD3D_SHADER_FILTER_MINIMUM_MIN_LINEAR_MAG_MIP_POINT = 0x110,
1932 VKD3D_SHADER_FILTER_MINIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x111,
1933 VKD3D_SHADER_FILTER_MINIMUM_MIN_MAG_LINEAR_MIP_POINT = 0x114,
1934 VKD3D_SHADER_FILTER_MINIMUM_MIN_MAG_MIP_LINEAR = 0x115,
1935 VKD3D_SHADER_FILTER_MINIMUM_ANISOTROPIC = 0x155,
1936 VKD3D_SHADER_FILTER_MAXIMUM_MIN_MAG_MIP_POINT = 0x180,
1937 VKD3D_SHADER_FILTER_MAXIMUM_MIN_MAG_POINT_MIP_LINEAR = 0x181,
1938 VKD3D_SHADER_FILTER_MAXIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x184,
1939 VKD3D_SHADER_FILTER_MAXIMUM_MIN_POINT_MAG_MIP_LINEAR = 0x185,
1940 VKD3D_SHADER_FILTER_MAXIMUM_MIN_LINEAR_MAG_MIP_POINT = 0x190,
1941 VKD3D_SHADER_FILTER_MAXIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x191,
1942 VKD3D_SHADER_FILTER_MAXIMUM_MIN_MAG_LINEAR_MIP_POINT = 0x194,
1943 VKD3D_SHADER_FILTER_MAXIMUM_MIN_MAG_MIP_LINEAR = 0x195,
1944 VKD3D_SHADER_FILTER_MAXIMUM_ANISOTROPIC = 0x1d5,
1945
1946 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_FILTER),
1947};
1948
1949enum vkd3d_shader_texture_address_mode
1950{
1951 VKD3D_SHADER_TEXTURE_ADDRESS_MODE_WRAP = 0x1,
1952 VKD3D_SHADER_TEXTURE_ADDRESS_MODE_MIRROR = 0x2,
1953 VKD3D_SHADER_TEXTURE_ADDRESS_MODE_CLAMP = 0x3,
1954 VKD3D_SHADER_TEXTURE_ADDRESS_MODE_BORDER = 0x4,
1955 VKD3D_SHADER_TEXTURE_ADDRESS_MODE_MIRROR_ONCE = 0x5,
1956
1957 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_TEXTURE_ADDRESS_MODE),
1958};
1959
1960enum vkd3d_shader_comparison_func
1961{
1962 VKD3D_SHADER_COMPARISON_FUNC_NEVER = 0x1,
1963 VKD3D_SHADER_COMPARISON_FUNC_LESS = 0x2,
1964 VKD3D_SHADER_COMPARISON_FUNC_EQUAL = 0x3,
1965 VKD3D_SHADER_COMPARISON_FUNC_LESS_EQUAL = 0x4,
1966 VKD3D_SHADER_COMPARISON_FUNC_GREATER = 0x5,
1967 VKD3D_SHADER_COMPARISON_FUNC_NOT_EQUAL = 0x6,
1968 VKD3D_SHADER_COMPARISON_FUNC_GREATER_EQUAL = 0x7,
1969 VKD3D_SHADER_COMPARISON_FUNC_ALWAYS = 0x8,
1970
1971 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_COMPARISON_FUNC),
1972};
1973
1974enum vkd3d_shader_static_border_colour
1975{
1976 VKD3D_SHADER_STATIC_BORDER_COLOUR_TRANSPARENT_BLACK = 0x0,
1977 VKD3D_SHADER_STATIC_BORDER_COLOUR_OPAQUE_BLACK = 0x1,
1978 VKD3D_SHADER_STATIC_BORDER_COLOUR_OPAQUE_WHITE = 0x2,
1979
1980 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_STATIC_BORDER_COLOUR),
1981};
1982
1983 struct vkd3d_shader_static_sampler_desc
1984{
1985 enum vkd3d_shader_filter filter;
1986 enum vkd3d_shader_texture_address_mode address_u;
1987 enum vkd3d_shader_texture_address_mode address_v;
1988 enum vkd3d_shader_texture_address_mode address_w;
1989 float mip_lod_bias;
1990 unsigned int max_anisotropy;
1991 enum vkd3d_shader_comparison_func comparison_func;
1992 enum vkd3d_shader_static_border_colour border_colour;
1993 float min_lod;
1994 float max_lod;
1995 unsigned int shader_register;
1996 unsigned int register_space;
1997 enum vkd3d_shader_visibility shader_visibility;
1998};
1999
2000 struct vkd3d_shader_descriptor_range
2001{
2002 enum vkd3d_shader_descriptor_type range_type;
2003 unsigned int descriptor_count;
2004 unsigned int base_shader_register;
2005 unsigned int register_space;
2006 unsigned int descriptor_table_offset;
2007};
2008
2009 struct vkd3d_shader_root_descriptor_table
2010{
2011 unsigned int descriptor_range_count;
2012 const struct vkd3d_shader_descriptor_range *descriptor_ranges;
2013};
2014
2015 struct vkd3d_shader_root_constants
2016{
2017 unsigned int shader_register;
2018 unsigned int register_space;
2019 unsigned int value_count;
2020};
2021
2022 struct vkd3d_shader_root_descriptor
2023{
2024 unsigned int shader_register;
2025 unsigned int register_space;
2026};
2027
2028enum vkd3d_shader_root_parameter_type
2029{
2030 VKD3D_SHADER_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE = 0x0,
2031 VKD3D_SHADER_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS = 0x1,
2032 VKD3D_SHADER_ROOT_PARAMETER_TYPE_CBV = 0x2,
2033 VKD3D_SHADER_ROOT_PARAMETER_TYPE_SRV = 0x3,
2034 VKD3D_SHADER_ROOT_PARAMETER_TYPE_UAV = 0x4,
2035
2036 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_ROOT_PARAMETER_TYPE),
2037};
2038
2039 struct vkd3d_shader_root_parameter
2040{
2041 enum vkd3d_shader_root_parameter_type parameter_type;
2042 union
2043 {
2044 struct vkd3d_shader_root_descriptor_table descriptor_table;
2045 struct vkd3d_shader_root_constants constants;
2046 struct vkd3d_shader_root_descriptor descriptor;
2047 } u;
2048 enum vkd3d_shader_visibility shader_visibility;
2049};
2050
2051enum vkd3d_shader_root_signature_flags
2052{
2053 VKD3D_SHADER_ROOT_SIGNATURE_FLAG_NONE = 0x00,
2054 VKD3D_SHADER_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT = 0x01,
2055 VKD3D_SHADER_ROOT_SIGNATURE_FLAG_DENY_VERTEX_SHADER_ROOT_ACCESS = 0x02,
2056 VKD3D_SHADER_ROOT_SIGNATURE_FLAG_DENY_HULL_SHADER_ROOT_ACCESS = 0x04,
2057 VKD3D_SHADER_ROOT_SIGNATURE_FLAG_DENY_DOMAIN_SHADER_ROOT_ACCESS = 0x08,
2058 VKD3D_SHADER_ROOT_SIGNATURE_FLAG_DENY_GEOMETRY_SHADER_ROOT_ACCESS = 0x10,
2059 VKD3D_SHADER_ROOT_SIGNATURE_FLAG_DENY_PIXEL_SHADER_ROOT_ACCESS = 0x20,
2060 VKD3D_SHADER_ROOT_SIGNATURE_FLAG_ALLOW_STREAM_OUTPUT = 0x40,
2061
2062 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_ROOT_SIGNATURE_FLAGS),
2063};
2064
2065 struct vkd3d_shader_root_signature_desc
2066{
2067 unsigned int parameter_count;
2068 const struct vkd3d_shader_root_parameter *parameters;
2069 unsigned int static_sampler_count;
2070 const struct vkd3d_shader_static_sampler_desc *static_samplers;
2071 enum vkd3d_shader_root_signature_flags flags;
2072};
2073
2074/* root signature 1.1 */
2075enum vkd3d_shader_root_descriptor_flags
2076{
2077 VKD3D_SHADER_ROOT_DESCRIPTOR_FLAG_NONE = 0x0,
2078 VKD3D_SHADER_ROOT_DESCRIPTOR_FLAG_DATA_VOLATILE = 0x2,
2079 VKD3D_SHADER_ROOT_DESCRIPTOR_FLAG_DATA_STATIC_WHILE_SET_AT_EXECUTE = 0x4,
2080 VKD3D_SHADER_ROOT_DESCRIPTOR_FLAG_DATA_STATIC = 0x8,
2081
2082 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_ROOT_DESCRIPTOR_FLAGS),
2083};
2084
2085 enum vkd3d_shader_descriptor_range_flags
2086{
2087 VKD3D_SHADER_DESCRIPTOR_RANGE_FLAG_NONE = 0x0,
2088 VKD3D_SHADER_DESCRIPTOR_RANGE_FLAG_DESCRIPTORS_VOLATILE = 0x1,
2089 VKD3D_SHADER_DESCRIPTOR_RANGE_FLAG_DATA_VOLATILE = 0x2,
2090 VKD3D_SHADER_DESCRIPTOR_RANGE_FLAG_DATA_STATIC_WHILE_SET_AT_EXECUTE = 0x4,
2091 VKD3D_SHADER_DESCRIPTOR_RANGE_FLAG_DATA_STATIC = 0x8,
2093 VKD3D_SHADER_DESCRIPTOR_RANGE_FLAG_DESCRIPTORS_STATIC_KEEPING_BUFFER_BOUNDS_CHECKS = 0x10000,
2094
2095 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_DESCRIPTOR_RANGE_FLAGS),
2096};
2097
2098 struct vkd3d_shader_descriptor_range1
2099{
2100 enum vkd3d_shader_descriptor_type range_type;
2101 unsigned int descriptor_count;
2102 unsigned int base_shader_register;
2103 unsigned int register_space;
2104 enum vkd3d_shader_descriptor_range_flags flags;
2105 unsigned int descriptor_table_offset;
2106};
2107
2108 struct vkd3d_shader_root_descriptor_table1
2109{
2110 unsigned int descriptor_range_count;
2111 const struct vkd3d_shader_descriptor_range1 *descriptor_ranges;
2112};
2113
2114 struct vkd3d_shader_root_descriptor1
2115{
2116 unsigned int shader_register;
2117 unsigned int register_space;
2118 enum vkd3d_shader_root_descriptor_flags flags;
2119};
2120
2121 struct vkd3d_shader_root_parameter1
2122{
2123 enum vkd3d_shader_root_parameter_type parameter_type;
2124 union
2125 {
2126 struct vkd3d_shader_root_descriptor_table1 descriptor_table;
2127 struct vkd3d_shader_root_constants constants;
2128 struct vkd3d_shader_root_descriptor1 descriptor;
2129 } u;
2130 enum vkd3d_shader_visibility shader_visibility;
2131};
2132
2133 struct vkd3d_shader_root_signature_desc1
2134{
2135 unsigned int parameter_count;
2136 const struct vkd3d_shader_root_parameter1 *parameters;
2137 unsigned int static_sampler_count;
2138 const struct vkd3d_shader_static_sampler_desc *static_samplers;
2139 enum vkd3d_shader_root_signature_flags flags;
2140};
2141
2142enum vkd3d_shader_root_signature_version
2143{
2144 VKD3D_SHADER_ROOT_SIGNATURE_VERSION_1_0 = 0x1,
2145 VKD3D_SHADER_ROOT_SIGNATURE_VERSION_1_1 = 0x2,
2146
2147 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_ROOT_SIGNATURE_VERSION),
2148};
2149
2150 struct vkd3d_shader_versioned_root_signature_desc
2151{
2152 enum vkd3d_shader_root_signature_version version;
2153 union
2154 {
2155 struct vkd3d_shader_root_signature_desc v_1_0;
2156 struct vkd3d_shader_root_signature_desc1 v_1_1;
2157 } u;
2158};
2159
2164 enum vkd3d_shader_resource_type
2165{
2170 VKD3D_SHADER_RESOURCE_NONE = 0x0,
2172 VKD3D_SHADER_RESOURCE_BUFFER = 0x1,
2174 VKD3D_SHADER_RESOURCE_TEXTURE_1D = 0x2,
2176 VKD3D_SHADER_RESOURCE_TEXTURE_2D = 0x3,
2178 VKD3D_SHADER_RESOURCE_TEXTURE_2DMS = 0x4,
2180 VKD3D_SHADER_RESOURCE_TEXTURE_3D = 0x5,
2182 VKD3D_SHADER_RESOURCE_TEXTURE_CUBE = 0x6,
2184 VKD3D_SHADER_RESOURCE_TEXTURE_1DARRAY = 0x7,
2186 VKD3D_SHADER_RESOURCE_TEXTURE_2DARRAY = 0x8,
2188 VKD3D_SHADER_RESOURCE_TEXTURE_2DMSARRAY = 0x9,
2190 VKD3D_SHADER_RESOURCE_TEXTURE_CUBEARRAY = 0xa,
2191
2192 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_RESOURCE_TYPE),
2193};
2194
2199 enum vkd3d_shader_resource_data_type
2200{
2205 VKD3D_SHADER_RESOURCE_DATA_NONE = 0x0,
2207 VKD3D_SHADER_RESOURCE_DATA_UNORM = 0x1,
2209 VKD3D_SHADER_RESOURCE_DATA_SNORM = 0x2,
2211 VKD3D_SHADER_RESOURCE_DATA_INT = 0x3,
2213 VKD3D_SHADER_RESOURCE_DATA_UINT = 0x4,
2215 VKD3D_SHADER_RESOURCE_DATA_FLOAT = 0x5,
2217 VKD3D_SHADER_RESOURCE_DATA_MIXED = 0x6,
2219 VKD3D_SHADER_RESOURCE_DATA_DOUBLE = 0x7,
2225 VKD3D_SHADER_RESOURCE_DATA_CONTINUED = 0x8,
2226
2227 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_RESOURCE_DATA_TYPE),
2228};
2229
2234 enum vkd3d_shader_descriptor_info_flag
2235{
2240 VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_UAV_COUNTER = 0x00000001,
2242 VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_UAV_READ = 0x00000002,
2244 VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_SAMPLER_COMPARISON_MODE = 0x00000004,
2247 VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_UAV_ATOMICS = 0x00000008,
2249 VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_RAW_BUFFER = 0x00000010,
2250
2251 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_DESCRIPTOR_INFO_FLAG),
2252};
2253
2258 struct vkd3d_shader_descriptor_info
2259{
2261 enum vkd3d_shader_descriptor_type type;
2266 unsigned int register_space;
2268 unsigned int register_index;
2270 enum vkd3d_shader_resource_type resource_type;
2272 enum vkd3d_shader_resource_data_type resource_data_type;
2277 unsigned int flags;
2282 unsigned int count;
2283};
2284
2318 struct vkd3d_shader_scan_descriptor_info
2319{
2323 enum vkd3d_shader_structure_type type;
2325 const void *next;
2326
2328 struct vkd3d_shader_descriptor_info *descriptors;
2330 unsigned int descriptor_count;
2331};
2332
2339 struct vkd3d_shader_combined_resource_sampler_info
2340{
2341 unsigned int resource_space;
2342 unsigned int resource_index;
2343 unsigned int sampler_space;
2344 unsigned int sampler_index;
2345};
2346
2367 struct vkd3d_shader_scan_combined_resource_sampler_info
2368{
2370 enum vkd3d_shader_structure_type type;
2372 const void *next;
2373
2375 struct vkd3d_shader_combined_resource_sampler_info *combined_samplers;
2377 unsigned int combined_sampler_count;
2378};
2379
2387 struct vkd3d_shader_scan_hull_shader_tessellation_info
2388{
2390 enum vkd3d_shader_structure_type type;
2392 const void *next;
2393
2395 enum vkd3d_shader_tessellator_output_primitive output_primitive;
2397 enum vkd3d_shader_tessellator_partitioning partitioning;
2398};
2399
2407 struct vkd3d_shader_scan_thread_group_size_info
2408{
2410 enum vkd3d_shader_structure_type type;
2412 const void *next;
2413
2415 unsigned int x, y, z;
2416};
2417
2432 struct vkd3d_shader_d3dbc_source_info
2433{
2435 enum vkd3d_shader_structure_type type;
2437 const void *next;
2438
2450 enum vkd3d_shader_resource_type texture_dimensions[6];
2451
2470 uint32_t shadow_samplers;
2471};
2472
2477 enum vkd3d_shader_component_type
2478{
2480 VKD3D_SHADER_COMPONENT_VOID = 0x0,
2482 VKD3D_SHADER_COMPONENT_UINT = 0x1,
2484 VKD3D_SHADER_COMPONENT_INT = 0x2,
2486 VKD3D_SHADER_COMPONENT_FLOAT = 0x3,
2488 VKD3D_SHADER_COMPONENT_BOOL = 0x4,
2490 VKD3D_SHADER_COMPONENT_DOUBLE = 0x5,
2492 VKD3D_SHADER_COMPONENT_UINT64 = 0x6,
2494 VKD3D_SHADER_COMPONENT_INT64 = 0x7,
2496 VKD3D_SHADER_COMPONENT_FLOAT16 = 0x8,
2498 VKD3D_SHADER_COMPONENT_UINT16 = 0x9,
2500 VKD3D_SHADER_COMPONENT_INT16 = 0xa,
2501
2502 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_COMPONENT_TYPE),
2503};
2504
2506 enum vkd3d_shader_sysval_semantic
2507{
2509 VKD3D_SHADER_SV_NONE = 0x00,
2511 VKD3D_SHADER_SV_POSITION = 0x01,
2513 VKD3D_SHADER_SV_CLIP_DISTANCE = 0x02,
2515 VKD3D_SHADER_SV_CULL_DISTANCE = 0x03,
2517 VKD3D_SHADER_SV_RENDER_TARGET_ARRAY_INDEX = 0x04,
2519 VKD3D_SHADER_SV_VIEWPORT_ARRAY_INDEX = 0x05,
2521 VKD3D_SHADER_SV_VERTEX_ID = 0x06,
2523 VKD3D_SHADER_SV_PRIMITIVE_ID = 0x07,
2525 VKD3D_SHADER_SV_INSTANCE_ID = 0x08,
2527 VKD3D_SHADER_SV_IS_FRONT_FACE = 0x09,
2529 VKD3D_SHADER_SV_SAMPLE_INDEX = 0x0a,
2530 VKD3D_SHADER_SV_TESS_FACTOR_QUADEDGE = 0x0b,
2531 VKD3D_SHADER_SV_TESS_FACTOR_QUADINT = 0x0c,
2532 VKD3D_SHADER_SV_TESS_FACTOR_TRIEDGE = 0x0d,
2533 VKD3D_SHADER_SV_TESS_FACTOR_TRIINT = 0x0e,
2534 VKD3D_SHADER_SV_TESS_FACTOR_LINEDET = 0x0f,
2535 VKD3D_SHADER_SV_TESS_FACTOR_LINEDEN = 0x10,
2537 VKD3D_SHADER_SV_TARGET = 0x40,
2539 VKD3D_SHADER_SV_DEPTH = 0x41,
2541 VKD3D_SHADER_SV_COVERAGE = 0x42,
2546 VKD3D_SHADER_SV_DEPTH_GREATER_EQUAL = 0x43,
2551 VKD3D_SHADER_SV_DEPTH_LESS_EQUAL = 0x44,
2553 VKD3D_SHADER_SV_STENCIL_REF = 0x45,
2554
2555 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_SYSVAL_SEMANTIC),
2556};
2557
2562 enum vkd3d_shader_minimum_precision
2563{
2564 VKD3D_SHADER_MINIMUM_PRECISION_NONE = 0,
2566 VKD3D_SHADER_MINIMUM_PRECISION_FLOAT_16 = 1,
2568 VKD3D_SHADER_MINIMUM_PRECISION_FIXED_8_2 = 2,
2570 VKD3D_SHADER_MINIMUM_PRECISION_INT_16 = 4,
2572 VKD3D_SHADER_MINIMUM_PRECISION_UINT_16 = 5,
2573
2574 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_MINIMUM_PRECISION),
2575};
2576
2580 struct vkd3d_shader_signature_element
2581{
2583 const char *semantic_name;
2585 unsigned int semantic_index;
2590 unsigned int stream_index;
2595 enum vkd3d_shader_sysval_semantic sysval_semantic;
2597 enum vkd3d_shader_component_type component_type;
2599 unsigned int register_index;
2601 unsigned int mask;
2608 unsigned int used_mask;
2610 enum vkd3d_shader_minimum_precision min_precision;
2611};
2612
2620 struct vkd3d_shader_signature
2621{
2623 struct vkd3d_shader_signature_element *elements;
2625 unsigned int element_count;
2626};
2627
2629 enum vkd3d_shader_swizzle_component
2630{
2631 VKD3D_SHADER_SWIZZLE_X = 0x0,
2632 VKD3D_SHADER_SWIZZLE_Y = 0x1,
2633 VKD3D_SHADER_SWIZZLE_Z = 0x2,
2634 VKD3D_SHADER_SWIZZLE_W = 0x3,
2635
2636 VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_SWIZZLE_COMPONENT),
2637};
2638
2644 struct vkd3d_shader_dxbc_section_desc
2645{
2647 uint32_t tag;
2649 struct vkd3d_shader_code data;
2650};
2651
2657 struct vkd3d_shader_dxbc_desc
2658{
2663 uint32_t tag;
2665 uint32_t checksum[4];
2670 unsigned int version;
2672 size_t size;
2674 size_t section_count;
2676 struct vkd3d_shader_dxbc_section_desc *sections;
2677};
2678
2683#define VKD3D_SHADER_SWIZZLE_MASK (0xffu)
2685#define VKD3D_SHADER_SWIZZLE_SHIFT(idx) (8u * (idx))
2686
2696#define VKD3D_SHADER_SWIZZLE(x, y, z, w) \
2697 (VKD3D_SHADER_SWIZZLE_ ## x << VKD3D_SHADER_SWIZZLE_SHIFT(0) \
2698 | VKD3D_SHADER_SWIZZLE_ ## y << VKD3D_SHADER_SWIZZLE_SHIFT(1) \
2699 | VKD3D_SHADER_SWIZZLE_ ## z << VKD3D_SHADER_SWIZZLE_SHIFT(2) \
2700 | VKD3D_SHADER_SWIZZLE_ ## w << VKD3D_SHADER_SWIZZLE_SHIFT(3))
2701
2703#define VKD3D_SHADER_NO_SWIZZLE VKD3D_SHADER_SWIZZLE(X, Y, Z, W)
2704
2706 static inline uint32_t vkd3d_shader_create_swizzle(enum vkd3d_shader_swizzle_component x,
2707 enum vkd3d_shader_swizzle_component y, enum vkd3d_shader_swizzle_component z,
2708 enum vkd3d_shader_swizzle_component w)
2709{
2710 return ((x & VKD3D_SHADER_SWIZZLE_MASK) << VKD3D_SHADER_SWIZZLE_SHIFT(0))
2711 | ((y & VKD3D_SHADER_SWIZZLE_MASK) << VKD3D_SHADER_SWIZZLE_SHIFT(1))
2712 | ((z & VKD3D_SHADER_SWIZZLE_MASK) << VKD3D_SHADER_SWIZZLE_SHIFT(2))
2713 | ((w & VKD3D_SHADER_SWIZZLE_MASK) << VKD3D_SHADER_SWIZZLE_SHIFT(3));
2714}
2715
2757 struct vkd3d_shader_scan_signature_info
2758{
2760 enum vkd3d_shader_structure_type type;
2762 const void *next;
2763
2765 struct vkd3d_shader_signature input;
2766
2768 struct vkd3d_shader_signature output;
2769
2771 struct vkd3d_shader_signature patch_constant;
2772};
2773
2780 struct vkd3d_shader_varying_map
2781{
2788 unsigned int output_signature_index;
2790 unsigned int input_register_index;
2792 unsigned int input_mask;
2793};
2794
2819 struct vkd3d_shader_varying_map_info
2820{
2822 enum vkd3d_shader_structure_type type;
2824 const void *next;
2825
2837 const struct vkd3d_shader_varying_map *varying_map;
2839 unsigned int varying_count;
2840};
2841
2867 struct vkd3d_shader_parameter_info
2868{
2870 enum vkd3d_shader_structure_type type;
2872 const void *next;
2873
2875 const struct vkd3d_shader_parameter1 *parameters;
2877 unsigned int parameter_count;
2878};
2879
2880#ifdef LIBVKD3D_SHADER_SOURCE
2881# define VKD3D_SHADER_API VKD3D_EXPORT
2882#else
2883# define VKD3D_SHADER_API VKD3D_IMPORT
2884#endif
2885
2886#ifndef VKD3D_SHADER_NO_PROTOTYPES
2887
2899VKD3D_SHADER_API const char *vkd3d_shader_get_version(unsigned int *major, unsigned int *minor);
2915VKD3D_SHADER_API const enum vkd3d_shader_source_type *vkd3d_shader_get_supported_source_types(unsigned int *count);
2930VKD3D_SHADER_API const enum vkd3d_shader_target_type *vkd3d_shader_get_supported_target_types(
2931 enum vkd3d_shader_source_type source_type, unsigned int *count);
2932
3007VKD3D_SHADER_API int vkd3d_shader_compile(const struct vkd3d_shader_compile_info *compile_info,
3008 struct vkd3d_shader_code *out, char **messages);
3016VKD3D_SHADER_API void vkd3d_shader_free_messages(char *messages);
3026VKD3D_SHADER_API void vkd3d_shader_free_shader_code(struct vkd3d_shader_code *code);
3027
3063VKD3D_SHADER_API int vkd3d_shader_parse_root_signature(const struct vkd3d_shader_code *dxbc,
3064 struct vkd3d_shader_versioned_root_signature_desc *root_signature, char **messages);
3075VKD3D_SHADER_API void vkd3d_shader_free_root_signature(
3076 struct vkd3d_shader_versioned_root_signature_desc *root_signature);
3077
3106VKD3D_SHADER_API int vkd3d_shader_serialize_root_signature(
3107 const struct vkd3d_shader_versioned_root_signature_desc *root_signature,
3108 struct vkd3d_shader_code *dxbc, char **messages);
3129VKD3D_SHADER_API int vkd3d_shader_convert_root_signature(struct vkd3d_shader_versioned_root_signature_desc *dst,
3130 enum vkd3d_shader_root_signature_version version, const struct vkd3d_shader_versioned_root_signature_desc *src);
3131
3202VKD3D_SHADER_API int vkd3d_shader_scan(const struct vkd3d_shader_compile_info *compile_info, char **messages);
3212VKD3D_SHADER_API void vkd3d_shader_free_scan_descriptor_info(
3213 struct vkd3d_shader_scan_descriptor_info *scan_descriptor_info);
3214
3254VKD3D_SHADER_API int vkd3d_shader_parse_input_signature(const struct vkd3d_shader_code *dxbc,
3255 struct vkd3d_shader_signature *signature, char **messages);
3275VKD3D_SHADER_API struct vkd3d_shader_signature_element *vkd3d_shader_find_signature_element(
3276 const struct vkd3d_shader_signature *signature, const char *semantic_name,
3277 unsigned int semantic_index, unsigned int stream_index);
3287VKD3D_SHADER_API void vkd3d_shader_free_shader_signature(struct vkd3d_shader_signature *signature);
3288
3289/* 1.3 */
3290
3324VKD3D_SHADER_API int vkd3d_shader_preprocess(const struct vkd3d_shader_compile_info *compile_info,
3325 struct vkd3d_shader_code *out, char **messages);
3326
3337VKD3D_SHADER_API void vkd3d_shader_set_log_callback(PFN_vkd3d_log callback);
3338
3350VKD3D_SHADER_API void vkd3d_shader_free_dxbc(struct vkd3d_shader_dxbc_desc *dxbc);
3351
3381VKD3D_SHADER_API int vkd3d_shader_parse_dxbc(const struct vkd3d_shader_code *dxbc,
3382 uint32_t flags, struct vkd3d_shader_dxbc_desc *desc, char **messages);
3383
3414VKD3D_SHADER_API int vkd3d_shader_serialize_dxbc(size_t section_count,
3415 const struct vkd3d_shader_dxbc_section_desc *sections, struct vkd3d_shader_code *dxbc, char **messages);
3416
3428VKD3D_SHADER_API void vkd3d_shader_free_scan_signature_info(struct vkd3d_shader_scan_signature_info *info);
3429
3455VKD3D_SHADER_API void vkd3d_shader_build_varying_map(const struct vkd3d_shader_signature *output_signature,
3456 const struct vkd3d_shader_signature *input_signature,
3457 unsigned int *count, struct vkd3d_shader_varying_map *varyings);
3458
3471VKD3D_SHADER_API void vkd3d_shader_free_scan_combined_resource_sampler_info(
3472 struct vkd3d_shader_scan_combined_resource_sampler_info *info);
3473
3474#endif /* VKD3D_SHADER_NO_PROTOTYPES */
3475
3477 typedef const char *(*PFN_vkd3d_shader_get_version)(unsigned int *major, unsigned int *minor);
3479typedef const enum vkd3d_shader_source_type *(*PFN_vkd3d_shader_get_supported_source_types)(unsigned int *count);
3481typedef const enum vkd3d_shader_target_type *(*PFN_vkd3d_shader_get_supported_target_types)(
3482 enum vkd3d_shader_source_type source_type, unsigned int *count);
3483
3485 typedef int (*PFN_vkd3d_shader_compile)(const struct vkd3d_shader_compile_info *compile_info,
3486 struct vkd3d_shader_code *out, char **messages);
3488 typedef void (*PFN_vkd3d_shader_free_messages)(char *messages);
3490 typedef void (*PFN_vkd3d_shader_free_shader_code)(struct vkd3d_shader_code *code);
3491
3493 typedef int (*PFN_vkd3d_shader_parse_root_signature)(const struct vkd3d_shader_code *dxbc,
3494 struct vkd3d_shader_versioned_root_signature_desc *root_signature, char **messages);
3496 typedef void (*PFN_vkd3d_shader_free_root_signature)(struct vkd3d_shader_versioned_root_signature_desc *root_signature);
3497
3499 typedef int (*PFN_vkd3d_shader_serialize_root_signature)(
3500 const struct vkd3d_shader_versioned_root_signature_desc *root_signature,
3501 struct vkd3d_shader_code *dxbc, char **messages);
3502
3504 typedef int (*PFN_vkd3d_shader_convert_root_signature)(struct vkd3d_shader_versioned_root_signature_desc *dst,
3505 enum vkd3d_shader_root_signature_version version, const struct vkd3d_shader_versioned_root_signature_desc *src);
3506
3508 typedef int (*PFN_vkd3d_shader_scan)(const struct vkd3d_shader_compile_info *compile_info, char **messages);
3510 typedef void (*PFN_vkd3d_shader_free_scan_descriptor_info)(
3511 struct vkd3d_shader_scan_descriptor_info *scan_descriptor_info);
3512
3514 typedef int (*PFN_vkd3d_shader_parse_input_signature)(const struct vkd3d_shader_code *dxbc,
3515 struct vkd3d_shader_signature *signature, char **messages);
3517typedef struct vkd3d_shader_signature_element * (*PFN_vkd3d_shader_find_signature_element)(
3518 const struct vkd3d_shader_signature *signature, const char *semantic_name,
3519 unsigned int semantic_index, unsigned int stream_index);
3521 typedef void (*PFN_vkd3d_shader_free_shader_signature)(struct vkd3d_shader_signature *signature);
3522
3524 typedef void (*PFN_vkd3d_shader_preprocess)(struct vkd3d_shader_compile_info *compile_info,
3525 struct vkd3d_shader_code *out, char **messages);
3526
3528 typedef void (*PFN_vkd3d_shader_set_log_callback)(PFN_vkd3d_log callback);
3529
3531 typedef void (*PFN_vkd3d_shader_free_dxbc)(struct vkd3d_shader_dxbc_desc *dxbc);
3533 typedef int (*PFN_vkd3d_shader_parse_dxbc)(const struct vkd3d_shader_code *dxbc,
3534 uint32_t flags, struct vkd3d_shader_dxbc_desc *desc, char **messages);
3536 typedef int (*PFN_vkd3d_shader_serialize_dxbc)(size_t section_count,
3537 const struct vkd3d_shader_dxbc_section_desc *sections, struct vkd3d_shader_code *dxbc, char **messages);
3538
3540 typedef void (*PFN_vkd3d_shader_build_varying_map)(const struct vkd3d_shader_signature *output_signature,
3541 const struct vkd3d_shader_signature *input_signature,
3542 unsigned int *count, struct vkd3d_shader_varying_map *varyings);
3544 typedef void (*PFN_vkd3d_shader_free_scan_signature_info)(struct vkd3d_shader_scan_signature_info *info);
3545
3547 typedef void (*PFN_vkd3d_shader_free_scan_combined_resource_sampler_info)(
3548 struct vkd3d_shader_scan_combined_resource_sampler_info *info);
3549
3550#ifdef __cplusplus
3551}
3552#endif /* __cplusplus */
3553
3554#endif /* __VKD3D_SHADER_H */
vkd3d_shader_code
A generic structure containing a GPU shader, in text or byte-code format.
Definition vkd3d_shader.h:429
vkd3d_shader_code::code
const void * code
Pointer to the code.
Definition vkd3d_shader.h:444
vkd3d_shader_code::size
size_t size
Size of code, in bytes.
Definition vkd3d_shader.h:446
vkd3d_shader_combined_resource_sampler_info
This structure describes a single resource-sampler pair.
Definition vkd3d_shader.h:2340
vkd3d_shader_combined_resource_sampler
Describes the mapping of a Direct3D resource-sampler pair to a combined sampler (i....
Definition vkd3d_shader.h:1300
vkd3d_shader_combined_resource_sampler::binding
struct vkd3d_shader_descriptor_binding binding
The binding in the target environment.
Definition vkd3d_shader.h:1321
vkd3d_shader_combined_resource_sampler::resource_index
unsigned int resource_index
Register index of the Direct3D resource.
Definition vkd3d_shader.h:1307
vkd3d_shader_combined_resource_sampler::sampler_index
unsigned int sampler_index
Register index of the Direct3D sampler.
Definition vkd3d_shader.h:1314
vkd3d_shader_combined_resource_sampler::sampler_space
unsigned int sampler_space
Register space of the Direct3D sampler.
Definition vkd3d_shader.h:1312
vkd3d_shader_combined_resource_sampler::resource_space
unsigned int resource_space
Register space of the Direct3D resource.
Definition vkd3d_shader.h:1305
vkd3d_shader_combined_resource_sampler::flags
unsigned int flags
A combination of zero or more elements of vkd3d_shader_binding_flag.
Definition vkd3d_shader.h:1318
vkd3d_shader_combined_resource_sampler::shader_visibility
enum vkd3d_shader_visibility shader_visibility
Shader stage(s) to which the resource is visible.
Definition vkd3d_shader.h:1316
vkd3d_shader_compile_info
A chained structure containing compilation parameters.
Definition vkd3d_shader.h:1628
vkd3d_shader_compile_info::options
const struct vkd3d_shader_compile_option * options
Pointer to an array of compilation options.
Definition vkd3d_shader.h:1656
vkd3d_shader_compile_info::source
struct vkd3d_shader_code source
Input source code or byte code.
Definition vkd3d_shader.h:1639
vkd3d_shader_compile_info::log_level
enum vkd3d_shader_log_level log_level
Minimum severity of messages returned from the shader function.
Definition vkd3d_shader.h:1661
vkd3d_shader_compile_info::type
enum vkd3d_shader_structure_type type
Must be set to VKD3D_SHADER_STRUCTURE_TYPE_COMPILE_INFO.
Definition vkd3d_shader.h:1630
vkd3d_shader_compile_info::source_name
const char * source_name
Name of the initial source file, which may be used in error messages or debug information.
Definition vkd3d_shader.h:1666
vkd3d_shader_compile_info::option_count
unsigned int option_count
Size, in elements, of options.
Definition vkd3d_shader.h:1658
vkd3d_shader_compile_info::source_type
enum vkd3d_shader_source_type source_type
Format of the input code passed in source.
Definition vkd3d_shader.h:1642
vkd3d_shader_compile_info::next
const void * next
Optional pointer to a structure containing further parameters.
Definition vkd3d_shader.h:1636
vkd3d_shader_compile_info::target_type
enum vkd3d_shader_target_type target_type
Desired output format.
Definition vkd3d_shader.h:1644
vkd3d_shader_compile_option
Various settings which may affect shader compilation or scanning, passed as part of struct vkd3d_shad...
Definition vkd3d_shader.h:395
vkd3d_shader_compile_option::value
unsigned int value
A value associated with the option.
Definition vkd3d_shader.h:402
vkd3d_shader_compile_option::name
enum vkd3d_shader_compile_option_name name
Name of the option.
Definition vkd3d_shader.h:397
vkd3d_shader_d3dbc_source_info
A chained structure containing legacy Direct3D bytecode compilation parameters.
Definition vkd3d_shader.h:2433
vkd3d_shader_d3dbc_source_info::type
enum vkd3d_shader_structure_type type
Must be set to VKD3D_SHADER_STRUCTURE_TYPE_D3DBC_SOURCE_INFO.
Definition vkd3d_shader.h:2435
vkd3d_shader_d3dbc_source_info::shadow_samplers
uint32_t shadow_samplers
A mask indicating which samplers should be shadow (i.e.
Definition vkd3d_shader.h:2470
vkd3d_shader_d3dbc_source_info::next
const void * next
Optional pointer to a structure containing further parameters.
Definition vkd3d_shader.h:2437
vkd3d_shader_d3dbc_source_info::texture_dimensions
enum vkd3d_shader_resource_type texture_dimensions[6]
The dimension of each texture bound to the shader.
Definition vkd3d_shader.h:2450
vkd3d_shader_descriptor_binding
A common structure describing the bind point of a descriptor or descriptor array in the target enviro...
Definition vkd3d_shader.h:481
vkd3d_shader_descriptor_binding::binding
unsigned int binding
The binding index of the descriptor.
Definition vkd3d_shader.h:488
vkd3d_shader_descriptor_binding::count
unsigned int count
The size of this descriptor array.
Definition vkd3d_shader.h:494
vkd3d_shader_descriptor_binding::set
unsigned int set
The set of the descriptor.
Definition vkd3d_shader.h:486
vkd3d_shader_descriptor_info
Describes a single shader descriptor; returned as part of struct vkd3d_shader_scan_descriptor_info.
Definition vkd3d_shader.h:2259
vkd3d_shader_descriptor_info::resource_type
enum vkd3d_shader_resource_type resource_type
Resource type, if applicable, including its dimension.
Definition vkd3d_shader.h:2270
vkd3d_shader_descriptor_info::register_index
unsigned int register_index
Register index of the descriptor.
Definition vkd3d_shader.h:2268
vkd3d_shader_descriptor_info::resource_data_type
enum vkd3d_shader_resource_data_type resource_data_type
Data type contained in the resource (for example, float or integer).
Definition vkd3d_shader.h:2272
vkd3d_shader_descriptor_info::type
enum vkd3d_shader_descriptor_type type
Type of the descriptor (for example, SRV, CBV, UAV, or sampler).
Definition vkd3d_shader.h:2261
vkd3d_shader_descriptor_info::count
unsigned int count
Size of this descriptor array, or 1 if a single descriptor.
Definition vkd3d_shader.h:2282
vkd3d_shader_descriptor_info::flags
unsigned int flags
Bitwise combination of zero or more members of vkd3d_shader_descriptor_info_flag.
Definition vkd3d_shader.h:2277
vkd3d_shader_descriptor_info::register_space
unsigned int register_space
Register space of the resource, or 0 if the shader does not support multiple register spaces.
Definition vkd3d_shader.h:2266
vkd3d_shader_descriptor_offset_info
A chained structure containing descriptor offsets.
Definition vkd3d_shader.h:1454
vkd3d_shader_descriptor_offset_info::next
const void * next
Optional pointer to a structure containing further parameters.
Definition vkd3d_shader.h:1458
vkd3d_shader_descriptor_offset_info::uav_counter_offsets
const struct vkd3d_shader_descriptor_offset * uav_counter_offsets
Pointer to an array of offsets into the descriptor arrays referenced by the 'uav_counters' array in s...
Definition vkd3d_shader.h:1517
vkd3d_shader_descriptor_offset_info::type
enum vkd3d_shader_structure_type type
Must be set to VKD3D_SHADER_STRUCTURE_TYPE_DESCRIPTOR_OFFSET_INFO.
Definition vkd3d_shader.h:1456
vkd3d_shader_descriptor_offset_info::descriptor_table_offset
unsigned int descriptor_table_offset
Byte offset within the push constants of an array of 32-bit descriptor array offsets.
Definition vkd3d_shader.h:1465
vkd3d_shader_descriptor_offset_info::descriptor_table_count
unsigned int descriptor_table_count
Size, in elements, of the descriptor table push constant array.
Definition vkd3d_shader.h:1467
vkd3d_shader_descriptor_offset_info::binding_offsets
const struct vkd3d_shader_descriptor_offset * binding_offsets
Pointer to an array of struct vkd3d_shader_descriptor_offset objects.
Definition vkd3d_shader.h:1510
vkd3d_shader_descriptor_offset
Definition vkd3d_shader.h:1437
vkd3d_shader_descriptor_range1
Definition vkd3d_shader.h:2099
vkd3d_shader_descriptor_range
Definition vkd3d_shader.h:2001
vkd3d_shader_dxbc_desc
A description of a DXBC blob, as returned by vkd3d_shader_parse_dxbc().
Definition vkd3d_shader.h:2658
vkd3d_shader_dxbc_desc::section_count
size_t section_count
The number of sections contained in the DXBC.
Definition vkd3d_shader.h:2674
vkd3d_shader_dxbc_desc::sections
struct vkd3d_shader_dxbc_section_desc * sections
Descriptions of the sections contained in the DXBC.
Definition vkd3d_shader.h:2676
vkd3d_shader_dxbc_desc::tag
uint32_t tag
The DXBC tag.
Definition vkd3d_shader.h:2663
vkd3d_shader_dxbc_desc::size
size_t size
The total size of the DXBC blob.
Definition vkd3d_shader.h:2672
vkd3d_shader_dxbc_desc::checksum
uint32_t checksum[4]
A checksum of the DXBC contents.
Definition vkd3d_shader.h:2665
vkd3d_shader_dxbc_desc::version
unsigned int version
The DXBC version.
Definition vkd3d_shader.h:2670
vkd3d_shader_dxbc_section_desc
A description of a DXBC section.
Definition vkd3d_shader.h:2645
vkd3d_shader_dxbc_section_desc::tag
uint32_t tag
The section tag.
Definition vkd3d_shader.h:2647
vkd3d_shader_dxbc_section_desc::data
struct vkd3d_shader_code data
The contents of the section.
Definition vkd3d_shader.h:2649
vkd3d_shader_hlsl_source_info
A chained structure containing HLSL compilation parameters.
Definition vkd3d_shader.h:1885
vkd3d_shader_hlsl_source_info::type
enum vkd3d_shader_structure_type type
Must be set to VKD3D_SHADER_STRUCTURE_TYPE_HLSL_SOURCE_INFO.
Definition vkd3d_shader.h:1887
vkd3d_shader_hlsl_source_info::profile
const char * profile
Pointer to a null-terminated string containing the target shader profile.
Definition vkd3d_shader.h:1903
vkd3d_shader_hlsl_source_info::entry_point
const char * entry_point
Optional pointer to a null-terminated string containing the shader entry point.
Definition vkd3d_shader.h:1897
vkd3d_shader_hlsl_source_info::next
const void * next
Optional pointer to a structure containing further parameters.
Definition vkd3d_shader.h:1889
vkd3d_shader_interface_info
A chained structure describing the interface between a compiled shader and the target environment.
Definition vkd3d_shader.h:1387
vkd3d_shader_interface_info::combined_sampler_count
unsigned int combined_sampler_count
Size, in elements, of combined_samplers.
Definition vkd3d_shader.h:1406
vkd3d_shader_interface_info::bindings
const struct vkd3d_shader_resource_binding * bindings
Pointer to an array of bindings for shader resource descriptors.
Definition vkd3d_shader.h:1394
vkd3d_shader_interface_info::push_constant_buffers
const struct vkd3d_shader_push_constant_buffer * push_constant_buffers
Pointer to an array of bindings for push constant buffers.
Definition vkd3d_shader.h:1399
vkd3d_shader_interface_info::uav_counters
const struct vkd3d_shader_uav_counter_binding * uav_counters
Pointer to an array of bindings for UAV counters.
Definition vkd3d_shader.h:1409
vkd3d_shader_interface_info::binding_count
unsigned int binding_count
Size, in elements, of bindings.
Definition vkd3d_shader.h:1396
vkd3d_shader_interface_info::push_constant_buffer_count
unsigned int push_constant_buffer_count
Size, in elements, of push_constant_buffers.
Definition vkd3d_shader.h:1401
vkd3d_shader_interface_info::next
const void * next
Optional pointer to a structure containing further parameters.
Definition vkd3d_shader.h:1391
vkd3d_shader_interface_info::combined_samplers
const struct vkd3d_shader_combined_resource_sampler * combined_samplers
Pointer to an array of bindings for combined samplers.
Definition vkd3d_shader.h:1404
vkd3d_shader_interface_info::type
enum vkd3d_shader_structure_type type
Must be set to VKD3D_SHADER_STRUCTURE_TYPE_INTERFACE_INFO.
Definition vkd3d_shader.h:1389
vkd3d_shader_interface_info::uav_counter_count
unsigned int uav_counter_count
Size, in elements, of uav_counters.
Definition vkd3d_shader.h:1411
vkd3d_shader_macro
A single preprocessor macro, passed as part of struct vkd3d_shader_preprocess_info.
Definition vkd3d_shader.h:1752
vkd3d_shader_macro::name
const char * name
Pointer to a null-terminated string containing the name of a macro.
Definition vkd3d_shader.h:1758
vkd3d_shader_macro::value
const char * value
Optional pointer to a null-terminated string containing the expansion of the macro.
Definition vkd3d_shader.h:1764
vkd3d_shader_parameter1
An individual shader parameter.
Definition vkd3d_shader.h:1196
vkd3d_shader_parameter1::type
enum vkd3d_shader_parameter_type type
How the parameter will be provided to the shader.
Definition vkd3d_shader.h:1200
vkd3d_shader_parameter1::immediate_constant
struct vkd3d_shader_parameter_immediate_constant1 immediate_constant
Additional information if type is VKD3D_SHADER_PARAMETER_TYPE_IMMEDIATE_CONSTANT.
Definition vkd3d_shader.h:1212
vkd3d_shader_parameter1::specialization_constant
struct vkd3d_shader_parameter_specialization_constant specialization_constant
Additional information if type is VKD3D_SHADER_PARAMETER_TYPE_SPECIALIZATION_CONSTANT.
Definition vkd3d_shader.h:1217
vkd3d_shader_parameter1::data_type
enum vkd3d_shader_parameter_data_type data_type
The data type of the supplied parameter, which determines how it is to be interpreted.
Definition vkd3d_shader.h:1205
vkd3d_shader_parameter1::buffer
struct vkd3d_shader_parameter_buffer buffer
Additional information if type is VKD3D_SHADER_PARAMETER_TYPE_BUFFER.
Definition vkd3d_shader.h:1222
vkd3d_shader_parameter1::name
enum vkd3d_shader_parameter_name name
The builtin parameter to be mapped.
Definition vkd3d_shader.h:1198
vkd3d_shader_parameter_buffer
The linkage of a parameter specified through a uniform buffer, used in struct vkd3d_shader_parameter1...
Definition vkd3d_shader.h:1142
vkd3d_shader_parameter_buffer::offset
uint32_t offset
The byte offset of the parameter within the buffer.
Definition vkd3d_shader.h:1151
vkd3d_shader_parameter_buffer::set
unsigned int set
The set of the uniform buffer descriptor.
Definition vkd3d_shader.h:1147
vkd3d_shader_parameter_buffer::binding
unsigned int binding
The binding index of the uniform buffer descriptor.
Definition vkd3d_shader.h:1149
vkd3d_shader_parameter_immediate_constant1
The value of an immediate constant parameter, used in struct vkd3d_shader_parameter1.
Definition vkd3d_shader.h:1096
vkd3d_shader_parameter_immediate_constant1::f32_vec4
float f32_vec4[4]
A pointer to the value if the parameter's data type is VKD3D_SHADER_PARAMETER_DATA_TYPE_FLOAT32_VEC4.
Definition vkd3d_shader.h:1115
vkd3d_shader_parameter_immediate_constant1::u32
uint32_t u32
The value if the parameter's data type is VKD3D_SHADER_PARAMETER_DATA_TYPE_UINT32.
Definition vkd3d_shader.h:1103
vkd3d_shader_parameter_immediate_constant1::f32
float f32
The value if the parameter's data type is VKD3D_SHADER_PARAMETER_DATA_TYPE_FLOAT32.
Definition vkd3d_shader.h:1108
vkd3d_shader_parameter_immediate_constant
The value of an immediate constant parameter, used in struct vkd3d_shader_parameter.
Definition vkd3d_shader.h:1071
vkd3d_shader_parameter_immediate_constant::f32
float f32
The value if the parameter's data type is VKD3D_SHADER_PARAMETER_DATA_TYPE_FLOAT32.
Definition vkd3d_shader.h:1085
vkd3d_shader_parameter_immediate_constant::u32
uint32_t u32
The value if the parameter's data type is VKD3D_SHADER_PARAMETER_DATA_TYPE_UINT32.
Definition vkd3d_shader.h:1078
vkd3d_shader_parameter_info
Interface information regarding a builtin shader parameter.
Definition vkd3d_shader.h:2868
vkd3d_shader_parameter_info::type
enum vkd3d_shader_structure_type type
Must be set to VKD3D_SHADER_STRUCTURE_TYPE_PARAMETER_INFO.
Definition vkd3d_shader.h:2870
vkd3d_shader_parameter_info::parameter_count
unsigned int parameter_count
Size, in elements, of parameters.
Definition vkd3d_shader.h:2877
vkd3d_shader_parameter_info::parameters
const struct vkd3d_shader_parameter1 * parameters
Pointer to an array of dynamic parameters for this shader instance.
Definition vkd3d_shader.h:2875
vkd3d_shader_parameter_info::next
const void * next
Optional pointer to a structure containing further parameters.
Definition vkd3d_shader.h:2872
vkd3d_shader_parameter_specialization_constant
The linkage of a specialization constant parameter, used in struct vkd3d_shader_parameter and struct ...
Definition vkd3d_shader.h:1126
vkd3d_shader_parameter_specialization_constant::id
uint32_t id
The ID of the specialization constant.
Definition vkd3d_shader.h:1134
vkd3d_shader_parameter
An individual shader parameter.
Definition vkd3d_shader.h:1167
vkd3d_shader_preprocess_info
A chained structure containing preprocessing parameters.
Definition vkd3d_shader.h:1825
vkd3d_shader_preprocess_info::type
enum vkd3d_shader_structure_type type
Must be set to VKD3D_SHADER_STRUCTURE_TYPE_PREPROCESS_INFO.
Definition vkd3d_shader.h:1827
vkd3d_shader_preprocess_info::macros
const struct vkd3d_shader_macro * macros
Pointer to an array of predefined macros.
Definition vkd3d_shader.h:1839
vkd3d_shader_preprocess_info::include_context
void * include_context
User-defined pointer which will be passed unmodified to the pfn_open_include and pfn_close_include ca...
Definition vkd3d_shader.h:1870
vkd3d_shader_preprocess_info::macro_count
unsigned int macro_count
Size, in elements, of macros.
Definition vkd3d_shader.h:1841
vkd3d_shader_preprocess_info::pfn_open_include
PFN_vkd3d_shader_open_include pfn_open_include
Optional pointer to a callback function, which will be called in order to evaluate #include directive...
Definition vkd3d_shader.h:1855
vkd3d_shader_preprocess_info::pfn_close_include
PFN_vkd3d_shader_close_include pfn_close_include
Optional pointer to a callback function, which will be called whenever an included file is closed.
Definition vkd3d_shader.h:1865
vkd3d_shader_preprocess_info::next
const void * next
Optional pointer to a structure containing further parameters.
Definition vkd3d_shader.h:1829
vkd3d_shader_push_constant_buffer
Describes the mapping of a Direct3D constant buffer to a range of push constants in the target enviro...
Definition vkd3d_shader.h:1353
vkd3d_shader_push_constant_buffer::register_index
unsigned int register_index
Register index of the Direct3D resource.
Definition vkd3d_shader.h:1360
vkd3d_shader_push_constant_buffer::size
unsigned int size
Size, in bytes, of the target push constants.
Definition vkd3d_shader.h:1367
vkd3d_shader_push_constant_buffer::register_space
unsigned int register_space
Register space of the Direct3D resource.
Definition vkd3d_shader.h:1358
vkd3d_shader_push_constant_buffer::shader_visibility
enum vkd3d_shader_visibility shader_visibility
Shader stage(s) to which the resource is visible.
Definition vkd3d_shader.h:1362
vkd3d_shader_push_constant_buffer::offset
unsigned int offset
Offset, in bytes, of the target push constants.
Definition vkd3d_shader.h:1365
vkd3d_shader_resource_binding
Describes the mapping of a single resource or resource array to its binding point in the target envir...
Definition vkd3d_shader.h:1265
vkd3d_shader_resource_binding::binding
struct vkd3d_shader_descriptor_binding binding
The binding in the target environment.
Definition vkd3d_shader.h:1288
vkd3d_shader_resource_binding::register_space
unsigned int register_space
Register space of the Direct3D resource.
Definition vkd3d_shader.h:1272
vkd3d_shader_resource_binding::type
enum vkd3d_shader_descriptor_type type
The type of this descriptor.
Definition vkd3d_shader.h:1267
vkd3d_shader_resource_binding::flags
unsigned int flags
A combination of zero or more elements of vkd3d_shader_binding_flag.
Definition vkd3d_shader.h:1285
vkd3d_shader_resource_binding::register_index
unsigned int register_index
Register index of the Direct3D resource.
Definition vkd3d_shader.h:1281
vkd3d_shader_resource_binding::shader_visibility
enum vkd3d_shader_visibility shader_visibility
Shader stage(s) to which the resource is visible.
Definition vkd3d_shader.h:1283
vkd3d_shader_root_constants
Definition vkd3d_shader.h:2016
vkd3d_shader_root_descriptor1
Definition vkd3d_shader.h:2115
vkd3d_shader_root_descriptor_table1
Definition vkd3d_shader.h:2109
vkd3d_shader_root_descriptor_table
Definition vkd3d_shader.h:2010
vkd3d_shader_root_descriptor
Definition vkd3d_shader.h:2023
vkd3d_shader_root_parameter1
Definition vkd3d_shader.h:2122
vkd3d_shader_root_parameter
Definition vkd3d_shader.h:2040
vkd3d_shader_root_signature_desc1
Definition vkd3d_shader.h:2134
vkd3d_shader_root_signature_desc
Definition vkd3d_shader.h:2066
vkd3d_shader_scan_combined_resource_sampler_info
A chained structure describing the resource-sampler pairs used by a shader.
Definition vkd3d_shader.h:2368
vkd3d_shader_scan_combined_resource_sampler_info::type
enum vkd3d_shader_structure_type type
Must be set to VKD3D_SHADER_STRUCTURE_TYPE_SCAN_COMBINED_RESOURCE_SAMPLER_INFO.
Definition vkd3d_shader.h:2370
vkd3d_shader_scan_combined_resource_sampler_info::next
const void * next
Optional pointer to a structure containing further parameters.
Definition vkd3d_shader.h:2372
vkd3d_shader_scan_combined_resource_sampler_info::combined_sampler_count
unsigned int combined_sampler_count
The number of resource-sampler pairs in combined_samplers.
Definition vkd3d_shader.h:2377
vkd3d_shader_scan_combined_resource_sampler_info::combined_samplers
struct vkd3d_shader_combined_resource_sampler_info * combined_samplers
Pointer to an array of resource-sampler pairs.
Definition vkd3d_shader.h:2375
vkd3d_shader_scan_descriptor_info
A chained structure enumerating the descriptors declared by a shader.
Definition vkd3d_shader.h:2319
vkd3d_shader_scan_descriptor_info::type
enum vkd3d_shader_structure_type type
Input; must be set to VKD3D_SHADER_STRUCTURE_TYPE_SCAN_DESCRIPTOR_INFO.
Definition vkd3d_shader.h:2323
vkd3d_shader_scan_descriptor_info::next
const void * next
Input; optional pointer to a structure containing further parameters.
Definition vkd3d_shader.h:2325
vkd3d_shader_scan_descriptor_info::descriptor_count
unsigned int descriptor_count
Output; size, in elements, of descriptors.
Definition vkd3d_shader.h:2330
vkd3d_shader_scan_descriptor_info::descriptors
struct vkd3d_shader_descriptor_info * descriptors
Output; returns a pointer to an array of descriptors.
Definition vkd3d_shader.h:2328
vkd3d_shader_scan_hull_shader_tessellation_info
A chained structure describing the tessellation information in a hull shader.
Definition vkd3d_shader.h:2388
vkd3d_shader_scan_hull_shader_tessellation_info::next
const void * next
Optional pointer to a structure containing further parameters.
Definition vkd3d_shader.h:2392
vkd3d_shader_scan_hull_shader_tessellation_info::output_primitive
enum vkd3d_shader_tessellator_output_primitive output_primitive
The tessellation output primitive.
Definition vkd3d_shader.h:2395
vkd3d_shader_scan_hull_shader_tessellation_info::type
enum vkd3d_shader_structure_type type
Must be set to VKD3D_SHADER_STRUCTURE_TYPE_SCAN_HULL_SHADER_TESSELLATION_INFO.
Definition vkd3d_shader.h:2390
vkd3d_shader_scan_hull_shader_tessellation_info::partitioning
enum vkd3d_shader_tessellator_partitioning partitioning
The tessellation partitioning mode.
Definition vkd3d_shader.h:2397
vkd3d_shader_scan_signature_info
A chained structure containing descriptions of shader inputs and outputs.
Definition vkd3d_shader.h:2758
vkd3d_shader_scan_signature_info::next
const void * next
Optional pointer to a structure containing further parameters.
Definition vkd3d_shader.h:2762
vkd3d_shader_scan_signature_info::type
enum vkd3d_shader_structure_type type
Must be set to VKD3D_SHADER_STRUCTURE_TYPE_SCAN_SIGNATURE_INFO.
Definition vkd3d_shader.h:2760
vkd3d_shader_scan_signature_info::patch_constant
struct vkd3d_shader_signature patch_constant
The shader patch constant varyings.
Definition vkd3d_shader.h:2771
vkd3d_shader_scan_signature_info::output
struct vkd3d_shader_signature output
The shader output varyings.
Definition vkd3d_shader.h:2768
vkd3d_shader_scan_signature_info::input
struct vkd3d_shader_signature input
The shader input varyings.
Definition vkd3d_shader.h:2765
vkd3d_shader_scan_thread_group_size_info
A chained structure describing the thread group size in a compute shader.
Definition vkd3d_shader.h:2408
vkd3d_shader_scan_thread_group_size_info::type
enum vkd3d_shader_structure_type type
Must be set to VKD3D_SHADER_STRUCTURE_TYPE_SCAN_THREAD_GROUP_SIZE_INFO.
Definition vkd3d_shader.h:2410
vkd3d_shader_scan_thread_group_size_info::x
unsigned int x
The thread group size in the x/y/z direction.
Definition vkd3d_shader.h:2415
vkd3d_shader_scan_thread_group_size_info::next
const void * next
Optional pointer to a structure containing further parameters.
Definition vkd3d_shader.h:2412
vkd3d_shader_signature_element
A single shader varying, returned as part of struct vkd3d_shader_signature.
Definition vkd3d_shader.h:2581
vkd3d_shader_signature_element::semantic_index
unsigned int semantic_index
Semantic index, or 0 if the semantic is not indexed.
Definition vkd3d_shader.h:2585
vkd3d_shader_signature_element::sysval_semantic
enum vkd3d_shader_sysval_semantic sysval_semantic
System value semantic.
Definition vkd3d_shader.h:2595
vkd3d_shader_signature_element::stream_index
unsigned int stream_index
Stream index of a geometry shader output semantic.
Definition vkd3d_shader.h:2590
vkd3d_shader_signature_element::used_mask
unsigned int used_mask
Subset of mask which the shader reads from or writes to.
Definition vkd3d_shader.h:2608
vkd3d_shader_signature_element::component_type
enum vkd3d_shader_component_type component_type
Data type.
Definition vkd3d_shader.h:2597
vkd3d_shader_signature_element::min_precision
enum vkd3d_shader_minimum_precision min_precision
Minimum interpolation precision.
Definition vkd3d_shader.h:2610
vkd3d_shader_signature_element::register_index
unsigned int register_index
Register index.
Definition vkd3d_shader.h:2599
vkd3d_shader_signature_element::mask
unsigned int mask
Mask of the register components allocated to this varying.
Definition vkd3d_shader.h:2601
vkd3d_shader_signature_element::semantic_name
const char * semantic_name
Semantic name.
Definition vkd3d_shader.h:2583
vkd3d_shader_signature
Description of a shader input or output signature.
Definition vkd3d_shader.h:2621
vkd3d_shader_signature::elements
struct vkd3d_shader_signature_element * elements
Pointer to an array of varyings.
Definition vkd3d_shader.h:2623
vkd3d_shader_signature::element_count
unsigned int element_count
Size, in elements, of elements.
Definition vkd3d_shader.h:2625
vkd3d_shader_spirv_domain_shader_target_info
Definition vkd3d_shader.h:1739
vkd3d_shader_spirv_target_info
Definition vkd3d_shader.h:1698
vkd3d_shader_static_sampler_desc
Definition vkd3d_shader.h:1984
vkd3d_shader_transform_feedback_element
Definition vkd3d_shader.h:1415
vkd3d_shader_transform_feedback_info
Definition vkd3d_shader.h:1426
vkd3d_shader_uav_counter_binding
Describes the mapping of a single Direct3D UAV counter.
Definition vkd3d_shader.h:1330
vkd3d_shader_uav_counter_binding::shader_visibility
enum vkd3d_shader_visibility shader_visibility
Shader stage(s) to which the UAV counter is visible.
Definition vkd3d_shader.h:1339
vkd3d_shader_uav_counter_binding::register_space
unsigned int register_space
Register space of the Direct3D UAV descriptor.
Definition vkd3d_shader.h:1335
vkd3d_shader_uav_counter_binding::binding
struct vkd3d_shader_descriptor_binding binding
The binding in the target environment.
Definition vkd3d_shader.h:1342
vkd3d_shader_uav_counter_binding::register_index
unsigned int register_index
Register index of the Direct3D UAV descriptor.
Definition vkd3d_shader.h:1337
vkd3d_shader_varying_map_info
A chained structure which describes how output varyings in this shader stage should be mapped to inpu...
Definition vkd3d_shader.h:2820
vkd3d_shader_varying_map_info::varying_count
unsigned int varying_count
The number of registers provided in varying_map.
Definition vkd3d_shader.h:2839
vkd3d_shader_varying_map_info::type
enum vkd3d_shader_structure_type type
Must be set to VKD3D_SHADER_STRUCTURE_TYPE_VARYING_MAP_INFO.
Definition vkd3d_shader.h:2822
vkd3d_shader_varying_map_info::next
const void * next
Optional pointer to a structure containing further parameters.
Definition vkd3d_shader.h:2824
vkd3d_shader_varying_map_info::varying_map
const struct vkd3d_shader_varying_map * varying_map
A mapping of output varyings in this shader stage to input varyings in the next shader stage.
Definition vkd3d_shader.h:2837
vkd3d_shader_varying_map
Describes the mapping of a output varying register in a shader stage, to an input varying register in...
Definition vkd3d_shader.h:2781
vkd3d_shader_varying_map::input_register_index
unsigned int input_register_index
The register index of the input varying to map this register to.
Definition vkd3d_shader.h:2790
vkd3d_shader_varying_map::input_mask
unsigned int input_mask
The mask consumed by the destination register.
Definition vkd3d_shader.h:2792
vkd3d_shader_varying_map::output_signature_index
unsigned int output_signature_index
The signature index (in the output signature) of the output varying.
Definition vkd3d_shader.h:2788
vkd3d_shader_versioned_root_signature_desc
Definition vkd3d_shader.h:2151
vkd3d_shader_find_signature_element
VKD3D_SHADER_API struct vkd3d_shader_signature_element * vkd3d_shader_find_signature_element(const struct vkd3d_shader_signature *signature, const char *semantic_name, unsigned int semantic_index, unsigned int stream_index)
Find a single element of a parsed input signature.
vkd3d_shader_d3dbc_constant_register
vkd3d_shader_d3dbc_constant_register
Symbolic register indices for mapping uniform constant register sets in legacy Direct3D bytecode to c...
Definition vkd3d_shader.h:1238
VKD3D_SHADER_D3DBC_BOOL_CONSTANT_REGISTER
@ VKD3D_SHADER_D3DBC_BOOL_CONSTANT_REGISTER
The boolean constant register set, b# in Direct3D assembly.
Definition vkd3d_shader.h:1244
VKD3D_SHADER_D3DBC_FLOAT_CONSTANT_REGISTER
@ VKD3D_SHADER_D3DBC_FLOAT_CONSTANT_REGISTER
The float constant register set, c# in Direct3D assembly.
Definition vkd3d_shader.h:1240
VKD3D_SHADER_D3DBC_INT_CONSTANT_REGISTER
@ VKD3D_SHADER_D3DBC_INT_CONSTANT_REGISTER
The integer constant register set, i# in Direct3D assembly.
Definition vkd3d_shader.h:1242
vkd3d_shader_compile_option_name
vkd3d_shader_compile_option_name
Definition vkd3d_shader.h:289
VKD3D_SHADER_COMPILE_OPTION_WARN_IMPLICIT_TRUNCATION
@ VKD3D_SHADER_COMPILE_OPTION_WARN_IMPLICIT_TRUNCATION
If value is nonzero, emit a compile warning warn when vectors or matrices are truncated in an implici...
Definition vkd3d_shader.h:376
VKD3D_SHADER_COMPILE_OPTION_TYPED_UAV
@ VKD3D_SHADER_COMPILE_OPTION_TYPED_UAV
value is a member of enum vkd3d_shader_compile_option_typed_uav.
Definition vkd3d_shader.h:305
VKD3D_SHADER_COMPILE_OPTION_BACKWARD_COMPATIBILITY
@ VKD3D_SHADER_COMPILE_OPTION_BACKWARD_COMPATIBILITY
This option is used to enable various backward compatibility features.
Definition vkd3d_shader.h:334
VKD3D_SHADER_COMPILE_OPTION_PACK_MATRIX_ORDER
@ VKD3D_SHADER_COMPILE_OPTION_PACK_MATRIX_ORDER
This option specifies default matrix packing order for HLSL sources.
Definition vkd3d_shader.h:326
VKD3D_SHADER_COMPILE_OPTION_CHILD_EFFECT
@ VKD3D_SHADER_COMPILE_OPTION_CHILD_EFFECT
If value is non-zero compilation will produce a child effect using shared object descriptions,...
Definition vkd3d_shader.h:365
VKD3D_SHADER_COMPILE_OPTION_API_VERSION
@ VKD3D_SHADER_COMPILE_OPTION_API_VERSION
value is a member of enum vkd3d_shader_api_version.
Definition vkd3d_shader.h:303
VKD3D_SHADER_COMPILE_OPTION_WRITE_TESS_GEOM_POINT_SIZE
@ VKD3D_SHADER_COMPILE_OPTION_WRITE_TESS_GEOM_POINT_SIZE
If value is nonzero, write the point size for Vulkan tessellation and geometry shaders.
Definition vkd3d_shader.h:317
VKD3D_SHADER_COMPILE_OPTION_BUFFER_UAV
@ VKD3D_SHADER_COMPILE_OPTION_BUFFER_UAV
value is a member of enum vkd3d_shader_compile_option_buffer_uav.
Definition vkd3d_shader.h:299
VKD3D_SHADER_COMPILE_OPTION_FRAGMENT_COORDINATE_ORIGIN
@ VKD3D_SHADER_COMPILE_OPTION_FRAGMENT_COORDINATE_ORIGIN
This option specifies the origin of fragment coordinates for SPIR-V targets.
Definition vkd3d_shader.h:344
VKD3D_SHADER_COMPILE_OPTION_FEATURE
@ VKD3D_SHADER_COMPILE_OPTION_FEATURE
This option specifies the shader features available in the target environment.
Definition vkd3d_shader.h:354
VKD3D_SHADER_COMPILE_OPTION_STRIP_DEBUG
@ VKD3D_SHADER_COMPILE_OPTION_STRIP_DEBUG
If value is nonzero, do not include debug information in the compiled shader.
Definition vkd3d_shader.h:297
VKD3D_SHADER_COMPILE_OPTION_INCLUDE_EMPTY_BUFFERS_IN_EFFECTS
@ VKD3D_SHADER_COMPILE_OPTION_INCLUDE_EMPTY_BUFFERS_IN_EFFECTS
If value is nonzero, empty constant buffers descriptions are written out in the output effect binary.
Definition vkd3d_shader.h:384
VKD3D_SHADER_COMPILE_OPTION_FORMATTING
@ VKD3D_SHADER_COMPILE_OPTION_FORMATTING
value is a member of enum vkd3d_shader_compile_option_formatting_flags.
Definition vkd3d_shader.h:301
vkd3d_shader_create_swizzle
static uint32_t vkd3d_shader_create_swizzle(enum vkd3d_shader_swizzle_component x, enum vkd3d_shader_swizzle_component y, enum vkd3d_shader_swizzle_component z, enum vkd3d_shader_swizzle_component w)
Build a vkd3d-shader swizzle with the given components.
Definition vkd3d_shader.h:2706
vkd3d_shader_compile_option_formatting_flags
vkd3d_shader_compile_option_formatting_flags
Definition vkd3d_shader.h:173
VKD3D_SHADER_COMPILE_OPTION_FORMATTING_IO_SIGNATURES
@ VKD3D_SHADER_COMPILE_OPTION_FORMATTING_IO_SIGNATURES
Emit the signatures when disassembling a shader.
Definition vkd3d_shader.h:185
PFN_vkd3d_shader_free_dxbc
void(* PFN_vkd3d_shader_free_dxbc)(struct vkd3d_shader_dxbc_desc *dxbc)
Type of vkd3d_shader_free_dxbc().
Definition vkd3d_shader.h:3531
PFN_vkd3d_shader_convert_root_signature
int(* PFN_vkd3d_shader_convert_root_signature)(struct vkd3d_shader_versioned_root_signature_desc *dst, enum vkd3d_shader_root_signature_version version, const struct vkd3d_shader_versioned_root_signature_desc *src)
Type of vkd3d_shader_convert_root_signature().
Definition vkd3d_shader.h:3504
PFN_vkd3d_shader_build_varying_map
void(* PFN_vkd3d_shader_build_varying_map)(const struct vkd3d_shader_signature *output_signature, const struct vkd3d_shader_signature *input_signature, unsigned int *count, struct vkd3d_shader_varying_map *varyings)
Type of vkd3d_shader_build_varying_map().
Definition vkd3d_shader.h:3540
vkd3d_shader_resource_data_type
vkd3d_shader_resource_data_type
The type of the data contained in a shader resource, returned as part of struct vkd3d_shader_descript...
Definition vkd3d_shader.h:2200
VKD3D_SHADER_RESOURCE_DATA_NONE
@ VKD3D_SHADER_RESOURCE_DATA_NONE
The descriptor has no relevant data type.
Definition vkd3d_shader.h:2205
VKD3D_SHADER_RESOURCE_DATA_DOUBLE
@ VKD3D_SHADER_RESOURCE_DATA_DOUBLE
IEEE double-precision floating-point.
Definition vkd3d_shader.h:2219
VKD3D_SHADER_RESOURCE_DATA_MIXED
@ VKD3D_SHADER_RESOURCE_DATA_MIXED
Undefined/type-less.
Definition vkd3d_shader.h:2217
VKD3D_SHADER_RESOURCE_DATA_SNORM
@ VKD3D_SHADER_RESOURCE_DATA_SNORM
Signed normalized integer.
Definition vkd3d_shader.h:2209
VKD3D_SHADER_RESOURCE_DATA_CONTINUED
@ VKD3D_SHADER_RESOURCE_DATA_CONTINUED
Continuation of the previous component.
Definition vkd3d_shader.h:2225
VKD3D_SHADER_RESOURCE_DATA_UINT
@ VKD3D_SHADER_RESOURCE_DATA_UINT
Unsigned integer.
Definition vkd3d_shader.h:2213
VKD3D_SHADER_RESOURCE_DATA_FLOAT
@ VKD3D_SHADER_RESOURCE_DATA_FLOAT
IEEE single-precision floating-point.
Definition vkd3d_shader.h:2215
VKD3D_SHADER_RESOURCE_DATA_UNORM
@ VKD3D_SHADER_RESOURCE_DATA_UNORM
Unsigned normalized integer.
Definition vkd3d_shader.h:2207
VKD3D_SHADER_RESOURCE_DATA_INT
@ VKD3D_SHADER_RESOURCE_DATA_INT
Signed integer.
Definition vkd3d_shader.h:2211
vkd3d_shader_get_version
VKD3D_SHADER_API const char * vkd3d_shader_get_version(unsigned int *major, unsigned int *minor)
Returns the current version of this library.
vkd3d_shader_parameter_type
vkd3d_shader_parameter_type
The manner in which a parameter value is provided to the shader, used in struct vkd3d_shader_paramete...
Definition vkd3d_shader.h:617
VKD3D_SHADER_PARAMETER_TYPE_BUFFER
@ VKD3D_SHADER_PARAMETER_TYPE_BUFFER
The parameter value is provided to the shader as part of a uniform buffer.
Definition vkd3d_shader.h:632
VKD3D_SHADER_PARAMETER_TYPE_SPECIALIZATION_CONSTANT
@ VKD3D_SHADER_PARAMETER_TYPE_SPECIALIZATION_CONSTANT
The parameter value is provided to the shader via specialization constants.
Definition vkd3d_shader.h:625
VKD3D_SHADER_PARAMETER_TYPE_IMMEDIATE_CONSTANT
@ VKD3D_SHADER_PARAMETER_TYPE_IMMEDIATE_CONSTANT
The parameter value is embedded directly in the shader.
Definition vkd3d_shader.h:620
PFN_vkd3d_shader_open_include
int(* PFN_vkd3d_shader_open_include)(const char *filename, bool local, const char *parent_data, void *context, struct vkd3d_shader_code *out)
Type of a callback function which will be used to open preprocessor includes.
Definition vkd3d_shader.h:1795
vkd3d_shader_compile_option_fragment_coordinate_origin
vkd3d_shader_compile_option_fragment_coordinate_origin
Determines the origin of fragment coordinates.
Definition vkd3d_shader.h:235
VKD3D_SHADER_COMPILE_OPTION_FRAGMENT_COORDINATE_ORIGIN_LOWER_LEFT
@ VKD3D_SHADER_COMPILE_OPTION_FRAGMENT_COORDINATE_ORIGIN_LOWER_LEFT
Fragment coordinates originate from the lower-left.
Definition vkd3d_shader.h:241
VKD3D_SHADER_COMPILE_OPTION_FRAGMENT_COORDINATE_ORIGIN_UPPER_LEFT
@ VKD3D_SHADER_COMPILE_OPTION_FRAGMENT_COORDINATE_ORIGIN_UPPER_LEFT
Fragment coordinates originate from the upper-left.
Definition vkd3d_shader.h:238
vkd3d_shader_free_shader_code
VKD3D_SHADER_API void vkd3d_shader_free_shader_code(struct vkd3d_shader_code *code)
Free shader code allocated by another vkd3d-shader function, such as vkd3d_shader_compile().
vkd3d_shader_fog_source
vkd3d_shader_fog_source
The source of the fog varying output by a pre-rasterization shader.
Definition vkd3d_shader.h:584
VKD3D_SHADER_FOG_SOURCE_FOG
@ VKD3D_SHADER_FOG_SOURCE_FOG
The source shader is not modified.
Definition vkd3d_shader.h:589
VKD3D_SHADER_FOG_SOURCE_FOG_OR_SPECULAR_W
@ VKD3D_SHADER_FOG_SOURCE_FOG_OR_SPECULAR_W
If the source shader has a fog varying, it is not modified.
Definition vkd3d_shader.h:597
VKD3D_SHADER_FOG_SOURCE_W
@ VKD3D_SHADER_FOG_SOURCE_W
The fog source is the W component of the position output by the vertex shader.
Definition vkd3d_shader.h:607
VKD3D_SHADER_FOG_SOURCE_Z
@ VKD3D_SHADER_FOG_SOURCE_Z
The fog source is the Z component of the position output by the vertex shader.
Definition vkd3d_shader.h:602
vkd3d_shader_parameter_data_type
vkd3d_shader_parameter_data_type
The format of data provided to the shader, used in struct vkd3d_shader_parameter and struct vkd3d_sha...
Definition vkd3d_shader.h:642
VKD3D_SHADER_PARAMETER_DATA_TYPE_FLOAT32_VEC4
@ VKD3D_SHADER_PARAMETER_DATA_TYPE_FLOAT32_VEC4
The parameter is provided as a 4-dimensional vector of 32-bit floats.
Definition vkd3d_shader.h:654
VKD3D_SHADER_PARAMETER_DATA_TYPE_UINT32
@ VKD3D_SHADER_PARAMETER_DATA_TYPE_UINT32
The parameter is provided as a 32-bit unsigned integer.
Definition vkd3d_shader.h:645
VKD3D_SHADER_PARAMETER_DATA_TYPE_FLOAT32
@ VKD3D_SHADER_PARAMETER_DATA_TYPE_FLOAT32
The parameter is provided as a 32-bit float.
Definition vkd3d_shader.h:647
vkd3d_shader_build_varying_map
VKD3D_SHADER_API void vkd3d_shader_build_varying_map(const struct vkd3d_shader_signature *output_signature, const struct vkd3d_shader_signature *input_signature, unsigned int *count, struct vkd3d_shader_varying_map *varyings)
Build a mapping of output varyings in a shader stage to input varyings in the following shader stage.
PFN_vkd3d_shader_serialize_dxbc
int(* PFN_vkd3d_shader_serialize_dxbc)(size_t section_count, const struct vkd3d_shader_dxbc_section_desc *sections, struct vkd3d_shader_code *dxbc, char **messages)
Type of vkd3d_shader_serialize_dxbc().
Definition vkd3d_shader.h:3536
PFN_vkd3d_shader_close_include
void(* PFN_vkd3d_shader_close_include)(const struct vkd3d_shader_code *code, void *context)
Type of a callback function which will be used to close preprocessor includes.
Definition vkd3d_shader.h:1811
vkd3d_shader_descriptor_info_flag
vkd3d_shader_descriptor_info_flag
Additional flags describing a shader descriptor, returned as part of struct vkd3d_shader_descriptor_i...
Definition vkd3d_shader.h:2235
VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_RAW_BUFFER
@ VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_RAW_BUFFER
The descriptor is a raw (byte-addressed) buffer.
Definition vkd3d_shader.h:2249
VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_UAV_READ
@ VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_UAV_READ
The descriptor is a UAV resource, which is read from by the shader.
Definition vkd3d_shader.h:2242
VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_UAV_ATOMICS
@ VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_UAV_ATOMICS
The descriptor is a UAV resource, on which the shader performs atomic ops.
Definition vkd3d_shader.h:2247
VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_UAV_COUNTER
@ VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_UAV_COUNTER
The descriptor is a UAV resource, whose counter is read from or written to by the shader.
Definition vkd3d_shader.h:2240
VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_SAMPLER_COMPARISON_MODE
@ VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_SAMPLER_COMPARISON_MODE
The descriptor is a comparison sampler.
Definition vkd3d_shader.h:2244
vkd3d_shader_serialize_root_signature
VKD3D_SHADER_API int vkd3d_shader_serialize_root_signature(const struct vkd3d_shader_versioned_root_signature_desc *root_signature, struct vkd3d_shader_code *dxbc, char **messages)
Convert a structural description of a shader root signature to a byte code format capable of being re...
vkd3d_shader_parse_input_signature
VKD3D_SHADER_API int vkd3d_shader_parse_input_signature(const struct vkd3d_shader_code *dxbc, struct vkd3d_shader_signature *signature, char **messages)
Read the input signature of a compiled DXBC shader, returning a structural description which can be e...
vkd3d_shader_compile_option_backward_compatibility
vkd3d_shader_compile_option_backward_compatibility
Individual options to enable various backward compatibility features.
Definition vkd3d_shader.h:201
VKD3D_SHADER_COMPILE_OPTION_BACKCOMPAT_MAP_SEMANTIC_NAMES
@ VKD3D_SHADER_COMPILE_OPTION_BACKCOMPAT_MAP_SEMANTIC_NAMES
Causes compiler to convert SM1-3 semantics to corresponding System Value semantics,...
Definition vkd3d_shader.h:213
VKD3D_SHADER_COMPILE_OPTION_DOUBLE_AS_FLOAT_ALIAS
@ VKD3D_SHADER_COMPILE_OPTION_DOUBLE_AS_FLOAT_ALIAS
Causes 'double' to behave as an alias for 'float'.
Definition vkd3d_shader.h:224
PFN_vkd3d_shader_free_shader_signature
void(* PFN_vkd3d_shader_free_shader_signature)(struct vkd3d_shader_signature *signature)
Type of vkd3d_shader_free_shader_signature().
Definition vkd3d_shader.h:3521
PFN_vkd3d_shader_scan
int(* PFN_vkd3d_shader_scan)(const struct vkd3d_shader_compile_info *compile_info, char **messages)
Type of vkd3d_shader_scan().
Definition vkd3d_shader.h:3508
vkd3d_shader_parse_root_signature
VKD3D_SHADER_API int vkd3d_shader_parse_root_signature(const struct vkd3d_shader_code *dxbc, struct vkd3d_shader_versioned_root_signature_desc *root_signature, char **messages)
Convert a byte code description of a shader root signature to a structural description which can be e...
PFN_vkd3d_shader_free_root_signature
void(* PFN_vkd3d_shader_free_root_signature)(struct vkd3d_shader_versioned_root_signature_desc *root_signature)
Type of vkd3d_shader_free_root_signature().
Definition vkd3d_shader.h:3496
vkd3d_shader_sysval_semantic
vkd3d_shader_sysval_semantic
System value semantic, returned as part of struct vkd3d_shader_signature.
Definition vkd3d_shader.h:2507
VKD3D_SHADER_SV_VERTEX_ID
@ VKD3D_SHADER_SV_VERTEX_ID
Vertex ID; SV_VertexID in Direct3D.
Definition vkd3d_shader.h:2521
VKD3D_SHADER_SV_RENDER_TARGET_ARRAY_INDEX
@ VKD3D_SHADER_SV_RENDER_TARGET_ARRAY_INDEX
Render target layer; SV_RenderTargetArrayIndex in Direct3D.
Definition vkd3d_shader.h:2517
VKD3D_SHADER_SV_DEPTH_LESS_EQUAL
@ VKD3D_SHADER_SV_DEPTH_LESS_EQUAL
Depth, which is guaranteed to be less than or equal to the current depth; SV_DepthLessEqual in Direct...
Definition vkd3d_shader.h:2551
VKD3D_SHADER_SV_PRIMITIVE_ID
@ VKD3D_SHADER_SV_PRIMITIVE_ID
Primitive ID; SV_PrimitiveID in Direct3D.
Definition vkd3d_shader.h:2523
VKD3D_SHADER_SV_COVERAGE
@ VKD3D_SHADER_SV_COVERAGE
Sample mask; SV_Coverage in Direct3D.
Definition vkd3d_shader.h:2541
VKD3D_SHADER_SV_CULL_DISTANCE
@ VKD3D_SHADER_SV_CULL_DISTANCE
Cull distance; SV_CullDistance in Direct3D.
Definition vkd3d_shader.h:2515
VKD3D_SHADER_SV_DEPTH
@ VKD3D_SHADER_SV_DEPTH
Depth; SV_Depth in Direct3D.
Definition vkd3d_shader.h:2539
VKD3D_SHADER_SV_TARGET
@ VKD3D_SHADER_SV_TARGET
Render target; SV_Target in Direct3D.
Definition vkd3d_shader.h:2537
VKD3D_SHADER_SV_NONE
@ VKD3D_SHADER_SV_NONE
No system value.
Definition vkd3d_shader.h:2509
VKD3D_SHADER_SV_IS_FRONT_FACE
@ VKD3D_SHADER_SV_IS_FRONT_FACE
Whether the triangle is front-facing; SV_IsFrontFace in Direct3D.
Definition vkd3d_shader.h:2527
VKD3D_SHADER_SV_VIEWPORT_ARRAY_INDEX
@ VKD3D_SHADER_SV_VIEWPORT_ARRAY_INDEX
Viewport index; SV_ViewportArrayIndex in Direct3D.
Definition vkd3d_shader.h:2519
VKD3D_SHADER_SV_DEPTH_GREATER_EQUAL
@ VKD3D_SHADER_SV_DEPTH_GREATER_EQUAL
Depth, which is guaranteed to be greater than or equal to the current depth; SV_DepthGreaterEqual in ...
Definition vkd3d_shader.h:2546
VKD3D_SHADER_SV_INSTANCE_ID
@ VKD3D_SHADER_SV_INSTANCE_ID
Instance ID; SV_InstanceID in Direct3D.
Definition vkd3d_shader.h:2525
VKD3D_SHADER_SV_CLIP_DISTANCE
@ VKD3D_SHADER_SV_CLIP_DISTANCE
Clip distance; SV_ClipDistance in Direct3D.
Definition vkd3d_shader.h:2513
VKD3D_SHADER_SV_SAMPLE_INDEX
@ VKD3D_SHADER_SV_SAMPLE_INDEX
Sample index; SV_SampleIndex in Direct3D.
Definition vkd3d_shader.h:2529
VKD3D_SHADER_SV_STENCIL_REF
@ VKD3D_SHADER_SV_STENCIL_REF
Stencil reference; SV_StencilRef in Direct3D.
Definition vkd3d_shader.h:2553
VKD3D_SHADER_SV_POSITION
@ VKD3D_SHADER_SV_POSITION
Vertex position; SV_Position in Direct3D.
Definition vkd3d_shader.h:2511
vkd3d_shader_source_type
vkd3d_shader_source_type
The format of a shader to be compiled or scanned.
Definition vkd3d_shader.h:1522
VKD3D_SHADER_SOURCE_DXBC_DXIL
@ VKD3D_SHADER_SOURCE_DXBC_DXIL
A 'DirectX Intermediate Language' shader embedded in a DXBC container.
Definition vkd3d_shader.h:1544
VKD3D_SHADER_SOURCE_D3D_BYTECODE
@ VKD3D_SHADER_SOURCE_D3D_BYTECODE
Legacy Direct3D byte-code.
Definition vkd3d_shader.h:1539
VKD3D_SHADER_SOURCE_HLSL
@ VKD3D_SHADER_SOURCE_HLSL
High-Level Shader Language source code.
Definition vkd3d_shader.h:1534
VKD3D_SHADER_SOURCE_FX
@ VKD3D_SHADER_SOURCE_FX
Binary format used by Direct3D 9/10.x/11 effects.
Definition vkd3d_shader.h:1549
VKD3D_SHADER_SOURCE_TX
@ VKD3D_SHADER_SOURCE_TX
A D3DX texture shader.
Definition vkd3d_shader.h:1554
VKD3D_SHADER_SOURCE_DXBC_TPF
@ VKD3D_SHADER_SOURCE_DXBC_TPF
A 'Tokenized Program Format' shader embedded in a DXBC container.
Definition vkd3d_shader.h:1532
VKD3D_SHADER_SOURCE_NONE
@ VKD3D_SHADER_SOURCE_NONE
The shader has no type or is to be ignored.
Definition vkd3d_shader.h:1527
vkd3d_shader_free_shader_signature
VKD3D_SHADER_API void vkd3d_shader_free_shader_signature(struct vkd3d_shader_signature *signature)
Free a structural representation of a shader input signature allocated by vkd3d_shader_parse_input_si...
vkd3d_shader_parse_dxbc_flags
vkd3d_shader_parse_dxbc_flags
Flags for vkd3d_shader_parse_dxbc().
Definition vkd3d_shader.h:280
VKD3D_SHADER_PARSE_DXBC_IGNORE_CHECKSUM
@ VKD3D_SHADER_PARSE_DXBC_IGNORE_CHECKSUM
Ignore the checksum and continue parsing even if it is incorrect.
Definition vkd3d_shader.h:283
vkd3d_shader_serialize_dxbc
VKD3D_SHADER_API int vkd3d_shader_serialize_dxbc(size_t section_count, const struct vkd3d_shader_dxbc_section_desc *sections, struct vkd3d_shader_code *dxbc, char **messages)
Serialize a DXBC description into a blob stored in a vkd3d_shader_code structure.
vkd3d_shader_log_level
vkd3d_shader_log_level
Describes the minimum severity of compilation messages returned by vkd3d_shader_compile() and similar...
Definition vkd3d_shader.h:1609
VKD3D_SHADER_LOG_NONE
@ VKD3D_SHADER_LOG_NONE
No messages will be returned.
Definition vkd3d_shader.h:1611
VKD3D_SHADER_LOG_ERROR
@ VKD3D_SHADER_LOG_ERROR
Only fatal errors which prevent successful compilation will be returned.
Definition vkd3d_shader.h:1613
VKD3D_SHADER_LOG_WARNING
@ VKD3D_SHADER_LOG_WARNING
Non-fatal warnings and fatal errors will be returned.
Definition vkd3d_shader.h:1615
VKD3D_SHADER_LOG_INFO
@ VKD3D_SHADER_LOG_INFO
All messages, including general informational messages, will be returned.
Definition vkd3d_shader.h:1619
vkd3d_shader_scan
VKD3D_SHADER_API int vkd3d_shader_scan(const struct vkd3d_shader_compile_info *compile_info, char **messages)
Parse shader source code or byte code, returning various types of requested information.
vkd3d_shader_fog_fragment_mode
vkd3d_shader_fog_fragment_mode
The factor used to interpolate the fragment output colour with fog.
Definition vkd3d_shader.h:522
VKD3D_SHADER_FOG_FRAGMENT_EXP2
@ VKD3D_SHADER_FOG_FRAGMENT_EXP2
The fog interpolation factor is 2^-((k * c)²).
Definition vkd3d_shader.h:554
VKD3D_SHADER_FOG_FRAGMENT_NONE
@ VKD3D_SHADER_FOG_FRAGMENT_NONE
No fog interpolation is applied; the output colour is passed through unmodified.
Definition vkd3d_shader.h:528
VKD3D_SHADER_FOG_FRAGMENT_EXP
@ VKD3D_SHADER_FOG_FRAGMENT_EXP
The fog interpolation factor is 2^-(k * c).
Definition vkd3d_shader.h:541
VKD3D_SHADER_FOG_FRAGMENT_LINEAR
@ VKD3D_SHADER_FOG_FRAGMENT_LINEAR
The fog interpolation factor is (E - c) * k.
Definition vkd3d_shader.h:568
vkd3d_shader_structure_type
vkd3d_shader_structure_type
The type of a chained structure.
Definition vkd3d_shader.h:71
VKD3D_SHADER_STRUCTURE_TYPE_TRANSFORM_FEEDBACK_INFO
@ VKD3D_SHADER_STRUCTURE_TYPE_TRANSFORM_FEEDBACK_INFO
The structure is a vkd3d_shader_transform_feedback_info structure.
Definition vkd3d_shader.h:83
VKD3D_SHADER_STRUCTURE_TYPE_SCAN_COMBINED_RESOURCE_SAMPLER_INFO
@ VKD3D_SHADER_STRUCTURE_TYPE_SCAN_COMBINED_RESOURCE_SAMPLER_INFO
The structure is a vkd3d_shader_scan_combined_resource_sampler_info structure.
Definition vkd3d_shader.h:114
VKD3D_SHADER_STRUCTURE_TYPE_COMPILE_INFO
@ VKD3D_SHADER_STRUCTURE_TYPE_COMPILE_INFO
The structure is a vkd3d_shader_compile_info structure.
Definition vkd3d_shader.h:73
VKD3D_SHADER_STRUCTURE_TYPE_D3DBC_SOURCE_INFO
@ VKD3D_SHADER_STRUCTURE_TYPE_D3DBC_SOURCE_INFO
The structure is a vkd3d_shader_d3dbc_source_info structure.
Definition vkd3d_shader.h:134
VKD3D_SHADER_STRUCTURE_TYPE_PARAMETER_INFO
@ VKD3D_SHADER_STRUCTURE_TYPE_PARAMETER_INFO
The structure is a vkd3d_shader_parameter_info structure.
Definition vkd3d_shader.h:119
VKD3D_SHADER_STRUCTURE_TYPE_SCAN_DESCRIPTOR_INFO
@ VKD3D_SHADER_STRUCTURE_TYPE_SCAN_DESCRIPTOR_INFO
The structure is a vkd3d_shader_scan_descriptor_info structure.
Definition vkd3d_shader.h:77
VKD3D_SHADER_STRUCTURE_TYPE_SPIRV_DOMAIN_SHADER_TARGET_INFO
@ VKD3D_SHADER_STRUCTURE_TYPE_SPIRV_DOMAIN_SHADER_TARGET_INFO
The structure is a vkd3d_shader_spirv_domain_shader_target_info structure.
Definition vkd3d_shader.h:79
VKD3D_SHADER_STRUCTURE_TYPE_DESCRIPTOR_OFFSET_INFO
@ VKD3D_SHADER_STRUCTURE_TYPE_DESCRIPTOR_OFFSET_INFO
The structure is a vkd3d_shader_descriptor_offset_info structure.
Definition vkd3d_shader.h:99
VKD3D_SHADER_STRUCTURE_TYPE_SCAN_SIGNATURE_INFO
@ VKD3D_SHADER_STRUCTURE_TYPE_SCAN_SIGNATURE_INFO
The structure is a vkd3d_shader_scan_signature_info structure.
Definition vkd3d_shader.h:104
VKD3D_SHADER_STRUCTURE_TYPE_SCAN_THREAD_GROUP_SIZE_INFO
@ VKD3D_SHADER_STRUCTURE_TYPE_SCAN_THREAD_GROUP_SIZE_INFO
The structure is a vkd3d_shader_scan_thread_group_size_info structure.
Definition vkd3d_shader.h:129
VKD3D_SHADER_STRUCTURE_TYPE_PREPROCESS_INFO
@ VKD3D_SHADER_STRUCTURE_TYPE_PREPROCESS_INFO
The structure is a vkd3d_shader_preprocess_info structure.
Definition vkd3d_shader.h:94
VKD3D_SHADER_STRUCTURE_TYPE_INTERFACE_INFO
@ VKD3D_SHADER_STRUCTURE_TYPE_INTERFACE_INFO
The structure is a vkd3d_shader_interface_info structure.
Definition vkd3d_shader.h:75
VKD3D_SHADER_STRUCTURE_TYPE_SCAN_HULL_SHADER_TESSELLATION_INFO
@ VKD3D_SHADER_STRUCTURE_TYPE_SCAN_HULL_SHADER_TESSELLATION_INFO
The structure is a vkd3d_shader_scan_hull_shader_tessellation_info structure.
Definition vkd3d_shader.h:124
VKD3D_SHADER_STRUCTURE_TYPE_VARYING_MAP_INFO
@ VKD3D_SHADER_STRUCTURE_TYPE_VARYING_MAP_INFO
The structure is a vkd3d_shader_varying_map_info structure.
Definition vkd3d_shader.h:109
VKD3D_SHADER_STRUCTURE_TYPE_SPIRV_TARGET_INFO
@ VKD3D_SHADER_STRUCTURE_TYPE_SPIRV_TARGET_INFO
The structure is a vkd3d_shader_spirv_target_info structure.
Definition vkd3d_shader.h:81
VKD3D_SHADER_STRUCTURE_TYPE_HLSL_SOURCE_INFO
@ VKD3D_SHADER_STRUCTURE_TYPE_HLSL_SOURCE_INFO
The structure is a vkd3d_shader_hlsl_source_info structure.
Definition vkd3d_shader.h:89
vkd3d_shader_visibility
vkd3d_shader_visibility
Describes which shader stages a resource is visible to.
Definition vkd3d_shader.h:407
VKD3D_SHADER_VISIBILITY_DOMAIN
@ VKD3D_SHADER_VISIBILITY_DOMAIN
The resource is visible only to the domain shader.
Definition vkd3d_shader.h:415
VKD3D_SHADER_VISIBILITY_COMPUTE
@ VKD3D_SHADER_VISIBILITY_COMPUTE
The resource is visible only to the compute shader.
Definition vkd3d_shader.h:422
VKD3D_SHADER_VISIBILITY_PIXEL
@ VKD3D_SHADER_VISIBILITY_PIXEL
The resource is visible only to the pixel shader.
Definition vkd3d_shader.h:419
VKD3D_SHADER_VISIBILITY_ALL
@ VKD3D_SHADER_VISIBILITY_ALL
The resource is visible to all shader stages.
Definition vkd3d_shader.h:409
VKD3D_SHADER_VISIBILITY_GEOMETRY
@ VKD3D_SHADER_VISIBILITY_GEOMETRY
The resource is visible only to the geometry shader.
Definition vkd3d_shader.h:417
VKD3D_SHADER_VISIBILITY_VERTEX
@ VKD3D_SHADER_VISIBILITY_VERTEX
The resource is visible only to the vertex shader.
Definition vkd3d_shader.h:411
VKD3D_SHADER_VISIBILITY_HULL
@ VKD3D_SHADER_VISIBILITY_HULL
The resource is visible only to the hull shader.
Definition vkd3d_shader.h:413
vkd3d_shader_free_scan_combined_resource_sampler_info
VKD3D_SHADER_API void vkd3d_shader_free_scan_combined_resource_sampler_info(struct vkd3d_shader_scan_combined_resource_sampler_info *info)
Free members of struct vkd3d_shader_scan_combined_resource_sampler_info allocated by vkd3d_shader_sca...
vkd3d_shader_spirv_extension
vkd3d_shader_spirv_extension
Definition vkd3d_shader.h:1681
VKD3D_SHADER_SPIRV_EXTENSION_EXT_FRAGMENT_SHADER_INTERLOCK
@ VKD3D_SHADER_SPIRV_EXTENSION_EXT_FRAGMENT_SHADER_INTERLOCK
Definition vkd3d_shader.h:1691
VKD3D_SHADER_SPIRV_EXTENSION_EXT_STENCIL_EXPORT
@ VKD3D_SHADER_SPIRV_EXTENSION_EXT_STENCIL_EXPORT
Definition vkd3d_shader.h:1687
VKD3D_SHADER_SPIRV_EXTENSION_EXT_VIEWPORT_INDEX_LAYER
@ VKD3D_SHADER_SPIRV_EXTENSION_EXT_VIEWPORT_INDEX_LAYER
Definition vkd3d_shader.h:1689
VKD3D_SHADER_SPIRV_EXTENSION_EXT_DESCRIPTOR_INDEXING
@ VKD3D_SHADER_SPIRV_EXTENSION_EXT_DESCRIPTOR_INDEXING
Definition vkd3d_shader.h:1685
vkd3d_shader_api_version
vkd3d_shader_api_version
Definition vkd3d_shader.h:44
vkd3d_shader_component_type
vkd3d_shader_component_type
Data type of a shader varying, returned as part of struct vkd3d_shader_signature_element.
Definition vkd3d_shader.h:2478
VKD3D_SHADER_COMPONENT_INT
@ VKD3D_SHADER_COMPONENT_INT
32-bit signed integer.
Definition vkd3d_shader.h:2484
VKD3D_SHADER_COMPONENT_UINT
@ VKD3D_SHADER_COMPONENT_UINT
32-bit unsigned integer.
Definition vkd3d_shader.h:2482
VKD3D_SHADER_COMPONENT_FLOAT16
@ VKD3D_SHADER_COMPONENT_FLOAT16
16-bit IEEE floating-point.
Definition vkd3d_shader.h:2496
VKD3D_SHADER_COMPONENT_UINT16
@ VKD3D_SHADER_COMPONENT_UINT16
16-bit unsigned integer.
Definition vkd3d_shader.h:2498
VKD3D_SHADER_COMPONENT_INT16
@ VKD3D_SHADER_COMPONENT_INT16
16-bit signed integer.
Definition vkd3d_shader.h:2500
VKD3D_SHADER_COMPONENT_DOUBLE
@ VKD3D_SHADER_COMPONENT_DOUBLE
64-bit IEEE floating-point.
Definition vkd3d_shader.h:2490
VKD3D_SHADER_COMPONENT_UINT64
@ VKD3D_SHADER_COMPONENT_UINT64
64-bit unsigned integer.
Definition vkd3d_shader.h:2492
VKD3D_SHADER_COMPONENT_FLOAT
@ VKD3D_SHADER_COMPONENT_FLOAT
32-bit IEEE floating-point.
Definition vkd3d_shader.h:2486
VKD3D_SHADER_COMPONENT_VOID
@ VKD3D_SHADER_COMPONENT_VOID
The varying has no type.
Definition vkd3d_shader.h:2480
VKD3D_SHADER_COMPONENT_INT64
@ VKD3D_SHADER_COMPONENT_INT64
64-bit signed integer.
Definition vkd3d_shader.h:2494
VKD3D_SHADER_COMPONENT_BOOL
@ VKD3D_SHADER_COMPONENT_BOOL
Boolean.
Definition vkd3d_shader.h:2488
vkd3d_shader_descriptor_type
vkd3d_shader_descriptor_type
The type of a shader resource descriptor.
Definition vkd3d_shader.h:451
VKD3D_SHADER_DESCRIPTOR_TYPE_UAV
@ VKD3D_SHADER_DESCRIPTOR_TYPE_UAV
The descriptor is an unordered access view.
Definition vkd3d_shader.h:461
VKD3D_SHADER_DESCRIPTOR_TYPE_CBV
@ VKD3D_SHADER_DESCRIPTOR_TYPE_CBV
The descriptor is a constant buffer view.
Definition vkd3d_shader.h:466
VKD3D_SHADER_DESCRIPTOR_TYPE_SAMPLER
@ VKD3D_SHADER_DESCRIPTOR_TYPE_SAMPLER
The descriptor is a sampler.
Definition vkd3d_shader.h:471
VKD3D_SHADER_DESCRIPTOR_TYPE_SRV
@ VKD3D_SHADER_DESCRIPTOR_TYPE_SRV
The descriptor is a shader resource view.
Definition vkd3d_shader.h:456
VKD3D_SHADER_SWIZZLE_MASK
#define VKD3D_SHADER_SWIZZLE_MASK
A mask selecting one component from a vkd3d-shader swizzle.
Definition vkd3d_shader.h:2683
vkd3d_shader_resource_type
vkd3d_shader_resource_type
The type of a shader resource, returned as part of struct vkd3d_shader_descriptor_info.
Definition vkd3d_shader.h:2165
VKD3D_SHADER_RESOURCE_NONE
@ VKD3D_SHADER_RESOURCE_NONE
The type is invalid or not applicable for this descriptor.
Definition vkd3d_shader.h:2170
VKD3D_SHADER_RESOURCE_TEXTURE_2DARRAY
@ VKD3D_SHADER_RESOURCE_TEXTURE_2DARRAY
2-dimensional array texture.
Definition vkd3d_shader.h:2186
VKD3D_SHADER_RESOURCE_TEXTURE_2DMS
@ VKD3D_SHADER_RESOURCE_TEXTURE_2DMS
Multisampled 2-dimensional texture.
Definition vkd3d_shader.h:2178
VKD3D_SHADER_RESOURCE_TEXTURE_3D
@ VKD3D_SHADER_RESOURCE_TEXTURE_3D
3-dimensional texture.
Definition vkd3d_shader.h:2180
VKD3D_SHADER_RESOURCE_TEXTURE_1DARRAY
@ VKD3D_SHADER_RESOURCE_TEXTURE_1DARRAY
1-dimensional array texture.
Definition vkd3d_shader.h:2184
VKD3D_SHADER_RESOURCE_BUFFER
@ VKD3D_SHADER_RESOURCE_BUFFER
Dimensionless buffer.
Definition vkd3d_shader.h:2172
VKD3D_SHADER_RESOURCE_TEXTURE_CUBE
@ VKD3D_SHADER_RESOURCE_TEXTURE_CUBE
Cubemap texture.
Definition vkd3d_shader.h:2182
VKD3D_SHADER_RESOURCE_TEXTURE_1D
@ VKD3D_SHADER_RESOURCE_TEXTURE_1D
1-dimensional texture.
Definition vkd3d_shader.h:2174
VKD3D_SHADER_RESOURCE_TEXTURE_CUBEARRAY
@ VKD3D_SHADER_RESOURCE_TEXTURE_CUBEARRAY
Cubemap array texture.
Definition vkd3d_shader.h:2190
VKD3D_SHADER_RESOURCE_TEXTURE_2DMSARRAY
@ VKD3D_SHADER_RESOURCE_TEXTURE_2DMSARRAY
Multisampled 2-dimensional array texture.
Definition vkd3d_shader.h:2188
VKD3D_SHADER_RESOURCE_TEXTURE_2D
@ VKD3D_SHADER_RESOURCE_TEXTURE_2D
2-dimensional texture.
Definition vkd3d_shader.h:2176
vkd3d_shader_free_dxbc
VKD3D_SHADER_API void vkd3d_shader_free_dxbc(struct vkd3d_shader_dxbc_desc *dxbc)
Free the contents of a vkd3d_shader_dxbc_desc structure allocated by another vkd3d-shader function,...
vkd3d_shader_get_supported_source_types
VKD3D_SHADER_API enum vkd3d_shader_source_type * vkd3d_shader_get_supported_source_types(unsigned int *count)
Returns the source types supported, with any target type, by vkd3d_shader_compile().
vkd3d_shader_set_log_callback
VKD3D_SHADER_API void vkd3d_shader_set_log_callback(PFN_vkd3d_log callback)
Set a callback to be called when vkd3d-shader outputs debug logging.
PFN_vkd3d_shader_parse_root_signature
int(* PFN_vkd3d_shader_parse_root_signature)(const struct vkd3d_shader_code *dxbc, struct vkd3d_shader_versioned_root_signature_desc *root_signature, char **messages)
Type of vkd3d_shader_parse_root_signature().
Definition vkd3d_shader.h:3493
vkd3d_shader_free_scan_signature_info
VKD3D_SHADER_API void vkd3d_shader_free_scan_signature_info(struct vkd3d_shader_scan_signature_info *info)
Free members of struct vkd3d_shader_scan_signature_info allocated by vkd3d_shader_scan().
PFN_vkd3d_shader_serialize_root_signature
int(* PFN_vkd3d_shader_serialize_root_signature)(const struct vkd3d_shader_versioned_root_signature_desc *root_signature, struct vkd3d_shader_code *dxbc, char **messages)
Type of vkd3d_shader_serialize_root_signature().
Definition vkd3d_shader.h:3499
vkd3d_shader_compile_option_typed_uav
vkd3d_shader_compile_option_typed_uav
Determines how typed UAVs are declared.
Definition vkd3d_shader.h:160
VKD3D_SHADER_COMPILE_OPTION_TYPED_UAV_READ_FORMAT_UNKNOWN
@ VKD3D_SHADER_COMPILE_OPTION_TYPED_UAV_READ_FORMAT_UNKNOWN
Use Unknown format for UAVs which are read from.
Definition vkd3d_shader.h:167
VKD3D_SHADER_COMPILE_OPTION_TYPED_UAV_READ_FORMAT_R32
@ VKD3D_SHADER_COMPILE_OPTION_TYPED_UAV_READ_FORMAT_R32
Use R32(u)i/R32f format for UAVs which are read from.
Definition vkd3d_shader.h:162
PFN_vkd3d_shader_parse_dxbc
int(* PFN_vkd3d_shader_parse_dxbc)(const struct vkd3d_shader_code *dxbc, uint32_t flags, struct vkd3d_shader_dxbc_desc *desc, char **messages)
Type of vkd3d_shader_parse_dxbc().
Definition vkd3d_shader.h:3533
vkd3d_shader_parse_dxbc
VKD3D_SHADER_API int vkd3d_shader_parse_dxbc(const struct vkd3d_shader_code *dxbc, uint32_t flags, struct vkd3d_shader_dxbc_desc *desc, char **messages)
Parse a DXBC blob contained in a vkd3d_shader_code structure.
vkd3d_shader_swizzle_component
vkd3d_shader_swizzle_component
Possible values for a single component of a vkd3d-shader swizzle.
Definition vkd3d_shader.h:2630
vkd3d_shader_compile
VKD3D_SHADER_API int vkd3d_shader_compile(const struct vkd3d_shader_compile_info *compile_info, struct vkd3d_shader_code *out, char **messages)
Transform a form of GPU shader source code or byte code into another form of source code or byte code...
vkd3d_shader_convert_root_signature
VKD3D_SHADER_API int vkd3d_shader_convert_root_signature(struct vkd3d_shader_versioned_root_signature_desc *dst, enum vkd3d_shader_root_signature_version version, const struct vkd3d_shader_versioned_root_signature_desc *src)
Convert a structural representation of a root signature to a different version of structural represen...
PFN_vkd3d_shader_compile
int(* PFN_vkd3d_shader_compile)(const struct vkd3d_shader_compile_info *compile_info, struct vkd3d_shader_code *out, char **messages)
Type of vkd3d_shader_compile().
Definition vkd3d_shader.h:3485
PFN_vkd3d_shader_free_scan_descriptor_info
void(* PFN_vkd3d_shader_free_scan_descriptor_info)(struct vkd3d_shader_scan_descriptor_info *scan_descriptor_info)
Type of vkd3d_shader_free_scan_descriptor_info().
Definition vkd3d_shader.h:3510
vkd3d_shader_descriptor_range_flags
vkd3d_shader_descriptor_range_flags
Definition vkd3d_shader.h:2086
VKD3D_SHADER_DESCRIPTOR_RANGE_FLAG_DESCRIPTORS_STATIC_KEEPING_BUFFER_BOUNDS_CHECKS
@ VKD3D_SHADER_DESCRIPTOR_RANGE_FLAG_DESCRIPTORS_STATIC_KEEPING_BUFFER_BOUNDS_CHECKS
Definition vkd3d_shader.h:2093
vkd3d_shader_preprocess
VKD3D_SHADER_API int vkd3d_shader_preprocess(const struct vkd3d_shader_compile_info *compile_info, struct vkd3d_shader_code *out, char **messages)
Preprocess the given source code.
VKD3D_SHADER_SWIZZLE_SHIFT
#define VKD3D_SHADER_SWIZZLE_SHIFT(idx)
The offset, in bits, of the nth parameter of a vkd3d-shader swizzle.
Definition vkd3d_shader.h:2685
PFN_vkd3d_shader_free_messages
void(* PFN_vkd3d_shader_free_messages)(char *messages)
Type of vkd3d_shader_free_messages().
Definition vkd3d_shader.h:3488
vkd3d_shader_get_supported_target_types
VKD3D_SHADER_API enum vkd3d_shader_target_type * vkd3d_shader_get_supported_target_types(enum vkd3d_shader_source_type source_type, unsigned int *count)
Returns the target types supported, with the given source type, by vkd3d_shader_compile().
vkd3d_shader_minimum_precision
vkd3d_shader_minimum_precision
Minimum interpolation precision of a shader varying, returned as part of struct vkd3d_shader_signatur...
Definition vkd3d_shader.h:2563
VKD3D_SHADER_MINIMUM_PRECISION_UINT_16
@ VKD3D_SHADER_MINIMUM_PRECISION_UINT_16
16-bit unsigned integer.
Definition vkd3d_shader.h:2572
VKD3D_SHADER_MINIMUM_PRECISION_FIXED_8_2
@ VKD3D_SHADER_MINIMUM_PRECISION_FIXED_8_2
10-bit fixed point (2 integer and 8 fractional bits).
Definition vkd3d_shader.h:2568
VKD3D_SHADER_MINIMUM_PRECISION_FLOAT_16
@ VKD3D_SHADER_MINIMUM_PRECISION_FLOAT_16
16-bit floating-point.
Definition vkd3d_shader.h:2566
VKD3D_SHADER_MINIMUM_PRECISION_INT_16
@ VKD3D_SHADER_MINIMUM_PRECISION_INT_16
16-bit signed integer.
Definition vkd3d_shader.h:2570
PFN_vkd3d_shader_free_scan_signature_info
void(* PFN_vkd3d_shader_free_scan_signature_info)(struct vkd3d_shader_scan_signature_info *info)
Type of vkd3d_shader_free_scan_signature_info().
Definition vkd3d_shader.h:3544
PFN_vkd3d_shader_parse_input_signature
int(* PFN_vkd3d_shader_parse_input_signature)(const struct vkd3d_shader_code *dxbc, struct vkd3d_shader_signature *signature, char **messages)
Type of vkd3d_shader_parse_input_signature().
Definition vkd3d_shader.h:3514
vkd3d_shader_free_scan_descriptor_info
VKD3D_SHADER_API void vkd3d_shader_free_scan_descriptor_info(struct vkd3d_shader_scan_descriptor_info *scan_descriptor_info)
Free members of struct vkd3d_shader_scan_descriptor_info() allocated by vkd3d_shader_scan().
PFN_vkd3d_shader_preprocess
void(* PFN_vkd3d_shader_preprocess)(struct vkd3d_shader_compile_info *compile_info, struct vkd3d_shader_code *out, char **messages)
Type of vkd3d_shader_preprocess().
Definition vkd3d_shader.h:3524
vkd3d_shader_target_type
vkd3d_shader_target_type
The output format of a compiled shader.
Definition vkd3d_shader.h:1561
VKD3D_SHADER_TARGET_SPIRV_BINARY
@ VKD3D_SHADER_TARGET_SPIRV_BINARY
A SPIR-V shader in binary form.
Definition vkd3d_shader.h:1571
VKD3D_SHADER_TARGET_D3D_ASM
@ VKD3D_SHADER_TARGET_D3D_ASM
Direct3D shader assembly.
Definition vkd3d_shader.h:1576
VKD3D_SHADER_TARGET_NONE
@ VKD3D_SHADER_TARGET_NONE
The shader has no type or is to be ignored.
Definition vkd3d_shader.h:1566
VKD3D_SHADER_TARGET_DXBC_TPF
@ VKD3D_SHADER_TARGET_DXBC_TPF
A 'Tokenized Program Format' shader embedded in a DXBC container.
Definition vkd3d_shader.h:1586
VKD3D_SHADER_TARGET_GLSL
@ VKD3D_SHADER_TARGET_GLSL
An 'OpenGL Shading Language' shader.
Definition vkd3d_shader.h:1590
VKD3D_SHADER_TARGET_MSL
@ VKD3D_SHADER_TARGET_MSL
A 'Metal Shading Language' shader.
Definition vkd3d_shader.h:1599
VKD3D_SHADER_TARGET_D3D_BYTECODE
@ VKD3D_SHADER_TARGET_D3D_BYTECODE
Legacy Direct3D byte-code.
Definition vkd3d_shader.h:1581
VKD3D_SHADER_TARGET_FX
@ VKD3D_SHADER_TARGET_FX
Binary format used by Direct3D 9/10.x/11 effects profiles.
Definition vkd3d_shader.h:1595
PFN_vkd3d_shader_free_shader_code
void(* PFN_vkd3d_shader_free_shader_code)(struct vkd3d_shader_code *code)
Type of vkd3d_shader_free_shader_code().
Definition vkd3d_shader.h:3490
vkd3d_shader_compile_option_pack_matrix_order
vkd3d_shader_compile_option_pack_matrix_order
Determines how matrices are stored.
Definition vkd3d_shader.h:192
vkd3d_shader_spirv_environment
vkd3d_shader_spirv_environment
Definition vkd3d_shader.h:1670
VKD3D_SHADER_SPIRV_ENVIRONMENT_VULKAN_1_1
@ VKD3D_SHADER_SPIRV_ENVIRONMENT_VULKAN_1_1
Definition vkd3d_shader.h:1675
vkd3d_shader_compile_option_feature_flags
vkd3d_shader_compile_option_feature_flags
Advertises feature availability.
Definition vkd3d_shader.h:248
VKD3D_SHADER_COMPILE_OPTION_FEATURE_WAVE_OPS
@ VKD3D_SHADER_COMPILE_OPTION_FEATURE_WAVE_OPS
The SPIR-V target environment supports wave operations.
Definition vkd3d_shader.h:265
VKD3D_SHADER_COMPILE_OPTION_FEATURE_INT64
@ VKD3D_SHADER_COMPILE_OPTION_FEATURE_INT64
The SPIR-V target environment supports 64-bit integer types.
Definition vkd3d_shader.h:252
VKD3D_SHADER_COMPILE_OPTION_FEATURE_FLOAT64
@ VKD3D_SHADER_COMPILE_OPTION_FEATURE_FLOAT64
The SPIR-V target environment supports 64-bit floating-point types.
Definition vkd3d_shader.h:256
VKD3D_SHADER_COMPILE_OPTION_FEATURE_ZERO_INITIALIZE_WORKGROUP_MEMORY
@ VKD3D_SHADER_COMPILE_OPTION_FEATURE_ZERO_INITIALIZE_WORKGROUP_MEMORY
The SPIR-V target environment supports zero-initializing workgroup memory.
Definition vkd3d_shader.h:269
PFN_vkd3d_shader_set_log_callback
void(* PFN_vkd3d_shader_set_log_callback)(PFN_vkd3d_log callback)
Type of vkd3d_shader_set_log_callback().
Definition vkd3d_shader.h:3528
vkd3d_shader_parameter_name
vkd3d_shader_parameter_name
Names a specific shader parameter, used in struct vkd3d_shader_parameter and struct vkd3d_shader_para...
Definition vkd3d_shader.h:664
VKD3D_SHADER_PARAMETER_NAME_POINT_SPRITE
@ VKD3D_SHADER_PARAMETER_NAME_POINT_SPRITE
Whether texture coordinate inputs should take their values from the point coordinate.
Definition vkd3d_shader.h:874
VKD3D_SHADER_PARAMETER_NAME_FOG_SOURCE
@ VKD3D_SHADER_PARAMETER_NAME_FOG_SOURCE
Fog source.
Definition vkd3d_shader.h:965
VKD3D_SHADER_PARAMETER_NAME_RASTERIZER_SAMPLE_COUNT
@ VKD3D_SHADER_PARAMETER_NAME_RASTERIZER_SAMPLE_COUNT
The sample count of the framebuffer, as returned by the HLSL function GetRenderTargetSampleCount() or...
Definition vkd3d_shader.h:678
VKD3D_SHADER_PARAMETER_NAME_ALPHA_TEST_FUNC
@ VKD3D_SHADER_PARAMETER_NAME_ALPHA_TEST_FUNC
Alpha test comparison function.
Definition vkd3d_shader.h:703
VKD3D_SHADER_PARAMETER_NAME_FOG_SCALE
@ VKD3D_SHADER_PARAMETER_NAME_FOG_SCALE
Scale value for fog.
Definition vkd3d_shader.h:941
VKD3D_SHADER_PARAMETER_NAME_BUMP_MATRIX_0
@ VKD3D_SHADER_PARAMETER_NAME_BUMP_MATRIX_0
Bump-mapping matrix.
Definition vkd3d_shader.h:989
VKD3D_SHADER_PARAMETER_NAME_ALPHA_TEST_REF
@ VKD3D_SHADER_PARAMETER_NAME_ALPHA_TEST_REF
Alpha test reference value.
Definition vkd3d_shader.h:713
VKD3D_SHADER_PARAMETER_NAME_FOG_END
@ VKD3D_SHADER_PARAMETER_NAME_FOG_END
End coordinate for linear fog.
Definition vkd3d_shader.h:928
VKD3D_SHADER_PARAMETER_NAME_POINT_SIZE_MAX
@ VKD3D_SHADER_PARAMETER_NAME_POINT_SIZE_MAX
Maximum point size.
Definition vkd3d_shader.h:841
VKD3D_SHADER_PARAMETER_NAME_FOG_FRAGMENT_MODE
@ VKD3D_SHADER_PARAMETER_NAME_FOG_FRAGMENT_MODE
Fog mode used in fragment shaders.
Definition vkd3d_shader.h:902
VKD3D_SHADER_PARAMETER_NAME_POINT_SIZE_MIN
@ VKD3D_SHADER_PARAMETER_NAME_POINT_SIZE_MIN
Minimum point size.
Definition vkd3d_shader.h:831
VKD3D_SHADER_PARAMETER_NAME_POINT_SIZE
@ VKD3D_SHADER_PARAMETER_NAME_POINT_SIZE
Point size.
Definition vkd3d_shader.h:808
VKD3D_SHADER_PARAMETER_NAME_CLIP_PLANE_0
@ VKD3D_SHADER_PARAMETER_NAME_CLIP_PLANE_0
Clip plane values.
Definition vkd3d_shader.h:782
VKD3D_SHADER_PARAMETER_NAME_FLAT_INTERPOLATION
@ VKD3D_SHADER_PARAMETER_NAME_FLAT_INTERPOLATION
Whether to use flat interpolation for fragment shader colour inputs.
Definition vkd3d_shader.h:737
VKD3D_SHADER_PARAMETER_NAME_CLIP_PLANE_MASK
@ VKD3D_SHADER_PARAMETER_NAME_CLIP_PLANE_MASK
A mask of enabled clip planes.
Definition vkd3d_shader.h:765
VKD3D_SHADER_PARAMETER_NAME_BUMP_LUMINANCE_OFFSET_0
@ VKD3D_SHADER_PARAMETER_NAME_BUMP_LUMINANCE_OFFSET_0
Bump-mapping luminance offset.
Definition vkd3d_shader.h:1037
VKD3D_SHADER_PARAMETER_NAME_FOG_COLOUR
@ VKD3D_SHADER_PARAMETER_NAME_FOG_COLOUR
Fog colour.
Definition vkd3d_shader.h:915
VKD3D_SHADER_PARAMETER_NAME_BUMP_LUMINANCE_SCALE_0
@ VKD3D_SHADER_PARAMETER_NAME_BUMP_LUMINANCE_SCALE_0
Bump-mapping luminance scale factor.
Definition vkd3d_shader.h:1013
VKD3D_SHADER_PARAMETER_NAME_PROJECTED_TEXTURE_MASK
@ VKD3D_SHADER_PARAMETER_NAME_PROJECTED_TEXTURE_MASK
A mask of projected textures.
Definition vkd3d_shader.h:1061
vkd3d_shader_free_messages
VKD3D_SHADER_API void vkd3d_shader_free_messages(char *messages)
Free shader messages allocated by another vkd3d-shader function, such as vkd3d_shader_compile().
PFN_vkd3d_shader_free_scan_combined_resource_sampler_info
void(* PFN_vkd3d_shader_free_scan_combined_resource_sampler_info)(struct vkd3d_shader_scan_combined_resource_sampler_info *info)
Type of vkd3d_shader_free_scan_combined_resource_sampler_info().
Definition vkd3d_shader.h:3547
vkd3d_shader_free_root_signature
VKD3D_SHADER_API void vkd3d_shader_free_root_signature(struct vkd3d_shader_versioned_root_signature_desc *root_signature)
Free a structural representation of a shader root signature allocated by vkd3d_shader_convert_root_si...
vkd3d_shader_compile_option_buffer_uav
vkd3d_shader_compile_option_buffer_uav
Determines how buffer UAVs are stored.
Definition vkd3d_shader.h:146
VKD3D_SHADER_COMPILE_OPTION_BUFFER_UAV_STORAGE_TEXEL_BUFFER
@ VKD3D_SHADER_COMPILE_OPTION_BUFFER_UAV_STORAGE_TEXEL_BUFFER
Use buffer textures for buffer UAVs.
Definition vkd3d_shader.h:148
VKD3D_SHADER_COMPILE_OPTION_BUFFER_UAV_STORAGE_BUFFER
@ VKD3D_SHADER_COMPILE_OPTION_BUFFER_UAV_STORAGE_BUFFER
Use storage buffers for buffer UAVs.
Definition vkd3d_shader.h:150
vkd3d_types.h
This file contains definitions for basic types used by vkd3d libraries.