108 if (local_var &&
scope->upper->upper ==
ctx->globals)
142 for (
i = 0;
i <
entry->args_count; ++
i)
155 for (
k = 0;
k < state_block->
count; ++
k)
218 return type->e.array.elements_count;
220 return type->e.record.field_count;
347 bool is_sm4 = (
ctx->profile->major_version >= 4);
351 type->reg_size[
k] = 0;
390 for (
i = 0;
i <
type->e.record.field_count; ++
i)
482 type->class = type_class;
483 type->e.numeric.type = base_type;
541 struct hlsl_type **type_ptr,
unsigned int *index_ptr)
544 unsigned int index = *index_ptr;
564 *index_ptr = row_major ?
x :
y;
565 return row_major ?
y :
x;
571 unsigned int array_index;
574 *index_ptr =
index % elem_comp_count;
575 array_index =
index / elem_comp_count;
583 unsigned int field_comp_count,
i;
585 for (
i = 0;
i <
type->e.record.field_count; ++
i)
589 if (
index < field_comp_count)
595 index -= field_comp_count;
721 unsigned int chain_len,
i;
754 for (
i = 0;
i <
load->src.path_len; ++
i)
761 unsigned int p = deref->
path_len - 1 - chain_len;
805 unsigned int path_len, path_index, deref_path_len,
i;
865 return type->e.array.type;
872 return type->e.record.fields[
c->value.u[0].u].type;
890 type->e.array.type = basic_type;
930 type->sampler_dim = dim;
948 type->sampler_dim = dim;
972 static const char *
const names[] =
1044 switch (
type->class)
1053 unsigned int count = 0,
i;
1055 for (
i = 0;
i <
type->e.record.field_count; ++
i)
1137 for (
size_t i = 0;
i < t1->
e.
record.field_count; ++
i)
1151 return t1->
e.
array.elements_count == t2->
e.
array.elements_count
1205 type->modifiers |= default_majority;
1225 type->e.array.elements_count = old->
e.
array.elements_count;
1246 dst_field->
loc = src_field->
loc;
1265 type->e.resource.rasteriser_ordered = old->
e.
resource.rasteriser_ordered;
1326 var->storage_modifiers = modifiers;
1332 unsigned int i, obj_count =
type->reg_size[
k];
1339 for (
i = 0;
i <
k; ++
i)
1367 const char *name_copy;
1378 var->is_synthetic =
true;
1392 memset(deref, 0,
sizeof(*deref));
1426 memset(deref, 0,
sizeof(*deref));
1466 for (
i = 0;
i <
lhs->path_len; ++
i)
1477 return &store->
node;
1539 struct hlsl_constant_value
value;
1548 struct hlsl_constant_value
value;
1556 struct hlsl_constant_value
value;
1565 struct hlsl_constant_value
value;
1591 struct hlsl_constant_value
value = { 0 };
1711 return &vsir_instr->
node;
1844 return &store->
node;
1867 const char *profile_name,
struct hlsl_ir_node **
args,
unsigned int args_count,
1875 switch (compile_type)
1877 case HLSL_COMPILE_TYPE_COMPILE:
1897 case HLSL_COMPILE_TYPE_CONSTRUCTGSWITHSO:
1908 compile->
profile = profile_info;
1922 return &compile->
node;
1930 sizeof(*state_block->
entries)))
1943 if (!(sampler_state =
hlsl_alloc(
ctx,
sizeof(*sampler_state))))
1956 for (
unsigned int i = 0;
i < state_block->
count; ++
i)
1975 return &sampler_state->
node;
2041 return &
index->node;
2129 if (
map->instrs[
i].src ==
src)
2130 return map->instrs[
i].dst;
2146 for (
i = 0;
i <
src->path_len; ++
i)
2246 dst->load_type =
src->load_type;
2265 dst->sampling_dim =
src->sampling_dim;
2306 dst->writemask =
src->writemask;
2331 const char *profile_name =
NULL;
2352 profile_name = compile->
profile->name;
2370 &sampler_state->
node.loc);
2381 unsigned int lhs_index,
bool single_arg,
unsigned int arg_index)
2389 entry->lhs_has_index = lhs_has_index;
2390 entry->lhs_index = lhs_index;
2398 entry->args_count = 1;
2400 entry->args_count =
src->args_count;
2421 for (
unsigned int i = 0;
i <
src->args_count; ++
i)
2484 switch (instr->
type)
2623 ERR(
"hlsl_type without a name in a scope?\n");
2649 TRACE(
"Pushing a new scope.\n");
2650 ctx->cur_scope = new_scope;
2658 TRACE(
"Popping current scope.\n");
2659 ctx->cur_scope = prev_scope;
2700 static const char *
const base_types[] =
2710 static const char *
const dimensions[] =
2732 switch (
type->class)
2869 unsigned int element_index;
2878 current_type =
type;
2943 if (
string->content_size)
2944 string->buffer[--
string->content_size] = 0;
2951 static const char *
const names[] =
2975 return "Unexpected node type";
2981 static const char *
const names[] =
3009 if (
src->node->index)
3017 if (
var->storage_modifiers)
3026 if (
var->semantic.name)
3053 bool show_rel, show_const;
3061 if (show_rel && show_const)
3076 static const char components[] = {
'x',
'y',
'z',
'w'};
3078 unsigned int i = 0,
pos = 0;
3095 static const char components[] = {
'x',
'y',
'z',
'w'};
3139 if (
type->dimx != 1)
3141 for (
x = 0;
x <
type->dimx; ++
x)
3145 switch (
type->e.numeric.type)
3172 if (
type->dimx != 1)
3178 static const char *
const op_names[] =
3243 return op_names[
op];
3309 static const char *
const type_names[] =
3331 if (
load->coords.node)
3336 if (
load->sample_index.node)
3341 if (
load->texel_offset.node)
3401 if (
swizzle->val.node->data_type->dimy > 1)
3404 for (
i = 0;
i <
swizzle->node.data_type->dimx; ++
i)
3428 case HLSL_COMPILE_TYPE_COMPILE:
3432 case HLSL_COMPILE_TYPE_CONSTRUCTGSWITHSO:
3496 switch (instr->
type)
3581 for (
i = 0;
i <
func->parameters.count; ++
i)
3599 if (!
var->default_values)
3651 for (
i = 0;
i <
type->e.record.field_count; ++
i)
3889 for (
i = 0;
i <
attr->args_count; ++
i)
3900 memset(semantic, 0,
sizeof(*semantic));
3951 if (
ctx->internal_func_name)
3953 char *internal_name;
3958 name = internal_name;
3990 for (
i = 0;
i < 4; ++
i)
3992 if (writemask & (1 <<
i))
4003 static const unsigned int swizzles[16] =
4023 return swizzles[writemask & 0xf];
4028 unsigned int ret = 0,
i,
j = 0;
4030 for (
i = 0;
i < 4; ++
i)
4034 if (second & (1 <<
j++))
4046 for (
i = 0;
i < dim; ++
i)
4131 return &profiles[
i];
4148 unsigned int x,
y, bt,
i,
v;
4151 static const char *
const names[] =
4161 static const char *
const variants_float[] = {
"min10float",
"min16float"};
4162 static const char *
const variants_int[] = {
"min12int",
"min16int"};
4163 static const char *
const variants_uint[] = {
"min16uint"};
4165 static const char *
const sampler_names[] =
4197 {
"technique10", 10},
4198 {
"technique11", 11},
4206 for (
y = 1;
y <= 4; ++
y)
4208 for (
x = 1;
x <= 4; ++
x)
4214 ctx->builtin_types.matrix[bt][
x - 1][
y - 1] =
type;
4222 ctx->builtin_types.vector[bt][
x - 1] =
type;
4230 ctx->builtin_types.scalar[bt] =
type;
4239 const char *
const *variants;
4240 unsigned int n_variants;
4245 variants = variants_float;
4250 variants = variants_int;
4255 variants = variants_uint;
4265 for (
v = 0;
v < n_variants; ++
v)
4267 for (
y = 1;
y <= 4; ++
y)
4269 for (
x = 1;
x <= 4; ++
x)
4274 type->is_minimum_precision = 1;
4282 type->is_minimum_precision = 1;
4290 type->is_minimum_precision = 1;
4302 type->sampler_dim = bt;
4303 ctx->builtin_types.sampler[bt] =
type;
4329 effect_types[
i].base_type, effect_types[
i].
dimx, effect_types[
i].
dimy);
4336 type->e.version = technique_types[
i].version;
4352 ctx->message_context = message_context;
4361 ctx->source_files_count = 1;
4362 ctx->location.source_name =
ctx->source_files[0];
4363 ctx->location.line =
ctx->location.column = 1;
4375 ctx->globals =
ctx->cur_scope;
4393 ctx->cur_buffer =
ctx->globals_buffer;
4395 ctx->warn_implicit_truncation =
true;
4420 ctx->warn_implicit_truncation =
option->value;
4424 ctx->include_empty_buffers =
option->value;
4438 ctx->output_primitive = 0;
4439 ctx->partitioning = 0;
4452 for (
i = 0;
i <
ctx->source_files_count; ++
i)
4465 for (
i = 0;
i <
var->state_block_count; ++
i)
4469 var->state_block_count = 0;
4470 var->state_block_capacity = 0;
4504 const char *entry_point;
4510 ERR(
"No HLSL source info given.\n");
4524 "The '%s' target profile is only compatible with the 'fx' target type.",
profile->
name);
4530 "The '%s' target profile is incompatible with the 'd3dbc' target type.",
profile->
name);
4536 "The '%s' target profile is incompatible with the 'dxbc-tpf' target type.",
profile->
name);
4542 "The '%s' target profile is incompatible with the 'fx' target type.",
profile->
name);
4598 "Entry point \"%s\" is not defined.", entry_point);
4611 if (
profile->major_version < 4)
4646 const char *saved_internal_func_name =
ctx->internal_func_name;
4649 void *saved_scanner =
ctx->scanner;
4667 ctx->internal_func_name = internal_name->
buffer;
4670 ctx->scanner = saved_scanner;
4671 ctx->internal_func_name = saved_internal_func_name;
4672 ctx->cur_function = saved_cur_function;
4676 ERR(
"Failed to compile intrinsic, error %u.\n",
ret);
static void list_remove(struct list_entry *entry)
static int list_empty(struct list_entry *head)
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
static void list_init(struct list_entry *head)
_STLP_TEMPLATE_FOR_CONT_EXT size_type count(const _KT &__x) const
unsigned int component_count
int d3dbc_parse(const struct vkd3d_shader_compile_info *compile_info, uint64_t config_flags, struct vkd3d_shader_message_context *message_context, struct vsir_program *program)
size_t const element_size
static const WCHAR version[]
BOOL next_node(stream_t *stream, strbuf_t *buf)
_ACRTIMP size_t __cdecl strlen(const char *)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
int hlsl_emit_effect_binary(struct hlsl_ctx *ctx, struct vkd3d_shader_code *out)
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei count
GLuint GLuint GLsizei GLenum type
GLint GLint GLint GLint GLint GLint y
GLdouble GLdouble GLdouble r
GLenum GLenum GLuint components
GLuint GLuint GLuint GLuint arg1
GLuint GLuint GLuint GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg3
GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg2
GLboolean GLboolean GLboolean b
GLenum const GLfloat * params
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
enum wined3d_data_type data_type
unsigned int hlsl_type_get_array_element_reg_size(const struct hlsl_type *type, enum hlsl_regset regset)
static const char * get_case_insensitive_typename(const char *name)
static unsigned int traverse_path_from_component_index(struct hlsl_ctx *ctx, struct hlsl_type **type_ptr, unsigned int *index_ptr)
static bool func_decl_matches(const struct hlsl_ir_function_decl *decl, const struct hlsl_func_parameters *parameters)
static struct hlsl_ir_node * clone_if(struct hlsl_ctx *ctx, struct clone_instr_map *map, struct hlsl_ir_if *src)
static void dump_deref(struct vkd3d_string_buffer *buffer, const struct hlsl_deref *deref)
static struct hlsl_ir_node * clone_resource_store(struct hlsl_ctx *ctx, struct clone_instr_map *map, struct hlsl_ir_resource_store *src)
struct hlsl_ir_var * hlsl_get_var(struct hlsl_scope *scope, const char *name)
static struct hlsl_ir_node * clone_call(struct hlsl_ctx *ctx, struct hlsl_ir_call *src)
static void dump_ir_stateblock_constant(struct vkd3d_string_buffer *buffer, const struct hlsl_ir_stateblock_constant *constant)
static struct hlsl_ir_node * clone_string_constant(struct hlsl_ctx *ctx, struct hlsl_ir_string_constant *src)
bool hlsl_scope_add_type(struct hlsl_scope *scope, struct hlsl_type *type)
static void free_ir_loop(struct hlsl_ir_loop *loop)
static struct hlsl_ir_node * clone_swizzle(struct hlsl_ctx *ctx, struct clone_instr_map *map, struct hlsl_ir_swizzle *src)
static void free_function(struct hlsl_ir_function *func)
bool hlsl_clone_block(struct hlsl_ctx *ctx, struct hlsl_block *dst_block, const struct hlsl_block *src_block)
static void dump_ir_store(struct vkd3d_string_buffer *buffer, const struct hlsl_ir_store *store)
struct vkd3d_string_buffer * hlsl_type_to_string(struct hlsl_ctx *ctx, const struct hlsl_type *type)
void hlsl_dump_var_default_values(const struct hlsl_ir_var *var)
void hlsl_dump_function(struct hlsl_ctx *ctx, const struct hlsl_ir_function_decl *func)
bool hlsl_types_are_equal(const struct hlsl_type *t1, const struct hlsl_type *t2)
struct hlsl_ir_node * hlsl_new_float_constant(struct hlsl_ctx *ctx, float f, const struct vkd3d_shader_location *loc)
bool hlsl_copy_deref(struct hlsl_ctx *ctx, struct hlsl_deref *deref, const struct hlsl_deref *other)
unsigned int hlsl_type_get_sm4_offset(const struct hlsl_type *type, unsigned int offset)
static struct hlsl_type * hlsl_new_simple_type(struct hlsl_ctx *ctx, const char *name, enum hlsl_type_class class)
static void dump_ir_constant(struct vkd3d_string_buffer *buffer, const struct hlsl_ir_constant *constant)
struct hlsl_ir_node * hlsl_new_sampler_state(struct hlsl_ctx *ctx, const struct hlsl_state_block *state_block, struct vkd3d_shader_location *loc)
bool hlsl_add_var(struct hlsl_ctx *ctx, struct hlsl_ir_var *decl, bool local_var)
struct hlsl_ir_function_decl * hlsl_get_first_func_decl(struct hlsl_ctx *ctx, const char *name)
bool hlsl_type_is_resource(const struct hlsl_type *type)
struct hlsl_type * hlsl_new_uav_type(struct hlsl_ctx *ctx, enum hlsl_sampler_dim dim, struct hlsl_type *format, bool rasteriser_ordered)
static void hlsl_type_calculate_reg_size(struct hlsl_ctx *ctx, struct hlsl_type *type)
void hlsl_block_cleanup(struct hlsl_block *block)
bool hlsl_index_chain_has_resource_access(struct hlsl_ir_index *index)
const char * hlsl_jump_type_to_string(enum hlsl_ir_jump_type type)
struct hlsl_ir_var * hlsl_new_synthetic_var(struct hlsl_ctx *ctx, const char *template, struct hlsl_type *type, const struct vkd3d_shader_location *loc)
static void dump_ir_resource_load(struct vkd3d_string_buffer *buffer, const struct hlsl_ir_resource_load *load)
static bool init_deref_from_component_index(struct hlsl_ctx *ctx, struct hlsl_block *block, struct hlsl_deref *deref, const struct hlsl_deref *prefix, unsigned int index, const struct vkd3d_shader_location *loc)
void hlsl_add_function(struct hlsl_ctx *ctx, char *name, struct hlsl_ir_function_decl *decl)
struct hlsl_ir_node * hlsl_new_stateblock_constant(struct hlsl_ctx *ctx, const char *name, struct vkd3d_shader_location *loc)
struct hlsl_ir_node * hlsl_new_loop(struct hlsl_ctx *ctx, struct hlsl_block *block, enum hlsl_ir_loop_unroll_type unroll_type, unsigned int unroll_limit, const struct vkd3d_shader_location *loc)
struct hlsl_ir_node * hlsl_new_constant(struct hlsl_ctx *ctx, struct hlsl_type *type, const struct hlsl_constant_value *value, const struct vkd3d_shader_location *loc)
static struct hlsl_ir_node * clone_stateblock_constant(struct hlsl_ctx *ctx, struct clone_instr_map *map, struct hlsl_ir_stateblock_constant *constant)
static void dump_src(struct vkd3d_string_buffer *buffer, const struct hlsl_src *src)
void hlsl_fixme(struct hlsl_ctx *ctx, const struct vkd3d_shader_location *loc, const char *fmt,...)
void hlsl_pop_scope(struct hlsl_ctx *ctx)
void hlsl_free_var(struct hlsl_ir_var *decl)
unsigned int hlsl_type_component_count(const struct hlsl_type *type)
struct hlsl_type * hlsl_get_type(struct hlsl_scope *scope, const char *name, bool recursive, bool case_insensitive)
static void dump_ir_loop(struct hlsl_ctx *ctx, struct vkd3d_string_buffer *buffer, const struct hlsl_ir_loop *loop)
bool hlsl_type_is_row_major(const struct hlsl_type *type)
static void free_ir_jump(struct hlsl_ir_jump *jump)
void hlsl_push_scope(struct hlsl_ctx *ctx)
static bool clone_block(struct hlsl_ctx *ctx, struct hlsl_block *dst_block, const struct hlsl_block *src_block, struct clone_instr_map *map)
struct hlsl_ir_var * hlsl_new_synthetic_var_named(struct hlsl_ctx *ctx, const char *name, struct hlsl_type *type, const struct vkd3d_shader_location *loc, bool dummy_scope)
static void free_ir_compile(struct hlsl_ir_compile *compile)
void hlsl_note(struct hlsl_ctx *ctx, const struct vkd3d_shader_location *loc, enum vkd3d_shader_log_level level, const char *fmt,...)
void hlsl_free_ir_switch_case(struct hlsl_ir_switch_case *c)
void hlsl_free_state_block_entry(struct hlsl_state_block_entry *entry)
struct hlsl_ir_node * hlsl_new_switch(struct hlsl_ctx *ctx, struct hlsl_ir_node *selector, struct list *cases, const struct vkd3d_shader_location *loc)
static bool type_is_single_reg(const struct hlsl_type *type)
void hlsl_init_simple_deref_from_var(struct hlsl_deref *deref, struct hlsl_ir_var *var)
bool hlsl_index_is_noncontiguous(struct hlsl_ir_index *index)
static void free_function_rb(struct rb_entry *entry, void *context)
struct hlsl_ir_node * hlsl_new_store_index(struct hlsl_ctx *ctx, const struct hlsl_deref *lhs, struct hlsl_ir_node *idx, struct hlsl_ir_node *rhs, unsigned int writemask, const struct vkd3d_shader_location *loc)
struct hlsl_ir_node * hlsl_new_int_constant(struct hlsl_ctx *ctx, int32_t n, const struct vkd3d_shader_location *loc)
bool hlsl_clone_semantic(struct hlsl_ctx *ctx, struct hlsl_semantic *dst, const struct hlsl_semantic *src)
static struct hlsl_ir_node * clone_store(struct hlsl_ctx *ctx, struct clone_instr_map *map, struct hlsl_ir_store *src)
struct hlsl_ir_node * hlsl_new_cast(struct hlsl_ctx *ctx, struct hlsl_ir_node *node, struct hlsl_type *type, const struct vkd3d_shader_location *loc)
bool hlsl_index_is_resource_access(struct hlsl_ir_index *index)
const char * debug_hlsl_type(struct hlsl_ctx *ctx, const struct hlsl_type *type)
struct hlsl_type * hlsl_new_cb_type(struct hlsl_ctx *ctx, struct hlsl_type *format)
bool hlsl_new_store_component(struct hlsl_ctx *ctx, struct hlsl_block *block, const struct hlsl_deref *lhs, unsigned int comp, struct hlsl_ir_node *rhs)
void hlsl_free_instr_list(struct list *list)
struct hlsl_ir_function_decl * hlsl_get_func_decl(struct hlsl_ctx *ctx, const char *name, const struct hlsl_func_parameters *parameters)
static struct hlsl_ir_node * clone_jump(struct hlsl_ctx *ctx, struct clone_instr_map *map, struct hlsl_ir_jump *src)
static void free_ir_index(struct hlsl_ir_index *index)
static void free_ir_string_constant(struct hlsl_ir_string_constant *string)
static void free_ir_constant(struct hlsl_ir_constant *constant)
static void dump_instr(struct hlsl_ctx *ctx, struct vkd3d_string_buffer *buffer, const struct hlsl_ir_node *instr)
uint32_t hlsl_map_swizzle(uint32_t swizzle, unsigned int writemask)
static struct hlsl_ir_node * clone_instr(struct hlsl_ctx *ctx, struct clone_instr_map *map, const struct hlsl_ir_node *instr)
struct hlsl_ir_node * hlsl_new_swizzle(struct hlsl_ctx *ctx, uint32_t s, unsigned int components, struct hlsl_ir_node *val, const struct vkd3d_shader_location *loc)
const char * debug_hlsl_swizzle(uint32_t swizzle, unsigned int size)
static void free_ir_load(struct hlsl_ir_load *load)
static void free_ir_resource_store(struct hlsl_ir_resource_store *store)
static void dump_ir_if(struct hlsl_ctx *ctx, struct vkd3d_string_buffer *buffer, const struct hlsl_ir_if *if_node)
struct hlsl_ir_node * hlsl_new_unary_expr(struct hlsl_ctx *ctx, enum hlsl_ir_expr_op op, struct hlsl_ir_node *arg, const struct vkd3d_shader_location *loc)
static void dump_ir_expr(struct vkd3d_string_buffer *buffer, const struct hlsl_ir_expr *expr)
void hlsl_cleanup_deref(struct hlsl_deref *deref)
static void free_ir_swizzle(struct hlsl_ir_swizzle *swizzle)
void hlsl_cleanup_semantic(struct hlsl_semantic *semantic)
struct hlsl_ir_load * hlsl_new_var_load(struct hlsl_ctx *ctx, struct hlsl_ir_var *var, const struct vkd3d_shader_location *loc)
struct hlsl_type * hlsl_new_struct_type(struct hlsl_ctx *ctx, const char *name, struct hlsl_struct_field *fields, size_t field_count)
static void clone_src(struct clone_instr_map *map, struct hlsl_src *dst, const struct hlsl_src *src)
struct hlsl_buffer * hlsl_new_buffer(struct hlsl_ctx *ctx, enum hlsl_buffer_type type, const char *name, uint32_t modifiers, const struct hlsl_reg_reservation *reservation, struct hlsl_scope *annotations, const struct vkd3d_shader_location *loc)
void hlsl_error(struct hlsl_ctx *ctx, const struct vkd3d_shader_location *loc, enum vkd3d_shader_error error, const char *fmt,...)
void hlsl_warning(struct hlsl_ctx *ctx, const struct vkd3d_shader_location *loc, enum vkd3d_shader_error error, const char *fmt,...)
static struct hlsl_scope * hlsl_new_scope(struct hlsl_ctx *ctx, struct hlsl_scope *upper)
static struct hlsl_ir_node * clone_expr(struct hlsl_ctx *ctx, struct clone_instr_map *map, struct hlsl_ir_expr *src)
struct hlsl_ir_node * hlsl_new_load_component(struct hlsl_ctx *ctx, struct hlsl_block *block, const struct hlsl_deref *deref, unsigned int comp, const struct vkd3d_shader_location *loc)
struct hlsl_ir_node * hlsl_new_compile(struct hlsl_ctx *ctx, enum hlsl_compile_type compile_type, const char *profile_name, struct hlsl_ir_node **args, unsigned int args_count, struct hlsl_block *args_instrs, const struct vkd3d_shader_location *loc)
unsigned int hlsl_type_element_count(const struct hlsl_type *type)
uint32_t hlsl_swizzle_from_writemask(unsigned int writemask)
static void dump_ir_call(struct hlsl_ctx *ctx, struct vkd3d_string_buffer *buffer, const struct hlsl_ir_call *call)
struct hlsl_ir_node * hlsl_new_null_constant(struct hlsl_ctx *ctx, const struct vkd3d_shader_location *loc)
struct hlsl_type * hlsl_type_clone(struct hlsl_ctx *ctx, struct hlsl_type *old, unsigned int default_majority, uint32_t modifiers)
static void dump_ir_jump(struct vkd3d_string_buffer *buffer, const struct hlsl_ir_jump *jump)
unsigned int hlsl_type_get_component_offset(struct hlsl_ctx *ctx, struct hlsl_type *type, unsigned int index, enum hlsl_regset *regset)
int hlsl_compile_shader(const struct vkd3d_shader_code *hlsl, const struct vkd3d_shader_compile_info *compile_info, struct vkd3d_shader_code *out, struct vkd3d_shader_message_context *message_context)
struct hlsl_ir_node * hlsl_new_copy(struct hlsl_ctx *ctx, struct hlsl_ir_node *node)
static void dump_ir_resource_store(struct vkd3d_string_buffer *buffer, const struct hlsl_ir_resource_store *store)
static void free_ir_expr(struct hlsl_ir_expr *expr)
struct hlsl_type * hlsl_type_get_component_type(struct hlsl_ctx *ctx, struct hlsl_type *type, unsigned int index)
static void init_node(struct hlsl_ir_node *node, enum hlsl_ir_node_type type, struct hlsl_type *data_type, const struct vkd3d_shader_location *loc)
static void hlsl_ctx_cleanup(struct hlsl_ctx *ctx)
struct hlsl_ir_node * hlsl_new_expr(struct hlsl_ctx *ctx, enum hlsl_ir_expr_op op, struct hlsl_ir_node *operands[HLSL_MAX_OPERANDS], struct hlsl_type *data_type, const struct vkd3d_shader_location *loc)
static struct hlsl_ir_node * clone_constant(struct hlsl_ctx *ctx, struct hlsl_ir_constant *src)
uint32_t hlsl_combine_swizzles(uint32_t first, uint32_t second, unsigned int dim)
static struct hlsl_ir_node * clone_index(struct hlsl_ctx *ctx, struct clone_instr_map *map, struct hlsl_ir_index *src)
static int compare_function_rb(const void *key, const struct rb_entry *entry)
const struct hlsl_type * hlsl_get_multiarray_element_type(const struct hlsl_type *type)
static bool init_deref(struct hlsl_ctx *ctx, struct hlsl_deref *deref, struct hlsl_ir_var *var, unsigned int path_len)
unsigned int hlsl_get_multiarray_size(const struct hlsl_type *type)
bool hlsl_type_is_shader(const struct hlsl_type *type)
struct hlsl_ir_node * hlsl_new_ternary_expr(struct hlsl_ctx *ctx, enum hlsl_ir_expr_op op, struct hlsl_ir_node *arg1, struct hlsl_ir_node *arg2, struct hlsl_ir_node *arg3)
static void declare_predefined_types(struct hlsl_ctx *ctx)
static void free_ir_resource_load(struct hlsl_ir_resource_load *load)
struct hlsl_ir_node * hlsl_new_uint_constant(struct hlsl_ctx *ctx, unsigned int n, const struct vkd3d_shader_location *loc)
static struct hlsl_ir_node * clone_compile(struct hlsl_ctx *ctx, struct clone_instr_map *map, struct hlsl_ir_compile *compile)
static struct hlsl_ir_node * clone_sampler_state(struct hlsl_ctx *ctx, struct clone_instr_map *map, struct hlsl_ir_sampler_state *sampler_state)
static struct hlsl_ir_node * hlsl_new_error_expr(struct hlsl_ctx *ctx)
static void dump_ir_swizzle(struct vkd3d_string_buffer *buffer, const struct hlsl_ir_swizzle *swizzle)
struct vkd3d_string_buffer * hlsl_component_to_string(struct hlsl_ctx *ctx, const struct hlsl_ir_var *var, unsigned int index)
struct hlsl_type * hlsl_get_element_type_from_path_index(struct hlsl_ctx *ctx, const struct hlsl_type *type, struct hlsl_ir_node *idx)
static struct hlsl_ir_node * clone_loop(struct hlsl_ctx *ctx, struct clone_instr_map *map, struct hlsl_ir_loop *src)
struct hlsl_ir_node * hlsl_new_index(struct hlsl_ctx *ctx, struct hlsl_ir_node *val, struct hlsl_ir_node *idx, const struct vkd3d_shader_location *loc)
struct hlsl_type * hlsl_deref_get_type(struct hlsl_ctx *ctx, const struct hlsl_deref *deref)
static int compare_hlsl_types_rb(const void *key, const struct rb_entry *entry)
void hlsl_replace_node(struct hlsl_ir_node *old, struct hlsl_ir_node *new)
struct hlsl_ir_node * hlsl_new_resource_store(struct hlsl_ctx *ctx, const struct hlsl_deref *resource, struct hlsl_ir_node *coords, struct hlsl_ir_node *value, const struct vkd3d_shader_location *loc)
const char * debug_hlsl_writemask(unsigned int writemask)
static void free_ir_call(struct hlsl_ir_call *call)
static void free_function_decl(struct hlsl_ir_function_decl *decl)
unsigned int hlsl_type_major_size(const struct hlsl_type *type)
struct hlsl_ir_node * hlsl_new_resource_load(struct hlsl_ctx *ctx, const struct hlsl_resource_load_params *params, const struct vkd3d_shader_location *loc)
const char * hlsl_node_type_to_string(enum hlsl_ir_node_type type)
static struct hlsl_ir_node * map_instr(const struct clone_instr_map *map, struct hlsl_ir_node *src)
static bool hlsl_ctx_init(struct hlsl_ctx *ctx, const struct vkd3d_shader_compile_info *compile_info, const struct hlsl_profile_info *profile, struct vkd3d_shader_message_context *message_context)
unsigned int hlsl_combine_writemasks(unsigned int first, unsigned int second)
struct hlsl_ir_function_decl * hlsl_new_func_decl(struct hlsl_ctx *ctx, struct hlsl_type *return_type, const struct hlsl_func_parameters *parameters, const struct hlsl_semantic *semantic, const struct vkd3d_shader_location *loc)
struct hlsl_type * hlsl_new_texture_type(struct hlsl_ctx *ctx, enum hlsl_sampler_dim dim, struct hlsl_type *format, unsigned int sample_count)
static void dump_ir_var(struct hlsl_ctx *ctx, struct vkd3d_string_buffer *buffer, const struct hlsl_ir_var *var)
static void dump_ir_compile(struct hlsl_ctx *ctx, struct vkd3d_string_buffer *buffer, const struct hlsl_ir_compile *compile)
static void free_ir_switch(struct hlsl_ir_switch *s)
struct hlsl_type * hlsl_new_array_type(struct hlsl_ctx *ctx, struct hlsl_type *basic_type, unsigned int array_size)
static bool type_is_single_component(const struct hlsl_type *type)
const struct hlsl_profile_info * hlsl_get_target_info(const char *target)
struct hlsl_ir_node * hlsl_new_binary_expr(struct hlsl_ctx *ctx, enum hlsl_ir_expr_op op, struct hlsl_ir_node *arg1, struct hlsl_ir_node *arg2)
static bool clone_deref(struct hlsl_ctx *ctx, struct clone_instr_map *map, struct hlsl_deref *dst, const struct hlsl_deref *src)
struct hlsl_ir_switch_case * hlsl_new_switch_case(struct hlsl_ctx *ctx, unsigned int value, bool is_default, struct hlsl_block *body, const struct vkd3d_shader_location *loc)
static struct hlsl_type * hlsl_new_type(struct hlsl_ctx *ctx, const char *name, enum hlsl_type_class type_class, enum hlsl_base_type base_type, unsigned dimx, unsigned dimy)
void hlsl_free_state_block(struct hlsl_state_block *state_block)
struct hlsl_ir_load * hlsl_new_load_index(struct hlsl_ctx *ctx, const struct hlsl_deref *deref, struct hlsl_ir_node *idx, const struct vkd3d_shader_location *loc)
static void free_ir_stateblock_constant(struct hlsl_ir_stateblock_constant *constant)
static void free_ir_if(struct hlsl_ir_if *if_node)
static struct hlsl_ir_node * clone_resource_load(struct hlsl_ctx *ctx, struct clone_instr_map *map, struct hlsl_ir_resource_load *src)
bool hlsl_state_block_add_entry(struct hlsl_state_block *state_block, struct hlsl_state_block_entry *entry)
char * hlsl_sprintf_alloc(struct hlsl_ctx *ctx, const char *fmt,...)
struct hlsl_ir_node * hlsl_new_call(struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *decl, const struct vkd3d_shader_location *loc)
static struct hlsl_ir_node * clone_switch(struct hlsl_ctx *ctx, struct clone_instr_map *map, struct hlsl_ir_switch *s)
static void dump_ir_switch(struct hlsl_ctx *ctx, struct vkd3d_string_buffer *buffer, const struct hlsl_ir_switch *s)
bool hlsl_init_deref_from_index_chain(struct hlsl_ctx *ctx, struct hlsl_deref *deref, struct hlsl_ir_node *chain)
unsigned int hlsl_type_minor_size(const struct hlsl_type *type)
struct hlsl_ir_var * hlsl_new_var(struct hlsl_ctx *ctx, const char *name, struct hlsl_type *type, const struct vkd3d_shader_location *loc, const struct hlsl_semantic *semantic, uint32_t modifiers, const struct hlsl_reg_reservation *reg_reservation)
void hlsl_free_type(struct hlsl_type *type)
const char * debug_hlsl_expr_op(enum hlsl_ir_expr_op op)
static void dump_ir_index(struct vkd3d_string_buffer *buffer, const struct hlsl_ir_index *index)
void hlsl_free_attribute(struct hlsl_attribute *attr)
static struct hlsl_ir_node * clone_load(struct hlsl_ctx *ctx, struct clone_instr_map *map, struct hlsl_ir_load *src)
struct hlsl_ir_node * hlsl_new_vsir_instruction_ref(struct hlsl_ctx *ctx, unsigned int vsir_instr_idx, struct hlsl_type *type, const struct hlsl_reg *reg, const struct vkd3d_shader_location *loc)
static void dump_block(struct hlsl_ctx *ctx, struct vkd3d_string_buffer *buffer, const struct hlsl_block *block)
static void free_ir_sampler_state(struct hlsl_ir_sampler_state *sampler_state)
static void dump_ir_string(struct vkd3d_string_buffer *buffer, const struct hlsl_ir_string_constant *string)
static enum hlsl_regset type_get_regset(const struct hlsl_type *type)
enum hlsl_regset hlsl_deref_get_regset(struct hlsl_ctx *ctx, const struct hlsl_deref *deref)
struct vkd3d_string_buffer * hlsl_modifiers_to_string(struct hlsl_ctx *ctx, uint32_t modifiers)
struct hlsl_ir_function * hlsl_get_function(struct hlsl_ctx *ctx, const char *name)
struct hlsl_ir_node * hlsl_new_jump(struct hlsl_ctx *ctx, enum hlsl_ir_jump_type type, struct hlsl_ir_node *condition, const struct vkd3d_shader_location *loc)
void hlsl_free_instr(struct hlsl_ir_node *node)
struct hlsl_ir_function_decl * hlsl_compile_internal_function(struct hlsl_ctx *ctx, const char *name, const char *hlsl)
struct hlsl_ir_node * hlsl_new_if(struct hlsl_ctx *ctx, struct hlsl_ir_node *condition, struct hlsl_block *then_block, struct hlsl_block *else_block, const struct vkd3d_shader_location *loc)
struct hlsl_ir_node * hlsl_new_string_constant(struct hlsl_ctx *ctx, const char *str, const struct vkd3d_shader_location *loc)
static void free_ir_store(struct hlsl_ir_store *store)
void hlsl_cleanup_ir_switch_cases(struct list *cases)
struct hlsl_state_block_entry * clone_stateblock_entry(struct hlsl_ctx *ctx, const struct hlsl_state_block_entry *src, const char *name, bool lhs_has_index, unsigned int lhs_index, bool single_arg, unsigned int arg_index)
static void dump_ir_sampler_state(struct vkd3d_string_buffer *buffer, const struct hlsl_ir_sampler_state *sampler_state)
struct hlsl_ir_node * hlsl_new_bool_constant(struct hlsl_ctx *ctx, bool b, const struct vkd3d_shader_location *loc)
struct hlsl_ir_node * hlsl_new_simple_store(struct hlsl_ctx *ctx, struct hlsl_ir_var *lhs, struct hlsl_ir_node *rhs)
struct hlsl_ir_load * hlsl_new_load_parent(struct hlsl_ctx *ctx, const struct hlsl_deref *deref, const struct vkd3d_shader_location *loc)
#define HLSL_STORAGE_CENTROID
static void hlsl_src_from_node(struct hlsl_src *src, struct hlsl_ir_node *node)
static bool hlsl_array_reserve(struct hlsl_ctx *ctx, void **elements, size_t *capacity, size_t element_count, size_t element_size)
@ HLSL_CLASS_COMPUTE_SHADER
@ HLSL_CLASS_RASTERIZER_STATE
@ HLSL_CLASS_RENDER_TARGET_VIEW
@ HLSL_CLASS_VERTEX_SHADER
@ HLSL_CLASS_GEOMETRY_SHADER
@ HLSL_CLASS_DEPTH_STENCIL_VIEW
@ HLSL_CLASS_CONSTANT_BUFFER
@ HLSL_CLASS_EFFECT_GROUP
@ HLSL_CLASS_PIXEL_SHADER
@ HLSL_CLASS_DOMAIN_SHADER
@ HLSL_CLASS_DEPTH_STENCIL_STATE
static char * hlsl_strdup(struct hlsl_ctx *ctx, const char *string)
static struct hlsl_type * hlsl_get_vector_type(const struct hlsl_ctx *ctx, enum hlsl_base_type base_type, unsigned int dimx)
#define HLSL_ARRAY_ELEMENTS_COUNT_IMPLICIT
#define HLSL_STORAGE_UNIFORM
static void * hlsl_calloc(struct hlsl_ctx *ctx, size_t count, size_t size)
@ HLSL_REGSET_LAST_OBJECT
static void hlsl_block_init(struct hlsl_block *block)
@ HLSL_IR_STATEBLOCK_CONSTANT
@ HLSL_IR_VSIR_INSTRUCTION_REF
@ HLSL_IR_STRING_CONSTANT
#define HLSL_STORAGE_EXTERN
#define HLSL_STORAGE_GROUPSHARED
static struct vkd3d_string_buffer * hlsl_get_string_buffer(struct hlsl_ctx *ctx)
#define HLSL_SWIZZLE(x, y, z, w)
#define HLSL_STORAGE_STATIC
static struct hlsl_type * hlsl_get_scalar_type(const struct hlsl_ctx *ctx, enum hlsl_base_type base_type)
#define HLSL_SWIZZLE_SHIFT(idx)
static void hlsl_block_add_instr(struct hlsl_block *block, struct hlsl_ir_node *instr)
#define HLSL_MODIFIER_PRECISE
@ HLSL_RESOURCE_GATHER_BLUE
@ HLSL_RESOURCE_SAMPLE_GRAD
@ HLSL_RESOURCE_SAMPLE_CMP
@ HLSL_RESOURCE_SAMPLE_CMP_LZ
@ HLSL_RESOURCE_SAMPLE_LOD_BIAS
@ HLSL_RESOURCE_SAMPLE_INFO
@ HLSL_RESOURCE_GATHER_GREEN
@ HLSL_RESOURCE_GATHER_RED
@ HLSL_RESOURCE_SAMPLE_LOD
@ HLSL_RESOURCE_GATHER_ALPHA
static void * hlsl_alloc(struct hlsl_ctx *ctx, size_t size)
static bool hlsl_is_numeric_type(const struct hlsl_type *type)
#define HLSL_MODIFIER_CONST
static void hlsl_block_add_block(struct hlsl_block *block, struct hlsl_block *add)
#define HLSL_STORAGE_LINEAR
@ HLSL_SAMPLER_DIM_GENERIC
@ HLSL_SAMPLER_DIM_1DARRAY
@ HLSL_SAMPLER_DIM_CUBEARRAY
@ HLSL_SAMPLER_DIM_2DMSARRAY
@ HLSL_SAMPLER_DIM_BUFFER
@ HLSL_SAMPLER_DIM_LAST_SAMPLER
@ HLSL_SAMPLER_DIM_2DARRAY
@ HLSL_SAMPLER_DIM_RAW_BUFFER
@ HLSL_SAMPLER_DIM_COMPARISON
@ HLSL_SAMPLER_DIM_STRUCTURED_BUFFER
int hlsl_emit_bytecode(struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *entry_func, enum vkd3d_shader_target_type target_type, struct vkd3d_shader_code *out)
int hlsl_lexer_compile(struct hlsl_ctx *ctx, const struct vkd3d_shader_code *hlsl)
static bool hlsl_deref_is_lowered(const struct hlsl_deref *deref)
#define HLSL_MODIFIER_ROW_MAJOR
static void hlsl_src_remove(struct hlsl_src *src)
#define HLSL_STORAGE_SHARED
#define HLSL_MODIFIERS_MAJORITY_MASK
#define HLSL_MAX_OPERANDS
#define HLSL_MODIFIER_COLUMN_MAJOR
@ HLSL_OP0_RASTERIZER_SAMPLE_COUNT
static unsigned int hlsl_swizzle_get_component(uint32_t swizzle, unsigned int idx)
@ HLSL_IR_JUMP_DISCARD_NZ
@ HLSL_IR_JUMP_UNRESOLVED_CONTINUE
@ HLSL_IR_JUMP_DISCARD_NEG
static void hlsl_release_string_buffer(struct hlsl_ctx *ctx, struct vkd3d_string_buffer *buffer)
#define HLSL_MODIFIER_VOLATILE
#define HLSL_STORAGE_NOINTERPOLATION
#define HLSL_STORAGE_NOPERSPECTIVE
void vsir_program_cleanup(struct vsir_program *program)
static const char * target_type(DWORD dwType)
static BOOL is_string(parse_buffer *buf)
for(i=0;i< sizeof(testsuite)/sizeof(testsuite[0]);++i) ok(call_test(testsuite[i].func)
static unsigned __int64 next
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
__WINE_SERVER_LIST_INLINE void list_move_head(struct list *dst, struct list *src)
#define LIST_FOR_EACH_ENTRY_SAFE_REV(cursor, cursor2, list, type, field)
#define RB_ENTRY_VALUE(element, type, field)
static void rb_destroy(struct rb_tree *tree, rb_traverse_func_t *callback, void *context)
static int rb_put(struct rb_tree *tree, const void *key, struct rb_entry *entry)
static struct rb_entry * rb_get(const struct rb_tree *tree, const void *key)
static void rb_init(struct rb_tree *tree, rb_compare_func_t compare)
static const void * body(MD5_CTX *ctx, const void *data, unsigned long size)
struct clone_instr_map::@5996 * instrs
const struct hlsl_ir_node * src
struct hlsl_ir_node * dst
union constant::@270 value[4]
struct hlsl_reg_reservation reservation
struct vkd3d_shader_location loc
struct hlsl_scope * annotations
struct vkd3d_shader_message_context * message_context
struct hlsl_type * data_type
struct hlsl_src rel_offset
unsigned int const_offset
struct hlsl_ir_function_decl * decl
const struct hlsl_profile_info * profile
enum hlsl_ir_compile::hlsl_compile_type compile_type
struct hlsl_ir_constant::hlsl_constant_value value
struct hlsl_src operands[HLSL_MAX_OPERANDS]
const struct hlsl_attribute *const * attrs
struct hlsl_func_parameters parameters
struct hlsl_ir_function * func
struct hlsl_ir_var * return_var
struct hlsl_ir_var * early_return_var
struct vkd3d_shader_location loc
struct hlsl_type * return_type
struct hlsl_block then_block
struct hlsl_src condition
struct hlsl_block else_block
struct hlsl_src condition
enum hlsl_ir_jump_type type
enum hlsl_ir_loop_unroll_type unroll_type
unsigned int unroll_limit
enum hlsl_ir_node_type type
struct hlsl_type * data_type
struct vkd3d_shader_location loc
struct hlsl_src coords value
struct hlsl_deref resource
struct hlsl_state_block * state_block
struct vkd3d_shader_location loc
struct hlsl_ir_var::hlsl_default_value * default_values
struct hlsl_scope * scope
struct hlsl_semantic semantic
struct hlsl_reg_reservation reg_reservation
struct hlsl_ir_var::@6002 * objects_usage[HLSL_REGSET_LAST_OBJECT+1]
struct hlsl_type * data_type
struct vkd3d_shader_location loc
unsigned int state_block_count
struct hlsl_state_block ** state_blocks
unsigned int vsir_instr_idx
enum vkd3d_shader_type type
struct hlsl_scope * upper
struct hlsl_state_block_entry ** entries
struct hlsl_semantic semantic
struct vkd3d_shader_location loc
uint32_t is_minimum_precision
struct rb_entry scope_entry
struct hlsl_type * format
struct hlsl_type::@5997::@5998 numeric
enum hlsl_sampler_dim sampler_dim
struct hlsl_type::@5997::@6000 array
unsigned int sample_count
struct hlsl_type::@5997::@6001 resource
struct hlsl_type::@5997::@5999 record
enum hlsl_type_class class
const struct vkd3d_shader_compile_option * options
unsigned int option_count
enum vkd3d_shader_target_type target_type
Character const *const prefix
int tpf_parse(const struct vkd3d_shader_compile_info *compile_info, uint64_t config_flags, struct vkd3d_shader_message_context *message_context, struct vsir_program *program)
#define new(TYPE, numElems)
const char * vkd3d_dbg_sprintf(const char *fmt,...) VKD3D_PRINTF_FUNC(1
#define vkd3d_unreachable()
#define VKD3D_ASSERT(cond)
static int ascii_strcasecmp(const char *a, const char *b)
static void vkd3d_free(void *ptr)
bool vkd3d_array_reserve(void **elements, size_t *capacity, size_t element_count, size_t element_size)
@ VKD3D_SHADER_COMPILE_OPTION_WARN_IMPLICIT_TRUNCATION
@ VKD3D_SHADER_COMPILE_OPTION_BACKWARD_COMPATIBILITY
@ VKD3D_SHADER_COMPILE_OPTION_PACK_MATRIX_ORDER
@ VKD3D_SHADER_COMPILE_OPTION_CHILD_EFFECT
@ VKD3D_SHADER_COMPILE_OPTION_INCLUDE_EMPTY_BUFFERS_IN_EFFECTS
VKD3D_SHADER_API void vkd3d_shader_free_shader_code(struct vkd3d_shader_code *code)
@ VKD3D_SHADER_COMPILE_OPTION_BACKCOMPAT_MAP_SEMANTIC_NAMES
@ VKD3D_SHADER_COMPILE_OPTION_DOUBLE_AS_FLOAT_ALIAS
@ VKD3D_SHADER_SOURCE_D3D_BYTECODE
@ VKD3D_SHADER_SOURCE_DXBC_TPF
@ VKD3D_SHADER_TARGET_SPIRV_BINARY
@ VKD3D_SHADER_TARGET_D3D_ASM
@ VKD3D_SHADER_TARGET_SPIRV_TEXT
@ VKD3D_SHADER_TARGET_DXBC_TPF
@ VKD3D_SHADER_TARGET_D3D_BYTECODE
@ VKD3D_SHADER_COMPILE_OPTION_PACK_MATRIX_COLUMN_MAJOR
@ VKD3D_SHADER_COMPILE_OPTION_PACK_MATRIX_ROW_MAJOR
void vkd3d_string_buffer_init(struct vkd3d_string_buffer *buffer)
int vkd3d_string_buffer_vprintf(struct vkd3d_string_buffer *buffer, const char *format, va_list args)
void vkd3d_shader_verror(struct vkd3d_shader_message_context *context, const struct vkd3d_shader_location *location, enum vkd3d_shader_error error, const char *format, va_list args)
void vkd3d_string_buffer_cleanup(struct vkd3d_string_buffer *buffer)
void vkd3d_string_buffer_clear(struct vkd3d_string_buffer *buffer)
void vkd3d_string_buffer_cache_init(struct vkd3d_string_buffer_cache *cache)
void vkd3d_shader_vwarning(struct vkd3d_shader_message_context *context, const struct vkd3d_shader_location *location, enum vkd3d_shader_error error, const char *format, va_list args)
void vkd3d_string_buffer_cache_cleanup(struct vkd3d_string_buffer_cache *cache)
void vkd3d_shader_vnote(struct vkd3d_shader_message_context *context, const struct vkd3d_shader_location *location, enum vkd3d_shader_log_level level, const char *format, va_list args)
uint64_t vkd3d_shader_init_config_flags(void)
int vsir_program_compile(struct vsir_program *program, uint64_t config_flags, const struct vkd3d_shader_compile_info *compile_info, struct vkd3d_shader_code *out, struct vkd3d_shader_message_context *message_context)
int vkd3d_string_buffer_printf(struct vkd3d_string_buffer *buffer, const char *format,...)
#define vkd3d_find_struct(c, t)
@ VKD3D_SHADER_TYPE_VERTEX
@ VKD3D_SHADER_TYPE_GEOMETRY
@ VKD3D_SHADER_TYPE_COMPUTE
@ VKD3D_SHADER_TYPE_TEXTURE
@ VKD3D_SHADER_TYPE_PIXEL
@ VKD3D_SHADER_TYPE_EFFECT
@ VKD3D_SHADER_TYPE_DOMAIN
@ VKD3D_SHADER_ERROR_HLSL_NOT_IMPLEMENTED
@ VKD3D_SHADER_ERROR_HLSL_INVALID_LVALUE
@ VKD3D_SHADER_ERROR_HLSL_NOT_DEFINED
@ VKD3D_SHADER_ERROR_HLSL_INVALID_PROFILE
@ VKD3D_SHADER_ERROR_HLSL_INCOMPATIBLE_PROFILE
#define VKD3DSP_WRITEMASK_ALL
#define vkd3d_string_buffer_trace(buffer)
@ VKD3D_TESSELLATOR_DOMAIN_INVALID
@ VKD3D_ERROR_INVALID_ARGUMENT
@ VKD3D_ERROR_NOT_IMPLEMENTED
@ VKD3D_ERROR_INVALID_SHADER
@ VKD3D_ERROR_OUT_OF_MEMORY
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
static size_t align(size_t addr, size_t alignment)
static unsigned int block