Commit 9b3e942f authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

d3dx9: Implement preshader parsing.

parent e2da1a4e
...@@ -108,7 +108,57 @@ const char *debug_d3dxparameter_registerset(D3DXREGISTER_SET r) DECLSPEC_HIDDEN; ...@@ -108,7 +108,57 @@ const char *debug_d3dxparameter_registerset(D3DXREGISTER_SET r) DECLSPEC_HIDDEN;
void set_number(void *outdata, D3DXPARAMETER_TYPE outtype, void set_number(void *outdata, D3DXPARAMETER_TYPE outtype,
const void *indata, D3DXPARAMETER_TYPE intype) DECLSPEC_HIDDEN; const void *indata, D3DXPARAMETER_TYPE intype) DECLSPEC_HIDDEN;
struct d3dx_param_eval; struct d3dx_parameter;
enum pres_reg_tables
{
PRES_REGTAB_IMMED,
PRES_REGTAB_CONST,
PRES_REGTAB_OCONST,
PRES_REGTAB_OBCONST,
PRES_REGTAB_OICONST,
PRES_REGTAB_TEMP,
PRES_REGTAB_COUNT,
PRES_REGTAB_FIRST_SHADER = PRES_REGTAB_CONST,
};
struct d3dx_const_tab
{
unsigned int input_count;
D3DXCONSTANT_DESC *inputs;
struct d3dx_parameter **inputs_param;
ID3DXConstantTable *ctab;
/* TODO: do not keep input constant structure
(use it only at the parse stage) */
const enum pres_reg_tables *regset2table;
};
struct d3dx_regstore
{
void *tables[PRES_REGTAB_COUNT];
unsigned int table_sizes[PRES_REGTAB_COUNT]; /* registers count */
unsigned int *table_value_set[PRES_REGTAB_COUNT];
};
struct d3dx_pres_ins;
struct d3dx_preshader
{
struct d3dx_regstore regs;
unsigned int ins_count;
struct d3dx_pres_ins *ins;
struct d3dx_const_tab inputs;
};
struct d3dx_param_eval
{
D3DXPARAMETER_TYPE param_type;
struct d3dx_preshader pres;
struct d3dx_const_tab shader_inputs;
};
struct d3dx_parameter struct d3dx_parameter
{ {
...@@ -140,7 +190,7 @@ struct d3dx9_base_effect; ...@@ -140,7 +190,7 @@ struct d3dx9_base_effect;
struct d3dx_parameter *get_parameter_by_name(struct d3dx9_base_effect *base, struct d3dx_parameter *get_parameter_by_name(struct d3dx9_base_effect *base,
struct d3dx_parameter *parameter, const char *name) DECLSPEC_HIDDEN; struct d3dx_parameter *parameter, const char *name) DECLSPEC_HIDDEN;
HRESULT d3dx_create_param_eval(struct d3dx9_base_effect *base_effect, void *byte_code, void 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) DECLSPEC_HIDDEN; unsigned int byte_code_size, D3DXPARAMETER_TYPE type, struct d3dx_param_eval **peval) DECLSPEC_HIDDEN;
void d3dx_free_param_eval(struct d3dx_param_eval *peval) DECLSPEC_HIDDEN; void d3dx_free_param_eval(struct d3dx_param_eval *peval) DECLSPEC_HIDDEN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment