81 return isnan(
v) ? signed_nan.double_value :
v;
93 for (
i = 0;
i <
n; ++
i)
126 return 1.0 /
sqrt(
v);
148#define PRES_OPCODE_MASK 0x7ff00000
149#define PRES_OPCODE_SHIFT 20
150#define PRES_SCALAR_FLAG 0x80000000
151#define PRES_NCOMP_MASK 0x0000ffff
153#define FOURCC_PRES 0x53455250
154#define FOURCC_CLIT 0x54494c43
155#define FOURCC_FXLC 0x434c5846
156#define FOURCC_PRSI 0x49535250
157#define PRES_SIGN 0x46580000
170 {0x000,
"nop", 0, 0,
NULL },
224 "imm",
"c",
"oc",
"ob",
"oi",
"r",
"(null)",
257#define MAX_INPUTS_COUNT 8
311#define PRES_BITMASK_BLOCK_SIZE (sizeof(unsigned int) * 8)
338 unsigned int start_offset,
unsigned int count)
362 FIXME(
"Unexpected preshader input from table %u.\n",
table);
386 unsigned int *bytecode = (
unsigned int *)
data;
387 unsigned int i,
j,
n;
389 size /=
sizeof(*bytecode);
394 for (
j = 0;
j <
n; ++
j)
395 TRACE(
"0x%08x,", bytecode[
i +
j]);
402 unsigned int fourcc,
unsigned int *
size)
405 while (
count > 2 && (*
ptr & 0xffff) == 0xfffe)
407 unsigned int section_size;
409 section_size = (*
ptr >> 16);
410 if (!section_size || section_size + 1 >
count)
412 if (*(
ptr + 1) == fourcc)
414 *
size = section_size;
417 count -= section_size + 1;
418 ptr += section_size + 1;
433 FIXME(
"Unsupported register table %#x.\n", *
ptr);
437 reg->table = reg_table[*
ptr++];
446 WARN(
"Byte code buffer ends unexpectedly, count %u.\n",
count);
454 FIXME(
"Unknown relative addressing flag, word %#x.\n", *
ptr);
470 opr->
reg.offset /= 4;
476 unsigned int ins_code, ins_raw;
477 unsigned int input_count;
482 WARN(
"Byte code buffer ends unexpectedly.\n");
496 input_count = *
ptr++;
503 FIXME(
"Unknown opcode %#x, input_count %u, raw %#x.\n", ins_code, input_count, ins_raw);
509 FIXME(
"Actual input args count %u exceeds inputs array size, instruction %s.\n", input_count,
513 for (
i = 0;
i < input_count; ++
i)
526 FIXME(
"Relative addressing in output register not supported.\n");
533 FIXME(
"Instructions outputting multiple registers are not supported.\n");
540 WORD *constantinfo_reserved)
546 FIXME(
"Could not get constant desc.\n");
581 info->major_count = const_length /
info->major_stride;
582 info->minor_remainder = const_length %
info->major_stride;
588 info->minor_remainder = 0;
593#define INITIAL_CONST_SET_SIZE 16
599 unsigned int new_size;
608 ERR(
"Out of memory.\n");
616 sizeof(*const_tab->
const_set) * new_size);
619 ERR(
"Out of memory.\n");
658 if (
r1->table !=
r2->table)
659 return r1->table -
r2->table;
660 return r1->register_index -
r2->register_index;
666 unsigned int i, start_index =
index;
675 while (index < const_tab->const_set_count - 1)
678 current_data = first_const->
param->data;
679 current_table = first_const->
table;
689 if (!(const_set->
table == current_table && current_start_offset == start_offset
691 && current_data == const_set->
param->data
693 && first_const->
param->class == const_set->
param->class
694 && first_const->
param->columns == const_set->
param->columns
695 && first_const->
param->rows == const_set->
param->rows
698 || first_const->
param->element_count == const_set->
param->element_count)))))
701 current_start_offset +=
count;
709 TRACE(
"Merging %u child parameters for %s, not merging %u, direct_copy %#x.\n",
i -
index,
716 if (
index == start_index
732 TRACE(
"Not merging %u child parameters for %s, direct_copy %#x.\n",
744 unsigned int const_count, param_count,
i;
754 if (
param->element_count)
756 param_count =
param->element_count;
757 const_count =
desc.Elements;
762 if (
desc.Elements > 1)
764 FIXME(
"Unexpected number of constant elements %u.\n",
desc.Elements);
767 param_count =
param->member_count;
768 const_count =
desc.StructMembers;
771 if (const_count != param_count)
773 FIXME(
"Number of elements or struct members differs between parameter (%u) and constant (%u).\n",
774 param_count, const_count);
783 for (
i = 0;
i < const_count; ++
i)
791 FIXME(
"Could not get constant.\n");
806 TRACE(
"Constant %s, rows %u, columns %u, class %u, bytes %u.\n",
808 TRACE(
"Parameter %s, rows %u, columns %u, class %u, flags %#x, bytes %u.\n",
817 FIXME(
"Unknown register set %u.\n",
desc.RegisterSet);
824 ERR(
"Unexpected register set %u.\n",
desc.RegisterSet);
846 FIXME(
"Incomplete last row for not transposed matrix which cannot be directly copied, parameter %s.\n",
850 || (
info.major_count ==
info.major &&
info.minor_remainder))
852 WARN(
"Constant dimensions exceed parameter size.\n");
863 struct d3dx_effect *effect,
const char **skip_constants,
866 ID3DXConstantTable *ctab;
877 TRACE(
"Could not get CTAB data, hr %#x.\n",
hr);
883 FIXME(
"Could not get CTAB desc, hr %#x.\n",
hr);
889 if (!cdesc || !inputs_param)
895 for (
i = 0;
i <
desc.Constants; ++
i)
897 unsigned int index =
out->input_count;
898 WORD constantinfo_reserved;
903 FIXME(
"Null constant handle.\n");
909 if (!inputs_param[
index])
911 WARN(
"Could not find parameter %s in effect.\n", cdesc[
index].
Name);
938 for (
j = 0;
j < skip_constants_count; ++
j)
942 if (!constantinfo_reserved)
944 WARN(
"skip_constants parameter %s is not register bound.\n",
953 if (
j < skip_constants_count)
963 if (
out->const_set_count)
970 while (i < out->const_set_count - 1)
974 &&
out->const_set[
i].table ==
out->const_set[
i + 1].table
975 &&
out->const_set[
i].register_index +
out->const_set[
i].register_count
976 >=
out->const_set[
i + 1].register_index)
978 assert(
out->const_set[
i].register_index +
out->const_set[
i].register_count
979 <=
out->const_set[
i + 1].register_index + 1);
980 out->const_set[
i].register_count =
out->const_set[
i + 1].register_index + 1
981 -
out->const_set[
i].register_index;
983 * (
out->const_set_count -
i - 2));
984 --
out->const_set_count;
993 sizeof(*
out->const_set) *
out->const_set_count);
996 out->const_set = new_alloc;
997 out->const_set_size =
out->const_set_count;
1001 WARN(
"Out of memory.\n");
1012 table_sizes[
table] =
max(table_sizes[
table], max_register + 1);
1017 unsigned int i,
table, max_register;
1031 static const char *xyzw_str =
"xyzw";
1051 unsigned int index_reg;
1059 TRACE(
"%c", xyzw_str[(
arg->reg.offset +
i) % 4]);
1094 if (immediate_count)
1095 TRACE(
"// Immediates:\n");
1096 for (
i = 0;
i < immediate_count; ++
i)
1100 TRACE(
"%.8e", immediates[
i]);
1106 TRACE(
"// Preshader registers:\n");
1108 TRACE(
"preshader\n");
1116 unsigned int i,
j, const_count;
1119 unsigned int saved_word;
1120 unsigned int section_size;
1122 TRACE(
"Preshader version %#x.\n", *
ptr & 0xffff);
1126 WARN(
"Unexpected end of byte code buffer.\n");
1134 if (const_count > (section_size - 1) / (
sizeof(
double) /
sizeof(
unsigned int)))
1136 WARN(
"Byte code buffer ends unexpectedly.\n");
1139 dconst = (
double *)
p;
1146 TRACE(
"%u double constants.\n", const_count);
1151 WARN(
"Could not find preshader code.\n");
1167 unsigned int *ptr_next;
1172 section_size -= ptr_next -
p;
1187 FIXME(
"const_count %u is not a multiple of %u.\n", const_count,
1199 unsigned int reg_idx;
1203 unsigned int last_component_index = pres->
ins[
i].scalar_op && !
j ? 0
1204 : pres->
ins[
i].component_count - 1;
1208 + last_component_index);
1212 table = pres->
ins[
i].inputs[
j].index_reg.table;
1215 if (reg_idx >= pres->
regs.table_sizes[
table])
1218 FIXME(
"Out of bounds register index, i %u, j %u, table %u, reg_idx %u, preshader parsing failed.\n",
1235 const char **skip_constants,
unsigned int skip_constants_count)
1238 unsigned int *
ptr, *shader_ptr =
NULL;
1241 unsigned int count, pres_size;
1244 TRACE(
"effect %p, byte_code %p, byte_code_size %u, type %u, peval_out %p.\n",
1245 effect, byte_code, byte_code_size,
type, peval_out);
1247 count = byte_code_size /
sizeof(
unsigned int);
1248 if (!byte_code || !
count)
1275 ptr = (
unsigned int *)byte_code;
1278 if ((*
ptr & 0xfffe0000) != 0xfffe0000)
1280 FIXME(
"Invalid shader signature %#x.\n", *
ptr);
1284 TRACE(
"Shader version %#x.\n", *
ptr & 0xffff);
1288 TRACE(
"No preshader found.\n");
1297 FIXME(
"Failed parsing preshader, byte code for analysis follows.\n");
1305 skip_constants, skip_constants_count, &peval->
pres)))
1307 TRACE(
"Could not get shader constant table, hr %#x.\n",
ret);
1325 TRACE(
"// Shader registers:\n");
1330 TRACE(
"Created parameter evaluator %p.\n", *peval_out);
1334 WARN(
"Error creating parameter evaluator.\n");
1360 TRACE(
"peval %p.\n", peval);
1373 const float *in_float =
in;
1377 out_int[
i] = in_float[
i];
1387 out_bool[
i] = !!in_dword[
i];
1393 const int *in_int =
in;
1394 float *out_float =
out;
1397 out_float[
i] = in_int[
i];
1403 const BOOL *in_bool =
in;
1404 float *out_float =
out;
1407 out_float[
i] = !!in_bool[
i];
1413 const float *in_bool =
in;
1417 out_int[
i] = !!in_bool[
i];
1423 typedef void (*conv_func)(
void *
out,
const void *
in,
unsigned int count);
1457 FIXME(
"Unexpected register table %u.\n",
table);
1472 FIXME(
"Unexpected register table %u.\n",
table);
1478 FIXME(
"Unexpected parameter type %u.\n",
type);
1484 ULONG64 new_update_version, ID3DXEffectStateManager *manager,
struct IDirect3DDevice9 *
device,
1487 unsigned int const_idx;
1488 unsigned int current_start = 0, current_count = 0;
1494 for (const_idx = 0; const_idx < const_tab->
const_set_count; ++const_idx)
1499 unsigned int element,
i,
j, start_offset;
1536 unsigned int *
out = (
unsigned int *)rs->
tables[
table] + start_offset;
1542 for (
i = 0;
i <
info.major_count; ++
i)
1543 for (
j = 0;
j <
info.minor; ++
j)
1551 for (
i = 0;
i <
info.major_count; ++
i)
1552 for (
j = 0;
j <
info.minor; ++
j)
1567 for (const_idx = 0; const_idx < const_tab->
const_set_count; ++const_idx)
1571 if (device_update_all || (const_set->
param
1586 +
get_offset_reg(current_table, current_start), current_start, current_count)))
1589 current_table =
table;
1599 +
get_offset_reg(current_table, current_start), current_start, current_count)))
1612 unsigned int offset, base_index, reg_index,
table;
1626 unsigned int wrap_size;
1639 WARN(
"Wrapping register index %u, table %u, wrap_size %u, table size %u.\n",
1641 reg_index %= wrap_size;
1653 unsigned int comp,
double res)
1658#define ARGS_ARRAY_SIZE 8
1661 unsigned int i,
j,
k;
1670 ins = &pres->
ins[
i];
1728 unsigned int elements, elements_param, elements_table;
1731 TRACE(
"peval %p, param %p, param_value %p.\n", peval,
param, param_value);
1744 elements_param =
param->bytes /
sizeof(
unsigned int);
1745 elements =
min(elements_table, elements_param);
1747 for (
i = 0;
i < elements; ++
i)
_STLP_DECLSPEC complex< float > _STLP_CALL cos(const complex< float > &)
_STLP_DECLSPEC complex< float > _STLP_CALL sin(const complex< float > &)
_STLP_DECLSPEC complex< float > _STLP_CALL sqrt(const complex< float > &)
valarray< _Tp > acos(const valarray< _Tp > &__x)
valarray< _Tp > atan(const valarray< _Tp > &__x)
valarray< _Tp > asin(const valarray< _Tp > &__x)
valarray< _Tp > atan2(const valarray< _Tp > &__x, const valarray< _Tp > &__y)
int strcmp(const char *String1, const char *String2)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define D3DXERR_INVALIDDATA
unsigned int component_count
#define D3DERR_INVALIDCALL
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)
#define SET_D3D_STATE_(manager, device, method, args...)
static void set_number(void *outdata, D3DXPARAMETER_TYPE outtype, const void *indata, D3DXPARAMETER_TYPE intype)
struct d3dx_parameter * get_parameter_by_name(struct d3dx_effect *effect, struct d3dx_parameter *parameter, const char *name) DECLSPEC_HIDDEN
static BOOL is_top_level_parameter(struct d3dx_parameter *param)
const struct ctab_constant * d3dx_shader_get_ctab_constant(ID3DXConstantTable *iface, D3DXHANDLE constant) DECLSPEC_HIDDEN
@ PRES_REGTAB_FIRST_SHADER
static BOOL is_top_level_param_dirty(struct d3dx_top_level_parameter *param, ULONG64 update_version)
#define ID3DXConstantTable_GetDesc(p, a)
#define ID3DXConstantTable_GetConstantElement(p, a, b)
#define ID3DXConstantTable_Release(p)
#define ID3DXConstantTable_GetConstant(p, a, b)
HRESULT WINAPI D3DXGetShaderConstantTable(const DWORD *byte_code, ID3DXConstantTable **constant_table)
#define HeapFree(x, y, z)
static void cleanup(void)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
double pow(double x, double y)
GLuint GLuint GLsizei GLenum type
GLuint GLuint GLsizei count
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
_Check_return_ _CRT_JIT_INTRINSIC double __cdecl fabs(_In_ double x)
_Check_return_ __CRT_INLINE long lrint(_In_ double x)
_Check_return_ __CRT_INLINE double log2(_In_ double x)
_Check_return_ _CRTIMP double __cdecl floor(_In_ double x)
double __cdecl fmin(double, double)
#define memcpy(s1, s2, n)
#define memmove(s1, s2, n)
static const WCHAR desc[]
static const char mbstate_t *static wchar_t const char mbstate_t *static const wchar_t int *static double
static float(__cdecl *square_half_float)(float x
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)
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 const struct @244 table_info[]
static double pres_lt(double *args, int n)
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)
HRESULT d3dx_create_param_eval(struct d3dx_effect *effect, 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 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 HRESULT get_constants_desc(unsigned int *byte_code, struct d3dx_const_tab *out, struct d3dx_effect *effect, const char **skip_constants, unsigned int skip_constants_count, struct d3dx_preshader *pres)
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 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 HRESULT parse_preshader(struct d3dx_preshader *pres, unsigned int *ptr, unsigned int count, struct d3dx_effect *effect)
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
static int sum(int x_, int y_)
void __cdecl qsort(_Inout_updates_bytes_(_NumOfElements *_SizeOfElements) void *_Base, _In_ size_t _NumOfElements, _In_ size_t _SizeOfElements, _In_ int(__cdecl *_PtFuncCompare)(const void *, const void *))
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]