Loading...
Searching...
No Matches
vkd3d_shader.h
Go to the documentation of this file.
/*
* Copyright 2017-2019 Józef Kucia for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __VKD3D_SHADER_H
#define __VKD3D_SHADER_H
#include <stdbool.h>
#include <stdint.h>
#include <stddef.h>
#include <vkd3d_types.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
enum vkd3d_shader_api_version
{
VKD3D_SHADER_API_VERSION_1_0,
VKD3D_SHADER_API_VERSION_1_1,
VKD3D_SHADER_API_VERSION_1_2,
VKD3D_SHADER_API_VERSION_1_3,
VKD3D_SHADER_API_VERSION_1_4,
VKD3D_SHADER_API_VERSION_1_5,
VKD3D_SHADER_API_VERSION_1_6,
VKD3D_SHADER_API_VERSION_1_7,
VKD3D_SHADER_API_VERSION_1_8,
VKD3D_SHADER_API_VERSION_1_9,
VKD3D_SHADER_API_VERSION_1_10,
VKD3D_SHADER_API_VERSION_1_11,
VKD3D_SHADER_API_VERSION_1_12,
VKD3D_SHADER_API_VERSION_1_13,
VKD3D_SHADER_API_VERSION_1_14,
VKD3D_SHADER_API_VERSION_1_15,
VKD3D_SHADER_API_VERSION_1_16,
VKD3D_SHADER_API_VERSION_1_17,
VKD3D_SHADER_API_VERSION_1_18,
VKD3D_SHADER_API_VERSION_1_19,
VKD3D_SHADER_API_VERSION_2_0,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_API_VERSION),
};
enum vkd3d_shader_structure_type
{
VKD3D_SHADER_STRUCTURE_TYPE_COMPILE_INFO,
VKD3D_SHADER_STRUCTURE_TYPE_INTERFACE_INFO,
VKD3D_SHADER_STRUCTURE_TYPE_SCAN_DESCRIPTOR_INFO,
VKD3D_SHADER_STRUCTURE_TYPE_SPIRV_DOMAIN_SHADER_TARGET_INFO,
VKD3D_SHADER_STRUCTURE_TYPE_SPIRV_TARGET_INFO,
VKD3D_SHADER_STRUCTURE_TYPE_TRANSFORM_FEEDBACK_INFO,
VKD3D_SHADER_STRUCTURE_TYPE_HLSL_SOURCE_INFO,
VKD3D_SHADER_STRUCTURE_TYPE_PREPROCESS_INFO,
VKD3D_SHADER_STRUCTURE_TYPE_DESCRIPTOR_OFFSET_INFO,
VKD3D_SHADER_STRUCTURE_TYPE_SCAN_SIGNATURE_INFO,
VKD3D_SHADER_STRUCTURE_TYPE_VARYING_MAP_INFO,
VKD3D_SHADER_STRUCTURE_TYPE_SCAN_COMBINED_RESOURCE_SAMPLER_INFO,
VKD3D_SHADER_STRUCTURE_TYPE_PARAMETER_INFO,
VKD3D_SHADER_STRUCTURE_TYPE_SCAN_HULL_SHADER_TESSELLATION_INFO,
VKD3D_SHADER_STRUCTURE_TYPE_SCAN_THREAD_GROUP_SIZE_INFO,
VKD3D_SHADER_STRUCTURE_TYPE_D3DBC_SOURCE_INFO,
VKD3D_SHADER_STRUCTURE_TYPE_SCAN_DENORMAL_MODE_INFO,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_STRUCTURE_TYPE),
};
enum vkd3d_shader_compile_option_buffer_uav
{
VKD3D_SHADER_COMPILE_OPTION_BUFFER_UAV_STORAGE_TEXEL_BUFFER = 0x00000000,
VKD3D_SHADER_COMPILE_OPTION_BUFFER_UAV_STORAGE_BUFFER = 0x00000001,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_COMPILE_OPTION_BUFFER_UAV),
};
enum vkd3d_shader_compile_option_typed_uav
{
VKD3D_SHADER_COMPILE_OPTION_TYPED_UAV_READ_FORMAT_R32 = 0x00000000,
VKD3D_SHADER_COMPILE_OPTION_TYPED_UAV_READ_FORMAT_UNKNOWN = 0x00000001,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_COMPILE_OPTION_TYPED_UAV),
};
enum vkd3d_shader_compile_option_formatting_flags
{
VKD3D_SHADER_COMPILE_OPTION_FORMATTING_NONE = 0x00000000,
VKD3D_SHADER_COMPILE_OPTION_FORMATTING_COLOUR = 0x00000001,
VKD3D_SHADER_COMPILE_OPTION_FORMATTING_INDENT = 0x00000002,
VKD3D_SHADER_COMPILE_OPTION_FORMATTING_OFFSETS = 0x00000004,
VKD3D_SHADER_COMPILE_OPTION_FORMATTING_HEADER = 0x00000008,
VKD3D_SHADER_COMPILE_OPTION_FORMATTING_RAW_IDS = 0x00000010,
VKD3D_SHADER_COMPILE_OPTION_FORMATTING_IO_SIGNATURES = 0x00000020,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_COMPILE_OPTION_FORMATTING_FLAGS),
};
enum vkd3d_shader_compile_option_pack_matrix_order
{
VKD3D_SHADER_COMPILE_OPTION_PACK_MATRIX_ROW_MAJOR = 0x00000001,
VKD3D_SHADER_COMPILE_OPTION_PACK_MATRIX_COLUMN_MAJOR = 0x00000002,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_COMPILE_OPTION_PACK_MATRIX_ORDER),
};
enum vkd3d_shader_compile_option_backward_compatibility
{
VKD3D_SHADER_COMPILE_OPTION_BACKCOMPAT_MAP_SEMANTIC_NAMES = 0x00000001,
VKD3D_SHADER_COMPILE_OPTION_DOUBLE_AS_FLOAT_ALIAS = 0x00000002,
VKD3D_SHADER_COMPILE_OPTION_CONST_GLOBAL_UNIFORMS = 0x00000004,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_COMPILE_OPTION_BACKWARD_COMPATIBILITY),
};
enum vkd3d_shader_compile_option_fragment_coordinate_origin
{
VKD3D_SHADER_COMPILE_OPTION_FRAGMENT_COORDINATE_ORIGIN_UPPER_LEFT = 0x00000000,
VKD3D_SHADER_COMPILE_OPTION_FRAGMENT_COORDINATE_ORIGIN_LOWER_LEFT = 0x00000001,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_COMPILE_OPTION_FRAGMENT_COORDINATE_ORIGIN),
};
enum vkd3d_shader_compile_option_feature_flags
{
VKD3D_SHADER_COMPILE_OPTION_FEATURE_INT64 = 0x00000001,
VKD3D_SHADER_COMPILE_OPTION_FEATURE_FLOAT64 = 0x00000002,
VKD3D_SHADER_COMPILE_OPTION_FEATURE_WAVE_OPS = 0x00000004,
VKD3D_SHADER_COMPILE_OPTION_FEATURE_ZERO_INITIALIZE_WORKGROUP_MEMORY = 0x00000008,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_COMPILE_OPTION_FEATURE_FLAGS),
};
enum vkd3d_shader_parse_dxbc_flags
{
VKD3D_SHADER_PARSE_DXBC_IGNORE_CHECKSUM = 0x00000001,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_PARSE_DXBC_FLAGS),
};
enum vkd3d_shader_compile_option_name
{
VKD3D_SHADER_COMPILE_OPTION_STRIP_DEBUG = 0x00000001,
VKD3D_SHADER_COMPILE_OPTION_BUFFER_UAV = 0x00000002,
VKD3D_SHADER_COMPILE_OPTION_FORMATTING = 0x00000003,
VKD3D_SHADER_COMPILE_OPTION_API_VERSION = 0x00000004,
VKD3D_SHADER_COMPILE_OPTION_TYPED_UAV = 0x00000005,
VKD3D_SHADER_COMPILE_OPTION_WRITE_TESS_GEOM_POINT_SIZE = 0x00000006,
VKD3D_SHADER_COMPILE_OPTION_PACK_MATRIX_ORDER = 0x00000007,
VKD3D_SHADER_COMPILE_OPTION_BACKWARD_COMPATIBILITY = 0x00000008,
VKD3D_SHADER_COMPILE_OPTION_FRAGMENT_COORDINATE_ORIGIN = 0x00000009,
VKD3D_SHADER_COMPILE_OPTION_FEATURE = 0x0000000a,
VKD3D_SHADER_COMPILE_OPTION_CHILD_EFFECT = 0x0000000b,
VKD3D_SHADER_COMPILE_OPTION_WARN_IMPLICIT_TRUNCATION = 0x0000000c,
VKD3D_SHADER_COMPILE_OPTION_INCLUDE_EMPTY_BUFFERS_IN_EFFECTS = 0x0000000d,
VKD3D_SHADER_COMPILE_OPTION_DENORMAL_MODE_F16 = 0x0000000e,
VKD3D_SHADER_COMPILE_OPTION_DENORMAL_MODE_F32 = 0x0000000f,
VKD3D_SHADER_COMPILE_OPTION_DENORMAL_MODE_F64 = 0x00000010,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_COMPILE_OPTION_NAME),
};
struct vkd3d_shader_compile_option
{
enum vkd3d_shader_compile_option_name name;
unsigned int value;
};
enum vkd3d_shader_visibility
{
VKD3D_SHADER_VISIBILITY_ALL = 0,
VKD3D_SHADER_VISIBILITY_VERTEX = 1,
VKD3D_SHADER_VISIBILITY_HULL = 2,
VKD3D_SHADER_VISIBILITY_DOMAIN = 3,
VKD3D_SHADER_VISIBILITY_GEOMETRY = 4,
VKD3D_SHADER_VISIBILITY_PIXEL = 5,
VKD3D_SHADER_VISIBILITY_COMPUTE = 1000000000,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_VISIBILITY),
};
struct vkd3d_shader_code
{
const void *code;
size_t size;
};
enum vkd3d_shader_descriptor_type
{
VKD3D_SHADER_DESCRIPTOR_TYPE_SRV = 0x0,
VKD3D_SHADER_DESCRIPTOR_TYPE_UAV = 0x1,
VKD3D_SHADER_DESCRIPTOR_TYPE_CBV = 0x2,
VKD3D_SHADER_DESCRIPTOR_TYPE_SAMPLER = 0x3,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_DESCRIPTOR_TYPE),
};
struct vkd3d_shader_descriptor_binding
{
unsigned int set;
unsigned int binding;
unsigned int count;
};
enum vkd3d_shader_binding_flag
{
VKD3D_SHADER_BINDING_FLAG_BUFFER = 0x00000001,
VKD3D_SHADER_BINDING_FLAG_IMAGE = 0x00000002,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_BINDING_FLAG),
};
enum vkd3d_shader_fog_fragment_mode
{
VKD3D_SHADER_FOG_FRAGMENT_NONE = 0x0,
VKD3D_SHADER_FOG_FRAGMENT_EXP = 0x1,
VKD3D_SHADER_FOG_FRAGMENT_EXP2 = 0x2,
VKD3D_SHADER_FOG_FRAGMENT_LINEAR = 0x3,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_FOG_FRAGMENT_MODE),
};
enum vkd3d_shader_fog_source
{
VKD3D_SHADER_FOG_SOURCE_FOG = 0x0,
VKD3D_SHADER_FOG_SOURCE_FOG_OR_SPECULAR_W = 0x1,
VKD3D_SHADER_FOG_SOURCE_Z = 0x2,
VKD3D_SHADER_FOG_SOURCE_W = 0x3,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_FOG_SOURCE),
};
enum vkd3d_shader_parameter_type
{
VKD3D_SHADER_PARAMETER_TYPE_UNKNOWN,
VKD3D_SHADER_PARAMETER_TYPE_IMMEDIATE_CONSTANT,
VKD3D_SHADER_PARAMETER_TYPE_SPECIALIZATION_CONSTANT,
VKD3D_SHADER_PARAMETER_TYPE_BUFFER,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_PARAMETER_TYPE),
};
enum vkd3d_shader_parameter_data_type
{
VKD3D_SHADER_PARAMETER_DATA_TYPE_UNKNOWN,
VKD3D_SHADER_PARAMETER_DATA_TYPE_UINT32,
VKD3D_SHADER_PARAMETER_DATA_TYPE_FLOAT32,
VKD3D_SHADER_PARAMETER_DATA_TYPE_FLOAT32_VEC4,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_PARAMETER_DATA_TYPE),
};
enum vkd3d_shader_parameter_name
{
VKD3D_SHADER_PARAMETER_NAME_UNKNOWN,
VKD3D_SHADER_PARAMETER_NAME_RASTERIZER_SAMPLE_COUNT,
VKD3D_SHADER_PARAMETER_NAME_ALPHA_TEST_FUNC,
VKD3D_SHADER_PARAMETER_NAME_ALPHA_TEST_REF,
VKD3D_SHADER_PARAMETER_NAME_FLAT_INTERPOLATION,
VKD3D_SHADER_PARAMETER_NAME_CLIP_PLANE_MASK,
VKD3D_SHADER_PARAMETER_NAME_CLIP_PLANE_0,
VKD3D_SHADER_PARAMETER_NAME_CLIP_PLANE_1,
VKD3D_SHADER_PARAMETER_NAME_CLIP_PLANE_2,
VKD3D_SHADER_PARAMETER_NAME_CLIP_PLANE_3,
VKD3D_SHADER_PARAMETER_NAME_CLIP_PLANE_4,
VKD3D_SHADER_PARAMETER_NAME_CLIP_PLANE_5,
VKD3D_SHADER_PARAMETER_NAME_CLIP_PLANE_6,
VKD3D_SHADER_PARAMETER_NAME_CLIP_PLANE_7,
VKD3D_SHADER_PARAMETER_NAME_POINT_SIZE,
VKD3D_SHADER_PARAMETER_NAME_POINT_SIZE_MIN,
VKD3D_SHADER_PARAMETER_NAME_POINT_SIZE_MAX,
VKD3D_SHADER_PARAMETER_NAME_POINT_SPRITE,
VKD3D_SHADER_PARAMETER_NAME_FOG_FRAGMENT_MODE,
VKD3D_SHADER_PARAMETER_NAME_FOG_COLOUR,
VKD3D_SHADER_PARAMETER_NAME_FOG_END,
VKD3D_SHADER_PARAMETER_NAME_FOG_SCALE,
VKD3D_SHADER_PARAMETER_NAME_FOG_SOURCE,
VKD3D_SHADER_PARAMETER_NAME_BUMP_MATRIX_0,
VKD3D_SHADER_PARAMETER_NAME_BUMP_MATRIX_1,
VKD3D_SHADER_PARAMETER_NAME_BUMP_MATRIX_2,
VKD3D_SHADER_PARAMETER_NAME_BUMP_MATRIX_3,
VKD3D_SHADER_PARAMETER_NAME_BUMP_MATRIX_4,
VKD3D_SHADER_PARAMETER_NAME_BUMP_MATRIX_5,
VKD3D_SHADER_PARAMETER_NAME_BUMP_LUMINANCE_SCALE_0,
VKD3D_SHADER_PARAMETER_NAME_BUMP_LUMINANCE_SCALE_1,
VKD3D_SHADER_PARAMETER_NAME_BUMP_LUMINANCE_SCALE_2,
VKD3D_SHADER_PARAMETER_NAME_BUMP_LUMINANCE_SCALE_3,
VKD3D_SHADER_PARAMETER_NAME_BUMP_LUMINANCE_SCALE_4,
VKD3D_SHADER_PARAMETER_NAME_BUMP_LUMINANCE_SCALE_5,
VKD3D_SHADER_PARAMETER_NAME_BUMP_LUMINANCE_OFFSET_0,
VKD3D_SHADER_PARAMETER_NAME_BUMP_LUMINANCE_OFFSET_1,
VKD3D_SHADER_PARAMETER_NAME_BUMP_LUMINANCE_OFFSET_2,
VKD3D_SHADER_PARAMETER_NAME_BUMP_LUMINANCE_OFFSET_3,
VKD3D_SHADER_PARAMETER_NAME_BUMP_LUMINANCE_OFFSET_4,
VKD3D_SHADER_PARAMETER_NAME_BUMP_LUMINANCE_OFFSET_5,
VKD3D_SHADER_PARAMETER_NAME_PROJECTED_TEXTURE_MASK,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_PARAMETER_NAME),
};
struct vkd3d_shader_parameter_immediate_constant
{
union
{
uint32_t u32;
float f32;
} u;
};
struct vkd3d_shader_parameter_immediate_constant1
{
union
{
uint32_t u32;
float f32;
float f32_vec4[4];
void *_pointer_pad;
uint32_t _pad[4];
} u;
};
struct vkd3d_shader_parameter_specialization_constant
{
uint32_t id;
};
struct vkd3d_shader_parameter_buffer
{
unsigned int set;
unsigned int binding;
uint32_t offset;
};
struct vkd3d_shader_parameter
{
enum vkd3d_shader_parameter_name name;
enum vkd3d_shader_parameter_type type;
enum vkd3d_shader_parameter_data_type data_type;
union
{
struct vkd3d_shader_parameter_immediate_constant immediate_constant;
struct vkd3d_shader_parameter_specialization_constant specialization_constant;
} u;
};
struct vkd3d_shader_parameter1
{
enum vkd3d_shader_parameter_name name;
enum vkd3d_shader_parameter_type type;
enum vkd3d_shader_parameter_data_type data_type;
union
{
struct vkd3d_shader_parameter_immediate_constant1 immediate_constant;
struct vkd3d_shader_parameter_specialization_constant specialization_constant;
struct vkd3d_shader_parameter_buffer buffer;
void *_pointer_pad;
uint32_t _pad[4];
} u;
};
enum vkd3d_shader_d3dbc_constant_register
{
VKD3D_SHADER_D3DBC_FLOAT_CONSTANT_REGISTER = 0x0,
VKD3D_SHADER_D3DBC_INT_CONSTANT_REGISTER = 0x1,
VKD3D_SHADER_D3DBC_BOOL_CONSTANT_REGISTER = 0x2,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_D3DBC_CONSTANT_REGISTER),
};
struct vkd3d_shader_resource_binding
{
enum vkd3d_shader_descriptor_type type;
unsigned int register_space;
unsigned int register_index;
enum vkd3d_shader_visibility shader_visibility;
unsigned int flags;
struct vkd3d_shader_descriptor_binding binding;
};
#define VKD3D_SHADER_DUMMY_SAMPLER_INDEX ~0u
struct vkd3d_shader_combined_resource_sampler
{
unsigned int resource_space;
unsigned int resource_index;
unsigned int sampler_space;
unsigned int sampler_index;
enum vkd3d_shader_visibility shader_visibility;
unsigned int flags;
struct vkd3d_shader_descriptor_binding binding;
};
struct vkd3d_shader_uav_counter_binding
{
unsigned int register_space;
unsigned int register_index;
enum vkd3d_shader_visibility shader_visibility;
struct vkd3d_shader_descriptor_binding binding;
unsigned int offset;
};
struct vkd3d_shader_push_constant_buffer
{
unsigned int register_space;
unsigned int register_index;
enum vkd3d_shader_visibility shader_visibility;
unsigned int offset;
unsigned int size;
};
struct vkd3d_shader_interface_info
{
enum vkd3d_shader_structure_type type;
const void *next;
const struct vkd3d_shader_resource_binding *bindings;
unsigned int binding_count;
const struct vkd3d_shader_push_constant_buffer *push_constant_buffers;
unsigned int push_constant_buffer_count;
const struct vkd3d_shader_combined_resource_sampler *combined_samplers;
unsigned int combined_sampler_count;
const struct vkd3d_shader_uav_counter_binding *uav_counters;
unsigned int uav_counter_count;
};
struct vkd3d_shader_transform_feedback_element
{
unsigned int stream_index;
const char *semantic_name;
unsigned int semantic_index;
uint8_t component_index;
uint8_t component_count;
uint8_t output_slot;
};
/* Extends vkd3d_shader_interface_info. */
struct vkd3d_shader_transform_feedback_info
{
enum vkd3d_shader_structure_type type;
const void *next;
const struct vkd3d_shader_transform_feedback_element *elements;
unsigned int element_count;
const unsigned int *buffer_strides;
unsigned int buffer_stride_count;
};
struct vkd3d_shader_descriptor_offset
{
unsigned int static_offset;
unsigned int dynamic_offset_index;
};
struct vkd3d_shader_descriptor_offset_info
{
enum vkd3d_shader_structure_type type;
const void *next;
unsigned int descriptor_table_offset;
unsigned int descriptor_table_count;
const struct vkd3d_shader_descriptor_offset *binding_offsets;
const struct vkd3d_shader_descriptor_offset *uav_counter_offsets;
};
enum vkd3d_shader_source_type
{
VKD3D_SHADER_SOURCE_NONE,
VKD3D_SHADER_SOURCE_DXBC_TPF,
VKD3D_SHADER_SOURCE_HLSL,
VKD3D_SHADER_SOURCE_D3D_BYTECODE,
VKD3D_SHADER_SOURCE_DXBC_DXIL,
VKD3D_SHADER_SOURCE_FX,
VKD3D_SHADER_SOURCE_TX,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_SOURCE_TYPE),
};
enum vkd3d_shader_target_type
{
VKD3D_SHADER_TARGET_NONE,
VKD3D_SHADER_TARGET_SPIRV_BINARY,
VKD3D_SHADER_TARGET_SPIRV_TEXT,
VKD3D_SHADER_TARGET_D3D_ASM,
VKD3D_SHADER_TARGET_D3D_BYTECODE,
VKD3D_SHADER_TARGET_DXBC_TPF,
VKD3D_SHADER_TARGET_GLSL,
VKD3D_SHADER_TARGET_FX,
VKD3D_SHADER_TARGET_MSL,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_TARGET_TYPE),
};
enum vkd3d_shader_log_level
{
VKD3D_SHADER_LOG_NONE,
VKD3D_SHADER_LOG_ERROR,
VKD3D_SHADER_LOG_WARNING,
VKD3D_SHADER_LOG_INFO,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_LOG_LEVEL),
};
struct vkd3d_shader_compile_info
{
enum vkd3d_shader_structure_type type;
const void *next;
struct vkd3d_shader_code source;
enum vkd3d_shader_source_type source_type;
enum vkd3d_shader_target_type target_type;
const struct vkd3d_shader_compile_option *options;
unsigned int option_count;
enum vkd3d_shader_log_level log_level;
const char *source_name;
};
enum vkd3d_shader_spirv_environment
{
VKD3D_SHADER_SPIRV_ENVIRONMENT_NONE,
VKD3D_SHADER_SPIRV_ENVIRONMENT_OPENGL_4_5,
VKD3D_SHADER_SPIRV_ENVIRONMENT_VULKAN_1_0, /* default target */
VKD3D_SHADER_SPIRV_ENVIRONMENT_VULKAN_1_1,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_SPIRV_ENVIRONMENT),
};
enum vkd3d_shader_spirv_extension
{
VKD3D_SHADER_SPIRV_EXTENSION_NONE,
VKD3D_SHADER_SPIRV_EXTENSION_EXT_DEMOTE_TO_HELPER_INVOCATION,
VKD3D_SHADER_SPIRV_EXTENSION_EXT_DESCRIPTOR_INDEXING,
VKD3D_SHADER_SPIRV_EXTENSION_EXT_STENCIL_EXPORT,
VKD3D_SHADER_SPIRV_EXTENSION_EXT_VIEWPORT_INDEX_LAYER,
VKD3D_SHADER_SPIRV_EXTENSION_EXT_FRAGMENT_SHADER_INTERLOCK,
VKD3D_SHADER_SPIRV_EXTENSION_KHR_FLOAT_CONTROLS,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_SPIRV_EXTENSION),
};
/* Extends vkd3d_shader_compile_info. */
struct vkd3d_shader_spirv_target_info
{
enum vkd3d_shader_structure_type type;
const void *next;
const char *entry_point; /* "main" if NULL. */
enum vkd3d_shader_spirv_environment environment;
const enum vkd3d_shader_spirv_extension *extensions;
unsigned int extension_count;
const struct vkd3d_shader_parameter *parameters;
unsigned int parameter_count;
bool dual_source_blending;
const unsigned int *output_swizzles;
unsigned int output_swizzle_count;
};
enum vkd3d_shader_tessellator_output_primitive
{
VKD3D_SHADER_TESSELLATOR_OUTPUT_POINT = 0x1,
VKD3D_SHADER_TESSELLATOR_OUTPUT_LINE = 0x2,
VKD3D_SHADER_TESSELLATOR_OUTPUT_TRIANGLE_CW = 0x3,
VKD3D_SHADER_TESSELLATOR_OUTPUT_TRIANGLE_CCW = 0x4,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_TESSELLATOR_OUTPUT_PRIMITIVE),
};
enum vkd3d_shader_tessellator_partitioning
{
VKD3D_SHADER_TESSELLATOR_PARTITIONING_INTEGER = 0x1,
VKD3D_SHADER_TESSELLATOR_PARTITIONING_POW2 = 0x2,
VKD3D_SHADER_TESSELLATOR_PARTITIONING_FRACTIONAL_ODD = 0x3,
VKD3D_SHADER_TESSELLATOR_PARTITIONING_FRACTIONAL_EVEN = 0x4,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_TESSELLATOR_PARTITIONING),
};
/* Extends vkd3d_shader_spirv_target_info. */
struct vkd3d_shader_spirv_domain_shader_target_info
{
enum vkd3d_shader_structure_type type;
const void *next;
enum vkd3d_shader_tessellator_output_primitive output_primitive;
enum vkd3d_shader_tessellator_partitioning partitioning;
};
struct vkd3d_shader_macro
{
const char *name;
const char *value;
};
typedef int (*PFN_vkd3d_shader_open_include)(const char *filename, bool local,
const char *parent_data, void *context, struct vkd3d_shader_code *out);
typedef void (*PFN_vkd3d_shader_close_include)(const struct vkd3d_shader_code *code, void *context);
struct vkd3d_shader_preprocess_info
{
enum vkd3d_shader_structure_type type;
const void *next;
const struct vkd3d_shader_macro *macros;
unsigned int macro_count;
PFN_vkd3d_shader_open_include pfn_open_include;
PFN_vkd3d_shader_close_include pfn_close_include;
void *include_context;
};
struct vkd3d_shader_hlsl_source_info
{
enum vkd3d_shader_structure_type type;
const void *next;
const char *entry_point;
struct vkd3d_shader_code secondary_code;
const char *profile;
};
/* root signature 1.0 */
enum vkd3d_shader_filter
{
VKD3D_SHADER_FILTER_MIN_MAG_MIP_POINT = 0x000,
VKD3D_SHADER_FILTER_MIN_MAG_POINT_MIP_LINEAR = 0x001,
VKD3D_SHADER_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x004,
VKD3D_SHADER_FILTER_MIN_POINT_MAG_MIP_LINEAR = 0x005,
VKD3D_SHADER_FILTER_MIN_LINEAR_MAG_MIP_POINT = 0x010,
VKD3D_SHADER_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x011,
VKD3D_SHADER_FILTER_MIN_MAG_LINEAR_MIP_POINT = 0x014,
VKD3D_SHADER_FILTER_MIN_MAG_MIP_LINEAR = 0x015,
VKD3D_SHADER_FILTER_ANISOTROPIC = 0x055,
VKD3D_SHADER_FILTER_COMPARISON_MIN_MAG_MIP_POINT = 0x080,
VKD3D_SHADER_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR = 0x081,
VKD3D_SHADER_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x084,
VKD3D_SHADER_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR = 0x085,
VKD3D_SHADER_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT = 0x090,
VKD3D_SHADER_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x091,
VKD3D_SHADER_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT = 0x094,
VKD3D_SHADER_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR = 0x095,
VKD3D_SHADER_FILTER_COMPARISON_ANISOTROPIC = 0x0d5,
VKD3D_SHADER_FILTER_MINIMUM_MIN_MAG_MIP_POINT = 0x100,
VKD3D_SHADER_FILTER_MINIMUM_MIN_MAG_POINT_MIP_LINEAR = 0x101,
VKD3D_SHADER_FILTER_MINIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x104,
VKD3D_SHADER_FILTER_MINIMUM_MIN_POINT_MAG_MIP_LINEAR = 0x105,
VKD3D_SHADER_FILTER_MINIMUM_MIN_LINEAR_MAG_MIP_POINT = 0x110,
VKD3D_SHADER_FILTER_MINIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x111,
VKD3D_SHADER_FILTER_MINIMUM_MIN_MAG_LINEAR_MIP_POINT = 0x114,
VKD3D_SHADER_FILTER_MINIMUM_MIN_MAG_MIP_LINEAR = 0x115,
VKD3D_SHADER_FILTER_MINIMUM_ANISOTROPIC = 0x155,
VKD3D_SHADER_FILTER_MAXIMUM_MIN_MAG_MIP_POINT = 0x180,
VKD3D_SHADER_FILTER_MAXIMUM_MIN_MAG_POINT_MIP_LINEAR = 0x181,
VKD3D_SHADER_FILTER_MAXIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT = 0x184,
VKD3D_SHADER_FILTER_MAXIMUM_MIN_POINT_MAG_MIP_LINEAR = 0x185,
VKD3D_SHADER_FILTER_MAXIMUM_MIN_LINEAR_MAG_MIP_POINT = 0x190,
VKD3D_SHADER_FILTER_MAXIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR = 0x191,
VKD3D_SHADER_FILTER_MAXIMUM_MIN_MAG_LINEAR_MIP_POINT = 0x194,
VKD3D_SHADER_FILTER_MAXIMUM_MIN_MAG_MIP_LINEAR = 0x195,
VKD3D_SHADER_FILTER_MAXIMUM_ANISOTROPIC = 0x1d5,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_FILTER),
};
enum vkd3d_shader_texture_address_mode
{
VKD3D_SHADER_TEXTURE_ADDRESS_MODE_WRAP = 0x1,
VKD3D_SHADER_TEXTURE_ADDRESS_MODE_MIRROR = 0x2,
VKD3D_SHADER_TEXTURE_ADDRESS_MODE_CLAMP = 0x3,
VKD3D_SHADER_TEXTURE_ADDRESS_MODE_BORDER = 0x4,
VKD3D_SHADER_TEXTURE_ADDRESS_MODE_MIRROR_ONCE = 0x5,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_TEXTURE_ADDRESS_MODE),
};
enum vkd3d_shader_comparison_func
{
VKD3D_SHADER_COMPARISON_FUNC_NEVER = 0x1,
VKD3D_SHADER_COMPARISON_FUNC_LESS = 0x2,
VKD3D_SHADER_COMPARISON_FUNC_EQUAL = 0x3,
VKD3D_SHADER_COMPARISON_FUNC_LESS_EQUAL = 0x4,
VKD3D_SHADER_COMPARISON_FUNC_GREATER = 0x5,
VKD3D_SHADER_COMPARISON_FUNC_NOT_EQUAL = 0x6,
VKD3D_SHADER_COMPARISON_FUNC_GREATER_EQUAL = 0x7,
VKD3D_SHADER_COMPARISON_FUNC_ALWAYS = 0x8,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_COMPARISON_FUNC),
};
enum vkd3d_shader_static_border_colour
{
VKD3D_SHADER_STATIC_BORDER_COLOUR_TRANSPARENT_BLACK = 0x0,
VKD3D_SHADER_STATIC_BORDER_COLOUR_OPAQUE_BLACK = 0x1,
VKD3D_SHADER_STATIC_BORDER_COLOUR_OPAQUE_WHITE = 0x2,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_STATIC_BORDER_COLOUR),
};
struct vkd3d_shader_static_sampler_desc
{
enum vkd3d_shader_filter filter;
enum vkd3d_shader_texture_address_mode address_u;
enum vkd3d_shader_texture_address_mode address_v;
enum vkd3d_shader_texture_address_mode address_w;
float mip_lod_bias;
unsigned int max_anisotropy;
enum vkd3d_shader_comparison_func comparison_func;
enum vkd3d_shader_static_border_colour border_colour;
float min_lod;
float max_lod;
unsigned int shader_register;
unsigned int register_space;
enum vkd3d_shader_visibility shader_visibility;
};
struct vkd3d_shader_descriptor_range
{
enum vkd3d_shader_descriptor_type range_type;
unsigned int descriptor_count;
unsigned int base_shader_register;
unsigned int register_space;
unsigned int descriptor_table_offset;
};
struct vkd3d_shader_root_descriptor_table
{
unsigned int descriptor_range_count;
const struct vkd3d_shader_descriptor_range *descriptor_ranges;
};
struct vkd3d_shader_root_constants
{
unsigned int shader_register;
unsigned int register_space;
unsigned int value_count;
};
struct vkd3d_shader_root_descriptor
{
unsigned int shader_register;
unsigned int register_space;
};
enum vkd3d_shader_root_parameter_type
{
VKD3D_SHADER_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE = 0x0,
VKD3D_SHADER_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS = 0x1,
VKD3D_SHADER_ROOT_PARAMETER_TYPE_CBV = 0x2,
VKD3D_SHADER_ROOT_PARAMETER_TYPE_SRV = 0x3,
VKD3D_SHADER_ROOT_PARAMETER_TYPE_UAV = 0x4,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_ROOT_PARAMETER_TYPE),
};
struct vkd3d_shader_root_parameter
{
enum vkd3d_shader_root_parameter_type parameter_type;
union
{
struct vkd3d_shader_root_descriptor_table descriptor_table;
struct vkd3d_shader_root_constants constants;
struct vkd3d_shader_root_descriptor descriptor;
} u;
enum vkd3d_shader_visibility shader_visibility;
};
enum vkd3d_shader_root_signature_flags
{
VKD3D_SHADER_ROOT_SIGNATURE_FLAG_NONE = 0x00,
VKD3D_SHADER_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT = 0x01,
VKD3D_SHADER_ROOT_SIGNATURE_FLAG_DENY_VERTEX_SHADER_ROOT_ACCESS = 0x02,
VKD3D_SHADER_ROOT_SIGNATURE_FLAG_DENY_HULL_SHADER_ROOT_ACCESS = 0x04,
VKD3D_SHADER_ROOT_SIGNATURE_FLAG_DENY_DOMAIN_SHADER_ROOT_ACCESS = 0x08,
VKD3D_SHADER_ROOT_SIGNATURE_FLAG_DENY_GEOMETRY_SHADER_ROOT_ACCESS = 0x10,
VKD3D_SHADER_ROOT_SIGNATURE_FLAG_DENY_PIXEL_SHADER_ROOT_ACCESS = 0x20,
VKD3D_SHADER_ROOT_SIGNATURE_FLAG_ALLOW_STREAM_OUTPUT = 0x40,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_ROOT_SIGNATURE_FLAGS),
};
struct vkd3d_shader_root_signature_desc
{
unsigned int parameter_count;
const struct vkd3d_shader_root_parameter *parameters;
unsigned int static_sampler_count;
const struct vkd3d_shader_static_sampler_desc *static_samplers;
enum vkd3d_shader_root_signature_flags flags;
};
/* root signature 1.1 */
enum vkd3d_shader_root_descriptor_flags
{
VKD3D_SHADER_ROOT_DESCRIPTOR_FLAG_NONE = 0x0,
VKD3D_SHADER_ROOT_DESCRIPTOR_FLAG_DATA_VOLATILE = 0x2,
VKD3D_SHADER_ROOT_DESCRIPTOR_FLAG_DATA_STATIC_WHILE_SET_AT_EXECUTE = 0x4,
VKD3D_SHADER_ROOT_DESCRIPTOR_FLAG_DATA_STATIC = 0x8,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_ROOT_DESCRIPTOR_FLAGS),
};
enum vkd3d_shader_descriptor_range_flags
{
VKD3D_SHADER_DESCRIPTOR_RANGE_FLAG_NONE = 0x0,
VKD3D_SHADER_DESCRIPTOR_RANGE_FLAG_DESCRIPTORS_VOLATILE = 0x1,
VKD3D_SHADER_DESCRIPTOR_RANGE_FLAG_DATA_VOLATILE = 0x2,
VKD3D_SHADER_DESCRIPTOR_RANGE_FLAG_DATA_STATIC_WHILE_SET_AT_EXECUTE = 0x4,
VKD3D_SHADER_DESCRIPTOR_RANGE_FLAG_DATA_STATIC = 0x8,
VKD3D_SHADER_DESCRIPTOR_RANGE_FLAG_DESCRIPTORS_STATIC_KEEPING_BUFFER_BOUNDS_CHECKS = 0x10000,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_DESCRIPTOR_RANGE_FLAGS),
};
struct vkd3d_shader_descriptor_range1
{
enum vkd3d_shader_descriptor_type range_type;
unsigned int descriptor_count;
unsigned int base_shader_register;
unsigned int register_space;
enum vkd3d_shader_descriptor_range_flags flags;
unsigned int descriptor_table_offset;
};
struct vkd3d_shader_root_descriptor_table1
{
unsigned int descriptor_range_count;
const struct vkd3d_shader_descriptor_range1 *descriptor_ranges;
};
struct vkd3d_shader_root_descriptor1
{
unsigned int shader_register;
unsigned int register_space;
enum vkd3d_shader_root_descriptor_flags flags;
};
struct vkd3d_shader_root_parameter1
{
enum vkd3d_shader_root_parameter_type parameter_type;
union
{
struct vkd3d_shader_root_descriptor_table1 descriptor_table;
struct vkd3d_shader_root_constants constants;
struct vkd3d_shader_root_descriptor1 descriptor;
} u;
enum vkd3d_shader_visibility shader_visibility;
};
struct vkd3d_shader_root_signature_desc1
{
unsigned int parameter_count;
const struct vkd3d_shader_root_parameter1 *parameters;
unsigned int static_sampler_count;
const struct vkd3d_shader_static_sampler_desc *static_samplers;
enum vkd3d_shader_root_signature_flags flags;
};
enum vkd3d_shader_root_signature_version
{
VKD3D_SHADER_ROOT_SIGNATURE_VERSION_1_0 = 0x1,
VKD3D_SHADER_ROOT_SIGNATURE_VERSION_1_1 = 0x2,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_ROOT_SIGNATURE_VERSION),
};
struct vkd3d_shader_versioned_root_signature_desc
{
enum vkd3d_shader_root_signature_version version;
union
{
struct vkd3d_shader_root_signature_desc v_1_0;
struct vkd3d_shader_root_signature_desc1 v_1_1;
} u;
};
enum vkd3d_shader_resource_type
{
VKD3D_SHADER_RESOURCE_NONE = 0x0,
VKD3D_SHADER_RESOURCE_BUFFER = 0x1,
VKD3D_SHADER_RESOURCE_TEXTURE_1D = 0x2,
VKD3D_SHADER_RESOURCE_TEXTURE_2D = 0x3,
VKD3D_SHADER_RESOURCE_TEXTURE_2DMS = 0x4,
VKD3D_SHADER_RESOURCE_TEXTURE_3D = 0x5,
VKD3D_SHADER_RESOURCE_TEXTURE_CUBE = 0x6,
VKD3D_SHADER_RESOURCE_TEXTURE_1DARRAY = 0x7,
VKD3D_SHADER_RESOURCE_TEXTURE_2DARRAY = 0x8,
VKD3D_SHADER_RESOURCE_TEXTURE_2DMSARRAY = 0x9,
VKD3D_SHADER_RESOURCE_TEXTURE_CUBEARRAY = 0xa,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_RESOURCE_TYPE),
};
enum vkd3d_shader_resource_data_type
{
VKD3D_SHADER_RESOURCE_DATA_NONE = 0x0,
VKD3D_SHADER_RESOURCE_DATA_UNORM = 0x1,
VKD3D_SHADER_RESOURCE_DATA_SNORM = 0x2,
VKD3D_SHADER_RESOURCE_DATA_INT = 0x3,
VKD3D_SHADER_RESOURCE_DATA_UINT = 0x4,
VKD3D_SHADER_RESOURCE_DATA_FLOAT = 0x5,
VKD3D_SHADER_RESOURCE_DATA_MIXED = 0x6,
VKD3D_SHADER_RESOURCE_DATA_DOUBLE = 0x7,
VKD3D_SHADER_RESOURCE_DATA_CONTINUED = 0x8,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_RESOURCE_DATA_TYPE),
};
enum vkd3d_shader_descriptor_info_flag
{
VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_UAV_COUNTER = 0x00000001,
VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_UAV_READ = 0x00000002,
VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_SAMPLER_COMPARISON_MODE = 0x00000004,
VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_UAV_ATOMICS = 0x00000008,
VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_RAW_BUFFER = 0x00000010,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_DESCRIPTOR_INFO_FLAG),
};
struct vkd3d_shader_descriptor_info
{
enum vkd3d_shader_descriptor_type type;
unsigned int register_space;
unsigned int register_index;
enum vkd3d_shader_resource_type resource_type;
enum vkd3d_shader_resource_data_type resource_data_type;
unsigned int flags;
unsigned int count;
};
struct vkd3d_shader_scan_descriptor_info
{
enum vkd3d_shader_structure_type type;
const void *next;
struct vkd3d_shader_descriptor_info *descriptors;
unsigned int descriptor_count;
};
struct vkd3d_shader_combined_resource_sampler_info
{
unsigned int resource_space;
unsigned int resource_index;
unsigned int sampler_space;
unsigned int sampler_index;
};
struct vkd3d_shader_scan_combined_resource_sampler_info
{
enum vkd3d_shader_structure_type type;
const void *next;
struct vkd3d_shader_combined_resource_sampler_info *combined_samplers;
unsigned int combined_sampler_count;
};
struct vkd3d_shader_scan_hull_shader_tessellation_info
{
enum vkd3d_shader_structure_type type;
const void *next;
enum vkd3d_shader_tessellator_output_primitive output_primitive;
enum vkd3d_shader_tessellator_partitioning partitioning;
};
struct vkd3d_shader_scan_thread_group_size_info
{
enum vkd3d_shader_structure_type type;
const void *next;
unsigned int x, y, z;
};
enum vkd3d_shader_denormal_mode
{
VKD3D_SHADER_DENORMAL_MODE_ANY = 0,
VKD3D_SHADER_DENORMAL_MODE_PRESERVE = 1,
VKD3D_SHADER_DENORMAL_MODE_FLUSH_TO_ZERO = 2,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_DENORMAL_MODE),
};
struct vkd3d_shader_scan_denormal_mode_info
{
enum vkd3d_shader_structure_type type;
const void *next;
enum vkd3d_shader_denormal_mode f16_denormal_mode;
enum vkd3d_shader_denormal_mode f32_denormal_mode;
enum vkd3d_shader_denormal_mode f64_denormal_mode;
};
struct vkd3d_shader_d3dbc_source_info
{
enum vkd3d_shader_structure_type type;
const void *next;
enum vkd3d_shader_resource_type texture_dimensions[6];
uint32_t shadow_samplers;
};
enum vkd3d_shader_component_type
{
VKD3D_SHADER_COMPONENT_VOID = 0x0,
VKD3D_SHADER_COMPONENT_UINT = 0x1,
VKD3D_SHADER_COMPONENT_INT = 0x2,
VKD3D_SHADER_COMPONENT_FLOAT = 0x3,
VKD3D_SHADER_COMPONENT_BOOL = 0x4,
VKD3D_SHADER_COMPONENT_DOUBLE = 0x5,
VKD3D_SHADER_COMPONENT_UINT64 = 0x6,
VKD3D_SHADER_COMPONENT_INT64 = 0x7,
VKD3D_SHADER_COMPONENT_FLOAT16 = 0x8,
VKD3D_SHADER_COMPONENT_UINT16 = 0x9,
VKD3D_SHADER_COMPONENT_INT16 = 0xa,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_COMPONENT_TYPE),
};
enum vkd3d_shader_sysval_semantic
{
VKD3D_SHADER_SV_NONE = 0x00,
VKD3D_SHADER_SV_POSITION = 0x01,
VKD3D_SHADER_SV_CLIP_DISTANCE = 0x02,
VKD3D_SHADER_SV_CULL_DISTANCE = 0x03,
VKD3D_SHADER_SV_RENDER_TARGET_ARRAY_INDEX = 0x04,
VKD3D_SHADER_SV_VIEWPORT_ARRAY_INDEX = 0x05,
VKD3D_SHADER_SV_VERTEX_ID = 0x06,
VKD3D_SHADER_SV_PRIMITIVE_ID = 0x07,
VKD3D_SHADER_SV_INSTANCE_ID = 0x08,
VKD3D_SHADER_SV_IS_FRONT_FACE = 0x09,
VKD3D_SHADER_SV_SAMPLE_INDEX = 0x0a,
VKD3D_SHADER_SV_TESS_FACTOR_QUADEDGE = 0x0b,
VKD3D_SHADER_SV_TESS_FACTOR_QUADINT = 0x0c,
VKD3D_SHADER_SV_TESS_FACTOR_TRIEDGE = 0x0d,
VKD3D_SHADER_SV_TESS_FACTOR_TRIINT = 0x0e,
VKD3D_SHADER_SV_TESS_FACTOR_LINEDET = 0x0f,
VKD3D_SHADER_SV_TESS_FACTOR_LINEDEN = 0x10,
VKD3D_SHADER_SV_TARGET = 0x40,
VKD3D_SHADER_SV_DEPTH = 0x41,
VKD3D_SHADER_SV_COVERAGE = 0x42,
VKD3D_SHADER_SV_DEPTH_GREATER_EQUAL = 0x43,
VKD3D_SHADER_SV_DEPTH_LESS_EQUAL = 0x44,
VKD3D_SHADER_SV_STENCIL_REF = 0x45,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_SYSVAL_SEMANTIC),
};
enum vkd3d_shader_minimum_precision
{
VKD3D_SHADER_MINIMUM_PRECISION_NONE = 0,
VKD3D_SHADER_MINIMUM_PRECISION_FLOAT_16 = 1,
VKD3D_SHADER_MINIMUM_PRECISION_FIXED_8_2 = 2,
VKD3D_SHADER_MINIMUM_PRECISION_INT_16 = 4,
VKD3D_SHADER_MINIMUM_PRECISION_UINT_16 = 5,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_MINIMUM_PRECISION),
};
struct vkd3d_shader_signature_element
{
const char *semantic_name;
unsigned int semantic_index;
unsigned int stream_index;
enum vkd3d_shader_sysval_semantic sysval_semantic;
enum vkd3d_shader_component_type component_type;
unsigned int register_index;
unsigned int mask;
unsigned int used_mask;
enum vkd3d_shader_minimum_precision min_precision;
};
struct vkd3d_shader_signature
{
struct vkd3d_shader_signature_element *elements;
unsigned int element_count;
};
enum vkd3d_shader_swizzle_component
{
VKD3D_SHADER_SWIZZLE_X = 0x0,
VKD3D_SHADER_SWIZZLE_Y = 0x1,
VKD3D_SHADER_SWIZZLE_Z = 0x2,
VKD3D_SHADER_SWIZZLE_W = 0x3,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_SWIZZLE_COMPONENT),
};
struct vkd3d_shader_dxbc_section_desc
{
uint32_t tag;
struct vkd3d_shader_code data;
};
struct vkd3d_shader_dxbc_desc
{
uint32_t tag;
uint32_t checksum[4];
unsigned int version;
size_t size;
size_t section_count;
struct vkd3d_shader_dxbc_section_desc *sections;
};
#define VKD3D_SHADER_SWIZZLE_MASK (0xffu)
#define VKD3D_SHADER_SWIZZLE_SHIFT(idx) (8u * (idx))
#define VKD3D_SHADER_SWIZZLE(x, y, z, w) \
(VKD3D_SHADER_SWIZZLE_ ## x << VKD3D_SHADER_SWIZZLE_SHIFT(0) \
| VKD3D_SHADER_SWIZZLE_ ## y << VKD3D_SHADER_SWIZZLE_SHIFT(1) \
| VKD3D_SHADER_SWIZZLE_ ## z << VKD3D_SHADER_SWIZZLE_SHIFT(2) \
| VKD3D_SHADER_SWIZZLE_ ## w << VKD3D_SHADER_SWIZZLE_SHIFT(3))
#define VKD3D_SHADER_NO_SWIZZLE VKD3D_SHADER_SWIZZLE(X, Y, Z, W)
static inline 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)
{
return ((x & VKD3D_SHADER_SWIZZLE_MASK) << VKD3D_SHADER_SWIZZLE_SHIFT(0))
| ((y & VKD3D_SHADER_SWIZZLE_MASK) << VKD3D_SHADER_SWIZZLE_SHIFT(1))
| ((z & VKD3D_SHADER_SWIZZLE_MASK) << VKD3D_SHADER_SWIZZLE_SHIFT(2))
| ((w & VKD3D_SHADER_SWIZZLE_MASK) << VKD3D_SHADER_SWIZZLE_SHIFT(3));
}
struct vkd3d_shader_scan_signature_info
{
enum vkd3d_shader_structure_type type;
const void *next;
struct vkd3d_shader_signature input;
struct vkd3d_shader_signature output;
struct vkd3d_shader_signature patch_constant;
};
struct vkd3d_shader_varying_map
{
unsigned int output_signature_index;
unsigned int input_register_index;
unsigned int input_mask;
};
struct vkd3d_shader_varying_map_info
{
enum vkd3d_shader_structure_type type;
const void *next;
const struct vkd3d_shader_varying_map *varying_map;
unsigned int varying_count;
};
struct vkd3d_shader_parameter_info
{
enum vkd3d_shader_structure_type type;
const void *next;
const struct vkd3d_shader_parameter1 *parameters;
unsigned int parameter_count;
};
#ifdef LIBVKD3D_SHADER_SOURCE
# define VKD3D_SHADER_API VKD3D_EXPORT
#else
# define VKD3D_SHADER_API VKD3D_IMPORT
#endif
#ifndef VKD3D_SHADER_NO_PROTOTYPES
VKD3D_SHADER_API const char *vkd3d_shader_get_version(unsigned int *major, unsigned int *minor);
VKD3D_SHADER_API const enum vkd3d_shader_source_type *vkd3d_shader_get_supported_source_types(unsigned int *count);
VKD3D_SHADER_API const enum vkd3d_shader_target_type *vkd3d_shader_get_supported_target_types(
enum vkd3d_shader_source_type source_type, unsigned int *count);
VKD3D_SHADER_API int vkd3d_shader_compile(const struct vkd3d_shader_compile_info *compile_info,
struct vkd3d_shader_code *out, char **messages);
VKD3D_SHADER_API void vkd3d_shader_free_messages(char *messages);
VKD3D_SHADER_API void vkd3d_shader_free_shader_code(struct vkd3d_shader_code *code);
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);
VKD3D_SHADER_API void vkd3d_shader_free_root_signature(
struct vkd3d_shader_versioned_root_signature_desc *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);
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);
VKD3D_SHADER_API int vkd3d_shader_scan(const struct vkd3d_shader_compile_info *compile_info, char **messages);
VKD3D_SHADER_API void vkd3d_shader_free_scan_descriptor_info(
struct vkd3d_shader_scan_descriptor_info *scan_descriptor_info);
VKD3D_SHADER_API int vkd3d_shader_parse_input_signature(const struct vkd3d_shader_code *dxbc,
struct vkd3d_shader_signature *signature, char **messages);
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);
VKD3D_SHADER_API void vkd3d_shader_free_shader_signature(struct vkd3d_shader_signature *signature);
/* 1.3 */
VKD3D_SHADER_API int vkd3d_shader_preprocess(const struct vkd3d_shader_compile_info *compile_info,
struct vkd3d_shader_code *out, char **messages);
VKD3D_SHADER_API void vkd3d_shader_set_log_callback(PFN_vkd3d_log callback);
VKD3D_SHADER_API void vkd3d_shader_free_dxbc(struct vkd3d_shader_dxbc_desc *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);
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);
VKD3D_SHADER_API void vkd3d_shader_free_scan_signature_info(struct vkd3d_shader_scan_signature_info *info);
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);
VKD3D_SHADER_API void vkd3d_shader_free_scan_combined_resource_sampler_info(
struct vkd3d_shader_scan_combined_resource_sampler_info *info);
#endif /* VKD3D_SHADER_NO_PROTOTYPES */
typedef const char *(*PFN_vkd3d_shader_get_version)(unsigned int *major, unsigned int *minor);
typedef const enum vkd3d_shader_source_type *(*PFN_vkd3d_shader_get_supported_source_types)(unsigned int *count);
typedef const enum vkd3d_shader_target_type *(*PFN_vkd3d_shader_get_supported_target_types)(
enum vkd3d_shader_source_type source_type, unsigned int *count);
typedef int (*PFN_vkd3d_shader_compile)(const struct vkd3d_shader_compile_info *compile_info,
struct vkd3d_shader_code *out, char **messages);
typedef void (*PFN_vkd3d_shader_free_messages)(char *messages);
typedef void (*PFN_vkd3d_shader_free_shader_code)(struct vkd3d_shader_code *code);
typedef int (*PFN_vkd3d_shader_parse_root_signature)(const struct vkd3d_shader_code *dxbc,
struct vkd3d_shader_versioned_root_signature_desc *root_signature, char **messages);
typedef void (*PFN_vkd3d_shader_free_root_signature)(struct vkd3d_shader_versioned_root_signature_desc *root_signature);
typedef int (*PFN_vkd3d_shader_serialize_root_signature)(
const struct vkd3d_shader_versioned_root_signature_desc *root_signature,
struct vkd3d_shader_code *dxbc, char **messages);
typedef 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);
typedef int (*PFN_vkd3d_shader_scan)(const struct vkd3d_shader_compile_info *compile_info, char **messages);
typedef void (*PFN_vkd3d_shader_free_scan_descriptor_info)(
struct vkd3d_shader_scan_descriptor_info *scan_descriptor_info);
typedef int (*PFN_vkd3d_shader_parse_input_signature)(const struct vkd3d_shader_code *dxbc,
struct vkd3d_shader_signature *signature, char **messages);
typedef struct vkd3d_shader_signature_element * (*PFN_vkd3d_shader_find_signature_element)(
const struct vkd3d_shader_signature *signature, const char *semantic_name,
unsigned int semantic_index, unsigned int stream_index);
typedef void (*PFN_vkd3d_shader_free_shader_signature)(struct vkd3d_shader_signature *signature);
typedef void (*PFN_vkd3d_shader_preprocess)(struct vkd3d_shader_compile_info *compile_info,
struct vkd3d_shader_code *out, char **messages);
typedef void (*PFN_vkd3d_shader_set_log_callback)(PFN_vkd3d_log callback);
typedef void (*PFN_vkd3d_shader_free_dxbc)(struct vkd3d_shader_dxbc_desc *dxbc);
typedef int (*PFN_vkd3d_shader_parse_dxbc)(const struct vkd3d_shader_code *dxbc,
uint32_t flags, struct vkd3d_shader_dxbc_desc *desc, char **messages);
typedef 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);
typedef 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);
typedef void (*PFN_vkd3d_shader_free_scan_signature_info)(struct vkd3d_shader_scan_signature_info *info);
typedef void (*PFN_vkd3d_shader_free_scan_combined_resource_sampler_info)(
struct vkd3d_shader_scan_combined_resource_sampler_info *info);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __VKD3D_SHADER_H */
vkd3d_shader_code
A generic structure containing a GPU shader, in text or byte-code format.
Definition vkd3d_shader.h:468
vkd3d_shader_code::code
const void * code
Pointer to the code.
Definition vkd3d_shader.h:483
vkd3d_shader_code::size
size_t size
Size of code, in bytes.
Definition vkd3d_shader.h:485
vkd3d_shader_combined_resource_sampler_info
This structure describes a single resource-sampler pair.
Definition vkd3d_shader.h:2381
vkd3d_shader_combined_resource_sampler
Describes the mapping of a Direct3D resource-sampler pair to a combined sampler (i....
Definition vkd3d_shader.h:1339
vkd3d_shader_combined_resource_sampler::binding
struct vkd3d_shader_descriptor_binding binding
The binding in the target environment.
Definition vkd3d_shader.h:1360
vkd3d_shader_combined_resource_sampler::resource_index
unsigned int resource_index
Register index of the Direct3D resource.
Definition vkd3d_shader.h:1346
vkd3d_shader_combined_resource_sampler::sampler_index
unsigned int sampler_index
Register index of the Direct3D sampler.
Definition vkd3d_shader.h:1353
vkd3d_shader_combined_resource_sampler::sampler_space
unsigned int sampler_space
Register space of the Direct3D sampler.
Definition vkd3d_shader.h:1351
vkd3d_shader_combined_resource_sampler::resource_space
unsigned int resource_space
Register space of the Direct3D resource.
Definition vkd3d_shader.h:1344
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:1357
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:1355
vkd3d_shader_compile_info
A chained structure containing compilation parameters.
Definition vkd3d_shader.h:1667
vkd3d_shader_compile_info::options
const struct vkd3d_shader_compile_option * options
Pointer to an array of compilation options.
Definition vkd3d_shader.h:1695
vkd3d_shader_compile_info::source
struct vkd3d_shader_code source
Input source code or byte code.
Definition vkd3d_shader.h:1678
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:1700
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:1669
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:1705
vkd3d_shader_compile_info::option_count
unsigned int option_count
Size, in elements, of options.
Definition vkd3d_shader.h:1697
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:1681
vkd3d_shader_compile_info::next
const void * next
Optional pointer to a structure containing further parameters.
Definition vkd3d_shader.h:1675
vkd3d_shader_compile_info::target_type
enum vkd3d_shader_target_type target_type
Desired output format.
Definition vkd3d_shader.h:1683
vkd3d_shader_compile_option
Various settings which may affect shader compilation or scanning, passed as part of struct vkd3d_shad...
Definition vkd3d_shader.h:434
vkd3d_shader_compile_option::value
unsigned int value
A value associated with the option.
Definition vkd3d_shader.h:441
vkd3d_shader_compile_option::name
enum vkd3d_shader_compile_option_name name
Name of the option.
Definition vkd3d_shader.h:436
vkd3d_shader_d3dbc_source_info
A chained structure containing legacy Direct3D bytecode compilation parameters.
Definition vkd3d_shader.h:2514
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:2516
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:2551
vkd3d_shader_d3dbc_source_info::next
const void * next
Optional pointer to a structure containing further parameters.
Definition vkd3d_shader.h:2518
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:2531
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:520
vkd3d_shader_descriptor_binding::binding
unsigned int binding
The binding index of the descriptor.
Definition vkd3d_shader.h:527
vkd3d_shader_descriptor_binding::count
unsigned int count
The size of this descriptor array.
Definition vkd3d_shader.h:533
vkd3d_shader_descriptor_binding::set
unsigned int set
The set of the descriptor.
Definition vkd3d_shader.h:525
vkd3d_shader_descriptor_info
Describes a single shader descriptor; returned as part of struct vkd3d_shader_scan_descriptor_info.
Definition vkd3d_shader.h:2300
vkd3d_shader_descriptor_info::resource_type
enum vkd3d_shader_resource_type resource_type
Resource type, if applicable, including its dimension.
Definition vkd3d_shader.h:2311
vkd3d_shader_descriptor_info::register_index
unsigned int register_index
Register index of the descriptor.
Definition vkd3d_shader.h:2309
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:2313
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:2302
vkd3d_shader_descriptor_info::count
unsigned int count
Size of this descriptor array, or 1 if a single descriptor.
Definition vkd3d_shader.h:2323
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:2318
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:2307
vkd3d_shader_descriptor_offset_info
A chained structure containing descriptor offsets.
Definition vkd3d_shader.h:1493
vkd3d_shader_descriptor_offset_info::next
const void * next
Optional pointer to a structure containing further parameters.
Definition vkd3d_shader.h:1497
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:1556
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:1495
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:1504
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:1506
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:1549
vkd3d_shader_descriptor_offset
Definition vkd3d_shader.h:1476
vkd3d_shader_descriptor_range1
Definition vkd3d_shader.h:2140
vkd3d_shader_descriptor_range
Definition vkd3d_shader.h:2042
vkd3d_shader_dxbc_desc
A description of a DXBC blob, as returned by vkd3d_shader_parse_dxbc().
Definition vkd3d_shader.h:2739
vkd3d_shader_dxbc_desc::section_count
size_t section_count
The number of sections contained in the DXBC.
Definition vkd3d_shader.h:2755
vkd3d_shader_dxbc_desc::sections
struct vkd3d_shader_dxbc_section_desc * sections
Descriptions of the sections contained in the DXBC.
Definition vkd3d_shader.h:2757
vkd3d_shader_dxbc_desc::tag
uint32_t tag
The DXBC tag.
Definition vkd3d_shader.h:2744
vkd3d_shader_dxbc_desc::size
size_t size
The total size of the DXBC blob.
Definition vkd3d_shader.h:2753
vkd3d_shader_dxbc_desc::checksum
uint32_t checksum[4]
A checksum of the DXBC contents.
Definition vkd3d_shader.h:2746
vkd3d_shader_dxbc_desc::version
unsigned int version
The DXBC version.
Definition vkd3d_shader.h:2751
vkd3d_shader_dxbc_section_desc
A description of a DXBC section.
Definition vkd3d_shader.h:2726
vkd3d_shader_dxbc_section_desc::tag
uint32_t tag
The section tag.
Definition vkd3d_shader.h:2728
vkd3d_shader_dxbc_section_desc::data
struct vkd3d_shader_code data
The contents of the section.
Definition vkd3d_shader.h:2730
vkd3d_shader_hlsl_source_info
A chained structure containing HLSL compilation parameters.
Definition vkd3d_shader.h:1926
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:1928
vkd3d_shader_hlsl_source_info::profile
const char * profile
Pointer to a null-terminated string containing the target shader profile.
Definition vkd3d_shader.h:1944
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:1938
vkd3d_shader_hlsl_source_info::next
const void * next
Optional pointer to a structure containing further parameters.
Definition vkd3d_shader.h:1930
vkd3d_shader_interface_info
A chained structure describing the interface between a compiled shader and the target environment.
Definition vkd3d_shader.h:1426
vkd3d_shader_interface_info::combined_sampler_count
unsigned int combined_sampler_count
Size, in elements, of combined_samplers.
Definition vkd3d_shader.h:1445
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:1433
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:1438
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:1448
vkd3d_shader_interface_info::binding_count
unsigned int binding_count
Size, in elements, of bindings.
Definition vkd3d_shader.h:1435
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:1440
vkd3d_shader_interface_info::next
const void * next
Optional pointer to a structure containing further parameters.
Definition vkd3d_shader.h:1430
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:1443
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:1428
vkd3d_shader_interface_info::uav_counter_count
unsigned int uav_counter_count
Size, in elements, of uav_counters.
Definition vkd3d_shader.h:1450
vkd3d_shader_macro
A single preprocessor macro, passed as part of struct vkd3d_shader_preprocess_info.
Definition vkd3d_shader.h:1793
vkd3d_shader_macro::name
const char * name
Pointer to a null-terminated string containing the name of a macro.
Definition vkd3d_shader.h:1799
vkd3d_shader_macro::value
const char * value
Optional pointer to a null-terminated string containing the expansion of the macro.
Definition vkd3d_shader.h:1805
vkd3d_shader_parameter1
An individual shader parameter.
Definition vkd3d_shader.h:1235
vkd3d_shader_parameter1::type
enum vkd3d_shader_parameter_type type
How the parameter will be provided to the shader.
Definition vkd3d_shader.h:1239
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:1251
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:1256
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:1244
vkd3d_shader_parameter1::buffer
struct vkd3d_shader_parameter_buffer buffer
Additional information if type is VKD3D_SHADER_PARAMETER_TYPE_BUFFER.
Definition vkd3d_shader.h:1261
vkd3d_shader_parameter1::name
enum vkd3d_shader_parameter_name name
The builtin parameter to be mapped.
Definition vkd3d_shader.h:1237
vkd3d_shader_parameter_buffer
The linkage of a parameter specified through a uniform buffer, used in struct vkd3d_shader_parameter1...
Definition vkd3d_shader.h:1181
vkd3d_shader_parameter_buffer::offset
uint32_t offset
The byte offset of the parameter within the buffer.
Definition vkd3d_shader.h:1190
vkd3d_shader_parameter_buffer::set
unsigned int set
The set of the uniform buffer descriptor.
Definition vkd3d_shader.h:1186
vkd3d_shader_parameter_buffer::binding
unsigned int binding
The binding index of the uniform buffer descriptor.
Definition vkd3d_shader.h:1188
vkd3d_shader_parameter_immediate_constant1
The value of an immediate constant parameter, used in struct vkd3d_shader_parameter1.
Definition vkd3d_shader.h:1135
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:1154
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:1142
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:1147
vkd3d_shader_parameter_immediate_constant
The value of an immediate constant parameter, used in struct vkd3d_shader_parameter.
Definition vkd3d_shader.h:1110
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:1124
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:1117
vkd3d_shader_parameter_info
Interface information regarding a builtin shader parameter.
Definition vkd3d_shader.h:2949
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:2951
vkd3d_shader_parameter_info::parameter_count
unsigned int parameter_count
Size, in elements, of parameters.
Definition vkd3d_shader.h:2958
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:2956
vkd3d_shader_parameter_info::next
const void * next
Optional pointer to a structure containing further parameters.
Definition vkd3d_shader.h:2953
vkd3d_shader_parameter_specialization_constant
The linkage of a specialization constant parameter, used in struct vkd3d_shader_parameter and struct ...
Definition vkd3d_shader.h:1165
vkd3d_shader_parameter_specialization_constant::id
uint32_t id
The ID of the specialization constant.
Definition vkd3d_shader.h:1173
vkd3d_shader_parameter
An individual shader parameter.
Definition vkd3d_shader.h:1206
vkd3d_shader_preprocess_info
A chained structure containing preprocessing parameters.
Definition vkd3d_shader.h:1866
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:1868
vkd3d_shader_preprocess_info::macros
const struct vkd3d_shader_macro * macros
Pointer to an array of predefined macros.
Definition vkd3d_shader.h:1880
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:1911
vkd3d_shader_preprocess_info::macro_count
unsigned int macro_count
Size, in elements, of macros.
Definition vkd3d_shader.h:1882
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:1896
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:1906
vkd3d_shader_preprocess_info::next
const void * next
Optional pointer to a structure containing further parameters.
Definition vkd3d_shader.h:1870
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:1392
vkd3d_shader_push_constant_buffer::register_index
unsigned int register_index
Register index of the Direct3D resource.
Definition vkd3d_shader.h:1399
vkd3d_shader_push_constant_buffer::size
unsigned int size
Size, in bytes, of the target push constants.
Definition vkd3d_shader.h:1406
vkd3d_shader_push_constant_buffer::register_space
unsigned int register_space
Register space of the Direct3D resource.
Definition vkd3d_shader.h:1397
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:1401
vkd3d_shader_push_constant_buffer::offset
unsigned int offset
Offset, in bytes, of the target push constants.
Definition vkd3d_shader.h:1404
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:1304
vkd3d_shader_resource_binding::binding
struct vkd3d_shader_descriptor_binding binding
The binding in the target environment.
Definition vkd3d_shader.h:1327
vkd3d_shader_resource_binding::register_space
unsigned int register_space
Register space of the Direct3D resource.
Definition vkd3d_shader.h:1311
vkd3d_shader_resource_binding::type
enum vkd3d_shader_descriptor_type type
The type of this descriptor.
Definition vkd3d_shader.h:1306
vkd3d_shader_resource_binding::flags
unsigned int flags
A combination of zero or more elements of vkd3d_shader_binding_flag.
Definition vkd3d_shader.h:1324
vkd3d_shader_resource_binding::register_index
unsigned int register_index
Register index of the Direct3D resource.
Definition vkd3d_shader.h:1320
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:1322
vkd3d_shader_root_constants
Definition vkd3d_shader.h:2057
vkd3d_shader_root_descriptor1
Definition vkd3d_shader.h:2156
vkd3d_shader_root_descriptor_table1
Definition vkd3d_shader.h:2150
vkd3d_shader_root_descriptor_table
Definition vkd3d_shader.h:2051
vkd3d_shader_root_descriptor
Definition vkd3d_shader.h:2064
vkd3d_shader_root_parameter1
Definition vkd3d_shader.h:2163
vkd3d_shader_root_parameter
Definition vkd3d_shader.h:2081
vkd3d_shader_root_signature_desc1
Definition vkd3d_shader.h:2175
vkd3d_shader_root_signature_desc
Definition vkd3d_shader.h:2107
vkd3d_shader_scan_combined_resource_sampler_info
A chained structure describing the resource-sampler pairs used by a shader.
Definition vkd3d_shader.h:2409
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:2411
vkd3d_shader_scan_combined_resource_sampler_info::next
const void * next
Optional pointer to a structure containing further parameters.
Definition vkd3d_shader.h:2413
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:2418
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:2416
vkd3d_shader_scan_denormal_mode_info
A chained structure describing how a shader expects denormal floating-point values to be handled.
Definition vkd3d_shader.h:2485
vkd3d_shader_scan_denormal_mode_info::f64_denormal_mode
enum vkd3d_shader_denormal_mode f64_denormal_mode
The denormal mode for f64 (double) numbers.
Definition vkd3d_shader.h:2496
vkd3d_shader_scan_denormal_mode_info::f32_denormal_mode
enum vkd3d_shader_denormal_mode f32_denormal_mode
The denormal mode for f32 (float) numbers.
Definition vkd3d_shader.h:2494
vkd3d_shader_scan_denormal_mode_info::type
enum vkd3d_shader_structure_type type
Must be set to VKD3D_SHADER_STRUCTURE_TYPE_SCAN_DENORMAL_MODE_INFO.
Definition vkd3d_shader.h:2487
vkd3d_shader_scan_denormal_mode_info::next
const void * next
Optional pointer to a structure containing further parameters.
Definition vkd3d_shader.h:2489
vkd3d_shader_scan_denormal_mode_info::f16_denormal_mode
enum vkd3d_shader_denormal_mode f16_denormal_mode
The denormal mode for f16 (half) numbers.
Definition vkd3d_shader.h:2492
vkd3d_shader_scan_descriptor_info
A chained structure enumerating the descriptors declared by a shader.
Definition vkd3d_shader.h:2360
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:2364
vkd3d_shader_scan_descriptor_info::next
const void * next
Input; optional pointer to a structure containing further parameters.
Definition vkd3d_shader.h:2366
vkd3d_shader_scan_descriptor_info::descriptor_count
unsigned int descriptor_count
Output; size, in elements, of descriptors.
Definition vkd3d_shader.h:2371
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:2369
vkd3d_shader_scan_hull_shader_tessellation_info
A chained structure describing the tessellation information in a hull shader.
Definition vkd3d_shader.h:2429
vkd3d_shader_scan_hull_shader_tessellation_info::next
const void * next
Optional pointer to a structure containing further parameters.
Definition vkd3d_shader.h:2433
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:2436
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:2431
vkd3d_shader_scan_hull_shader_tessellation_info::partitioning
enum vkd3d_shader_tessellator_partitioning partitioning
The tessellation partitioning mode.
Definition vkd3d_shader.h:2438
vkd3d_shader_scan_signature_info
A chained structure containing descriptions of shader inputs and outputs.
Definition vkd3d_shader.h:2839
vkd3d_shader_scan_signature_info::next
const void * next
Optional pointer to a structure containing further parameters.
Definition vkd3d_shader.h:2843
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:2841
vkd3d_shader_scan_signature_info::patch_constant
struct vkd3d_shader_signature patch_constant
The shader patch constant varyings.
Definition vkd3d_shader.h:2852
vkd3d_shader_scan_signature_info::output
struct vkd3d_shader_signature output
The shader output varyings.
Definition vkd3d_shader.h:2849
vkd3d_shader_scan_signature_info::input
struct vkd3d_shader_signature input
The shader input varyings.
Definition vkd3d_shader.h:2846
vkd3d_shader_scan_thread_group_size_info
A chained structure describing the thread group size in a compute shader.
Definition vkd3d_shader.h:2449
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:2451
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:2456
vkd3d_shader_scan_thread_group_size_info::next
const void * next
Optional pointer to a structure containing further parameters.
Definition vkd3d_shader.h:2453
vkd3d_shader_signature_element
A single shader varying, returned as part of struct vkd3d_shader_signature.
Definition vkd3d_shader.h:2662
vkd3d_shader_signature_element::semantic_index
unsigned int semantic_index
Semantic index, or 0 if the semantic is not indexed.
Definition vkd3d_shader.h:2666
vkd3d_shader_signature_element::sysval_semantic
enum vkd3d_shader_sysval_semantic sysval_semantic
System value semantic.
Definition vkd3d_shader.h:2676
vkd3d_shader_signature_element::stream_index
unsigned int stream_index
Stream index of a geometry shader output semantic.
Definition vkd3d_shader.h:2671
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:2689
vkd3d_shader_signature_element::component_type
enum vkd3d_shader_component_type component_type
Data type.
Definition vkd3d_shader.h:2678
vkd3d_shader_signature_element::min_precision
enum vkd3d_shader_minimum_precision min_precision
Minimum interpolation precision.
Definition vkd3d_shader.h:2691
vkd3d_shader_signature_element::register_index
unsigned int register_index
Register index.
Definition vkd3d_shader.h:2680
vkd3d_shader_signature_element::mask
unsigned int mask
Mask of the register components allocated to this varying.
Definition vkd3d_shader.h:2682
vkd3d_shader_signature_element::semantic_name
const char * semantic_name
Semantic name.
Definition vkd3d_shader.h:2664
vkd3d_shader_signature
Description of a shader input or output signature.
Definition vkd3d_shader.h:2702
vkd3d_shader_signature::elements
struct vkd3d_shader_signature_element * elements
Pointer to an array of varyings.
Definition vkd3d_shader.h:2704
vkd3d_shader_signature::element_count
unsigned int element_count
Size, in elements, of elements.
Definition vkd3d_shader.h:2706
vkd3d_shader_spirv_domain_shader_target_info
Definition vkd3d_shader.h:1780
vkd3d_shader_spirv_target_info
Definition vkd3d_shader.h:1739
vkd3d_shader_static_sampler_desc
Definition vkd3d_shader.h:2025
vkd3d_shader_transform_feedback_element
Definition vkd3d_shader.h:1454
vkd3d_shader_transform_feedback_info
Definition vkd3d_shader.h:1465
vkd3d_shader_uav_counter_binding
Describes the mapping of a single Direct3D UAV counter.
Definition vkd3d_shader.h:1369
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:1378
vkd3d_shader_uav_counter_binding::register_space
unsigned int register_space
Register space of the Direct3D UAV descriptor.
Definition vkd3d_shader.h:1374
vkd3d_shader_uav_counter_binding::binding
struct vkd3d_shader_descriptor_binding binding
The binding in the target environment.
Definition vkd3d_shader.h:1381
vkd3d_shader_uav_counter_binding::register_index
unsigned int register_index
Register index of the Direct3D UAV descriptor.
Definition vkd3d_shader.h:1376
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:2901
vkd3d_shader_varying_map_info::varying_count
unsigned int varying_count
The number of registers provided in varying_map.
Definition vkd3d_shader.h:2920
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:2903
vkd3d_shader_varying_map_info::next
const void * next
Optional pointer to a structure containing further parameters.
Definition vkd3d_shader.h:2905
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:2918
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:2862
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:2871
vkd3d_shader_varying_map::input_mask
unsigned int input_mask
The mask consumed by the destination register.
Definition vkd3d_shader.h:2873
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:2869
vkd3d_shader_versioned_root_signature_desc
Definition vkd3d_shader.h:2192
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:1277
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:1283
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:1279
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:1281
vkd3d_shader_compile_option_name
vkd3d_shader_compile_option_name
Definition vkd3d_shader.h:307
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:394
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:323
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:352
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:344
VKD3D_SHADER_COMPILE_OPTION_DENORMAL_MODE_F32
@ VKD3D_SHADER_COMPILE_OPTION_DENORMAL_MODE_F32
Override the denormal mode for f32 (float) numbers.
Definition vkd3d_shader.h:416
VKD3D_SHADER_COMPILE_OPTION_DENORMAL_MODE_F16
@ VKD3D_SHADER_COMPILE_OPTION_DENORMAL_MODE_F16
Override the denormal mode for f16 (half) numbers.
Definition vkd3d_shader.h:409
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:383
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:321
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:335
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:317
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:362
VKD3D_SHADER_COMPILE_OPTION_DENORMAL_MODE_F64
@ VKD3D_SHADER_COMPILE_OPTION_DENORMAL_MODE_F64
Override the denormal mode for f64 (double) numbers.
Definition vkd3d_shader.h:423
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:372
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:315
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:402
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:319
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:2787
vkd3d_shader_compile_option_formatting_flags
vkd3d_shader_compile_option_formatting_flags
Definition vkd3d_shader.h:179
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:191
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:3614
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:3587
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:3623
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:2241
VKD3D_SHADER_RESOURCE_DATA_NONE
@ VKD3D_SHADER_RESOURCE_DATA_NONE
The descriptor has no relevant data type.
Definition vkd3d_shader.h:2246
VKD3D_SHADER_RESOURCE_DATA_DOUBLE
@ VKD3D_SHADER_RESOURCE_DATA_DOUBLE
IEEE double-precision floating-point.
Definition vkd3d_shader.h:2260
VKD3D_SHADER_RESOURCE_DATA_MIXED
@ VKD3D_SHADER_RESOURCE_DATA_MIXED
Undefined/type-less.
Definition vkd3d_shader.h:2258
VKD3D_SHADER_RESOURCE_DATA_SNORM
@ VKD3D_SHADER_RESOURCE_DATA_SNORM
Signed normalized integer.
Definition vkd3d_shader.h:2250
VKD3D_SHADER_RESOURCE_DATA_CONTINUED
@ VKD3D_SHADER_RESOURCE_DATA_CONTINUED
Continuation of the previous component.
Definition vkd3d_shader.h:2266
VKD3D_SHADER_RESOURCE_DATA_UINT
@ VKD3D_SHADER_RESOURCE_DATA_UINT
Unsigned integer.
Definition vkd3d_shader.h:2254
VKD3D_SHADER_RESOURCE_DATA_FLOAT
@ VKD3D_SHADER_RESOURCE_DATA_FLOAT
IEEE single-precision floating-point.
Definition vkd3d_shader.h:2256
VKD3D_SHADER_RESOURCE_DATA_UNORM
@ VKD3D_SHADER_RESOURCE_DATA_UNORM
Unsigned normalized integer.
Definition vkd3d_shader.h:2248
VKD3D_SHADER_RESOURCE_DATA_INT
@ VKD3D_SHADER_RESOURCE_DATA_INT
Signed integer.
Definition vkd3d_shader.h:2252
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:656
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:671
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:664
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:659
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:1836
vkd3d_shader_compile_option_fragment_coordinate_origin
vkd3d_shader_compile_option_fragment_coordinate_origin
Determines the origin of fragment coordinates.
Definition vkd3d_shader.h:253
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:259
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:256
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:623
VKD3D_SHADER_FOG_SOURCE_FOG
@ VKD3D_SHADER_FOG_SOURCE_FOG
The source shader is not modified.
Definition vkd3d_shader.h:628
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:636
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:646
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:641
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:681
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:693
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:684
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:686
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:3619
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:1852
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:2276
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:2290
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:2283
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:2288
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:2281
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:2285
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:207
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:221
VKD3D_SHADER_COMPILE_OPTION_CONST_GLOBAL_UNIFORMS
@ VKD3D_SHADER_COMPILE_OPTION_CONST_GLOBAL_UNIFORMS
Causes all uniform variables in global scope to be const.
Definition vkd3d_shader.h:242
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:232
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:3604
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:3591
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:3579
vkd3d_shader_sysval_semantic
vkd3d_shader_sysval_semantic
System value semantic, returned as part of struct vkd3d_shader_signature.
Definition vkd3d_shader.h:2588
VKD3D_SHADER_SV_VERTEX_ID
@ VKD3D_SHADER_SV_VERTEX_ID
Vertex ID; SV_VertexID in Direct3D.
Definition vkd3d_shader.h:2602
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:2598
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:2632
VKD3D_SHADER_SV_PRIMITIVE_ID
@ VKD3D_SHADER_SV_PRIMITIVE_ID
Primitive ID; SV_PrimitiveID in Direct3D.
Definition vkd3d_shader.h:2604
VKD3D_SHADER_SV_COVERAGE
@ VKD3D_SHADER_SV_COVERAGE
Sample mask; SV_Coverage in Direct3D.
Definition vkd3d_shader.h:2622
VKD3D_SHADER_SV_CULL_DISTANCE
@ VKD3D_SHADER_SV_CULL_DISTANCE
Cull distance; SV_CullDistance in Direct3D.
Definition vkd3d_shader.h:2596
VKD3D_SHADER_SV_DEPTH
@ VKD3D_SHADER_SV_DEPTH
Depth; SV_Depth in Direct3D.
Definition vkd3d_shader.h:2620
VKD3D_SHADER_SV_TARGET
@ VKD3D_SHADER_SV_TARGET
Render target; SV_Target in Direct3D.
Definition vkd3d_shader.h:2618
VKD3D_SHADER_SV_NONE
@ VKD3D_SHADER_SV_NONE
No system value.
Definition vkd3d_shader.h:2590
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:2608
VKD3D_SHADER_SV_VIEWPORT_ARRAY_INDEX
@ VKD3D_SHADER_SV_VIEWPORT_ARRAY_INDEX
Viewport index; SV_ViewportArrayIndex in Direct3D.
Definition vkd3d_shader.h:2600
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:2627
VKD3D_SHADER_SV_INSTANCE_ID
@ VKD3D_SHADER_SV_INSTANCE_ID
Instance ID; SV_InstanceID in Direct3D.
Definition vkd3d_shader.h:2606
VKD3D_SHADER_SV_CLIP_DISTANCE
@ VKD3D_SHADER_SV_CLIP_DISTANCE
Clip distance; SV_ClipDistance in Direct3D.
Definition vkd3d_shader.h:2594
VKD3D_SHADER_SV_SAMPLE_INDEX
@ VKD3D_SHADER_SV_SAMPLE_INDEX
Sample index; SV_SampleIndex in Direct3D.
Definition vkd3d_shader.h:2610
VKD3D_SHADER_SV_STENCIL_REF
@ VKD3D_SHADER_SV_STENCIL_REF
Stencil reference; SV_StencilRef in Direct3D.
Definition vkd3d_shader.h:2634
VKD3D_SHADER_SV_POSITION
@ VKD3D_SHADER_SV_POSITION
Vertex position; SV_Position in Direct3D.
Definition vkd3d_shader.h:2592
vkd3d_shader_source_type
vkd3d_shader_source_type
The format of a shader to be compiled or scanned.
Definition vkd3d_shader.h:1561
VKD3D_SHADER_SOURCE_DXBC_DXIL
@ VKD3D_SHADER_SOURCE_DXBC_DXIL
A 'DirectX Intermediate Language' shader embedded in a DXBC container.
Definition vkd3d_shader.h:1583
VKD3D_SHADER_SOURCE_D3D_BYTECODE
@ VKD3D_SHADER_SOURCE_D3D_BYTECODE
Legacy Direct3D byte-code.
Definition vkd3d_shader.h:1578
VKD3D_SHADER_SOURCE_HLSL
@ VKD3D_SHADER_SOURCE_HLSL
High-Level Shader Language source code.
Definition vkd3d_shader.h:1573
VKD3D_SHADER_SOURCE_FX
@ VKD3D_SHADER_SOURCE_FX
Binary format used by Direct3D 9/10.x/11 effects.
Definition vkd3d_shader.h:1588
VKD3D_SHADER_SOURCE_TX
@ VKD3D_SHADER_SOURCE_TX
A D3DX texture shader.
Definition vkd3d_shader.h:1593
VKD3D_SHADER_SOURCE_DXBC_TPF
@ VKD3D_SHADER_SOURCE_DXBC_TPF
A 'Tokenized Program Format' shader embedded in a DXBC container.
Definition vkd3d_shader.h:1571
VKD3D_SHADER_SOURCE_NONE
@ VKD3D_SHADER_SOURCE_NONE
The shader has no type or is to be ignored.
Definition vkd3d_shader.h:1566
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:298
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:301
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:1648
VKD3D_SHADER_LOG_NONE
@ VKD3D_SHADER_LOG_NONE
No messages will be returned.
Definition vkd3d_shader.h:1650
VKD3D_SHADER_LOG_ERROR
@ VKD3D_SHADER_LOG_ERROR
Only fatal errors which prevent successful compilation will be returned.
Definition vkd3d_shader.h:1652
VKD3D_SHADER_LOG_WARNING
@ VKD3D_SHADER_LOG_WARNING
Non-fatal warnings and fatal errors will be returned.
Definition vkd3d_shader.h:1654
VKD3D_SHADER_LOG_INFO
@ VKD3D_SHADER_LOG_INFO
All messages, including general informational messages, will be returned.
Definition vkd3d_shader.h:1658
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:561
VKD3D_SHADER_FOG_FRAGMENT_EXP2
@ VKD3D_SHADER_FOG_FRAGMENT_EXP2
The fog interpolation factor is 2^-((k * c)²).
Definition vkd3d_shader.h:593
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:567
VKD3D_SHADER_FOG_FRAGMENT_EXP
@ VKD3D_SHADER_FOG_FRAGMENT_EXP
The fog interpolation factor is 2^-(k * c).
Definition vkd3d_shader.h:580
VKD3D_SHADER_FOG_FRAGMENT_LINEAR
@ VKD3D_SHADER_FOG_FRAGMENT_LINEAR
The fog interpolation factor is (E - c) * k.
Definition vkd3d_shader.h:607
vkd3d_shader_structure_type
vkd3d_shader_structure_type
The type of a chained structure.
Definition vkd3d_shader.h:72
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:84
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:115
VKD3D_SHADER_STRUCTURE_TYPE_SCAN_DENORMAL_MODE_INFO
@ VKD3D_SHADER_STRUCTURE_TYPE_SCAN_DENORMAL_MODE_INFO
The structure is a vkd3d_shader_scan_denormal_mode_info structure.
Definition vkd3d_shader.h:140
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:74
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:135
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:120
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:78
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:80
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:100
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:105
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:130
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:95
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:76
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:125
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:110
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:82
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:90
vkd3d_shader_visibility
vkd3d_shader_visibility
Describes which shader stages a resource is visible to.
Definition vkd3d_shader.h:446
VKD3D_SHADER_VISIBILITY_DOMAIN
@ VKD3D_SHADER_VISIBILITY_DOMAIN
The resource is visible only to the domain shader.
Definition vkd3d_shader.h:454
VKD3D_SHADER_VISIBILITY_COMPUTE
@ VKD3D_SHADER_VISIBILITY_COMPUTE
The resource is visible only to the compute shader.
Definition vkd3d_shader.h:461
VKD3D_SHADER_VISIBILITY_PIXEL
@ VKD3D_SHADER_VISIBILITY_PIXEL
The resource is visible only to the pixel shader.
Definition vkd3d_shader.h:458
VKD3D_SHADER_VISIBILITY_ALL
@ VKD3D_SHADER_VISIBILITY_ALL
The resource is visible to all shader stages.
Definition vkd3d_shader.h:448
VKD3D_SHADER_VISIBILITY_GEOMETRY
@ VKD3D_SHADER_VISIBILITY_GEOMETRY
The resource is visible only to the geometry shader.
Definition vkd3d_shader.h:456
VKD3D_SHADER_VISIBILITY_VERTEX
@ VKD3D_SHADER_VISIBILITY_VERTEX
The resource is visible only to the vertex shader.
Definition vkd3d_shader.h:450
VKD3D_SHADER_VISIBILITY_HULL
@ VKD3D_SHADER_VISIBILITY_HULL
The resource is visible only to the hull shader.
Definition vkd3d_shader.h:452
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:1720
VKD3D_SHADER_SPIRV_EXTENSION_KHR_FLOAT_CONTROLS
@ VKD3D_SHADER_SPIRV_EXTENSION_KHR_FLOAT_CONTROLS
Definition vkd3d_shader.h:1732
VKD3D_SHADER_SPIRV_EXTENSION_EXT_FRAGMENT_SHADER_INTERLOCK
@ VKD3D_SHADER_SPIRV_EXTENSION_EXT_FRAGMENT_SHADER_INTERLOCK
Definition vkd3d_shader.h:1730
VKD3D_SHADER_SPIRV_EXTENSION_EXT_STENCIL_EXPORT
@ VKD3D_SHADER_SPIRV_EXTENSION_EXT_STENCIL_EXPORT
Definition vkd3d_shader.h:1726
VKD3D_SHADER_SPIRV_EXTENSION_EXT_VIEWPORT_INDEX_LAYER
@ VKD3D_SHADER_SPIRV_EXTENSION_EXT_VIEWPORT_INDEX_LAYER
Definition vkd3d_shader.h:1728
VKD3D_SHADER_SPIRV_EXTENSION_EXT_DESCRIPTOR_INDEXING
@ VKD3D_SHADER_SPIRV_EXTENSION_EXT_DESCRIPTOR_INDEXING
Definition vkd3d_shader.h:1724
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:2559
VKD3D_SHADER_COMPONENT_INT
@ VKD3D_SHADER_COMPONENT_INT
32-bit signed integer.
Definition vkd3d_shader.h:2565
VKD3D_SHADER_COMPONENT_UINT
@ VKD3D_SHADER_COMPONENT_UINT
32-bit unsigned integer.
Definition vkd3d_shader.h:2563
VKD3D_SHADER_COMPONENT_FLOAT16
@ VKD3D_SHADER_COMPONENT_FLOAT16
16-bit IEEE floating-point.
Definition vkd3d_shader.h:2577
VKD3D_SHADER_COMPONENT_UINT16
@ VKD3D_SHADER_COMPONENT_UINT16
16-bit unsigned integer.
Definition vkd3d_shader.h:2579
VKD3D_SHADER_COMPONENT_INT16
@ VKD3D_SHADER_COMPONENT_INT16
16-bit signed integer.
Definition vkd3d_shader.h:2581
VKD3D_SHADER_COMPONENT_DOUBLE
@ VKD3D_SHADER_COMPONENT_DOUBLE
64-bit IEEE floating-point.
Definition vkd3d_shader.h:2571
VKD3D_SHADER_COMPONENT_UINT64
@ VKD3D_SHADER_COMPONENT_UINT64
64-bit unsigned integer.
Definition vkd3d_shader.h:2573
VKD3D_SHADER_COMPONENT_FLOAT
@ VKD3D_SHADER_COMPONENT_FLOAT
32-bit IEEE floating-point.
Definition vkd3d_shader.h:2567
VKD3D_SHADER_COMPONENT_VOID
@ VKD3D_SHADER_COMPONENT_VOID
The varying has no type.
Definition vkd3d_shader.h:2561
VKD3D_SHADER_COMPONENT_INT64
@ VKD3D_SHADER_COMPONENT_INT64
64-bit signed integer.
Definition vkd3d_shader.h:2575
VKD3D_SHADER_COMPONENT_BOOL
@ VKD3D_SHADER_COMPONENT_BOOL
Boolean.
Definition vkd3d_shader.h:2569
vkd3d_shader_descriptor_type
vkd3d_shader_descriptor_type
The type of a shader resource descriptor.
Definition vkd3d_shader.h:490
VKD3D_SHADER_DESCRIPTOR_TYPE_UAV
@ VKD3D_SHADER_DESCRIPTOR_TYPE_UAV
The descriptor is an unordered access view.
Definition vkd3d_shader.h:500
VKD3D_SHADER_DESCRIPTOR_TYPE_CBV
@ VKD3D_SHADER_DESCRIPTOR_TYPE_CBV
The descriptor is a constant buffer view.
Definition vkd3d_shader.h:505
VKD3D_SHADER_DESCRIPTOR_TYPE_SAMPLER
@ VKD3D_SHADER_DESCRIPTOR_TYPE_SAMPLER
The descriptor is a sampler.
Definition vkd3d_shader.h:510
VKD3D_SHADER_DESCRIPTOR_TYPE_SRV
@ VKD3D_SHADER_DESCRIPTOR_TYPE_SRV
The descriptor is a shader resource view.
Definition vkd3d_shader.h:495
VKD3D_SHADER_SWIZZLE_MASK
#define VKD3D_SHADER_SWIZZLE_MASK
A mask selecting one component from a vkd3d-shader swizzle.
Definition vkd3d_shader.h:2764
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:2206
VKD3D_SHADER_RESOURCE_NONE
@ VKD3D_SHADER_RESOURCE_NONE
The type is invalid or not applicable for this descriptor.
Definition vkd3d_shader.h:2211
VKD3D_SHADER_RESOURCE_TEXTURE_2DARRAY
@ VKD3D_SHADER_RESOURCE_TEXTURE_2DARRAY
2-dimensional array texture.
Definition vkd3d_shader.h:2227
VKD3D_SHADER_RESOURCE_TEXTURE_2DMS
@ VKD3D_SHADER_RESOURCE_TEXTURE_2DMS
Multisampled 2-dimensional texture.
Definition vkd3d_shader.h:2219
VKD3D_SHADER_RESOURCE_TEXTURE_3D
@ VKD3D_SHADER_RESOURCE_TEXTURE_3D
3-dimensional texture.
Definition vkd3d_shader.h:2221
VKD3D_SHADER_RESOURCE_TEXTURE_1DARRAY
@ VKD3D_SHADER_RESOURCE_TEXTURE_1DARRAY
1-dimensional array texture.
Definition vkd3d_shader.h:2225
VKD3D_SHADER_RESOURCE_BUFFER
@ VKD3D_SHADER_RESOURCE_BUFFER
Dimensionless buffer.
Definition vkd3d_shader.h:2213
VKD3D_SHADER_RESOURCE_TEXTURE_CUBE
@ VKD3D_SHADER_RESOURCE_TEXTURE_CUBE
Cubemap texture.
Definition vkd3d_shader.h:2223
VKD3D_SHADER_RESOURCE_TEXTURE_1D
@ VKD3D_SHADER_RESOURCE_TEXTURE_1D
1-dimensional texture.
Definition vkd3d_shader.h:2215
VKD3D_SHADER_RESOURCE_TEXTURE_CUBEARRAY
@ VKD3D_SHADER_RESOURCE_TEXTURE_CUBEARRAY
Cubemap array texture.
Definition vkd3d_shader.h:2231
VKD3D_SHADER_RESOURCE_TEXTURE_2DMSARRAY
@ VKD3D_SHADER_RESOURCE_TEXTURE_2DMSARRAY
Multisampled 2-dimensional array texture.
Definition vkd3d_shader.h:2229
VKD3D_SHADER_RESOURCE_TEXTURE_2D
@ VKD3D_SHADER_RESOURCE_TEXTURE_2D
2-dimensional texture.
Definition vkd3d_shader.h:2217
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_denormal_mode
vkd3d_shader_denormal_mode
Specifies how denormal floating-point numbers should be treated.
Definition vkd3d_shader.h:2465
VKD3D_SHADER_DENORMAL_MODE_FLUSH_TO_ZERO
@ VKD3D_SHADER_DENORMAL_MODE_FLUSH_TO_ZERO
Denormal values should be flushed to zero.
Definition vkd3d_shader.h:2471
VKD3D_SHADER_DENORMAL_MODE_PRESERVE
@ VKD3D_SHADER_DENORMAL_MODE_PRESERVE
Denormal values should be preserved.
Definition vkd3d_shader.h:2469
VKD3D_SHADER_DENORMAL_MODE_ANY
@ VKD3D_SHADER_DENORMAL_MODE_ANY
No particular denormal mode is requested.
Definition vkd3d_shader.h:2467
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:3576
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:3582
vkd3d_shader_compile_option_typed_uav
vkd3d_shader_compile_option_typed_uav
Determines how typed UAVs are declared.
Definition vkd3d_shader.h:166
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:173
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:168
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:3616
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:2711
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:3568
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:3593
vkd3d_shader_descriptor_range_flags
vkd3d_shader_descriptor_range_flags
Definition vkd3d_shader.h:2127
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:2134
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:2766
PFN_vkd3d_shader_free_messages
void(* PFN_vkd3d_shader_free_messages)(char *messages)
Type of vkd3d_shader_free_messages().
Definition vkd3d_shader.h:3571
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:2644
VKD3D_SHADER_MINIMUM_PRECISION_UINT_16
@ VKD3D_SHADER_MINIMUM_PRECISION_UINT_16
16-bit unsigned integer.
Definition vkd3d_shader.h:2653
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:2649
VKD3D_SHADER_MINIMUM_PRECISION_FLOAT_16
@ VKD3D_SHADER_MINIMUM_PRECISION_FLOAT_16
16-bit floating-point.
Definition vkd3d_shader.h:2647
VKD3D_SHADER_MINIMUM_PRECISION_INT_16
@ VKD3D_SHADER_MINIMUM_PRECISION_INT_16
16-bit signed integer.
Definition vkd3d_shader.h:2651
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:3627
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:3597
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:3607
vkd3d_shader_target_type
vkd3d_shader_target_type
The output format of a compiled shader.
Definition vkd3d_shader.h:1600
VKD3D_SHADER_TARGET_SPIRV_BINARY
@ VKD3D_SHADER_TARGET_SPIRV_BINARY
A SPIR-V shader in binary form.
Definition vkd3d_shader.h:1610
VKD3D_SHADER_TARGET_D3D_ASM
@ VKD3D_SHADER_TARGET_D3D_ASM
Direct3D shader assembly.
Definition vkd3d_shader.h:1615
VKD3D_SHADER_TARGET_NONE
@ VKD3D_SHADER_TARGET_NONE
The shader has no type or is to be ignored.
Definition vkd3d_shader.h:1605
VKD3D_SHADER_TARGET_DXBC_TPF
@ VKD3D_SHADER_TARGET_DXBC_TPF
A 'Tokenized Program Format' shader embedded in a DXBC container.
Definition vkd3d_shader.h:1625
VKD3D_SHADER_TARGET_GLSL
@ VKD3D_SHADER_TARGET_GLSL
An 'OpenGL Shading Language' shader.
Definition vkd3d_shader.h:1629
VKD3D_SHADER_TARGET_MSL
@ VKD3D_SHADER_TARGET_MSL
A 'Metal Shading Language' shader.
Definition vkd3d_shader.h:1638
VKD3D_SHADER_TARGET_D3D_BYTECODE
@ VKD3D_SHADER_TARGET_D3D_BYTECODE
Legacy Direct3D byte-code.
Definition vkd3d_shader.h:1620
VKD3D_SHADER_TARGET_FX
@ VKD3D_SHADER_TARGET_FX
Binary format used by Direct3D 9/10.x/11 effects profiles.
Definition vkd3d_shader.h:1634
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:3573
vkd3d_shader_compile_option_pack_matrix_order
vkd3d_shader_compile_option_pack_matrix_order
Determines how matrices are stored.
Definition vkd3d_shader.h:198
vkd3d_shader_spirv_environment
vkd3d_shader_spirv_environment
Definition vkd3d_shader.h:1709
VKD3D_SHADER_SPIRV_ENVIRONMENT_VULKAN_1_1
@ VKD3D_SHADER_SPIRV_ENVIRONMENT_VULKAN_1_1
Definition vkd3d_shader.h:1714
vkd3d_shader_compile_option_feature_flags
vkd3d_shader_compile_option_feature_flags
Advertises feature availability.
Definition vkd3d_shader.h:266
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:283
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:270
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:274
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:287
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:3611
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:703
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:913
VKD3D_SHADER_PARAMETER_NAME_FOG_SOURCE
@ VKD3D_SHADER_PARAMETER_NAME_FOG_SOURCE
Fog source.
Definition vkd3d_shader.h:1004
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:717
VKD3D_SHADER_PARAMETER_NAME_ALPHA_TEST_FUNC
@ VKD3D_SHADER_PARAMETER_NAME_ALPHA_TEST_FUNC
Alpha test comparison function.
Definition vkd3d_shader.h:742
VKD3D_SHADER_PARAMETER_NAME_FOG_SCALE
@ VKD3D_SHADER_PARAMETER_NAME_FOG_SCALE
Scale value for fog.
Definition vkd3d_shader.h:980
VKD3D_SHADER_PARAMETER_NAME_BUMP_MATRIX_0
@ VKD3D_SHADER_PARAMETER_NAME_BUMP_MATRIX_0
Bump-mapping matrix.
Definition vkd3d_shader.h:1028
VKD3D_SHADER_PARAMETER_NAME_ALPHA_TEST_REF
@ VKD3D_SHADER_PARAMETER_NAME_ALPHA_TEST_REF
Alpha test reference value.
Definition vkd3d_shader.h:752
VKD3D_SHADER_PARAMETER_NAME_FOG_END
@ VKD3D_SHADER_PARAMETER_NAME_FOG_END
End coordinate for linear fog.
Definition vkd3d_shader.h:967
VKD3D_SHADER_PARAMETER_NAME_POINT_SIZE_MAX
@ VKD3D_SHADER_PARAMETER_NAME_POINT_SIZE_MAX
Maximum point size.
Definition vkd3d_shader.h:880
VKD3D_SHADER_PARAMETER_NAME_FOG_FRAGMENT_MODE
@ VKD3D_SHADER_PARAMETER_NAME_FOG_FRAGMENT_MODE
Fog mode used in fragment shaders.
Definition vkd3d_shader.h:941
VKD3D_SHADER_PARAMETER_NAME_POINT_SIZE_MIN
@ VKD3D_SHADER_PARAMETER_NAME_POINT_SIZE_MIN
Minimum point size.
Definition vkd3d_shader.h:870
VKD3D_SHADER_PARAMETER_NAME_POINT_SIZE
@ VKD3D_SHADER_PARAMETER_NAME_POINT_SIZE
Point size.
Definition vkd3d_shader.h:847
VKD3D_SHADER_PARAMETER_NAME_CLIP_PLANE_0
@ VKD3D_SHADER_PARAMETER_NAME_CLIP_PLANE_0
Clip plane values.
Definition vkd3d_shader.h:821
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:776
VKD3D_SHADER_PARAMETER_NAME_CLIP_PLANE_MASK
@ VKD3D_SHADER_PARAMETER_NAME_CLIP_PLANE_MASK
A mask of enabled clip planes.
Definition vkd3d_shader.h:804
VKD3D_SHADER_PARAMETER_NAME_BUMP_LUMINANCE_OFFSET_0
@ VKD3D_SHADER_PARAMETER_NAME_BUMP_LUMINANCE_OFFSET_0
Bump-mapping luminance offset.
Definition vkd3d_shader.h:1076
VKD3D_SHADER_PARAMETER_NAME_FOG_COLOUR
@ VKD3D_SHADER_PARAMETER_NAME_FOG_COLOUR
Fog colour.
Definition vkd3d_shader.h:954
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:1052
VKD3D_SHADER_PARAMETER_NAME_PROJECTED_TEXTURE_MASK
@ VKD3D_SHADER_PARAMETER_NAME_PROJECTED_TEXTURE_MASK
A mask of projected textures.
Definition vkd3d_shader.h:1100
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:3630
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:152
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:154
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:156
vkd3d_types.h
This file contains definitions for basic types used by vkd3d libraries.