20 #include "wine/port.h" 78 return isnan(
v) ? signed_nan.double_value :
v;
90 for (
i = 0;
i <
n; ++
i)
123 return 1.0 /
sqrt(
v);
149 #define PRES_OPCODE_MASK 0x7ff00000 150 #define PRES_OPCODE_SHIFT 20 151 #define PRES_SCALAR_FLAG 0x80000000 152 #define PRES_NCOMP_MASK 0x0000ffff 154 #define FOURCC_PRES 0x53455250 155 #define FOURCC_CLIT 0x54494c43 156 #define FOURCC_FXLC 0x434c5846 157 #define FOURCC_PRSI 0x49535250 158 #define PRES_SIGN 0x46580000 171 {0x000,
"nop", 0, 0,
NULL },
225 "imm",
"c",
"oc",
"ob",
"oi",
"r",
"(null)",
258 #define MAX_INPUTS_COUNT 8 312 #define PRES_BITMASK_BLOCK_SIZE (sizeof(unsigned int) * 8) 339 unsigned int start_offset,
unsigned int count)
363 FIXME(
"Unexpected preshader input from table %u.\n",
table);
387 unsigned int *bytecode = (
unsigned int *)
data;
388 unsigned int i,
j,
n;
390 size /=
sizeof(*bytecode);
395 for (
j = 0;
j <
n; ++
j)
396 TRACE(
"0x%08x,", bytecode[
i +
j]);
403 unsigned int fourcc,
unsigned int *
size)
406 while (
count > 2 && (*
ptr & 0xffff) == 0xfffe)
408 unsigned int section_size;
410 section_size = (*
ptr >> 16);
411 if (!section_size || section_size + 1 >
count)
413 if (*(
ptr + 1) == fourcc)
415 *
size = section_size;
418 count -= section_size + 1;
419 ptr += section_size + 1;
434 FIXME(
"Unsupported register table %#x.\n", *
ptr);
438 reg->table = reg_table[*
ptr++];
447 WARN(
"Byte code buffer ends unexpectedly, count %u.\n",
count);
455 FIXME(
"Unknown relative addressing flag, word %#x.\n", *
ptr);
471 opr->
reg.offset /= 4;
477 unsigned int ins_code, ins_raw;
478 unsigned int input_count;
483 WARN(
"Byte code buffer ends unexpectedly.\n");
497 input_count = *
ptr++;
504 FIXME(
"Unknown opcode %#x, input_count %u, raw %#x.\n", ins_code, input_count, ins_raw);
510 FIXME(
"Actual input args count %u exceeds inputs array size, instruction %s.\n", input_count,
514 for (
i = 0;
i < input_count; ++
i)
527 FIXME(
"Relative addressing in output register not supported.\n");
534 FIXME(
"Instructions outputting multiple registers are not supported.\n");
541 WORD *constantinfo_reserved)
547 FIXME(
"Could not get constant desc.\n");
582 info->major_count = const_length /
info->major_stride;
583 info->minor_remainder = const_length %
info->major_stride;
589 info->minor_remainder = 0;
594 #define INITIAL_CONST_SET_SIZE 16 600 unsigned int new_size;
609 ERR(
"Out of memory.\n");
617 sizeof(*const_tab->
const_set) * new_size);
620 ERR(
"Out of memory.\n");
659 if (
r1->table !=
r2->table)
660 return r1->table -
r2->table;
661 return r1->register_index -
r2->register_index;
667 unsigned int i, start_index =
index;
679 current_data = first_const->
param->data;
680 current_table = first_const->
table;
690 if (!(const_set->
table == current_table && current_start_offset == start_offset
692 && current_data == const_set->
param->data
694 && first_const->
param->class == const_set->
param->class
695 && first_const->
param->columns == const_set->
param->columns
696 && first_const->
param->rows == const_set->
param->rows
699 || first_const->
param->element_count == const_set->
param->element_count)))))
702 current_start_offset +=
count;
710 TRACE(
"Merging %u child parameters for %s, not merging %u, direct_copy %#x.\n",
i -
index,
717 if (
index == start_index
733 TRACE(
"Not merging %u child parameters for %s, direct_copy %#x.\n",
745 unsigned int const_count, param_count,
i;
755 if (
param->element_count)
757 param_count =
param->element_count;
758 const_count =
desc.Elements;
763 if (
desc.Elements > 1)
765 FIXME(
"Unexpected number of constant elements %u.\n",
desc.Elements);
768 param_count =
param->member_count;
769 const_count =
desc.StructMembers;
772 if (const_count != param_count)
774 FIXME(
"Number of elements or struct members differs between parameter (%u) and constant (%u).\n",
775 param_count, const_count);
784 for (
i = 0;
i < const_count; ++
i)
792 FIXME(
"Could not get constant.\n");
807 TRACE(
"Constant %s, rows %u, columns %u, class %u, bytes %u.\n",
809 TRACE(
"Parameter %s, rows %u, columns %u, class %u, flags %#x, bytes %u.\n",
818 FIXME(
"Unknown register set %u.\n",
desc.RegisterSet);
825 ERR(
"Unexpected register set %u.\n",
desc.RegisterSet);
847 FIXME(
"Incomplete last row for not transposed matrix which cannot be directly copied, parameter %s.\n",
851 || (
info.major_count ==
info.major &&
info.minor_remainder))
853 WARN(
"Constant dimensions exceed parameter size.\n");
867 ID3DXConstantTable *ctab;
878 TRACE(
"Could not get CTAB data, hr %#x.\n",
hr);
884 FIXME(
"Could not get CTAB desc, hr %#x.\n",
hr);
890 if (!cdesc || !inputs_param)
896 for (
i = 0;
i <
desc.Constants; ++
i)
898 unsigned int index =
out->input_count;
899 WORD constantinfo_reserved;
904 FIXME(
"Null constant handle.\n");
910 if (!inputs_param[
index])
912 WARN(
"Could not find parameter %s in effect.\n", cdesc[
index].
Name);
939 for (
j = 0;
j < skip_constants_count; ++
j)
943 if (!constantinfo_reserved)
945 WARN(
"skip_constants parameter %s is not register bound.\n",
954 if (
j < skip_constants_count)
964 if (
out->const_set_count)
971 while (i < out->const_set_count - 1)
975 &&
out->const_set[
i].table ==
out->const_set[
i + 1].table
976 &&
out->const_set[
i].register_index +
out->const_set[
i].register_count
977 >=
out->const_set[
i + 1].register_index)
979 assert(
out->const_set[
i].register_index +
out->const_set[
i].register_count
980 <=
out->const_set[
i + 1].register_index + 1);
981 out->const_set[
i].register_count =
out->const_set[
i + 1].register_index + 1
982 -
out->const_set[
i].register_index;
984 * (
out->const_set_count -
i - 2));
985 --
out->const_set_count;
994 sizeof(*
out->const_set) *
out->const_set_count);
997 out->const_set = new_alloc;
998 out->const_set_size =
out->const_set_count;
1002 WARN(
"Out of memory.\n");
1013 table_sizes[
table] =
max(table_sizes[
table], max_register + 1);
1018 unsigned int i,
table, max_register;
1032 static const char *xyzw_str =
"xyzw";
1052 unsigned int index_reg;
1060 TRACE(
"%c", xyzw_str[(
arg->reg.offset +
i) % 4]);
1095 if (immediate_count)
1096 TRACE(
"// Immediates:\n");
1097 for (
i = 0;
i < immediate_count; ++
i)
1101 TRACE(
"%.8e", immediates[
i]);
1107 TRACE(
"// Preshader registers:\n");
1109 TRACE(
"preshader\n");
1117 unsigned int i,
j, const_count;
1120 unsigned int saved_word;
1121 unsigned int section_size;
1123 TRACE(
"Preshader version %#x.\n", *
ptr & 0xffff);
1127 WARN(
"Unexpected end of byte code buffer.\n");
1135 if (const_count > (section_size - 1) / (
sizeof(
double) /
sizeof(
unsigned int)))
1137 WARN(
"Byte code buffer ends unexpectedly.\n");
1140 dconst = (
double *)
p;
1147 TRACE(
"%u double constants.\n", const_count);
1152 WARN(
"Could not find preshader code.\n");
1168 unsigned int *ptr_next;
1173 section_size -= ptr_next -
p;
1188 FIXME(
"const_count %u is not a multiple of %u.\n", const_count,
1200 unsigned int reg_idx;
1204 unsigned int last_component_index = pres->
ins[
i].scalar_op && !
j ? 0
1205 : pres->
ins[
i].component_count - 1;
1209 + last_component_index);
1213 table = pres->
ins[
i].inputs[
j].index_reg.table;
1216 if (reg_idx >= pres->
regs.table_sizes[
table])
1219 FIXME(
"Out of bounds register index, i %u, j %u, table %u, reg_idx %u, preshader parsing failed.\n",
1236 const char **skip_constants,
unsigned int skip_constants_count)
1239 unsigned int *
ptr, *shader_ptr =
NULL;
1242 unsigned int count, pres_size;
1245 TRACE(
"base_effect %p, byte_code %p, byte_code_size %u, type %u, peval_out %p.\n",
1246 base_effect, byte_code, byte_code_size,
type, peval_out);
1248 count = byte_code_size /
sizeof(
unsigned int);
1249 if (!byte_code || !
count)
1276 ptr = (
unsigned int *)byte_code;
1279 if ((*
ptr & 0xfffe0000) != 0xfffe0000)
1281 FIXME(
"Invalid shader signature %#x.\n", *
ptr);
1285 TRACE(
"Shader version %#x.\n", *
ptr & 0xffff);
1289 TRACE(
"No preshader found.\n");
1298 FIXME(
"Failed parsing preshader, byte code for analysis follows.\n");
1306 skip_constants, skip_constants_count, &peval->
pres)))
1308 TRACE(
"Could not get shader constant table, hr %#x.\n",
ret);
1326 TRACE(
"// Shader registers:\n");
1331 TRACE(
"Created parameter evaluator %p.\n", *peval_out);
1335 WARN(
"Error creating parameter evaluator.\n");
1361 TRACE(
"peval %p.\n", peval);
1374 const float *in_float =
in;
1378 out_int[
i] = in_float[
i];
1388 out_bool[
i] = !!in_dword[
i];
1394 const int *in_int =
in;
1395 float *out_float =
out;
1398 out_float[
i] = in_int[
i];
1404 const BOOL *in_bool =
in;
1405 float *out_float =
out;
1408 out_float[
i] = !!in_bool[
i];
1414 const float *in_bool =
in;
1418 out_int[
i] = !!in_bool[
i];
1424 typedef void (*conv_func)(
void *
out,
const void *
in,
unsigned int count);
1458 FIXME(
"Unexpected register table %u.\n",
table);
1473 FIXME(
"Unexpected register table %u.\n",
table);
1479 FIXME(
"Unexpected parameter type %u.\n",
type);
1485 ULONG64 new_update_version, ID3DXEffectStateManager *manager,
struct IDirect3DDevice9 *
device,
1488 unsigned int const_idx;
1489 unsigned int current_start = 0, current_count = 0;
1495 for (const_idx = 0; const_idx < const_tab->
const_set_count; ++const_idx)
1500 unsigned int element,
i,
j, start_offset;
1537 unsigned int *
out = (
unsigned int *)rs->
tables[
table] + start_offset;
1543 for (
i = 0;
i <
info.major_count; ++
i)
1544 for (
j = 0;
j <
info.minor; ++
j)
1552 for (
i = 0;
i <
info.major_count; ++
i)
1553 for (
j = 0;
j <
info.minor; ++
j)
1568 for (const_idx = 0; const_idx < const_tab->
const_set_count; ++const_idx)
1572 if (device_update_all || (const_set->
param 1587 +
get_offset_reg(current_table, current_start), current_start, current_count)))
1590 current_table =
table;
1600 +
get_offset_reg(current_table, current_start), current_start, current_count)))
1613 unsigned int offset, base_index, reg_index,
table;
1627 unsigned int wrap_size;
1640 WARN(
"Wrapping register index %u, table %u, wrap_size %u, table size %u.\n",
1642 reg_index %= wrap_size;
1654 unsigned int comp,
double res)
1659 #define ARGS_ARRAY_SIZE 8 1662 unsigned int i,
j,
k;
1671 ins = &pres->
ins[
i];
1729 unsigned int elements, elements_param, elements_table;
1732 TRACE(
"peval %p, param %p, param_value %p.\n", peval,
param, param_value);
1745 elements_param =
param->bytes /
sizeof(
unsigned int);
1746 elements =
min(elements_table, elements_param);
1748 for (
i = 0;
i < elements; ++
i)
#define ID3DXConstantTable_GetConstantElement(p, a, b)
_STLP_DECLSPEC complex< float > _STLP_CALL sqrt(const complex< float > &)
static void d3dx_free_preshader(struct d3dx_preshader *pres)
static unsigned int * parse_pres_reg(unsigned int *ptr, struct d3dx_pres_reg *reg)
static double exec_get_arg(struct d3dx_regstore *rs, const struct d3dx_pres_operand *opr, unsigned int comp)
static void pres_int_from_float(void *out, const void *in, unsigned int count)
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 HRESULT parse_preshader(struct d3dx_preshader *pres, unsigned int *ptr, unsigned int count, struct d3dx9_base_effect *base)
#define memmove(s1, s2, n)
static int compare_const_set(const void *a, const void *b)
static double pres_log(double *args, int n)
static BOOL is_param_type_sampler(D3DXPARAMETER_TYPE type)
valarray< _Tp > atan2(const valarray< _Tp > &__x, const valarray< _Tp > &__y)
static double pres_asin(double *args, int n)
static double exec_get_reg_value(struct d3dx_regstore *rs, enum pres_reg_tables table, unsigned int offset)
static double pres_dotswiz6(double *args, int n)
BOOL is_param_eval_input_dirty(struct d3dx_param_eval *peval, ULONG64 update_version)
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
WINE_DEFAULT_DEBUG_CHANNEL(d3dx)
HRESULT WINAPI D3DXGetShaderConstantTable(const DWORD *byte_code, ID3DXConstantTable **constant_table)
HRESULT d3dx_evaluate_parameter(struct d3dx_param_eval *peval, const struct d3dx_parameter *param, void *param_value)
HRESULT d3dx_param_eval_set_shader_constants(ID3DXEffectStateManager *manager, struct IDirect3DDevice9 *device, struct d3dx_param_eval *peval, BOOL update_all)
GLuint GLuint GLsizei count
D3DXCONSTANT_DESC * inputs
enum pres_reg_tables table
static enum pres_reg_tables pres_regset2table[]
static HRESULT init_set_constants_param(struct d3dx_const_tab *const_tab, ID3DXConstantTable *ctab, D3DXHANDLE hc, struct d3dx_parameter *param)
enum pres_value_type type
#define D3DERR_INVALIDCALL
#define ID3DXConstantTable_GetConstant(p, a, b)
static void set_number(void *outdata, D3DXPARAMETER_TYPE outtype, const void *indata, D3DXPARAMETER_TYPE intype)
GLenum GLsizei GLenum GLenum const GLvoid * table
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 to_signed_nan(double v)
static BOOL is_const_tab_input_dirty(struct d3dx_const_tab *ctab, ULONG64 update_version)
static void pres_int_from_bool(void *out, const void *in, unsigned int count)
#define ID3DXConstantTable_Release(p)
static void dump_preshader(struct d3dx_preshader *pres)
_Check_return_ __CRT_INLINE long lrint(_In_ double x)
WORD constantinfo_reserved
static enum pres_value_type table_type_from_param_type(D3DXPARAMETER_TYPE type)
static double pres_ge(double *args, int n)
struct d3dx_const_param_eval_output * const_set
static void pres_bool_from_value(void *out, const void *in, unsigned int count)
valarray< _Tp > asin(const valarray< _Tp > &__x)
static unsigned int * parse_pres_arg(unsigned int *ptr, unsigned int count, struct d3dx_pres_operand *opr)
struct d3dx_parameter ** inputs_param
static unsigned int get_reg_offset(unsigned int table, unsigned int offset)
valarray< _Tp > acos(const valarray< _Tp > &__x)
static BOOL is_top_level_param_dirty(struct d3dx_top_level_parameter *param, ULONG64 update_version)
static double pres_add(double *args, int n)
unsigned int component_count
void d3dx_free_param_eval(struct d3dx_param_eval *peval)
static double pres_exp(double *args, int n)
float pow(float __x, int __y)
static double pres_min(double *args, int n)
static void regstore_set_values(struct d3dx_regstore *rs, unsigned int table, const void *data, unsigned int start_offset, unsigned int count)
static double pres_rcp(double *args, int n)
static const WCHAR desc[]
static void append_pres_const_sets_for_shader_input(struct d3dx_const_tab *const_tab, struct d3dx_preshader *pres)
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 *))
const struct ctab_constant * d3dx_shader_get_ctab_constant(ID3DXConstantTable *iface, D3DXHANDLE constant) DECLSPEC_HIDDEN
unsigned int table_sizes[PRES_REGTAB_COUNT]
static unsigned int get_reg_components(unsigned int table)
static const char mbstate_t *static wchar_t const char mbstate_t *static const wchar_t int *static double
static double pres_acos(double *args, int n)
static void update_table_size(unsigned int *table_sizes, unsigned int table, unsigned int max_register)
_STLP_DECLSPEC complex< float > _STLP_CALL cos(const complex< float > &)
static double pres_frc(double *args, int n)
static const struct op_info pres_op_info[]
static const struct @244 table_info[]
struct d3dx_parameter * get_parameter_by_name(struct d3dx9_base_effect *base, struct d3dx_parameter *parameter, const char *name) DECLSPEC_HIDDEN
static double pres_lt(double *args, int n)
double(* pres_op_func)(double *args, int n)
static double pres_neg(double *args, int n)
unsigned int element_count
static UINT set(struct ID3DXConstantTableImpl *table, IDirect3DDevice9 *device, struct ctab_constant *constant, const void **indata, D3DXPARAMETER_TYPE intype, UINT *size, UINT incol, D3DXPARAMETER_CLASS inclass, UINT index, BOOL is_pointer)
static void get_const_upload_info(struct d3dx_const_param_eval_output *const_set, struct const_upload_info *info)
unsigned int component_count
static BOOL is_top_level_parameter(struct d3dx_parameter *param)
static int sum(int x_, int y_)
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
static HRESULT execute_preshader(struct d3dx_preshader *pres)
D3DXREGISTER_SET RegisterSet
double __cdecl fmax(double, double)
unsigned int component_size
struct d3dx_pres_operand output
#define INITIAL_CONST_SET_SIZE
GLboolean GLboolean GLboolean b
static unsigned int get_offset_reg(unsigned int table, unsigned int reg_idx)
static enum pres_reg_tables shad_regset2table[]
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static double pres_mul(double *args, int n)
static ULONG64 next_update_version(ULONG64 *version_counter)
unsigned int major_stride
static void dump_registers(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_max(double *args, int n)
static const char * table_symbol[]
static double pres_atan(double *args, int n)
unsigned int register_count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
valarray< _Tp > atan(const valarray< _Tp > &__x)
static BOOL is_param_dirty(struct d3dx_parameter *param, ULONG64 update_version)
double __cdecl fmin(double, double)
#define PRES_OPCODE_SHIFT
struct d3dx_const_tab shader_inputs
#define ID3DXConstantTable_GetDesc(p, a)
unsigned int minor_remainder
void * tables[PRES_REGTAB_COUNT]
#define memcpy(s1, s2, n)
static double pres_atan2(double *args, int n)
static double pres_cmp(double *args, int n)
enum D3DXPARAMETER_CLASS constant_class
static double pres_dotswiz8(double *args, int n)
static double pres_rsq(double *args, int n)
_Check_return_ _CRT_JIT_INTRINSIC double __cdecl fabs(_In_ double x)
HRESULT d3dx_create_param_eval(struct d3dx9_base_effect *base_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 get_constants_desc(unsigned int *byte_code, struct d3dx_const_tab *out, struct d3dx9_base_effect *base, const char **skip_constants, unsigned int skip_constants_count, struct d3dx_preshader *pres)
struct d3dx_preshader pres
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
static struct d3dx_top_level_parameter * top_level_parameter_from_parameter(struct d3dx_parameter *param)
unsigned int const_set_size
static float(__cdecl *square_half_float)(float x
static HRESULT regstore_alloc_table(struct d3dx_regstore *rs, unsigned int table)
static void regstore_free_tables(struct d3dx_regstore *rs)
struct d3dx_pres_reg index_reg
enum pres_reg_tables table
static double pres_cos(double *args, int n)
struct d3dx_pres_ins * ins
static HRESULT merge_const_set_entries(struct d3dx_const_tab *const_tab, struct d3dx_parameter *param, unsigned int index)
#define SET_D3D_STATE_(manager, device, method, args...)
static void update_table_sizes_consts(unsigned int *table_sizes, struct d3dx_const_tab *ctab)
static HRESULT get_ctab_constant_desc(ID3DXConstantTable *ctab, D3DXHANDLE hc, D3DXCONSTANT_DESC *desc, WORD *constantinfo_reserved)
ULONG64 * version_counter
static void pres_float_from_bool(void *out, const void *in, unsigned int count)
static void d3dx_free_const_tab(struct d3dx_const_tab *ctab)
static double pres_mov(double *args, int n)
D3DXPARAMETER_TYPE param_type
struct d3dx_regstore regs
int strcmp(const char *String1, const char *String2)
struct d3dx_const_tab inputs
static double pres_sin(double *args, int n)
char * cleanup(char *str)
static void exec_set_arg(struct d3dx_regstore *rs, const struct d3dx_pres_reg *reg, unsigned int comp, double res)
static void dump_bytecode(void *data, unsigned int size)
static double pres_dot(double *args, int n)
_STLP_DECLSPEC complex< float > _STLP_CALL sin(const complex< float > &)
unsigned int const_set_count
GLuint GLuint GLsizei GLenum type
static void dump_arg(struct d3dx_regstore *rs, const struct d3dx_pres_operand *arg, int component_count)
GLboolean GLboolean GLboolean GLboolean a
_Check_return_ _CRTIMP double __cdecl floor(_In_ double x)
static double regstore_get_double(struct d3dx_regstore *rs, unsigned int table, unsigned int offset)
enum pres_reg_tables * regset2table
static unsigned int * parse_pres_ins(unsigned int *ptr, unsigned int count, struct d3dx_pres_ins *ins)
static void pres_float_from_int(void *out, const void *in, unsigned int count)
static void dump_ins(struct d3dx_regstore *rs, const struct d3dx_pres_ins *ins)
double __cdecl log2(double)
static double pres_div(double *args, int n)
struct d3dx_pres_operand inputs[MAX_INPUTS_COUNT]
unsigned int register_index
#define HeapFree(x, y, z)
static HRESULT append_const_set(struct d3dx_const_tab *const_tab, struct d3dx_const_param_eval_output *set)
static void regstore_set_double(struct d3dx_regstore *rs, unsigned int table, unsigned int offset, double v)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
static unsigned int * find_bytecode_comment(unsigned int *ptr, unsigned int count, unsigned int fourcc, unsigned int *size)
struct d3dx_parameter * param