71 return isnan(
v) ? signed_nan.double_value :
v;
83 for (
i = 0;
i <
n; ++
i)
116 return 1.0 /
sqrt(
v);
138#define PRES_OPCODE_MASK 0x7ff00000
139#define PRES_OPCODE_SHIFT 20
140#define PRES_SCALAR_FLAG 0x80000000
141#define PRES_NCOMP_MASK 0x0000ffff
143#define FOURCC_PRES 0x53455250
144#define FOURCC_CLIT 0x54494c43
145#define FOURCC_FXLC 0x434c5846
146#define FOURCC_PRSI 0x49535250
147#define PRES_SIGN 0x46580000
160 {0x000,
"nop", 0, 0,
NULL },
215 "imm",
"c",
"v",
"oc",
"ob",
"oi",
"r",
"(null)",
248#define MAX_INPUTS_COUNT 8
302#define PRES_BITMASK_BLOCK_SIZE (sizeof(unsigned int) * 8)
329 unsigned int start_offset,
unsigned int count)
353 FIXME(
"Unexpected preshader input from table %u.\n",
table);
377 unsigned int *bytecode = (
unsigned int *)
data;
378 unsigned int i,
j,
n;
380 size /=
sizeof(*bytecode);
385 for (
j = 0;
j <
n; ++
j)
386 TRACE(
"0x%08x,", bytecode[
i +
j]);
393 unsigned int fourcc,
unsigned int *
size)
396 while (
count > 2 && (*
ptr & 0xffff) == 0xfffe)
398 unsigned int section_size;
400 section_size = (*
ptr >> 16);
401 if (!section_size || section_size + 1 >
count)
403 if (*(
ptr + 1) == fourcc)
405 *
size = section_size;
408 count -= section_size + 1;
409 ptr += section_size + 1;
424 FIXME(
"Unsupported register table %#x.\n", *
ptr);
428 reg->table = reg_table[*
ptr++];
437 WARN(
"Byte code buffer ends unexpectedly, count %u.\n",
count);
445 FIXME(
"Unknown relative addressing flag, word %#x.\n", *
ptr);
461 opr->
reg.offset /= 4;
467 unsigned int ins_code, ins_raw;
468 unsigned int input_count;
473 WARN(
"Byte code buffer ends unexpectedly.\n");
487 input_count = *
ptr++;
494 FIXME(
"Unknown opcode %#x, input_count %u, raw %#x.\n", ins_code, input_count, ins_raw);
500 FIXME(
"Actual input args count %u exceeds inputs array size, instruction %s.\n", input_count,
504 for (
i = 0;
i < input_count; ++
i)
517 FIXME(
"Relative addressing in output register not supported.\n");
524 FIXME(
"Instructions outputting multiple registers are not supported.\n");
531 WORD *constantinfo_reserved)
537 FIXME(
"Could not get constant desc.\n");
572 info->major_count = const_length /
info->major_stride;
573 info->minor_remainder = const_length %
info->major_stride;
579 info->minor_remainder = 0;
584#define INITIAL_CONST_SET_SIZE 16
599 ERR(
"Out of memory.\n");
609 ERR(
"Out of memory.\n");
648 if (
r1->table !=
r2->table)
649 return r1->table -
r2->table;
650 return r1->register_index -
r2->register_index;
656 unsigned int i, start_index =
index;
665 while (index < const_tab->const_set_count - 1)
668 current_data = first_const->
param->data;
669 current_table = first_const->
table;
679 if (!(const_set->
table == current_table && current_start_offset == start_offset
681 && current_data == const_set->
param->data
683 && first_const->
param->class == const_set->
param->class
684 && first_const->
param->columns == const_set->
param->columns
685 && first_const->
param->rows == const_set->
param->rows
688 || first_const->
param->element_count == const_set->
param->element_count)))))
691 current_start_offset +=
count;
699 TRACE(
"Merging %u child parameters for %s, not merging %u, direct_copy %#x.\n",
i -
index,
706 if (
index == start_index
722 TRACE(
"Not merging %u child parameters for %s, direct_copy %#x.\n",
734 unsigned int const_count, param_count,
i;
744 if (
param->element_count)
746 param_count =
param->element_count;
747 const_count =
desc.Elements;
752 if (
desc.Elements > 1)
754 FIXME(
"Unexpected number of constant elements %u.\n",
desc.Elements);
757 param_count =
param->member_count;
758 const_count =
desc.StructMembers;
761 if (const_count != param_count)
763 FIXME(
"Number of elements or struct members differs between parameter (%u) and constant (%u).\n",
764 param_count, const_count);
773 for (
i = 0;
i < const_count; ++
i)
781 FIXME(
"Could not get constant.\n");
796 TRACE(
"Constant %s, rows %u, columns %u, class %u, bytes %u.\n",
798 TRACE(
"Parameter %s, rows %u, columns %u, class %u, flags %#x, bytes %u.\n",
807 FIXME(
"Unknown register set %u.\n",
desc.RegisterSet);
814 ERR(
"Unexpected register set %u.\n",
desc.RegisterSet);
836 FIXME(
"Incomplete last row for not transposed matrix which cannot be directly copied, parameter %s.\n",
840 || (
info.major_count ==
info.major &&
info.minor_remainder))
842 WARN(
"Constant dimensions exceed parameter size.\n");
856 ID3DXConstantTable *ctab;
867 TRACE(
"Could not get CTAB data, hr %#lx.\n",
hr);
873 FIXME(
"Could not get CTAB desc, hr %#lx.\n",
hr);
877 out->inputs = cdesc =
malloc(
sizeof(*cdesc) *
desc.Constants);
878 out->inputs_param = inputs_param =
malloc(
sizeof(*inputs_param) *
desc.Constants);
879 if (!cdesc || !inputs_param)
885 for (
i = 0;
i <
desc.Constants; ++
i)
887 unsigned int index =
out->input_count;
888 WORD constantinfo_reserved;
893 FIXME(
"Null constant handle.\n");
899 if (!inputs_param[
index])
901 WARN(
"Could not find parameter %s in effect.\n", cdesc[
index].
Name);
928 for (
j = 0;
j < skip_constants_count; ++
j)
932 if (!constantinfo_reserved)
934 WARN(
"skip_constants parameter %s is not register bound.\n",
943 if (
j < skip_constants_count)
953 if (
out->const_set_count)
960 while (i < out->const_set_count - 1)
964 &&
out->const_set[
i].table ==
out->const_set[
i + 1].table
965 &&
out->const_set[
i].register_index +
out->const_set[
i].register_count
966 >=
out->const_set[
i + 1].register_index)
968 assert(
out->const_set[
i].register_index +
out->const_set[
i].register_count
969 <=
out->const_set[
i + 1].register_index + 1);
970 out->const_set[
i].register_count =
out->const_set[
i + 1].register_index + 1
971 -
out->const_set[
i].register_index;
973 * (
out->const_set_count -
i - 2));
974 --
out->const_set_count;
982 new_alloc =
realloc(
out->const_set,
sizeof(*
out->const_set) *
out->const_set_count);
985 out->const_set = new_alloc;
986 out->const_set_size =
out->const_set_count;
990 WARN(
"Out of memory.\n");
1001 table_sizes[
table] =
max(table_sizes[
table], max_register + 1);
1006 unsigned int i,
table, max_register;
1020 static const char *xyzw_str =
"xyzw";
1021 unsigned int i,
table, reg_offset;
1045 unsigned int index_reg;
1053 TRACE(
"%c", xyzw_str[(
arg->reg.offset +
i) % 4]);
1088 if (immediate_count)
1089 TRACE(
"// Immediates:\n");
1090 for (
i = 0;
i < immediate_count; ++
i)
1094 TRACE(
"%.8e", immediates[
i]);
1100 TRACE(
"// Preshader registers:\n");
1102 TRACE(
"preshader\n");
1111 unsigned int i,
j, const_count, magic;
1114 unsigned int saved_word;
1115 unsigned int section_size;
1119 TRACE(
"Preshader version %#x.\n", *
ptr);
1123 WARN(
"Unexpected end of byte code buffer.\n");
1131 if (const_count > (section_size - 1) / (
sizeof(
double) /
sizeof(
unsigned int)))
1133 WARN(
"Byte code buffer ends unexpectedly.\n");
1136 dconst = (
double *)
p;
1143 TRACE(
"%u double constants.\n", const_count);
1148 WARN(
"Could not find preshader code.\n");
1164 unsigned int *ptr_next;
1169 section_size -= ptr_next -
p;
1184 FIXME(
"const_count %u is not a multiple of %u.\n", const_count,
1198 unsigned int reg_idx;
1202 unsigned int last_component_index = pres->
ins[
i].scalar_op && !
j ? 0
1203 : pres->
ins[
i].component_count - 1;
1207 + last_component_index);
1211 table = pres->
ins[
i].inputs[
j].index_reg.table;
1214 if (reg_idx >= pres->
regs.table_sizes[
table])
1217 FIXME(
"Out of bounds register index, i %u, j %u, table %u, reg_idx %u, preshader parsing failed.\n",
1234 const char **skip_constants,
unsigned int skip_constants_count)
1237 unsigned int *
ptr, *shader_ptr =
NULL;
1240 unsigned int count, pres_size;
1243 TRACE(
"parameters %p, byte_code %p, byte_code_size %u, type %u, peval_out %p.\n",
1246 count = byte_code_size /
sizeof(
unsigned int);
1247 if (!byte_code || !
count)
1253 peval =
calloc(1,
sizeof(*peval));
1274 ptr = (
unsigned int *)byte_code;
1277 if ((*
ptr & 0xfffe0000) != 0xfffe0000)
1279 FIXME(
"Invalid shader signature %#x.\n", *
ptr);
1283 TRACE(
"Shader version %#x.\n", *
ptr & 0xffff);
1287 TRACE(
"No preshader found.\n");
1296 FIXME(
"Failed parsing preshader, byte code for analysis follows.\n");
1304 skip_constants, skip_constants_count, &peval->
pres)))
1306 TRACE(
"Could not get shader constant table, hr %#lx.\n",
ret);
1324 TRACE(
"// Shader registers:\n");
1329 TRACE(
"Created parameter evaluator %p.\n", *peval_out);
1333 WARN(
"Error creating parameter evaluator.\n");
1359 TRACE(
"peval %p.\n", peval);
1372 const float *in_float =
in;
1376 out_int[
i] = in_float[
i];
1386 out_bool[
i] = !!in_dword[
i];
1392 const int *in_int =
in;
1393 float *out_float =
out;
1396 out_float[
i] = in_int[
i];
1402 const BOOL *in_bool =
in;
1403 float *out_float =
out;
1406 out_float[
i] = !!in_bool[
i];
1412 const float *in_bool =
in;
1416 out_int[
i] = !!in_bool[
i];
1422 typedef void (*conv_func)(
void *
out,
const void *
in,
unsigned int count);
1456 FIXME(
"Unexpected register table %u.\n",
table);
1471 FIXME(
"Unexpected register table %u.\n",
table);
1477 FIXME(
"Unexpected parameter type %u.\n",
type);
1486 unsigned int const_idx;
1487 unsigned int current_start = 0, current_count = 0;
1493 for (const_idx = 0; const_idx < const_tab->
const_set_count; ++const_idx)
1498 unsigned int element,
i,
j, start_offset;
1535 unsigned int *
out = (
unsigned int *)rs->
tables[
table] + start_offset;
1541 for (
i = 0;
i <
info.major_count; ++
i)
1542 for (
j = 0;
j <
info.minor; ++
j)
1550 for (
i = 0;
i <
info.major_count; ++
i)
1551 for (
j = 0;
j <
info.minor; ++
j)
1566 for (const_idx = 0; const_idx < const_tab->
const_set_count; ++const_idx)
1570 if (device_update_all || (const_set->
param
1585 +
get_offset_reg(current_table, current_start), current_start, current_count)))
1588 current_table =
table;
1598 +
get_offset_reg(current_table, current_start), current_start, current_count)))
1611 unsigned int offset, base_index, reg_index,
table;
1625 unsigned int wrap_size;
1638 WARN(
"Wrapping register index %u, table %u, wrap_size %u, table size %u.\n",
1640 reg_index %= wrap_size;
1652 unsigned int comp,
double res)
1657#define ARGS_ARRAY_SIZE 8
1660 unsigned int i,
j,
k;
1669 ins = &pres->
ins[
i];
1727 unsigned int elements, elements_param, elements_table;
1731 TRACE(
"peval %p, param %p, param_value %p.\n", peval,
param, param_value);
1747 elements_param =
param->bytes /
sizeof(
unsigned int);
1748 elements =
min(elements_table, elements_param);
1750 for (
i = 0;
i < elements; ++
i)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define D3DERR_INVALIDCALL
unsigned int component_count
#define D3DXERR_INVALIDDATA
const struct ctab_constant * d3dx_shader_get_ctab_constant(ID3DXConstantTable *iface, D3DXHANDLE constant)
static BOOL is_param_type_sampler(D3DXPARAMETER_TYPE type)
static struct d3dx_top_level_parameter * top_level_parameter_from_parameter(struct d3dx_parameter *param)
static BOOL is_param_dirty(struct d3dx_parameter *param, ULONG64 update_version)
static ULONG64 next_update_version(ULONG64 *version_counter)
static void set_number(void *outdata, D3DXPARAMETER_TYPE outtype, const void *indata, D3DXPARAMETER_TYPE intype)
struct d3dx_parameter * get_parameter_by_name(struct d3dx_parameters_store *store, struct d3dx_parameter *parameter, const char *name)
static BOOL is_top_level_parameter(struct d3dx_parameter *param)
@ PRES_REGTAB_FIRST_SHADER
static BOOL is_top_level_param_dirty(struct d3dx_top_level_parameter *param, ULONG64 update_version)
#define SET_D3D_STATE_(manager, device, method,...)
HRESULT WINAPI D3DXGetShaderConstantTable(const DWORD *byte_code, ID3DXConstantTable **constant_table)
static void cleanup(void)
_ACRTIMP double __cdecl sqrt(double)
_ACRTIMP double __cdecl fabs(double)
_ACRTIMP double __cdecl atan(double)
_ACRTIMP __msvcrt_long __cdecl lrint(double)
_ACRTIMP double __cdecl log2(double)
_ACRTIMP double __cdecl sin(double)
_ACRTIMP double __cdecl fmin(double, double)
_ACRTIMP double __cdecl fmax(double, double)
_ACRTIMP double __cdecl floor(double)
_ACRTIMP double __cdecl asin(double)
_ACRTIMP double __cdecl cos(double)
_ACRTIMP double __cdecl atan2(double, double)
_ACRTIMP double __cdecl acos(double)
_ACRTIMP void __cdecl qsort(void *, size_t, size_t, int(__cdecl *)(const void *, const void *))
_ACRTIMP int __cdecl strcmp(const char *, const char *)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
#define ID3DXConstantTable_GetDesc(p, a)
#define ID3DXConstantTable_GetConstantElement(p, a, b)
#define ID3DXConstantTable_Release(p)
#define ID3DXConstantTable_GetConstant(p, a, b)
static xmlNodePtr get_element(const domelem *This)
double pow(double x, double y)
GLuint GLuint GLsizei count
GLuint GLuint GLsizei GLenum type
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
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 const GLfloat const GLdouble const GLfloat GLint GLint GLint j
#define memcpy(s1, s2, n)
#define memmove(s1, s2, n)
D3D11_SHADER_VARIABLE_DESC desc
static const char mbstate_t *static wchar_t const char mbstate_t *static const wchar_t int *static double
static ULONG ** element_count
static float(__cdecl *square_half_float)(float x
static HRESULT parse_preshader(struct d3dx_preshader *pres, unsigned int *ptr, unsigned int count, struct d3dx_parameters_store *parameters)
static double pres_frc(double *args, int n)
static double pres_div(double *args, int n)
static enum pres_value_type table_type_from_param_type(D3DXPARAMETER_TYPE type)
HRESULT d3dx_param_eval_set_shader_constants(ID3DXEffectStateManager *manager, struct IDirect3DDevice9 *device, struct d3dx_param_eval *peval, BOOL update_all)
static void regstore_set_double(struct d3dx_regstore *rs, unsigned int table, unsigned int offset, double v)
static void regstore_free_tables(struct d3dx_regstore *rs)
static double pres_sin(double *args, int n)
static HRESULT get_ctab_constant_desc(ID3DXConstantTable *ctab, D3DXHANDLE hc, D3DXCONSTANT_DESC *desc, WORD *constantinfo_reserved)
double(* pres_op_func)(double *args, int n)
static void pres_float_from_bool(void *out, const void *in, unsigned int count)
static double pres_dotswiz6(double *args, int n)
HRESULT d3dx_create_param_eval(struct d3dx_parameters_store *parameters, void *byte_code, unsigned int byte_code_size, D3DXPARAMETER_TYPE type, struct d3dx_param_eval **peval_out, ULONG64 *version_counter, const char **skip_constants, unsigned int skip_constants_count)
static double pres_mov(double *args, int n)
BOOL is_param_eval_input_dirty(struct d3dx_param_eval *peval, ULONG64 update_version)
static void d3dx_free_preshader(struct d3dx_preshader *pres)
static double pres_cmp(double *args, int n)
static void dump_preshader(struct d3dx_preshader *pres)
#define PRES_OPCODE_SHIFT
static double exec_get_reg_value(struct d3dx_regstore *rs, enum pres_reg_tables table, unsigned int offset)
static HRESULT append_const_set(struct d3dx_const_tab *const_tab, struct d3dx_const_param_eval_output *set)
static double exec_get_arg(struct d3dx_regstore *rs, const struct d3dx_pres_operand *opr, unsigned int comp)
static double pres_cos(double *args, int n)
static double pres_lt(double *args, int n)
static const struct @283 table_info[]
static void exec_set_arg(struct d3dx_regstore *rs, const struct d3dx_pres_reg *reg, unsigned int comp, double res)
static double pres_dot(double *args, int n)
static unsigned int * find_bytecode_comment(unsigned int *ptr, unsigned int count, unsigned int fourcc, unsigned int *size)
static double pres_mul(double *args, int n)
static unsigned int * parse_pres_arg(unsigned int *ptr, unsigned int count, struct d3dx_pres_operand *opr)
static void pres_float_from_int(void *out, const void *in, unsigned int count)
static double regstore_get_double(struct d3dx_regstore *rs, unsigned int table, unsigned int offset)
static double pres_exp(double *args, int n)
static HRESULT merge_const_set_entries(struct d3dx_const_tab *const_tab, struct d3dx_parameter *param, unsigned int index)
static unsigned int * parse_pres_ins(unsigned int *ptr, unsigned int count, struct d3dx_pres_ins *ins)
HRESULT d3dx_evaluate_parameter(struct d3dx_param_eval *peval, const struct d3dx_parameter *param, void *param_value)
static const struct op_info pres_op_info[]
static BOOL is_const_tab_input_dirty(struct d3dx_const_tab *ctab, ULONG64 update_version)
static enum pres_reg_tables pres_regset2table[]
static void dump_registers(struct d3dx_const_tab *ctab)
static HRESULT set_constants_device(ID3DXEffectStateManager *manager, struct IDirect3DDevice9 *device, D3DXPARAMETER_TYPE type, enum pres_reg_tables table, void *ptr, unsigned int start, unsigned int count)
static double pres_rcp(double *args, int n)
static void update_table_size(unsigned int *table_sizes, unsigned int table, unsigned int max_register)
static HRESULT execute_preshader(struct d3dx_preshader *pres)
static void update_table_sizes_consts(unsigned int *table_sizes, struct d3dx_const_tab *ctab)
static void regstore_set_data(struct d3dx_regstore *rs, unsigned int table, unsigned int offset, const unsigned int *in, unsigned int count, enum pres_value_type param_type)
static double pres_neg(double *args, int n)
static void append_pres_const_sets_for_shader_input(struct d3dx_const_tab *const_tab, struct d3dx_preshader *pres)
static double pres_atan(double *args, int n)
static HRESULT set_constants(struct d3dx_regstore *rs, struct d3dx_const_tab *const_tab, ULONG64 new_update_version, ID3DXEffectStateManager *manager, struct IDirect3DDevice9 *device, D3DXPARAMETER_TYPE type, BOOL device_update_all, BOOL pres_dirty)
static enum pres_reg_tables shad_regset2table[]
#define INITIAL_CONST_SET_SIZE
static void dump_arg(struct d3dx_regstore *rs, const struct d3dx_pres_operand *arg, int component_count)
static void pres_bool_from_value(void *out, const void *in, unsigned int count)
static unsigned int get_reg_offset(unsigned int table, unsigned int offset)
static double to_signed_nan(double v)
static double pres_add(double *args, int n)
static void d3dx_free_const_tab(struct d3dx_const_tab *ctab)
static double pres_asin(double *args, int n)
static void pres_int_from_bool(void *out, const void *in, unsigned int count)
static HRESULT get_constants_desc(unsigned int *byte_code, struct d3dx_const_tab *out, struct d3dx_parameters_store *parameters, const char **skip_constants, unsigned int skip_constants_count, struct d3dx_preshader *pres)
static const char * table_symbol[]
static unsigned int get_offset_reg(unsigned int table, unsigned int reg_idx)
static unsigned int * parse_pres_reg(unsigned int *ptr, struct d3dx_pres_reg *reg)
static void regstore_set_values(struct d3dx_regstore *rs, unsigned int table, const void *data, unsigned int start_offset, unsigned int count)
enum pres_value_type type
static double pres_atan2(double *args, int n)
static HRESULT init_set_constants_param(struct d3dx_const_tab *const_tab, ID3DXConstantTable *ctab, D3DXHANDLE hc, struct d3dx_parameter *param)
void d3dx_free_param_eval(struct d3dx_param_eval *peval)
static double pres_max(double *args, int n)
static HRESULT regstore_alloc_table(struct d3dx_regstore *rs, unsigned int table)
static double pres_acos(double *args, int n)
static void get_const_upload_info(struct d3dx_const_param_eval_output *const_set, struct const_upload_info *info)
static void dump_ins(struct d3dx_regstore *rs, const struct d3dx_pres_ins *ins)
static double pres_log(double *args, int n)
static void pres_int_from_float(void *out, const void *in, unsigned int count)
static double pres_ge(double *args, int n)
static double pres_min(double *args, int n)
static int __cdecl compare_const_set(const void *a, const void *b)
static double pres_dotswiz8(double *args, int n)
static void dump_bytecode(void *data, unsigned int size)
static unsigned int get_reg_components(unsigned int table)
static double pres_rsq(double *args, int n)
unsigned int component_size
for(i=0;i< sizeof(testsuite)/sizeof(testsuite[0]);++i) ok(call_test(testsuite[i].func)
static int sum(int x_, int y_)
D3DXREGISTER_SET RegisterSet
unsigned int major_stride
unsigned int minor_remainder
WORD constantinfo_reserved
unsigned int register_index
enum D3DXPARAMETER_CLASS constant_class
enum pres_reg_tables table
unsigned int register_count
struct d3dx_parameter * param
unsigned int element_count
struct d3dx_parameter ** inputs_param
struct d3dx_const_param_eval_output * const_set
unsigned int const_set_count
unsigned int const_set_size
D3DXCONSTANT_DESC * inputs
enum pres_reg_tables * regset2table
struct d3dx_const_tab shader_inputs
struct d3dx_preshader pres
ULONG64 * version_counter
D3DXPARAMETER_TYPE param_type
struct d3dx_pres_operand inputs[MAX_INPUTS_COUNT]
unsigned int component_count
struct d3dx_pres_operand output
struct d3dx_pres_reg index_reg
enum pres_reg_tables table
struct d3dx_const_tab inputs
struct d3dx_pres_ins * ins
struct d3dx_regstore regs
void * tables[PRES_REGTAB_COUNT]
unsigned int table_sizes[PRES_REGTAB_COUNT]
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out