ReactOS  0.4.15-dev-341-g17c5fb8
effect.c File Reference
#include "config.h"
#include "wine/port.h"
#include <stdio.h>
#include <assert.h>
#include "d3dx9_private.h"
#include "d3dcompiler.h"
Include dependency graph for effect.c:

Go to the source code of this file.

Classes

struct  d3dx_object
 
struct  d3dx_state
 
struct  d3dx_sampler
 
struct  d3dx_pass
 
struct  d3dx_technique
 
struct  d3dx9_base_effect
 
struct  ID3DXEffectImpl
 
struct  d3dx_effect_pool
 
struct  ID3DXEffectCompilerImpl
 

Macros

#define INT_FLOAT_MULTI   255.0f
 
#define INT_FLOAT_MULTI_INVERSE   (1/INT_FLOAT_MULTI)
 
#define PARAMETER_FLAG_SHARED   1
 
#define INITIAL_POOL_SIZE   16
 
#define INITIAL_SHARED_DATA_SIZE   4
 
#define INITIAL_CONST_NAMES_SIZE   4
 

Typedefs

typedef BOOL(* walk_parameter_dep_func) (void *data, struct d3dx_parameter *param)
 

Enumerations

enum  STATE_CLASS {
  SC_LIGHTENABLE, SC_FVF, SC_LIGHT, SC_MATERIAL,
  SC_NPATCHMODE, SC_PIXELSHADER, SC_RENDERSTATE, SC_SETSAMPLER,
  SC_SAMPLERSTATE, SC_TEXTURE, SC_TEXTURESTAGE, SC_TRANSFORM,
  SC_VERTEXSHADER, SC_SHADERCONST, SC_UNKNOWN
}
 
enum  MATERIAL_TYPE {
  MT_DIFFUSE, MT_AMBIENT, MT_SPECULAR, MT_EMISSIVE,
  MT_POWER
}
 
enum  LIGHT_TYPE {
  LT_TYPE, LT_DIFFUSE, LT_SPECULAR, LT_AMBIENT,
  LT_POSITION, LT_DIRECTION, LT_RANGE, LT_FALLOFF,
  LT_ATTENUATION0, LT_ATTENUATION1, LT_ATTENUATION2, LT_THETA,
  LT_PHI
}
 
enum  SHADER_CONSTANT_TYPE {
  SCT_VSFLOAT, SCT_VSBOOL, SCT_VSINT, SCT_PSFLOAT,
  SCT_PSBOOL, SCT_PSINT
}
 
enum  STATE_TYPE { ST_CONSTANT, ST_PARAMETER, ST_FXLC, ST_ARRAY_SELECTOR }
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (d3dx)
 
static struct d3dx_parameterget_annotation_by_name (struct d3dx9_base_effect *base, unsigned int count, struct d3dx_parameter *parameters, const char *name)
 
static HRESULT d3dx9_parse_state (struct d3dx9_base_effect *base, struct d3dx_state *state, const char *data, const char **ptr, struct d3dx_object *objects)
 
static void free_parameter (struct d3dx_parameter *param, BOOL element, BOOL child)
 
static void read_dword (const char **ptr, DWORD *d)
 
static void skip_dword_unknown (const char **ptr, unsigned int count)
 
static D3DXHANDLE get_parameter_handle (struct d3dx_parameter *parameter)
 
static D3DXHANDLE get_technique_handle (struct d3dx_technique *technique)
 
static D3DXHANDLE get_pass_handle (struct d3dx_pass *pass)
 
static struct d3dx_techniqueget_technique_by_name (struct d3dx9_base_effect *base, const char *name)
 
static struct d3dx_techniqueget_valid_technique (struct d3dx9_base_effect *base, D3DXHANDLE technique)
 
static struct d3dx_passget_valid_pass (struct d3dx9_base_effect *base, D3DXHANDLE pass)
 
static struct d3dx_parameterget_valid_parameter (struct d3dx9_base_effect *base, D3DXHANDLE parameter)
 
static void free_state (struct d3dx_state *state)
 
static void free_object (struct d3dx_object *object)
 
static void free_sampler (struct d3dx_sampler *sampler)
 
static void d3dx_pool_release_shared_parameter (struct d3dx_top_level_parameter *param)
 
static void free_parameter_data (struct d3dx_parameter *param, BOOL child)
 
static void free_top_level_parameter (struct d3dx_top_level_parameter *param)
 
static void free_pass (struct d3dx_pass *pass)
 
static void free_technique (struct d3dx_technique *technique)
 
static void d3dx9_base_effect_cleanup (struct d3dx9_base_effect *base)
 
static void free_effect (struct ID3DXEffectImpl *effect)
 
static void get_vector (struct d3dx_parameter *param, D3DXVECTOR4 *vector)
 
static void set_vector (struct d3dx_parameter *param, const D3DXVECTOR4 *vector)
 
static void get_matrix (struct d3dx_parameter *param, D3DXMATRIX *matrix, BOOL transpose)
 
static void set_matrix (struct d3dx_parameter *param, const D3DXMATRIX *matrix)
 
static void set_matrix_transpose (struct d3dx_parameter *param, const D3DXMATRIX *matrix)
 
static struct d3dx_parameterget_parameter_element_by_name (struct d3dx9_base_effect *base, struct d3dx_parameter *parameter, const char *name)
 
struct d3dx_parameterget_parameter_by_name (struct d3dx9_base_effect *base, struct d3dx_parameter *parameter, const char *name)
 
static DWORD d3dx9_effect_version (DWORD major, DWORD minor)
 
static HRESULT d3dx9_base_effect_get_desc (struct d3dx9_base_effect *base, D3DXEFFECT_DESC *desc)
 
static HRESULT d3dx9_base_effect_get_parameter_desc (struct d3dx9_base_effect *base, D3DXHANDLE parameter, D3DXPARAMETER_DESC *desc)
 
static HRESULT d3dx9_base_effect_get_technique_desc (struct d3dx9_base_effect *base, D3DXHANDLE technique, D3DXTECHNIQUE_DESC *desc)
 
static HRESULT d3dx9_get_param_value_ptr (struct d3dx_pass *pass, struct d3dx_state *state, void **param_value, struct d3dx_parameter **out_param, BOOL update_all, BOOL *param_dirty)
 
static HRESULT d3dx9_base_effect_get_pass_desc (struct d3dx9_base_effect *base, D3DXHANDLE pass_handle, D3DXPASS_DESC *desc)
 
static HRESULT d3dx9_base_effect_get_function_desc (struct d3dx9_base_effect *base, D3DXHANDLE shader, D3DXFUNCTION_DESC *desc)
 
static D3DXHANDLE d3dx9_base_effect_get_parameter (struct d3dx9_base_effect *base, D3DXHANDLE parameter, UINT index)
 
static D3DXHANDLE d3dx9_base_effect_get_parameter_by_name (struct d3dx9_base_effect *base, D3DXHANDLE parameter, const char *name)
 
static D3DXHANDLE d3dx9_base_effect_get_parameter_by_semantic (struct d3dx9_base_effect *base, D3DXHANDLE parameter, const char *semantic)
 
static D3DXHANDLE d3dx9_base_effect_get_parameter_element (struct d3dx9_base_effect *base, D3DXHANDLE parameter, UINT index)
 
static D3DXHANDLE d3dx9_base_effect_get_technique (struct d3dx9_base_effect *base, UINT index)
 
static D3DXHANDLE d3dx9_base_effect_get_technique_by_name (struct d3dx9_base_effect *base, const char *name)
 
static D3DXHANDLE d3dx9_base_effect_get_pass (struct d3dx9_base_effect *base, D3DXHANDLE technique, UINT index)
 
static D3DXHANDLE d3dx9_base_effect_get_pass_by_name (struct d3dx9_base_effect *base, D3DXHANDLE technique, const char *name)
 
static D3DXHANDLE d3dx9_base_effect_get_function (struct d3dx9_base_effect *base, UINT index)
 
static D3DXHANDLE d3dx9_base_effect_get_function_by_name (struct d3dx9_base_effect *base, const char *name)
 
static UINT get_annotation_from_object (struct d3dx9_base_effect *base, D3DXHANDLE object, struct d3dx_parameter **annotations)
 
static D3DXHANDLE d3dx9_base_effect_get_annotation (struct d3dx9_base_effect *base, D3DXHANDLE object, UINT index)
 
static D3DXHANDLE d3dx9_base_effect_get_annotation_by_name (struct d3dx9_base_effect *base, D3DXHANDLE object, const char *name)
 
static BOOL walk_parameter_tree (struct d3dx_parameter *param, walk_parameter_dep_func param_func, void *data)
 
static ULONG64get_version_counter_ptr (struct d3dx9_base_effect *base)
 
static ULONG64 next_effect_update_version (struct d3dx9_base_effect *base)
 
static void set_dirty (struct d3dx_parameter *param)
 
static HRESULT set_string (char **param_data, const char *string)
 
static HRESULT d3dx9_base_effect_set_value (struct d3dx9_base_effect *base, D3DXHANDLE parameter, const void *data, UINT bytes)
 
static HRESULT d3dx9_base_effect_get_value (struct d3dx9_base_effect *base, D3DXHANDLE parameter, void *data, UINT bytes)
 
static HRESULT d3dx9_base_effect_set_bool (struct d3dx9_base_effect *base, D3DXHANDLE parameter, BOOL b)
 
static HRESULT d3dx9_base_effect_get_bool (struct d3dx9_base_effect *base, D3DXHANDLE parameter, BOOL *b)
 
static HRESULT d3dx9_base_effect_set_bool_array (struct d3dx9_base_effect *base, D3DXHANDLE parameter, const BOOL *b, UINT count)
 
static HRESULT d3dx9_base_effect_get_bool_array (struct d3dx9_base_effect *base, D3DXHANDLE parameter, BOOL *b, UINT count)
 
static HRESULT d3dx9_base_effect_set_int (struct d3dx9_base_effect *base, D3DXHANDLE parameter, INT n)
 
static HRESULT d3dx9_base_effect_get_int (struct d3dx9_base_effect *base, D3DXHANDLE parameter, INT *n)
 
static HRESULT d3dx9_base_effect_set_int_array (struct d3dx9_base_effect *base, D3DXHANDLE parameter, const INT *n, UINT count)
 
static HRESULT d3dx9_base_effect_get_int_array (struct d3dx9_base_effect *base, D3DXHANDLE parameter, INT *n, UINT count)
 
static HRESULT d3dx9_base_effect_set_float (struct d3dx9_base_effect *base, D3DXHANDLE parameter, float f)
 
static HRESULT d3dx9_base_effect_get_float (struct d3dx9_base_effect *base, D3DXHANDLE parameter, float *f)
 
static HRESULT d3dx9_base_effect_set_float_array (struct d3dx9_base_effect *base, D3DXHANDLE parameter, const float *f, UINT count)
 
static HRESULT d3dx9_base_effect_get_float_array (struct d3dx9_base_effect *base, D3DXHANDLE parameter, float *f, UINT count)
 
static HRESULT d3dx9_base_effect_set_vector (struct d3dx9_base_effect *base, D3DXHANDLE parameter, const D3DXVECTOR4 *vector)
 
static HRESULT d3dx9_base_effect_get_vector (struct d3dx9_base_effect *base, D3DXHANDLE parameter, D3DXVECTOR4 *vector)
 
static HRESULT d3dx9_base_effect_set_vector_array (struct d3dx9_base_effect *base, D3DXHANDLE parameter, const D3DXVECTOR4 *vector, UINT count)
 
static HRESULT d3dx9_base_effect_get_vector_array (struct d3dx9_base_effect *base, D3DXHANDLE parameter, D3DXVECTOR4 *vector, UINT count)
 
static HRESULT d3dx9_base_effect_set_matrix (struct d3dx9_base_effect *base, D3DXHANDLE parameter, const D3DXMATRIX *matrix)
 
static HRESULT d3dx9_base_effect_get_matrix (struct d3dx9_base_effect *base, D3DXHANDLE parameter, D3DXMATRIX *matrix)
 
static HRESULT d3dx9_base_effect_set_matrix_array (struct d3dx9_base_effect *base, D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count)
 
static HRESULT d3dx9_base_effect_get_matrix_array (struct d3dx9_base_effect *base, D3DXHANDLE parameter, D3DXMATRIX *matrix, UINT count)
 
static HRESULT d3dx9_base_effect_set_matrix_pointer_array (struct d3dx9_base_effect *base, D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count)
 
static HRESULT d3dx9_base_effect_get_matrix_pointer_array (struct d3dx9_base_effect *base, D3DXHANDLE parameter, D3DXMATRIX **matrix, UINT count)
 
static HRESULT d3dx9_base_effect_set_matrix_transpose (struct d3dx9_base_effect *base, D3DXHANDLE parameter, const D3DXMATRIX *matrix)
 
static HRESULT d3dx9_base_effect_get_matrix_transpose (struct d3dx9_base_effect *base, D3DXHANDLE parameter, D3DXMATRIX *matrix)
 
static HRESULT d3dx9_base_effect_set_matrix_transpose_array (struct d3dx9_base_effect *base, D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count)
 
static HRESULT d3dx9_base_effect_get_matrix_transpose_array (struct d3dx9_base_effect *base, D3DXHANDLE parameter, D3DXMATRIX *matrix, UINT count)
 
static HRESULT d3dx9_base_effect_set_matrix_transpose_pointer_array (struct d3dx9_base_effect *base, D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count)
 
static HRESULT d3dx9_base_effect_get_matrix_transpose_pointer_array (struct d3dx9_base_effect *base, D3DXHANDLE parameter, D3DXMATRIX **matrix, UINT count)
 
static HRESULT d3dx9_base_effect_set_string (struct d3dx9_base_effect *base, D3DXHANDLE parameter, const char *string)
 
static HRESULT d3dx9_base_effect_get_string (struct d3dx9_base_effect *base, D3DXHANDLE parameter, const char **string)
 
static HRESULT d3dx9_base_effect_set_texture (struct d3dx9_base_effect *base, D3DXHANDLE parameter, struct IDirect3DBaseTexture9 *texture)
 
static HRESULT d3dx9_base_effect_get_texture (struct d3dx9_base_effect *base, D3DXHANDLE parameter, struct IDirect3DBaseTexture9 **texture)
 
static HRESULT d3dx9_base_effect_get_pixel_shader (struct d3dx9_base_effect *base, D3DXHANDLE parameter, struct IDirect3DPixelShader9 **shader)
 
static HRESULT d3dx9_base_effect_get_vertex_shader (struct d3dx9_base_effect *base, D3DXHANDLE parameter, struct IDirect3DVertexShader9 **shader)
 
static HRESULT d3dx9_base_effect_set_array_range (struct d3dx9_base_effect *base, D3DXHANDLE parameter, UINT start, UINT end)
 
static void d3dx9_set_light_parameter (enum LIGHT_TYPE op, D3DLIGHT9 *light, void *value)
 
static void d3dx9_set_material_parameter (enum MATERIAL_TYPE op, D3DMATERIAL9 *material, void *value)
 
static HRESULT d3dx_set_shader_const_state (struct ID3DXEffectImpl *effect, enum SHADER_CONSTANT_TYPE op, UINT index, struct d3dx_parameter *param, void *value_ptr)
 
static HRESULT d3dx9_apply_state (struct ID3DXEffectImpl *effect, struct d3dx_pass *pass, struct d3dx_state *state, unsigned int parent_index, BOOL update_all)
 
static HRESULT d3dx_set_shader_constants (struct ID3DXEffectImpl *effect, struct d3dx_pass *pass, struct d3dx_parameter *param, BOOL vs, BOOL update_all)
 
static HRESULT d3dx9_apply_pass_states (struct ID3DXEffectImpl *effect, struct d3dx_pass *pass, BOOL update_all)
 
static void param_set_data_pointer (struct d3dx_parameter *param, unsigned char *data, BOOL child, BOOL free_data)
 
static BOOL is_same_parameter (void *param1_, struct d3dx_parameter *param2)
 
static HRESULT d3dx_pool_sync_shared_parameter (struct d3dx_effect_pool *pool, struct d3dx_top_level_parameter *param)
 
static BOOL param_zero_data_func (void *dummy, struct d3dx_parameter *param)
 
static struct d3dx_effect_poolimpl_from_ID3DXEffectPool (ID3DXEffectPool *iface)
 
static struct ID3DXEffectImplimpl_from_ID3DXEffect (ID3DXEffect *iface)
 
static HRESULT WINAPI ID3DXEffectImpl_QueryInterface (ID3DXEffect *iface, REFIID riid, void **object)
 
static ULONG WINAPI ID3DXEffectImpl_AddRef (ID3DXEffect *iface)
 
static ULONG WINAPI ID3DXEffectImpl_Release (ID3DXEffect *iface)
 
static HRESULT WINAPI ID3DXEffectImpl_GetDesc (ID3DXEffect *iface, D3DXEFFECT_DESC *desc)
 
static HRESULT WINAPI ID3DXEffectImpl_GetParameterDesc (ID3DXEffect *iface, D3DXHANDLE parameter, D3DXPARAMETER_DESC *desc)
 
static HRESULT WINAPI ID3DXEffectImpl_GetTechniqueDesc (ID3DXEffect *iface, D3DXHANDLE technique, D3DXTECHNIQUE_DESC *desc)
 
static HRESULT WINAPI ID3DXEffectImpl_GetPassDesc (ID3DXEffect *iface, D3DXHANDLE pass, D3DXPASS_DESC *desc)
 
static HRESULT WINAPI ID3DXEffectImpl_GetFunctionDesc (ID3DXEffect *iface, D3DXHANDLE shader, D3DXFUNCTION_DESC *desc)
 
static D3DXHANDLE WINAPI ID3DXEffectImpl_GetParameter (ID3DXEffect *iface, D3DXHANDLE parameter, UINT index)
 
static D3DXHANDLE WINAPI ID3DXEffectImpl_GetParameterByName (ID3DXEffect *iface, D3DXHANDLE parameter, const char *name)
 
static D3DXHANDLE WINAPI ID3DXEffectImpl_GetParameterBySemantic (ID3DXEffect *iface, D3DXHANDLE parameter, const char *semantic)
 
static D3DXHANDLE WINAPI ID3DXEffectImpl_GetParameterElement (ID3DXEffect *iface, D3DXHANDLE parameter, UINT index)
 
static D3DXHANDLE WINAPI ID3DXEffectImpl_GetTechnique (ID3DXEffect *iface, UINT index)
 
static D3DXHANDLE WINAPI ID3DXEffectImpl_GetTechniqueByName (ID3DXEffect *iface, const char *name)
 
static D3DXHANDLE WINAPI ID3DXEffectImpl_GetPass (ID3DXEffect *iface, D3DXHANDLE technique, UINT index)
 
static D3DXHANDLE WINAPI ID3DXEffectImpl_GetPassByName (ID3DXEffect *iface, D3DXHANDLE technique, const char *name)
 
static D3DXHANDLE WINAPI ID3DXEffectImpl_GetFunction (ID3DXEffect *iface, UINT index)
 
static D3DXHANDLE WINAPI ID3DXEffectImpl_GetFunctionByName (ID3DXEffect *iface, const char *name)
 
static D3DXHANDLE WINAPI ID3DXEffectImpl_GetAnnotation (ID3DXEffect *iface, D3DXHANDLE object, UINT index)
 
static D3DXHANDLE WINAPI ID3DXEffectImpl_GetAnnotationByName (ID3DXEffect *iface, D3DXHANDLE object, const char *name)
 
static HRESULT WINAPI ID3DXEffectImpl_SetValue (ID3DXEffect *iface, D3DXHANDLE parameter, const void *data, UINT bytes)
 
static HRESULT WINAPI ID3DXEffectImpl_GetValue (ID3DXEffect *iface, D3DXHANDLE parameter, void *data, UINT bytes)
 
static HRESULT WINAPI ID3DXEffectImpl_SetBool (ID3DXEffect *iface, D3DXHANDLE parameter, BOOL b)
 
static HRESULT WINAPI ID3DXEffectImpl_GetBool (ID3DXEffect *iface, D3DXHANDLE parameter, BOOL *b)
 
static HRESULT WINAPI ID3DXEffectImpl_SetBoolArray (ID3DXEffect *iface, D3DXHANDLE parameter, const BOOL *b, UINT count)
 
static HRESULT WINAPI ID3DXEffectImpl_GetBoolArray (ID3DXEffect *iface, D3DXHANDLE parameter, BOOL *b, UINT count)
 
static HRESULT WINAPI ID3DXEffectImpl_SetInt (ID3DXEffect *iface, D3DXHANDLE parameter, INT n)
 
static HRESULT WINAPI ID3DXEffectImpl_GetInt (ID3DXEffect *iface, D3DXHANDLE parameter, INT *n)
 
static HRESULT WINAPI ID3DXEffectImpl_SetIntArray (ID3DXEffect *iface, D3DXHANDLE parameter, const INT *n, UINT count)
 
static HRESULT WINAPI ID3DXEffectImpl_GetIntArray (ID3DXEffect *iface, D3DXHANDLE parameter, INT *n, UINT count)
 
static HRESULT WINAPI ID3DXEffectImpl_SetFloat (ID3DXEffect *iface, D3DXHANDLE parameter, float f)
 
static HRESULT WINAPI ID3DXEffectImpl_GetFloat (ID3DXEffect *iface, D3DXHANDLE parameter, float *f)
 
static HRESULT WINAPI ID3DXEffectImpl_SetFloatArray (ID3DXEffect *iface, D3DXHANDLE parameter, const float *f, UINT count)
 
static HRESULT WINAPI ID3DXEffectImpl_GetFloatArray (ID3DXEffect *iface, D3DXHANDLE parameter, float *f, UINT count)
 
static HRESULT WINAPI ID3DXEffectImpl_SetVector (ID3DXEffect *iface, D3DXHANDLE parameter, const D3DXVECTOR4 *vector)
 
static HRESULT WINAPI ID3DXEffectImpl_GetVector (ID3DXEffect *iface, D3DXHANDLE parameter, D3DXVECTOR4 *vector)
 
static HRESULT WINAPI ID3DXEffectImpl_SetVectorArray (ID3DXEffect *iface, D3DXHANDLE parameter, const D3DXVECTOR4 *vector, UINT count)
 
static HRESULT WINAPI ID3DXEffectImpl_GetVectorArray (ID3DXEffect *iface, D3DXHANDLE parameter, D3DXVECTOR4 *vector, UINT count)
 
static HRESULT WINAPI ID3DXEffectImpl_SetMatrix (ID3DXEffect *iface, D3DXHANDLE parameter, const D3DXMATRIX *matrix)
 
static HRESULT WINAPI ID3DXEffectImpl_GetMatrix (ID3DXEffect *iface, D3DXHANDLE parameter, D3DXMATRIX *matrix)
 
static HRESULT WINAPI ID3DXEffectImpl_SetMatrixArray (ID3DXEffect *iface, D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count)
 
static HRESULT WINAPI ID3DXEffectImpl_GetMatrixArray (ID3DXEffect *iface, D3DXHANDLE parameter, D3DXMATRIX *matrix, UINT count)
 
static HRESULT WINAPI ID3DXEffectImpl_SetMatrixPointerArray (ID3DXEffect *iface, D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count)
 
static HRESULT WINAPI ID3DXEffectImpl_GetMatrixPointerArray (ID3DXEffect *iface, D3DXHANDLE parameter, D3DXMATRIX **matrix, UINT count)
 
static HRESULT WINAPI ID3DXEffectImpl_SetMatrixTranspose (ID3DXEffect *iface, D3DXHANDLE parameter, const D3DXMATRIX *matrix)
 
static HRESULT WINAPI ID3DXEffectImpl_GetMatrixTranspose (ID3DXEffect *iface, D3DXHANDLE parameter, D3DXMATRIX *matrix)
 
static HRESULT WINAPI ID3DXEffectImpl_SetMatrixTransposeArray (ID3DXEffect *iface, D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count)
 
static HRESULT WINAPI ID3DXEffectImpl_GetMatrixTransposeArray (ID3DXEffect *iface, D3DXHANDLE parameter, D3DXMATRIX *matrix, UINT count)
 
static HRESULT WINAPI ID3DXEffectImpl_SetMatrixTransposePointerArray (ID3DXEffect *iface, D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count)
 
static HRESULT WINAPI ID3DXEffectImpl_GetMatrixTransposePointerArray (ID3DXEffect *iface, D3DXHANDLE parameter, D3DXMATRIX **matrix, UINT count)
 
static HRESULT WINAPI ID3DXEffectImpl_SetString (ID3DXEffect *iface, D3DXHANDLE parameter, const char *string)
 
static HRESULT WINAPI ID3DXEffectImpl_GetString (ID3DXEffect *iface, D3DXHANDLE parameter, const char **string)
 
static HRESULT WINAPI ID3DXEffectImpl_SetTexture (struct ID3DXEffect *iface, D3DXHANDLE parameter, struct IDirect3DBaseTexture9 *texture)
 
static HRESULT WINAPI ID3DXEffectImpl_GetTexture (struct ID3DXEffect *iface, D3DXHANDLE parameter, struct IDirect3DBaseTexture9 **texture)
 
static HRESULT WINAPI ID3DXEffectImpl_GetPixelShader (ID3DXEffect *iface, D3DXHANDLE parameter, struct IDirect3DPixelShader9 **shader)
 
static HRESULT WINAPI ID3DXEffectImpl_GetVertexShader (struct ID3DXEffect *iface, D3DXHANDLE parameter, struct IDirect3DVertexShader9 **shader)
 
static HRESULT WINAPI ID3DXEffectImpl_SetArrayRange (ID3DXEffect *iface, D3DXHANDLE parameter, UINT start, UINT end)
 
static HRESULT WINAPI ID3DXEffectImpl_GetPool (ID3DXEffect *iface, ID3DXEffectPool **pool)
 
static HRESULT WINAPI ID3DXEffectImpl_SetTechnique (ID3DXEffect *iface, D3DXHANDLE technique)
 
static D3DXHANDLE WINAPI ID3DXEffectImpl_GetCurrentTechnique (ID3DXEffect *iface)
 
static HRESULT WINAPI ID3DXEffectImpl_ValidateTechnique (ID3DXEffect *iface, D3DXHANDLE technique)
 
static HRESULT WINAPI ID3DXEffectImpl_FindNextValidTechnique (ID3DXEffect *iface, D3DXHANDLE technique, D3DXHANDLE *next_technique)
 
static BOOL walk_parameter_dep (struct d3dx_parameter *param, walk_parameter_dep_func param_func, void *data)
 
static BOOL walk_param_eval_dep (struct d3dx_param_eval *param_eval, walk_parameter_dep_func param_func, void *data)
 
static BOOL walk_state_dep (struct d3dx_state *state, walk_parameter_dep_func param_func, void *data)
 
static BOOL is_parameter_used (struct d3dx_parameter *param, struct d3dx_technique *tech)
 
static BOOL WINAPI ID3DXEffectImpl_IsParameterUsed (ID3DXEffect *iface, D3DXHANDLE parameter, D3DXHANDLE technique)
 
static HRESULT WINAPI ID3DXEffectImpl_Begin (ID3DXEffect *iface, UINT *passes, DWORD flags)
 
static HRESULT WINAPI ID3DXEffectImpl_BeginPass (ID3DXEffect *iface, UINT pass)
 
static HRESULT WINAPI ID3DXEffectImpl_CommitChanges (ID3DXEffect *iface)
 
static HRESULT WINAPI ID3DXEffectImpl_EndPass (ID3DXEffect *iface)
 
static HRESULT WINAPI ID3DXEffectImpl_End (ID3DXEffect *iface)
 
static HRESULT WINAPI ID3DXEffectImpl_GetDevice (ID3DXEffect *iface, struct IDirect3DDevice9 **device)
 
static BOOL param_on_lost_device (void *data, struct d3dx_parameter *param)
 
static HRESULT WINAPI ID3DXEffectImpl_OnLostDevice (ID3DXEffect *iface)
 
static HRESULT WINAPI ID3DXEffectImpl_OnResetDevice (ID3DXEffect *iface)
 
static HRESULT WINAPI ID3DXEffectImpl_SetStateManager (ID3DXEffect *iface, ID3DXEffectStateManager *manager)
 
static HRESULT WINAPI ID3DXEffectImpl_GetStateManager (ID3DXEffect *iface, ID3DXEffectStateManager **manager)
 
static HRESULT WINAPI ID3DXEffectImpl_BeginParameterBlock (ID3DXEffect *iface)
 
static D3DXHANDLE WINAPI ID3DXEffectImpl_EndParameterBlock (ID3DXEffect *iface)
 
static HRESULT WINAPI ID3DXEffectImpl_ApplyParameterBlock (ID3DXEffect *iface, D3DXHANDLE parameter_block)
 
static HRESULT WINAPI ID3DXEffectImpl_CloneEffect (ID3DXEffect *iface, struct IDirect3DDevice9 *device, struct ID3DXEffect **effect)
 
static struct ID3DXEffectCompilerImplimpl_from_ID3DXEffectCompiler (ID3DXEffectCompiler *iface)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_QueryInterface (ID3DXEffectCompiler *iface, REFIID riid, void **object)
 
static ULONG WINAPI ID3DXEffectCompilerImpl_AddRef (ID3DXEffectCompiler *iface)
 
static ULONG WINAPI ID3DXEffectCompilerImpl_Release (ID3DXEffectCompiler *iface)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_GetDesc (ID3DXEffectCompiler *iface, D3DXEFFECT_DESC *desc)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_GetParameterDesc (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, D3DXPARAMETER_DESC *desc)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_GetTechniqueDesc (ID3DXEffectCompiler *iface, D3DXHANDLE technique, D3DXTECHNIQUE_DESC *desc)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_GetPassDesc (ID3DXEffectCompiler *iface, D3DXHANDLE pass, D3DXPASS_DESC *desc)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_GetFunctionDesc (ID3DXEffectCompiler *iface, D3DXHANDLE shader, D3DXFUNCTION_DESC *desc)
 
static D3DXHANDLE WINAPI ID3DXEffectCompilerImpl_GetParameter (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, UINT index)
 
static D3DXHANDLE WINAPI ID3DXEffectCompilerImpl_GetParameterByName (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, const char *name)
 
static D3DXHANDLE WINAPI ID3DXEffectCompilerImpl_GetParameterBySemantic (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, const char *semantic)
 
static D3DXHANDLE WINAPI ID3DXEffectCompilerImpl_GetParameterElement (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, UINT index)
 
static D3DXHANDLE WINAPI ID3DXEffectCompilerImpl_GetTechnique (ID3DXEffectCompiler *iface, UINT index)
 
static D3DXHANDLE WINAPI ID3DXEffectCompilerImpl_GetTechniqueByName (ID3DXEffectCompiler *iface, const char *name)
 
static D3DXHANDLE WINAPI ID3DXEffectCompilerImpl_GetPass (ID3DXEffectCompiler *iface, D3DXHANDLE technique, UINT index)
 
static D3DXHANDLE WINAPI ID3DXEffectCompilerImpl_GetPassByName (ID3DXEffectCompiler *iface, D3DXHANDLE technique, const char *name)
 
static D3DXHANDLE WINAPI ID3DXEffectCompilerImpl_GetFunction (ID3DXEffectCompiler *iface, UINT index)
 
static D3DXHANDLE WINAPI ID3DXEffectCompilerImpl_GetFunctionByName (ID3DXEffectCompiler *iface, const char *name)
 
static D3DXHANDLE WINAPI ID3DXEffectCompilerImpl_GetAnnotation (ID3DXEffectCompiler *iface, D3DXHANDLE object, UINT index)
 
static D3DXHANDLE WINAPI ID3DXEffectCompilerImpl_GetAnnotationByName (ID3DXEffectCompiler *iface, D3DXHANDLE object, const char *name)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_SetValue (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, const void *data, UINT bytes)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_GetValue (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, void *data, UINT bytes)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_SetBool (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, BOOL b)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_GetBool (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, BOOL *b)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_SetBoolArray (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, const BOOL *b, UINT count)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_GetBoolArray (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, BOOL *b, UINT count)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_SetInt (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, INT n)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_GetInt (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, INT *n)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_SetIntArray (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, const INT *n, UINT count)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_GetIntArray (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, INT *n, UINT count)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_SetFloat (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, float f)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_GetFloat (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, float *f)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_SetFloatArray (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, const float *f, UINT count)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_GetFloatArray (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, float *f, UINT count)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_SetVector (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, const D3DXVECTOR4 *vector)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_GetVector (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, D3DXVECTOR4 *vector)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_SetVectorArray (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, const D3DXVECTOR4 *vector, UINT count)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_GetVectorArray (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, D3DXVECTOR4 *vector, UINT count)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_SetMatrix (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, const D3DXMATRIX *matrix)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_GetMatrix (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, D3DXMATRIX *matrix)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_SetMatrixArray (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_GetMatrixArray (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, D3DXMATRIX *matrix, UINT count)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_SetMatrixPointerArray (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_GetMatrixPointerArray (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, D3DXMATRIX **matrix, UINT count)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_SetMatrixTranspose (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, const D3DXMATRIX *matrix)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_GetMatrixTranspose (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, D3DXMATRIX *matrix)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_SetMatrixTransposeArray (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_GetMatrixTransposeArray (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, D3DXMATRIX *matrix, UINT count)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_SetMatrixTransposePointerArray (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_GetMatrixTransposePointerArray (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, D3DXMATRIX **matrix, UINT count)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_SetString (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, const char *string)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_GetString (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, const char **string)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_SetTexture (struct ID3DXEffectCompiler *iface, D3DXHANDLE parameter, struct IDirect3DBaseTexture9 *texture)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_GetTexture (struct ID3DXEffectCompiler *iface, D3DXHANDLE parameter, struct IDirect3DBaseTexture9 **texture)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_GetPixelShader (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, struct IDirect3DPixelShader9 **shader)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_GetVertexShader (struct ID3DXEffectCompiler *iface, D3DXHANDLE parameter, struct IDirect3DVertexShader9 **shader)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_SetArrayRange (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, UINT start, UINT end)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_SetLiteral (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, BOOL literal)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_GetLiteral (ID3DXEffectCompiler *iface, D3DXHANDLE parameter, BOOL *literal)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_CompileEffect (ID3DXEffectCompiler *iface, DWORD flags, ID3DXBuffer **effect, ID3DXBuffer **error_msgs)
 
static HRESULT WINAPI ID3DXEffectCompilerImpl_CompileShader (ID3DXEffectCompiler *iface, D3DXHANDLE function, const char *target, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_msgs, ID3DXConstantTable **constant_table)
 
static HRESULT d3dx9_parse_sampler (struct d3dx9_base_effect *base, struct d3dx_sampler *sampler, const char *data, const char **ptr, struct d3dx_object *objects)
 
static HRESULT d3dx9_parse_value (struct d3dx9_base_effect *base, struct d3dx_parameter *param, void *value, const char *data, const char **ptr, struct d3dx_object *objects)
 
static HRESULT d3dx9_parse_init_value (struct d3dx9_base_effect *base, struct d3dx_parameter *param, const char *data, const char *ptr, struct d3dx_object *objects)
 
static HRESULT d3dx9_parse_name (char **name, const char *ptr)
 
static HRESULT d3dx9_copy_data (struct d3dx9_base_effect *base, unsigned int object_id, const char **ptr)
 
static void param_set_magic_number (struct d3dx_parameter *param)
 
static int param_rb_compare (const void *key, const struct wine_rb_entry *entry)
 
static void add_param_to_tree (struct d3dx9_base_effect *base, struct d3dx_parameter *param, struct d3dx_parameter *parent, char separator, unsigned int element)
 
static HRESULT d3dx9_parse_effect_typedef (struct d3dx9_base_effect *base, struct d3dx_parameter *param, const char *data, const char **ptr, struct d3dx_parameter *parent, UINT flags)
 
static HRESULT d3dx9_parse_effect_annotation (struct d3dx9_base_effect *base, struct d3dx_parameter *anno, const char *data, const char **ptr, struct d3dx_object *objects)
 
static HRESULT d3dx9_parse_effect_parameter (struct d3dx9_base_effect *base, struct d3dx_top_level_parameter *param, const char *data, const char **ptr, struct d3dx_object *objects)
 
static HRESULT d3dx9_parse_effect_pass (struct d3dx9_base_effect *base, struct d3dx_pass *pass, const char *data, const char **ptr, struct d3dx_object *objects)
 
static HRESULT d3dx9_parse_effect_technique (struct d3dx9_base_effect *base, struct d3dx_technique *technique, const char *data, const char **ptr, struct d3dx_object *objects)
 
static HRESULT d3dx9_create_object (struct d3dx9_base_effect *base, struct d3dx_object *object)
 
static HRESULT d3dx9_parse_array_selector (struct d3dx9_base_effect *base, struct d3dx_state *state, const char **skip_constants, unsigned int skip_constants_count)
 
static HRESULT d3dx9_parse_resource (struct d3dx9_base_effect *base, const char *data, const char **ptr, const char **skip_constants, unsigned int skip_constants_count)
 
static BOOL param_set_top_level_param (void *top_level_param, struct d3dx_parameter *param)
 
static HRESULT d3dx9_parse_effect (struct d3dx9_base_effect *base, const char *data, UINT data_size, DWORD start, const char **skip_constants, unsigned int skip_constants_count)
 
static charnext_valid_constant_name (char **string)
 
static const char ** parse_skip_constants_string (char *skip_constants_string, unsigned int *names_count)
 
static HRESULT d3dx9_base_effect_init (struct d3dx9_base_effect *base, const char *data, SIZE_T data_size, const D3D_SHADER_MACRO *defines, ID3DInclude *include, UINT eflags, ID3DBlob **errors, struct ID3DXEffectImpl *effect, struct d3dx_effect_pool *pool, const char *skip_constants_string)
 
static HRESULT d3dx9_effect_init (struct ID3DXEffectImpl *effect, struct IDirect3DDevice9 *device, const char *data, SIZE_T data_size, const D3D_SHADER_MACRO *defines, ID3DInclude *include, UINT eflags, ID3DBlob **error_messages, struct ID3DXEffectPool *pool, const char *skip_constants)
 
HRESULT WINAPI D3DXCreateEffectEx (struct IDirect3DDevice9 *device, const void *srcdata, UINT srcdatalen, const D3DXMACRO *defines, struct ID3DXInclude *include, const char *skip_constants, DWORD flags, struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors)
 
HRESULT WINAPI D3DXCreateEffect (struct IDirect3DDevice9 *device, const void *srcdata, UINT srcdatalen, const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags, struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors)
 
static HRESULT d3dx9_effect_compiler_init (struct ID3DXEffectCompilerImpl *compiler, const char *data, SIZE_T data_size, const D3D_SHADER_MACRO *defines, ID3DInclude *include, UINT eflags, ID3DBlob **error_messages)
 
HRESULT WINAPI D3DXCreateEffectCompiler (const char *srcdata, UINT srcdatalen, const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags, ID3DXEffectCompiler **compiler, ID3DXBuffer **parse_errors)
 
static HRESULT WINAPI d3dx_effect_pool_QueryInterface (ID3DXEffectPool *iface, REFIID riid, void **object)
 
static ULONG WINAPI d3dx_effect_pool_AddRef (ID3DXEffectPool *iface)
 
static void free_effect_pool (struct d3dx_effect_pool *pool)
 
static ULONG WINAPI d3dx_effect_pool_Release (ID3DXEffectPool *iface)
 
HRESULT WINAPI D3DXCreateEffectPool (ID3DXEffectPool **pool)
 
HRESULT WINAPI D3DXCreateEffectFromFileExW (struct IDirect3DDevice9 *device, const WCHAR *srcfile, const D3DXMACRO *defines, struct ID3DXInclude *include, const char *skipconstants, DWORD flags, struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilationerrors)
 
HRESULT WINAPI D3DXCreateEffectFromFileExA (struct IDirect3DDevice9 *device, const char *srcfile, const D3DXMACRO *defines, struct ID3DXInclude *include, const char *skipconstants, DWORD flags, struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilationerrors)
 
HRESULT WINAPI D3DXCreateEffectFromFileW (struct IDirect3DDevice9 *device, const WCHAR *srcfile, const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags, struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilationerrors)
 
HRESULT WINAPI D3DXCreateEffectFromFileA (struct IDirect3DDevice9 *device, const char *srcfile, const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags, struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilationerrors)
 
HRESULT WINAPI D3DXCreateEffectFromResourceExW (struct IDirect3DDevice9 *device, HMODULE srcmodule, const WCHAR *srcresource, const D3DXMACRO *defines, struct ID3DXInclude *include, const char *skipconstants, DWORD flags, struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilationerrors)
 
HRESULT WINAPI D3DXCreateEffectFromResourceExA (struct IDirect3DDevice9 *device, HMODULE srcmodule, const char *srcresource, const D3DXMACRO *defines, struct ID3DXInclude *include, const char *skipconstants, DWORD flags, struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilationerrors)
 
HRESULT WINAPI D3DXCreateEffectFromResourceW (struct IDirect3DDevice9 *device, HMODULE srcmodule, const WCHAR *srcresource, const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags, struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilationerrors)
 
HRESULT WINAPI D3DXCreateEffectFromResourceA (struct IDirect3DDevice9 *device, HMODULE srcmodule, const char *srcresource, const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags, struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilationerrors)
 
HRESULT WINAPI D3DXCreateEffectCompilerFromFileW (const WCHAR *srcfile, const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags, ID3DXEffectCompiler **effectcompiler, ID3DXBuffer **parseerrors)
 
HRESULT WINAPI D3DXCreateEffectCompilerFromFileA (const char *srcfile, const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags, ID3DXEffectCompiler **effectcompiler, ID3DXBuffer **parseerrors)
 
HRESULT WINAPI D3DXCreateEffectCompilerFromResourceA (HMODULE srcmodule, const char *srcresource, const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags, ID3DXEffectCompiler **effectcompiler, ID3DXBuffer **parseerrors)
 
HRESULT WINAPI D3DXCreateEffectCompilerFromResourceW (HMODULE srcmodule, const WCHAR *srcresource, const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags, ID3DXEffectCompiler **effectcompiler, ID3DXBuffer **parseerrors)
 
HRESULT WINAPI D3DXDisassembleEffect (ID3DXEffect *effect, BOOL enable_color_code, ID3DXBuffer **disassembly)
 

Variables

static const char parameter_magic_string [4] = {'@', '!', '#', '\xFF'}
 
struct {
   enum STATE_CLASS   class
 
   UINT   op
 
   const char *   name
 
state_table []
 
static const struct ID3DXEffectVtbl ID3DXEffect_Vtbl
 
static const struct ID3DXEffectCompilerVtbl ID3DXEffectCompiler_Vtbl
 
static const struct ID3DXEffectPoolVtbl ID3DXEffectPool_Vtbl
 

Macro Definition Documentation

◆ INITIAL_CONST_NAMES_SIZE

#define INITIAL_CONST_NAMES_SIZE   4

Definition at line 6549 of file effect.c.

◆ INITIAL_POOL_SIZE

#define INITIAL_POOL_SIZE   16

Definition at line 37 of file effect.c.

◆ INITIAL_SHARED_DATA_SIZE

#define INITIAL_SHARED_DATA_SIZE   4

Definition at line 194 of file effect.c.

◆ INT_FLOAT_MULTI

#define INT_FLOAT_MULTI   255.0f

Definition at line 30 of file effect.c.

◆ INT_FLOAT_MULTI_INVERSE

#define INT_FLOAT_MULTI_INVERSE   (1/INT_FLOAT_MULTI)

Definition at line 31 of file effect.c.

◆ PARAMETER_FLAG_SHARED

#define PARAMETER_FLAG_SHARED   1

Definition at line 35 of file effect.c.

Typedef Documentation

◆ walk_parameter_dep_func

typedef BOOL(* walk_parameter_dep_func) (void *data, struct d3dx_parameter *param)

Definition at line 219 of file effect.c.

Enumeration Type Documentation

◆ LIGHT_TYPE

Enumerator
LT_TYPE 
LT_DIFFUSE 
LT_SPECULAR 
LT_AMBIENT 
LT_POSITION 
LT_DIRECTION 
LT_RANGE 
LT_FALLOFF 
LT_ATTENUATION0 
LT_ATTENUATION1 
LT_ATTENUATION2 
LT_THETA 
LT_PHI 

Definition at line 69 of file effect.c.

◆ MATERIAL_TYPE

Enumerator
MT_DIFFUSE 
MT_AMBIENT 
MT_SPECULAR 
MT_EMISSIVE 
MT_POWER 

Definition at line 60 of file effect.c.

61 {
62  MT_DIFFUSE,
63  MT_AMBIENT,
66  MT_POWER,
67 };

◆ SHADER_CONSTANT_TYPE

Enumerator
SCT_VSFLOAT 
SCT_VSBOOL 
SCT_VSINT 
SCT_PSFLOAT 
SCT_PSBOOL 
SCT_PSINT 

Definition at line 86 of file effect.c.

87 {
89  SCT_VSBOOL,
90  SCT_VSINT,
92  SCT_PSBOOL,
93  SCT_PSINT,
94 };

◆ STATE_CLASS

Enumerator
SC_LIGHTENABLE 
SC_FVF 
SC_LIGHT 
SC_MATERIAL 
SC_NPATCHMODE 
SC_PIXELSHADER 
SC_RENDERSTATE 
SC_SETSAMPLER 
SC_SAMPLERSTATE 
SC_TEXTURE 
SC_TEXTURESTAGE 
SC_TRANSFORM 
SC_VERTEXSHADER 
SC_SHADERCONST 
SC_UNKNOWN 

Definition at line 41 of file effect.c.

◆ STATE_TYPE

Enumerator
ST_CONSTANT 
ST_PARAMETER 
ST_FXLC 
ST_ARRAY_SELECTOR 

Definition at line 96 of file effect.c.

97 {
100  ST_FXLC,
102 };

Function Documentation

◆ add_param_to_tree()

static void add_param_to_tree ( struct d3dx9_base_effect base,
struct d3dx_parameter param,
struct d3dx_parameter parent,
char  separator,
unsigned int  element 
)
static

Definition at line 5506 of file effect.c.

5508 {
5509  const char *parent_name = parent ? parent->full_name : NULL;
5510  unsigned int i;
5511 
5512  TRACE("Adding parameter %p (%s - parent %p, element %u) to the rbtree.\n",
5513  param, debugstr_a(param->name), parent, element);
5514 
5515  if (parent_name)
5516  {
5517  unsigned int parent_name_len = strlen(parent_name);
5518  unsigned int name_len = strlen(param->name);
5519  unsigned int part_str_len;
5520  unsigned int len;
5521  char part_str[16];
5522 
5523  if (separator == '[')
5524  {
5525  sprintf(part_str, "[%u]", element);
5526  part_str_len = strlen(part_str);
5527  name_len = 0;
5528  }
5529  else
5530  {
5531  part_str[0] = separator;
5532  part_str[1] = 0;
5533  part_str_len = 1;
5534  }
5535  len = parent_name_len + part_str_len + name_len + 1;
5536 
5537  if (!(param->full_name = heap_alloc(len)))
5538  {
5539  ERR("Out of memory.\n");
5540  return;
5541  }
5542 
5543  memcpy(param->full_name, parent_name, parent_name_len);
5544  memcpy(param->full_name + parent_name_len, part_str, part_str_len);
5545  memcpy(param->full_name + parent_name_len + part_str_len, param->name, name_len);
5546  param->full_name[len - 1] = 0;
5547  }
5548  else
5549  {
5550  unsigned int len = strlen(param->name) + 1;
5551 
5552  if (!(param->full_name = heap_alloc(len)))
5553  {
5554  ERR("Out of memory.\n");
5555  return;
5556  }
5557 
5558  memcpy(param->full_name, param->name, len);
5559  }
5560  TRACE("Full name is %s.\n", param->full_name);
5561  wine_rb_put(&base->param_tree, param->full_name, &param->rb_entry);
5562 
5564  for (i = 0; i < param->top_level_param->annotation_count; ++i)
5565  add_param_to_tree(base, &param->top_level_param->annotations[i], param, '@', 0);
5566 
5567  if (param->element_count)
5568  for (i = 0; i < param->element_count; ++i)
5569  add_param_to_tree(base, &param->members[i], param, '[', i);
5570  else
5571  for (i = 0; i < param->member_count; ++i)
5572  add_param_to_tree(base, &param->members[i], param, '.', 0);
5573 }
static const WCHAR separator[]
Definition: asmname.c:65
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define sprintf(buf, format,...)
Definition: sprintf.c:55
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
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
static BOOL is_top_level_parameter(struct d3dx_parameter *param)
#define TRACE(s)
Definition: solgame.cpp:4
r parent
Definition: btrfs.c:2944
#define debugstr_a
Definition: kernel32.h:31
GLfloat param
Definition: glext.h:5796
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
#define ERR(fmt,...)
Definition: debug.h:110
static void add_param_to_tree(struct d3dx9_base_effect *base, struct d3dx_parameter *param, struct d3dx_parameter *parent, char separator, unsigned int element)
Definition: effect.c:5506
static int wine_rb_put(struct wine_rb_tree *tree, const void *key, struct wine_rb_entry *entry)
Definition: rbtree.h:215

Referenced by d3dx9_parse_effect().

◆ d3dx9_apply_pass_states()

static HRESULT d3dx9_apply_pass_states ( struct ID3DXEffectImpl effect,
struct d3dx_pass pass,
BOOL  update_all 
)
static

Definition at line 3183 of file effect.c.

3184 {
3185  unsigned int i;
3186  HRESULT ret;
3187  HRESULT hr;
3188  ULONG64 new_update_version = next_effect_update_version(&effect->base_effect);
3189 
3190  TRACE("effect %p, pass %p, state_count %u.\n", effect, pass, pass->state_count);
3191 
3192  ret = D3D_OK;
3193  for (i = 0; i < pass->state_count; ++i)
3194  {
3195  if (FAILED(hr = d3dx9_apply_state(effect, pass, &pass->states[i], ~0u, update_all)))
3196  {
3197  WARN("Error applying state, hr %#x.\n", hr);
3198  ret = hr;
3199  }
3200  }
3201 
3202  if (effect->light_updated)
3203  {
3204  for (i = 0; i < ARRAY_SIZE(effect->current_light); ++i)
3205  {
3206  if ((effect->light_updated & (1u << i))
3207  && FAILED(hr = SET_D3D_STATE(effect, SetLight, i, &effect->current_light[i])))
3208  {
3209  WARN("Error setting light, hr %#x.\n", hr);
3210  ret = hr;
3211  }
3212  }
3213  effect->light_updated = 0;
3214  }
3215 
3216  if (effect->material_updated
3217  && FAILED(hr = SET_D3D_STATE(effect, SetMaterial, &effect->current_material)))
3218  {
3219  WARN("Error setting material, hr %#x.\n", hr);
3220  ret = hr;
3221  }
3222  effect->material_updated = FALSE;
3223 
3224  pass->update_version = new_update_version;
3225  return ret;
3226 }
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
Definition: glfuncs.h:240
HRESULT hr
Definition: shlfolder.c:183
#define WARN(fmt,...)
Definition: debug.h:112
D3DMATERIAL9 current_material
Definition: effect.c:190
#define SET_D3D_STATE(base_effect, args...)
pass
Definition: typegen.h:24
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
Definition: glfuncs.h:248
BOOL material_updated
Definition: effect.c:191
static HRESULT d3dx9_apply_state(struct ID3DXEffectImpl *effect, struct d3dx_pass *pass, struct d3dx_state *state, unsigned int parent_index, BOOL update_all)
Definition: effect.c:3047
static ULONG64 next_effect_update_version(struct d3dx9_base_effect *base)
Definition: effect.c:1541
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:78
unsigned __int64 ULONG64
Definition: imports.h:198
int ret
struct d3dx9_base_effect base_effect
Definition: effect.c:178
#define D3D_OK
Definition: d3d.h:106
#define ARRAY_SIZE(a)
Definition: main.h:24
D3DLIGHT9 current_light[8]
Definition: effect.c:188
unsigned int light_updated
Definition: effect.c:189

Referenced by ID3DXEffectImpl_Begin(), ID3DXEffectImpl_BeginPass(), and ID3DXEffectImpl_CommitChanges().

◆ d3dx9_apply_state()

static HRESULT d3dx9_apply_state ( struct ID3DXEffectImpl effect,
struct d3dx_pass pass,
struct d3dx_state state,
unsigned int  parent_index,
BOOL  update_all 
)
static

Definition at line 3047 of file effect.c.

3049 {
3050  struct d3dx_parameter *param;
3051  void *param_value;
3052  BOOL param_dirty;
3053  HRESULT hr;
3054 
3055  TRACE("operation %u, index %u, type %u.\n", state->operation, state->index, state->type);
3056 
3057  if (FAILED(hr = d3dx9_get_param_value_ptr(pass, state, &param_value, &param,
3058  update_all, &param_dirty)))
3059  {
3060  if (!update_all && hr == E_FAIL)
3061  {
3062  /* Native d3dx9 returns D3D_OK from CommitChanges() involving
3063  * out of bounds array access and does not touch the affected
3064  * states. */
3065  WARN("Returning D3D_OK on out of bounds array access.\n");
3066  return D3D_OK;
3067  }
3068  return hr;
3069  }
3070 
3071  if (!(update_all || param_dirty
3072  || state_table[state->operation].class == SC_VERTEXSHADER
3073  || state_table[state->operation].class == SC_PIXELSHADER
3074  || state_table[state->operation].class == SC_SETSAMPLER))
3075  return D3D_OK;
3076 
3077  switch (state_table[state->operation].class)
3078  {
3079  case SC_RENDERSTATE:
3080  TRACE("%s, operation %u, value %u.\n", state_table[state->operation].name,
3081  state_table[state->operation].op, *(DWORD *)param_value);
3082  return SET_D3D_STATE(effect, SetRenderState, state_table[state->operation].op, *(DWORD *)param_value);
3083  case SC_FVF:
3084  TRACE("%s, value %#x.\n", state_table[state->operation].name, *(DWORD *)param_value);
3085  return SET_D3D_STATE(effect, SetFVF, *(DWORD *)param_value);
3086  case SC_TEXTURE:
3087  {
3088  UINT unit;
3089 
3090  unit = parent_index == ~0u ? state->index : parent_index;
3091  TRACE("%s, unit %u, value %p.\n", state_table[state->operation].name, unit,
3092  *(IDirect3DBaseTexture9 **)param_value);
3093  return SET_D3D_STATE(effect, SetTexture, unit, *(IDirect3DBaseTexture9 **)param_value);
3094  }
3095  case SC_TEXTURESTAGE:
3096  TRACE("%s, stage %u, value %u.\n", state_table[state->operation].name, state->index, *(DWORD *)param_value);
3097  return SET_D3D_STATE(effect, SetTextureStageState, state->index,
3098  state_table[state->operation].op, *(DWORD *)param_value);
3099  case SC_SETSAMPLER:
3100  {
3101  struct d3dx_sampler *sampler;
3102  HRESULT ret, hr;
3103  unsigned int i;
3104 
3105  sampler = (struct d3dx_sampler *)param_value;
3106  TRACE("%s, sampler %u, applying %u states.\n", state_table[state->operation].name, state->index,
3107  sampler->state_count);
3108  ret = D3D_OK;
3109  for (i = 0; i < sampler->state_count; i++)
3110  {
3111  if (FAILED(hr = d3dx9_apply_state(effect, pass, &sampler->states[i], state->index, update_all)))
3112  ret = hr;
3113  }
3114  return ret;
3115  }
3116  case SC_SAMPLERSTATE:
3117  {
3118  UINT sampler;
3119 
3120  sampler = parent_index == ~0u ? state->index : parent_index;
3121  TRACE("%s, sampler %u, value %u.\n", state_table[state->operation].name, sampler, *(DWORD *)param_value);
3122  return SET_D3D_STATE(effect, SetSamplerState, sampler, state_table[state->operation].op,
3123  *(DWORD *)param_value);
3124  }
3125  case SC_VERTEXSHADER:
3126  TRACE("%s, shader %p.\n", state_table[state->operation].name, *(IDirect3DVertexShader9 **)param_value);
3127  if ((update_all || param_dirty)
3128  && FAILED(hr = SET_D3D_STATE(effect, SetVertexShader,
3129  *(IDirect3DVertexShader9 **)param_value)))
3130  ERR("Could not set vertex shader, hr %#x.\n", hr);
3131  else if (*(IDirect3DVertexShader9 **)param_value)
3132  hr = d3dx_set_shader_constants(effect, pass, param, TRUE, update_all || param_dirty);
3133  return hr;
3134  case SC_PIXELSHADER:
3135  TRACE("%s, shader %p.\n", state_table[state->operation].name, *(IDirect3DPixelShader9 **)param_value);
3136  if ((update_all || param_dirty)
3137  && FAILED(hr = SET_D3D_STATE(effect, SetPixelShader,
3138  *(IDirect3DPixelShader9 **)param_value)))
3139  ERR("Could not set pixel shader, hr %#x.\n", hr);
3140  else if (*(IDirect3DPixelShader9 **)param_value)
3141  hr = d3dx_set_shader_constants(effect, pass, param, FALSE, update_all || param_dirty);
3142  return hr;
3143  case SC_TRANSFORM:
3144  TRACE("%s, state %u.\n", state_table[state->operation].name, state->index);
3145  return SET_D3D_STATE(effect, SetTransform, state_table[state->operation].op + state->index,
3146  (D3DMATRIX *)param_value);
3147  case SC_LIGHTENABLE:
3148  TRACE("%s, index %u, value %u.\n", state_table[state->operation].name, state->index, *(BOOL *)param_value);
3149  return SET_D3D_STATE(effect, LightEnable, state->index, *(BOOL *)param_value);
3150  case SC_LIGHT:
3151  {
3152  TRACE("%s, index %u, op %u.\n", state_table[state->operation].name, state->index,
3153  state_table[state->operation].op);
3155  &effect->current_light[state->index], param_value);
3156  effect->light_updated |= 1u << state->index;
3157  return D3D_OK;
3158  }
3159  case SC_MATERIAL:
3160  {
3161  TRACE("%s, index %u, op %u.\n", state_table[state->operation].name, state->index,
3162  state_table[state->operation].op);
3164  &effect->current_material, param_value);
3165  effect->material_updated = TRUE;
3166  return D3D_OK;
3167  }
3168  case SC_NPATCHMODE:
3169  TRACE("%s, nsegments %f.\n", state_table[state->operation].name, *(float *)param_value);
3170  return SET_D3D_STATE(effect, SetNPatchMode, *(float *)param_value);
3171  case SC_SHADERCONST:
3172  TRACE("%s, index %u, op %u.\n", state_table[state->operation].name, state->index,
3173  state_table[state->operation].op);
3174  return d3dx_set_shader_const_state(effect, state_table[state->operation].op, state->index,
3175  param, param_value);
3176  default:
3177  FIXME("%s not handled.\n", state_table[state->operation].name);
3178  break;
3179  }
3180  return D3D_OK;
3181 }
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
Definition: glfuncs.h:240
#define TRUE
Definition: types.h:120
HRESULT hr
Definition: shlfolder.c:183
static const struct @244 state_table[]
#define WARN(fmt,...)
Definition: debug.h:112
D3DMATERIAL9 current_material
Definition: effect.c:190
#define SET_D3D_STATE(base_effect, args...)
#define E_FAIL
Definition: ddrawi.h:102
pass
Definition: typegen.h:24
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
Definition: glfuncs.h:248
unsigned int BOOL
Definition: ntddk_ex.h:94
#define FIXME(fmt,...)
Definition: debug.h:111
png_const_structrp png_const_inforp int * unit
Definition: png.h:2161
BOOL material_updated
Definition: effect.c:191
static HRESULT d3dx9_apply_state(struct ID3DXEffectImpl *effect, struct d3dx_pass *pass, struct d3dx_state *state, unsigned int parent_index, BOOL update_all)
Definition: effect.c:3047
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:78
static HRESULT d3dx_set_shader_const_state(struct ID3DXEffectImpl *effect, enum SHADER_CONSTANT_TYPE op, UINT index, struct d3dx_parameter *param, void *value_ptr)
Definition: effect.c:2899
GLfloat param
Definition: glext.h:5796
unsigned long DWORD
Definition: ntddk_ex.h:95
int ret
static HRESULT d3dx9_get_param_value_ptr(struct d3dx_pass *pass, struct d3dx_state *state, void **param_value, struct d3dx_parameter **out_param, BOOL update_all, BOOL *param_dirty)
Definition: effect.c:1064
static int state
Definition: maze.c:121
Definition: effect.c:44
#define ERR(fmt,...)
Definition: debug.h:110
#define D3D_OK
Definition: d3d.h:106
unsigned int UINT
Definition: ndis.h:50
static void d3dx9_set_light_parameter(enum LIGHT_TYPE op, D3DLIGHT9 *light, void *value)
Definition: effect.c:2789
static void d3dx9_set_material_parameter(enum MATERIAL_TYPE op, D3DMATERIAL9 *material, void *value)
Definition: effect.c:2856
D3DLIGHT9 current_light[8]
Definition: effect.c:188
unsigned int light_updated
Definition: effect.c:189
static HRESULT d3dx_set_shader_constants(struct ID3DXEffectImpl *effect, struct d3dx_pass *pass, struct d3dx_parameter *param, BOOL vs, BOOL update_all)
Definition: effect.c:3001
GLuint sampler
Definition: glext.h:7283

Referenced by d3dx9_apply_pass_states(), and d3dx_set_shader_constants().

◆ d3dx9_base_effect_cleanup()

static void d3dx9_base_effect_cleanup ( struct d3dx9_base_effect base)
static

Definition at line 684 of file effect.c.

685 {
686  unsigned int i;
687 
688  TRACE("base %p.\n", base);
689 
690  heap_free(base->full_name_tmp);
691 
692  if (base->parameters)
693  {
694  for (i = 0; i < base->parameter_count; ++i)
695  free_top_level_parameter(&base->parameters[i]);
696  HeapFree(GetProcessHeap(), 0, base->parameters);
697  base->parameters = NULL;
698  }
699 
700  if (base->techniques)
701  {
702  for (i = 0; i < base->technique_count; ++i)
703  free_technique(&base->techniques[i]);
704  HeapFree(GetProcessHeap(), 0, base->techniques);
705  base->techniques = NULL;
706  }
707 
708  if (base->objects)
709  {
710  for (i = 0; i < base->object_count; ++i)
711  {
712  free_object(&base->objects[i]);
713  }
714  HeapFree(GetProcessHeap(), 0, base->objects);
715  base->objects = NULL;
716  }
717 }
static void free_top_level_parameter(struct d3dx_top_level_parameter *param)
Definition: effect.c:606
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
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:404
static void free_technique(struct d3dx_technique *technique)
Definition: effect.c:649
static void free_object(struct d3dx_object *object)
Definition: effect.c:520
#define HeapFree(x, y, z)
Definition: compat.h:403
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by d3dx9_base_effect_init(), and free_effect().

◆ d3dx9_base_effect_get_annotation()

static D3DXHANDLE d3dx9_base_effect_get_annotation ( struct d3dx9_base_effect base,
D3DXHANDLE  object,
UINT  index 
)
static

Definition at line 1472 of file effect.c.

1474 {
1475  struct d3dx_parameter *annotations = NULL;
1476  UINT annotation_count = 0;
1477 
1478  annotation_count = get_annotation_from_object(base, object, &annotations);
1479 
1480  if (index < annotation_count)
1481  {
1482  TRACE("Returning parameter %p\n", &annotations[index]);
1483  return get_parameter_handle(&annotations[index]);
1484  }
1485 
1486  WARN("Annotation not found.\n");
1487 
1488  return NULL;
1489 }
#define WARN(fmt,...)
Definition: debug.h:112
smooth NULL
Definition: ftsmooth.c:416
static UINT get_annotation_from_object(struct d3dx9_base_effect *base, D3DXHANDLE object, struct d3dx_parameter **annotations)
Definition: effect.c:1432
GLuint index
Definition: glext.h:6031
static D3DXHANDLE get_parameter_handle(struct d3dx_parameter *parameter)
Definition: effect.c:443
#define TRACE(s)
Definition: solgame.cpp:4
unsigned int UINT
Definition: ndis.h:50

Referenced by ID3DXEffectImpl_GetAnnotation().

◆ d3dx9_base_effect_get_annotation_by_name()

static D3DXHANDLE d3dx9_base_effect_get_annotation_by_name ( struct d3dx9_base_effect base,
D3DXHANDLE  object,
const char name 
)
static

Definition at line 1491 of file effect.c.

1493 {
1494  struct d3dx_parameter *annotation = NULL;
1495  struct d3dx_parameter *annotations = NULL;
1496  UINT annotation_count = 0;
1497 
1498  if (!name)
1499  {
1500  WARN("Invalid argument specified\n");
1501  return NULL;
1502  }
1503 
1504  annotation_count = get_annotation_from_object(base, object, &annotations);
1505 
1506  annotation = get_annotation_by_name(base, annotation_count, annotations, name);
1507  if (annotation)
1508  {
1509  TRACE("Returning parameter %p\n", annotation);
1511  }
1512 
1513  WARN("Annotation not found.\n");
1514 
1515  return NULL;
1516 }
static struct d3dx_parameter * get_annotation_by_name(struct d3dx9_base_effect *base, unsigned int count, struct d3dx_parameter *parameters, const char *name)
Definition: effect.c:855
#define WARN(fmt,...)
Definition: debug.h:112
smooth NULL
Definition: ftsmooth.c:416
static UINT get_annotation_from_object(struct d3dx9_base_effect *base, D3DXHANDLE object, struct d3dx_parameter **annotations)
Definition: effect.c:1432
static D3DXHANDLE get_parameter_handle(struct d3dx_parameter *parameter)
Definition: effect.c:443
#define TRACE(s)
Definition: solgame.cpp:4
unsigned int UINT
Definition: ndis.h:50
Definition: name.c:38
#define annotation(x)
Definition: dispex.idl:19

Referenced by ID3DXEffectImpl_GetAnnotationByName().

◆ d3dx9_base_effect_get_bool()

static HRESULT d3dx9_base_effect_get_bool ( struct d3dx9_base_effect base,
D3DXHANDLE  parameter,
BOOL b 
)
static

Definition at line 1728 of file effect.c.

1729 {
1730  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
1731 
1732  if (b && param && !param->element_count && param->rows == 1 && param->columns == 1)
1733  {
1734  set_number(b, D3DXPT_BOOL, param->data, param->type);
1735  TRACE("Returning %s\n", *b ? "TRUE" : "FALSE");
1736  return D3D_OK;
1737  }
1738 
1739  WARN("Parameter not found.\n");
1740 
1741  return D3DERR_INVALIDCALL;
1742 }
#define WARN(fmt,...)
Definition: debug.h:112
#define D3DERR_INVALIDCALL
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define TRACE(s)
Definition: solgame.cpp:4
GLfloat param
Definition: glext.h:5796
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:504
static void set_number(void *outdata, D3DXPARAMETER_TYPE outtype, const void *indata, D3DXPARAMETER_TYPE intype)
Definition: effect.c:120
#define D3D_OK
Definition: d3d.h:106

Referenced by ID3DXEffectImpl_GetBool().

◆ d3dx9_base_effect_get_bool_array()

static HRESULT d3dx9_base_effect_get_bool_array ( struct d3dx9_base_effect base,
D3DXHANDLE  parameter,
BOOL b,
UINT  count 
)
static

Definition at line 1783 of file effect.c.

1785 {
1786  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
1787 
1788  if (b && param && (param->class == D3DXPC_SCALAR
1789  || param->class == D3DXPC_VECTOR
1790  || param->class == D3DXPC_MATRIX_ROWS
1791  || param->class == D3DXPC_MATRIX_COLUMNS))
1792  {
1793  UINT i, size = min(count, param->bytes / sizeof(DWORD));
1794 
1795  for (i = 0; i < size; ++i)
1796  {
1797  set_number(&b[i], D3DXPT_BOOL, (DWORD *)param->data + i, param->type);
1798  }
1799  return D3D_OK;
1800  }
1801 
1802  WARN("Parameter not found.\n");
1803 
1804  return D3DERR_INVALIDCALL;
1805 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define WARN(fmt,...)
Definition: debug.h:112
#define D3DERR_INVALIDCALL
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
Definition: glfuncs.h:248
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLsizeiptr size
Definition: glext.h:5919
GLfloat param
Definition: glext.h:5796
unsigned long DWORD
Definition: ntddk_ex.h:95
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:504
static void set_number(void *outdata, D3DXPARAMETER_TYPE outtype, const void *indata, D3DXPARAMETER_TYPE intype)
Definition: effect.c:120
#define D3D_OK
Definition: d3d.h:106
#define min(a, b)
Definition: monoChain.cc:55
unsigned int UINT
Definition: ndis.h:50

Referenced by ID3DXEffectImpl_GetBoolArray().

◆ d3dx9_base_effect_get_desc()

static HRESULT d3dx9_base_effect_get_desc ( struct d3dx9_base_effect base,
D3DXEFFECT_DESC desc 
)
static

Definition at line 1000 of file effect.c.

1001 {
1002  if (!desc)
1003  {
1004  WARN("Invalid argument specified.\n");
1005  return D3DERR_INVALIDCALL;
1006  }
1007 
1008  FIXME("partial stub!\n");
1009 
1010  /* TODO: add creator and function count. */
1011  desc->Creator = NULL;
1012  desc->Functions = 0;
1013  desc->Parameters = base->parameter_count;
1014  desc->Techniques = base->technique_count;
1015 
1016  return D3D_OK;
1017 }
#define WARN(fmt,...)
Definition: debug.h:112
#define D3DERR_INVALIDCALL
static const WCHAR desc[]
Definition: protectdata.c:36
#define FIXME(fmt,...)
Definition: debug.h:111
smooth NULL
Definition: ftsmooth.c:416
#define D3D_OK
Definition: d3d.h:106

Referenced by ID3DXEffectImpl_GetDesc().

◆ d3dx9_base_effect_get_float()

static HRESULT d3dx9_base_effect_get_float ( struct d3dx9_base_effect base,
D3DXHANDLE  parameter,
float f 
)
static

Definition at line 1970 of file effect.c.

1971 {
1972  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
1973 
1974  if (f && param && !param->element_count && param->columns == 1 && param->rows == 1)
1975  {
1976  set_number(f, D3DXPT_FLOAT, (DWORD *)param->data, param->type);
1977  TRACE("Returning %f\n", *f);
1978  return D3D_OK;
1979  }
1980 
1981  WARN("Parameter not found.\n");
1982 
1983  return D3DERR_INVALIDCALL;
1984 }
#define WARN(fmt,...)
Definition: debug.h:112
#define D3DERR_INVALIDCALL
GLfloat f
Definition: glext.h:7540
#define TRACE(s)
Definition: solgame.cpp:4
GLfloat param
Definition: glext.h:5796
unsigned long DWORD
Definition: ntddk_ex.h:95
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:504
static void set_number(void *outdata, D3DXPARAMETER_TYPE outtype, const void *indata, D3DXPARAMETER_TYPE intype)
Definition: effect.c:120
#define D3D_OK
Definition: d3d.h:106

Referenced by ID3DXEffectImpl_GetFloat().

◆ d3dx9_base_effect_get_float_array()

static HRESULT d3dx9_base_effect_get_float_array ( struct d3dx9_base_effect base,
D3DXHANDLE  parameter,
float f,
UINT  count 
)
static

Definition at line 2024 of file effect.c.

2026 {
2027  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
2028 
2029  if (f && param && (param->class == D3DXPC_SCALAR
2030  || param->class == D3DXPC_VECTOR
2031  || param->class == D3DXPC_MATRIX_ROWS
2032  || param->class == D3DXPC_MATRIX_COLUMNS))
2033  {
2034  UINT i, size = min(count, param->bytes / sizeof(DWORD));
2035 
2036  for (i = 0; i < size; ++i)
2037  {
2038  set_number(&f[i], D3DXPT_FLOAT, (DWORD *)param->data + i, param->type);
2039  }
2040  return D3D_OK;
2041  }
2042 
2043  WARN("Parameter not found.\n");
2044 
2045  return D3DERR_INVALIDCALL;
2046 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define WARN(fmt,...)
Definition: debug.h:112
#define D3DERR_INVALIDCALL
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
Definition: glfuncs.h:248
GLfloat f
Definition: glext.h:7540
GLsizeiptr size
Definition: glext.h:5919
GLfloat param
Definition: glext.h:5796
unsigned long DWORD
Definition: ntddk_ex.h:95
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:504
static void set_number(void *outdata, D3DXPARAMETER_TYPE outtype, const void *indata, D3DXPARAMETER_TYPE intype)
Definition: effect.c:120
#define D3D_OK
Definition: d3d.h:106
#define min(a, b)
Definition: monoChain.cc:55
unsigned int UINT
Definition: ndis.h:50

Referenced by ID3DXEffectImpl_GetFloatArray().

◆ d3dx9_base_effect_get_function()

static D3DXHANDLE d3dx9_base_effect_get_function ( struct d3dx9_base_effect base,
UINT  index 
)
static

Definition at line 1418 of file effect.c.

1419 {
1420  FIXME("stub!\n");
1421 
1422  return NULL;
1423 }
#define FIXME(fmt,...)
Definition: debug.h:111
smooth NULL
Definition: ftsmooth.c:416

Referenced by ID3DXEffectImpl_GetFunction().

◆ d3dx9_base_effect_get_function_by_name()

static D3DXHANDLE d3dx9_base_effect_get_function_by_name ( struct d3dx9_base_effect base,
const char name 
)
static

Definition at line 1425 of file effect.c.

1426 {
1427  FIXME("stub!\n");
1428 
1429  return NULL;
1430 }
#define FIXME(fmt,...)
Definition: debug.h:111
smooth NULL
Definition: ftsmooth.c:416

Referenced by ID3DXEffectImpl_GetFunctionByName().

◆ d3dx9_base_effect_get_function_desc()

static HRESULT d3dx9_base_effect_get_function_desc ( struct d3dx9_base_effect base,
D3DXHANDLE  shader,
D3DXFUNCTION_DESC desc 
)
static

Definition at line 1207 of file effect.c.

1209 {
1210  FIXME("stub!\n");
1211 
1212  return E_NOTIMPL;
1213 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

Referenced by ID3DXEffectImpl_GetFunctionDesc().

◆ d3dx9_base_effect_get_int()

static HRESULT d3dx9_base_effect_get_int ( struct d3dx9_base_effect base,
D3DXHANDLE  parameter,
INT n 
)
static

Definition at line 1850 of file effect.c.

1851 {
1852  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
1853 
1854  if (n && param && !param->element_count)
1855  {
1856  if (param->columns == 1 && param->rows == 1)
1857  {
1858  set_number(n, D3DXPT_INT, param->data, param->type);
1859  TRACE("Returning %i\n", *n);
1860  return D3D_OK;
1861  }
1862 
1863  if (param->type == D3DXPT_FLOAT &&
1864  ((param->class == D3DXPC_VECTOR && param->columns != 2)
1865  || (param->class == D3DXPC_MATRIX_ROWS && param->rows != 2 && param->columns == 1)))
1866  {
1867  TRACE("Vector fixup\n");
1868 
1869  /* all components (3,4) are clamped (0,255) and put in the INT */
1870  *n = (INT)(min(max(0.0f, *((FLOAT *)param->data + 2)), 1.0f) * INT_FLOAT_MULTI);
1871  *n += ((INT)(min(max(0.0f, *((FLOAT *)param->data + 1)), 1.0f) * INT_FLOAT_MULTI)) << 8;
1872  *n += ((INT)(min(max(0.0f, *((FLOAT *)param->data + 0)), 1.0f) * INT_FLOAT_MULTI)) << 16;
1873  if (param->columns * param->rows > 3)
1874  {
1875  *n += ((INT)(min(max(0.0f, *((FLOAT *)param->data + 3)), 1.0f) * INT_FLOAT_MULTI)) << 24;
1876  }
1877 
1878  TRACE("Returning %i\n", *n);
1879  return D3D_OK;
1880  }
1881  }
1882 
1883  WARN("Parameter not found.\n");
1884 
1885  return D3DERR_INVALIDCALL;
1886 }
#define max(a, b)
Definition: svc.c:63
#define WARN(fmt,...)
Definition: debug.h:112
#define INT
Definition: polytest.cpp:20
GLdouble n
Definition: glext.h:7729
#define D3DERR_INVALIDCALL
#define INT_FLOAT_MULTI
Definition: effect.c:30
GLfloat f
Definition: glext.h:7540
#define TRACE(s)
Definition: solgame.cpp:4
GLfloat param
Definition: glext.h:5796
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:504
static void set_number(void *outdata, D3DXPARAMETER_TYPE outtype, const void *indata, D3DXPARAMETER_TYPE intype)
Definition: effect.c:120
#define D3D_OK
Definition: d3d.h:106
#define min(a, b)
Definition: monoChain.cc:55
float FLOAT
Definition: typedefs.h:68

Referenced by ID3DXEffectImpl_GetInt().

◆ d3dx9_base_effect_get_int_array()

static HRESULT d3dx9_base_effect_get_int_array ( struct d3dx9_base_effect base,
D3DXHANDLE  parameter,
INT n,
UINT  count 
)
static

Definition at line 1926 of file effect.c.

1928 {
1929  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
1930 
1931  if (n && param && (param->class == D3DXPC_SCALAR
1932  || param->class == D3DXPC_VECTOR
1933  || param->class == D3DXPC_MATRIX_ROWS
1934  || param->class == D3DXPC_MATRIX_COLUMNS))
1935  {
1936  UINT i, size = min(count, param->bytes / sizeof(DWORD));
1937 
1938  for (i = 0; i < size; ++i)
1939  {
1940  set_number(&n[i], D3DXPT_INT, (DWORD *)param->data + i, param->type);
1941  }
1942  return D3D_OK;
1943  }
1944 
1945  WARN("Parameter not found.\n");
1946 
1947  return D3DERR_INVALIDCALL;
1948 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define WARN(fmt,...)
Definition: debug.h:112
GLdouble n
Definition: glext.h:7729
#define D3DERR_INVALIDCALL
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
Definition: glfuncs.h:248
GLsizeiptr size
Definition: glext.h:5919
GLfloat param
Definition: glext.h:5796
unsigned long DWORD
Definition: ntddk_ex.h:95
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:504
static void set_number(void *outdata, D3DXPARAMETER_TYPE outtype, const void *indata, D3DXPARAMETER_TYPE intype)
Definition: effect.c:120
#define D3D_OK
Definition: d3d.h:106
#define min(a, b)
Definition: monoChain.cc:55
unsigned int UINT
Definition: ndis.h:50

Referenced by ID3DXEffectImpl_GetIntArray().

◆ d3dx9_base_effect_get_matrix()

static HRESULT d3dx9_base_effect_get_matrix ( struct d3dx9_base_effect base,
D3DXHANDLE  parameter,
D3DXMATRIX matrix 
)
static

Definition at line 2262 of file effect.c.

2264 {
2265  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
2266 
2267  if (matrix && param && !param->element_count)
2268  {
2269  TRACE("Class %s\n", debug_d3dxparameter_class(param->class));
2270 
2271  switch (param->class)
2272  {
2273  case D3DXPC_MATRIX_ROWS:
2275  return D3D_OK;
2276 
2277  case D3DXPC_SCALAR:
2278  case D3DXPC_VECTOR:
2279  case D3DXPC_OBJECT:
2280  case D3DXPC_STRUCT:
2281  break;
2282 
2283  default:
2284  FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class));
2285  break;
2286  }
2287  }
2288 
2289  WARN("Parameter not found.\n");
2290 
2291  return D3DERR_INVALIDCALL;
2292 }
const char * debug_d3dxparameter_class(D3DXPARAMETER_CLASS c) DECLSPEC_HIDDEN
Definition: util.c:233
GLuint GLenum matrix
Definition: glext.h:9407
#define WARN(fmt,...)
Definition: debug.h:112
#define D3DERR_INVALIDCALL
#define FIXME(fmt,...)
Definition: debug.h:111
static void get_matrix(struct d3dx_parameter *param, D3DXMATRIX *matrix, BOOL transpose)
Definition: effect.c:761
#define TRACE(s)
Definition: solgame.cpp:4
GLfloat param
Definition: glext.h:5796
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:504
#define D3D_OK
Definition: d3d.h:106

Referenced by ID3DXEffectImpl_GetMatrix().

◆ d3dx9_base_effect_get_matrix_array()

static HRESULT d3dx9_base_effect_get_matrix_array ( struct d3dx9_base_effect base,
D3DXHANDLE  parameter,
D3DXMATRIX matrix,
UINT  count 
)
static

Definition at line 2332 of file effect.c.

2334 {
2335  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
2336 
2337  if (!count) return D3D_OK;
2338 
2340  {
2341  UINT i;
2342 
2343  TRACE("Class %s\n", debug_d3dxparameter_class(param->class));
2344 
2345  switch (param->class)
2346  {
2347  case D3DXPC_MATRIX_ROWS:
2348  for (i = 0; i < count; ++i)
2349  {
2350  get_matrix(&param->members[i], &matrix[i], FALSE);
2351  }
2352  return D3D_OK;
2353 
2354  case D3DXPC_SCALAR:
2355  case D3DXPC_VECTOR:
2356  case D3DXPC_OBJECT:
2357  case D3DXPC_STRUCT:
2358  break;
2359 
2360  default:
2361  FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class));
2362  break;
2363  }
2364  }
2365 
2366  WARN("Parameter not found.\n");
2367 
2368  return D3DERR_INVALIDCALL;
2369 }
const char * debug_d3dxparameter_class(D3DXPARAMETER_CLASS c) DECLSPEC_HIDDEN
Definition: util.c:233
GLuint GLenum matrix
Definition: glext.h:9407
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define WARN(fmt,...)
Definition: debug.h:112
#define D3DERR_INVALIDCALL
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
Definition: glfuncs.h:248
#define FIXME(fmt,...)
Definition: debug.h:111
static void get_matrix(struct d3dx_parameter *param, D3DXMATRIX *matrix, BOOL transpose)
Definition: effect.c:761
#define TRACE(s)
Definition: solgame.cpp:4
GLfloat param
Definition: glext.h:5796
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:504
#define D3D_OK
Definition: d3d.h:106
unsigned int UINT
Definition: ndis.h:50

Referenced by ID3DXEffectImpl_GetMatrixArray().

◆ d3dx9_base_effect_get_matrix_pointer_array()

static HRESULT d3dx9_base_effect_get_matrix_pointer_array ( struct d3dx9_base_effect base,
D3DXHANDLE  parameter,
D3DXMATRIX **  matrix,
UINT  count 
)
static

Definition at line 2406 of file effect.c.

2408 {
2409  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
2410 
2411  if (!count) return D3D_OK;
2412 
2414  {
2415  UINT i;
2416 
2417  TRACE("Class %s\n", debug_d3dxparameter_class(param->class));
2418 
2419  switch (param->class)
2420  {
2421  case D3DXPC_MATRIX_ROWS:
2422  for (i = 0; i < count; ++i)
2423  {
2424  get_matrix(&param->members[i], matrix[i], FALSE);
2425  }
2426  return D3D_OK;
2427 
2428  case D3DXPC_SCALAR:
2429  case D3DXPC_VECTOR:
2430  case D3DXPC_OBJECT:
2431  break;
2432 
2433  default:
2434  FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class));
2435  break;
2436  }
2437  }
2438 
2439  WARN("Parameter not found.\n");
2440 
2441  return D3DERR_INVALIDCALL;
2442 }
const char * debug_d3dxparameter_class(D3DXPARAMETER_CLASS c) DECLSPEC_HIDDEN
Definition: util.c:233
GLuint GLenum matrix
Definition: glext.h:9407
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define WARN(fmt,...)
Definition: debug.h:112
#define D3DERR_INVALIDCALL
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
Definition: glfuncs.h:248
#define FIXME(fmt,...)
Definition: debug.h:111
static void get_matrix(struct d3dx_parameter *param, D3DXMATRIX *matrix, BOOL transpose)
Definition: effect.c:761
#define TRACE(s)
Definition: solgame.cpp:4
GLfloat param
Definition: glext.h:5796
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:504
#define D3D_OK
Definition: d3d.h:106
unsigned int UINT
Definition: ndis.h:50

Referenced by ID3DXEffectImpl_GetMatrixPointerArray().

◆ d3dx9_base_effect_get_matrix_transpose()

static HRESULT d3dx9_base_effect_get_matrix_transpose ( struct d3dx9_base_effect base,
D3DXHANDLE  parameter,
D3DXMATRIX matrix 
)
static

Definition at line 2477 of file effect.c.

2479 {
2480  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
2481 
2482  if (matrix && param && !param->element_count)
2483  {
2484  TRACE("Class %s\n", debug_d3dxparameter_class(param->class));
2485 
2486  switch (param->class)
2487  {
2488  case D3DXPC_SCALAR:
2489  case D3DXPC_VECTOR:
2491  return D3D_OK;
2492 
2493  case D3DXPC_MATRIX_ROWS:
2495  return D3D_OK;
2496 
2497  case D3DXPC_OBJECT:
2498  case D3DXPC_STRUCT:
2499  break;
2500 
2501  default:
2502  FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class));
2503  break;
2504  }
2505  }
2506 
2507  WARN("Parameter not found.\n");
2508 
2509  return D3DERR_INVALIDCALL;
2510 }
const char * debug_d3dxparameter_class(D3DXPARAMETER_CLASS c) DECLSPEC_HIDDEN
Definition: util.c:233
#define TRUE
Definition: types.h:120
GLuint GLenum matrix
Definition: glext.h:9407
#define WARN(fmt,...)
Definition: debug.h:112
#define D3DERR_INVALIDCALL
#define FIXME(fmt,...)
Definition: debug.h:111
static void get_matrix(struct d3dx_parameter *param, D3DXMATRIX *matrix, BOOL transpose)
Definition: effect.c:761
#define TRACE(s)
Definition: solgame.cpp:4
GLfloat param
Definition: glext.h:5796
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:504
#define D3D_OK
Definition: d3d.h:106

Referenced by ID3DXEffectImpl_GetMatrixTranspose().

◆ d3dx9_base_effect_get_matrix_transpose_array()

static HRESULT d3dx9_base_effect_get_matrix_transpose_array ( struct d3dx9_base_effect base,
D3DXHANDLE  parameter,
D3DXMATRIX matrix,
UINT  count 
)
static

Definition at line 2550 of file effect.c.

2552 {
2553  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
2554 
2555  if (!count) return D3D_OK;
2556 
2558  {
2559  UINT i;
2560 
2561  TRACE("Class %s\n", debug_d3dxparameter_class(param->class));
2562 
2563  switch (param->class)
2564  {
2565  case D3DXPC_MATRIX_ROWS:
2566  for (i = 0; i < count; ++i)
2567  {
2568  get_matrix(&param->members[i], &matrix[i], TRUE);
2569  }
2570  return D3D_OK;
2571 
2572  case D3DXPC_SCALAR:
2573  case D3DXPC_VECTOR:
2574  case D3DXPC_OBJECT:
2575  case D3DXPC_STRUCT:
2576  break;
2577 
2578  default:
2579  FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class));
2580  break;
2581  }
2582  }
2583 
2584  WARN("Parameter not found.\n");
2585 
2586  return D3DERR_INVALIDCALL;
2587 }
const char * debug_d3dxparameter_class(D3DXPARAMETER_CLASS c) DECLSPEC_HIDDEN
Definition: util.c:233
#define TRUE
Definition: types.h:120
GLuint GLenum matrix
Definition: glext.h:9407
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define WARN(fmt,...)
Definition: debug.h:112
#define D3DERR_INVALIDCALL
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
Definition: glfuncs.h:248
#define FIXME(fmt,...)
Definition: debug.h:111
static void get_matrix(struct d3dx_parameter *param, D3DXMATRIX *matrix, BOOL transpose)
Definition: effect.c:761
#define TRACE(s)
Definition: solgame.cpp:4
GLfloat param
Definition: glext.h:5796
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:504
#define D3D_OK
Definition: d3d.h:106
unsigned int UINT
Definition: ndis.h:50

Referenced by ID3DXEffectImpl_GetMatrixTransposeArray().

◆ d3dx9_base_effect_get_matrix_transpose_pointer_array()

static HRESULT d3dx9_base_effect_get_matrix_transpose_pointer_array ( struct d3dx9_base_effect base,
D3DXHANDLE  parameter,
D3DXMATRIX **  matrix,
UINT  count 
)
static

Definition at line 2624 of file effect.c.

2626 {
2627  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
2628 
2629  if (!count) return D3D_OK;
2630 
2632  {
2633  UINT i;
2634 
2635  TRACE("Class %s\n", debug_d3dxparameter_class(param->class));
2636 
2637  switch (param->class)
2638  {
2639  case D3DXPC_MATRIX_ROWS:
2640  for (i = 0; i < count; ++i)
2641  {
2642  get_matrix(&param->members[i], matrix[i], TRUE);
2643  }
2644  return D3D_OK;
2645 
2646  case D3DXPC_SCALAR:
2647  case D3DXPC_VECTOR:
2648  case D3DXPC_OBJECT:
2649  break;
2650 
2651  default:
2652  FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class));
2653  break;
2654  }
2655  }
2656 
2657  WARN("Parameter not found.\n");
2658 
2659  return D3DERR_INVALIDCALL;
2660 }
const char * debug_d3dxparameter_class(D3DXPARAMETER_CLASS c) DECLSPEC_HIDDEN
Definition: util.c:233
#define TRUE
Definition: types.h:120
GLuint GLenum matrix
Definition: glext.h:9407
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define WARN(fmt,...)
Definition: debug.h:112
#define D3DERR_INVALIDCALL
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
Definition: glfuncs.h:248
#define FIXME(fmt,...)
Definition: debug.h:111
static void get_matrix(struct d3dx_parameter *param, D3DXMATRIX *matrix, BOOL transpose)
Definition: effect.c:761
#define TRACE(s)
Definition: solgame.cpp:4
GLfloat param
Definition: glext.h:5796
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:504
#define D3D_OK
Definition: d3d.h:106
unsigned int UINT
Definition: ndis.h:50

Referenced by ID3DXEffectImpl_GetMatrixTransposePointerArray().

◆ d3dx9_base_effect_get_parameter()

static D3DXHANDLE d3dx9_base_effect_get_parameter ( struct d3dx9_base_effect base,
D3DXHANDLE  parameter,
UINT  index 
)
static

Definition at line 1215 of file effect.c.

1217 {
1218  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
1219 
1220  if (!parameter)
1221  {
1222  if (index < base->parameter_count)
1223  {
1224  TRACE("Returning parameter %p.\n", &base->parameters[index]);
1225  return get_parameter_handle(&base->parameters[index].param);
1226  }
1227  }
1228  else
1229  {
1230  if (param && !param->element_count && index < param->member_count)
1231  {
1232  TRACE("Returning parameter %p.\n", &param->members[index]);
1233  return get_parameter_handle(&param->members[index]);
1234  }
1235  }
1236 
1237  WARN("Parameter not found.\n");
1238 
1239  return NULL;
1240 }
#define WARN(fmt,...)
Definition: debug.h:112
smooth NULL
Definition: ftsmooth.c:416
GLuint index
Definition: glext.h:6031
static D3DXHANDLE get_parameter_handle(struct d3dx_parameter *parameter)
Definition: effect.c:443
#define TRACE(s)
Definition: solgame.cpp:4
GLfloat param
Definition: glext.h:5796
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:504

Referenced by ID3DXEffectImpl_GetParameter().

◆ d3dx9_base_effect_get_parameter_by_name()

static D3DXHANDLE d3dx9_base_effect_get_parameter_by_name ( struct d3dx9_base_effect base,
D3DXHANDLE  parameter,
const char name 
)
static

Definition at line 1242 of file effect.c.

1244 {
1245  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
1247 
1248  if (!name)
1249  {
1251  TRACE("Returning parameter %p.\n", handle);
1252  return handle;
1253  }
1254 
1256  TRACE("Returning parameter %p.\n", handle);
1257 
1258  return handle;
1259 }
namespace GUID const ADDRINFOEXW ADDRINFOEXW struct timeval OVERLAPPED LPLOOKUPSERVICE_COMPLETION_ROUTINE HANDLE * handle
Definition: sock.c:82
const char * D3DXHANDLE
Definition: d3dx9shader.h:48
struct d3dx_parameter * get_parameter_by_name(struct d3dx9_base_effect *base, struct d3dx_parameter *parameter, const char *name)
Definition: effect.c:899
static D3DXHANDLE get_parameter_handle(struct d3dx_parameter *parameter)
Definition: effect.c:443
#define TRACE(s)
Definition: solgame.cpp:4
GLfloat param
Definition: glext.h:5796
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:504
Definition: name.c:38

Referenced by ID3DXEffectImpl_GetParameterByName().

◆ d3dx9_base_effect_get_parameter_by_semantic()

static D3DXHANDLE d3dx9_base_effect_get_parameter_by_semantic ( struct d3dx9_base_effect base,
D3DXHANDLE  parameter,
const char semantic 
)
static

Definition at line 1261 of file effect.c.

1263 {
1264  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
1265  struct d3dx_parameter *temp_param;
1266  UINT i;
1267 
1268  if (!parameter)
1269  {
1270  for (i = 0; i < base->parameter_count; ++i)
1271  {
1272  temp_param = &base->parameters[i].param;
1273 
1274  if (!temp_param->semantic)
1275  {
1276  if (!semantic)
1277  {
1278  TRACE("Returning parameter %p\n", temp_param);
1279  return get_parameter_handle(temp_param);
1280  }
1281  continue;
1282  }
1283 
1284  if (!strcasecmp(temp_param->semantic, semantic))
1285  {
1286  TRACE("Returning parameter %p\n", temp_param);
1287  return get_parameter_handle(temp_param);
1288  }
1289  }
1290  }
1291  else if (param)
1292  {
1293  for (i = 0; i < param->member_count; ++i)
1294  {
1295  temp_param = &param->members[i];
1296 
1297  if (!temp_param->semantic)
1298  {
1299  if (!semantic)
1300  {
1301  TRACE("Returning parameter %p\n", temp_param);
1302  return get_parameter_handle(temp_param);
1303  }
1304  continue;
1305  }
1306 
1307  if (!strcasecmp(temp_param->semantic, semantic))
1308  {
1309  TRACE("Returning parameter %p\n", temp_param);
1310  return get_parameter_handle(temp_param);
1311  }
1312  }
1313  }
1314 
1315  WARN("Parameter not found.\n");
1316 
1317  return NULL;
1318 }
#define strcasecmp
Definition: fake.h:9
#define WARN(fmt,...)
Definition: debug.h:112
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
Definition: glfuncs.h:248
struct d3dx_parameter * members
smooth NULL
Definition: ftsmooth.c:416
static D3DXHANDLE get_parameter_handle(struct d3dx_parameter *parameter)
Definition: effect.c:443
#define TRACE(s)
Definition: solgame.cpp:4
GLfloat param
Definition: glext.h:5796
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:504
unsigned int UINT
Definition: ndis.h:50

Referenced by ID3DXEffectImpl_GetParameterBySemantic().

◆ d3dx9_base_effect_get_parameter_desc()

static HRESULT d3dx9_base_effect_get_parameter_desc ( struct d3dx9_base_effect base,
D3DXHANDLE  parameter,
D3DXPARAMETER_DESC desc 
)
static

Definition at line 1019 of file effect.c.

1021 {
1022  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
1023 
1024  if (!desc || !param)
1025  {
1026  WARN("Invalid argument specified.\n");
1027  return D3DERR_INVALIDCALL;
1028  }
1029 
1030  desc->Name = param->name;
1031  desc->Semantic = param->semantic;
1032  desc->Class = param->class;
1033  desc->Type = param->type;
1034  desc->Rows = param->rows;
1035  desc->Columns = param->columns;
1036  desc->Elements = param->element_count;
1037  desc->Annotations = is_top_level_parameter(param)
1038  ? top_level_parameter_from_parameter(param)->annotation_count : 0;
1039  desc->StructMembers = param->member_count;
1040  desc->Flags = param->flags;
1041  desc->Bytes = param->bytes;
1042 
1043  return D3D_OK;
1044 }
#define WARN(fmt,...)
Definition: debug.h:112
#define D3DERR_INVALIDCALL
static const WCHAR desc[]
Definition: protectdata.c:36
static BOOL is_top_level_parameter(struct d3dx_parameter *param)
GLfloat param
Definition: glext.h:5796
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:504
#define D3D_OK
Definition: d3d.h:106
static struct d3dx_top_level_parameter * top_level_parameter_from_parameter(struct d3dx_parameter *param)

Referenced by ID3DXEffectImpl_GetParameterDesc().

◆ d3dx9_base_effect_get_parameter_element()

static D3DXHANDLE d3dx9_base_effect_get_parameter_element ( struct d3dx9_base_effect base,
D3DXHANDLE  parameter,
UINT  index 
)
static

Definition at line 1320 of file effect.c.

1322 {
1323  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
1324 
1325  if (!param)
1326  {
1327  if (index < base->parameter_count)
1328  {
1329  TRACE("Returning parameter %p.\n", &base->parameters[index]);
1330  return get_parameter_handle(&base->parameters[index].param);
1331  }
1332  }
1333  else
1334  {
1336  {
1337  TRACE("Returning parameter %p.\n", &param->members[index]);
1338  return get_parameter_handle(&param->members[index]);
1339  }
1340  }
1341 
1342  WARN("Parameter not found.\n");
1343 
1344  return NULL;
1345 }
#define WARN(fmt,...)
Definition: debug.h:112
smooth NULL
Definition: ftsmooth.c:416
GLuint index
Definition: glext.h:6031
static D3DXHANDLE get_parameter_handle(struct d3dx_parameter *parameter)
Definition: effect.c:443
#define TRACE(s)
Definition: solgame.cpp:4
GLfloat param
Definition: glext.h:5796
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:504

Referenced by ID3DXEffectImpl_GetParameterElement().

◆ d3dx9_base_effect_get_pass()

static D3DXHANDLE d3dx9_base_effect_get_pass ( struct d3dx9_base_effect base,
D3DXHANDLE  technique,
UINT  index 
)
static

Definition at line 1376 of file effect.c.

1378 {
1379  struct d3dx_technique *tech = get_valid_technique(base, technique);
1380 
1381  if (tech && index < tech->pass_count)
1382  {
1383  TRACE("Returning pass %p\n", &tech->passes[index]);
1384  return get_pass_handle(&tech->passes[index]);
1385  }
1386 
1387  WARN("Pass not found.\n");
1388 
1389  return NULL;
1390 }
#define WARN(fmt,...)
Definition: debug.h:112
static D3DXHANDLE get_pass_handle(struct d3dx_pass *pass)
Definition: effect.c:453
static struct d3dx_technique * get_valid_technique(struct d3dx9_base_effect *base, D3DXHANDLE technique)
Definition: effect.c:473
smooth NULL
Definition: ftsmooth.c:416
GLuint index
Definition: glext.h:6031
UINT pass_count
Definition: effect.c:142
#define TRACE(s)
Definition: solgame.cpp:4
struct d3dx_pass * passes
Definition: effect.c:146

Referenced by ID3DXEffectImpl_GetPass().

◆ d3dx9_base_effect_get_pass_by_name()

static D3DXHANDLE d3dx9_base_effect_get_pass_by_name ( struct d3dx9_base_effect base,
D3DXHANDLE  technique,
const char name 
)
static

Definition at line 1392 of file effect.c.

1394 {
1395  struct d3dx_technique *tech = get_valid_technique(base, technique);
1396 
1397  if (tech && name)
1398  {
1399  unsigned int i;
1400 
1401  for (i = 0; i < tech->pass_count; ++i)
1402  {
1403  struct d3dx_pass *pass = &tech->passes[i];
1404 
1405  if (!strcmp(pass->name, name))
1406  {
1407  TRACE("Returning pass %p\n", pass);
1408  return get_pass_handle(pass);
1409  }
1410  }
1411  }
1412 
1413  WARN("Pass not found.\n");
1414 
1415  return NULL;
1416 }
#define WARN(fmt,...)
Definition: debug.h:112
static D3DXHANDLE get_pass_handle(struct d3dx_pass *pass)
Definition: effect.c:453
pass
Definition: typegen.h:24
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
Definition: glfuncs.h:248
static struct d3dx_technique * get_valid_technique(struct d3dx9_base_effect *base, D3DXHANDLE technique)
Definition: effect.c:473
smooth NULL
Definition: ftsmooth.c:416
UINT pass_count
Definition: effect.c:142
#define TRACE(s)
Definition: solgame.cpp:4
Definition: name.c:38
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
struct d3dx_pass * passes
Definition: effect.c:146

Referenced by ID3DXEffectImpl_GetPassByName().

◆ d3dx9_base_effect_get_pass_desc()

static HRESULT d3dx9_base_effect_get_pass_desc ( struct d3dx9_base_effect base,
D3DXHANDLE  pass_handle,
D3DXPASS_DESC desc 
)
static

Definition at line 1158 of file effect.c.

1160 {
1161  struct d3dx_pass *pass = get_valid_pass(base, pass_handle);
1162  unsigned int i;
1163 
1164  if (!desc || !pass)
1165  {
1166  WARN("Invalid argument specified.\n");
1167  return D3DERR_INVALIDCALL;
1168  }
1169 
1170  desc->Name = pass->name;
1171  desc->Annotations = pass->annotation_count;
1172 
1173  desc->pVertexShaderFunction = NULL;
1174  desc->pPixelShaderFunction = NULL;
1175 
1176  if (base->flags & D3DXFX_NOT_CLONEABLE)
1177  return D3D_OK;
1178 
1179  for (i = 0; i < pass->state_count; ++i)
1180  {
1181  struct d3dx_state *state = &pass->states[i];
1182 
1183  if (state_table[state->operation].class == SC_VERTEXSHADER
1184  || state_table[state->operation].class == SC_PIXELSHADER)
1185  {
1186  struct d3dx_parameter *param;
1187  void *param_value;
1188  BOOL param_dirty;
1189  HRESULT hr;
1190  void *data;
1191 
1192  if (FAILED(hr = d3dx9_get_param_value_ptr(pass, &pass->states[i], &param_value, &param,
1193  FALSE, &param_dirty)))
1194  return hr;
1195 
1196  data = param->object_id ? base->objects[param->object_id].data : NULL;
1197  if (state_table[state->operation].class == SC_VERTEXSHADER)
1198  desc->pVertexShaderFunction = data;
1199  else
1200  desc->pPixelShaderFunction = data;
1201  }
1202  }
1203 
1204  return D3D_OK;
1205 }
HRESULT hr
Definition: shlfolder.c:183
static const struct @244 state_table[]
#define WARN(fmt,...)
Definition: debug.h:112
#define D3DERR_INVALIDCALL
pass
Definition: typegen.h:24
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
Definition: glfuncs.h:248
unsigned int BOOL
Definition: ntddk_ex.h:94
static const WCHAR desc[]
Definition: protectdata.c:36
smooth NULL
Definition: ftsmooth.c:416
LONG HRESULT
Definition: typedefs.h:78
GLfloat param
Definition: glext.h:5796
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static struct d3dx_pass * get_valid_pass(struct d3dx9_base_effect *base, D3DXHANDLE pass)
Definition: effect.c:486
static HRESULT d3dx9_get_param_value_ptr(struct d3dx_pass *pass, struct d3dx_state *state, void **param_value, struct d3dx_parameter **out_param, BOOL update_all, BOOL *param_dirty)
Definition: effect.c:1064
static int state
Definition: maze.c:121
#define D3D_OK
Definition: d3d.h:106
#define D3DXFX_NOT_CLONEABLE
Definition: d3dx9effect.h:27

Referenced by ID3DXEffectImpl_GetPassDesc().

◆ d3dx9_base_effect_get_pixel_shader()

static HRESULT d3dx9_base_effect_get_pixel_shader ( struct d3dx9_base_effect base,
D3DXHANDLE  parameter,
struct IDirect3DPixelShader9 **  shader 
)
static

Definition at line 2745 of file effect.c.

2747 {
2748  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
2749 
2750  if (shader && param && !param->element_count && param->type == D3DXPT_PIXELSHADER)
2751  {
2752  if ((*shader = *(struct IDirect3DPixelShader9 **)param->data))
2754  TRACE("Returning %p.\n", *shader);
2755  return D3D_OK;
2756  }
2757 
2758  WARN("Parameter not found.\n");
2759 
2760  return D3DERR_INVALIDCALL;
2761 }
#define WARN(fmt,...)
Definition: debug.h:112
#define D3DERR_INVALIDCALL
#define IDirect3DPixelShader9_AddRef(p)
Definition: d3d9.h:1260
GLuint shader
Definition: glext.h:6030
#define TRACE(s)
Definition: solgame.cpp:4
GLfloat param
Definition: glext.h:5796
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:504
#define D3D_OK
Definition: d3d.h:106

Referenced by ID3DXEffectImpl_GetPixelShader().

◆ d3dx9_base_effect_get_string()

static HRESULT d3dx9_base_effect_get_string ( struct d3dx9_base_effect base,
D3DXHANDLE  parameter,
const char **  string 
)
static

Definition at line 2678 of file effect.c.

2680 {
2681  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
2682 
2683  if (string && param && !param->element_count && param->type == D3DXPT_STRING)
2684  {
2685  *string = *(const char **)param->data;
2686  TRACE("Returning %s.\n", debugstr_a(*string));
2687  return D3D_OK;
2688  }
2689 
2690  WARN("Parameter not found.\n");
2691 
2692  return D3DERR_INVALIDCALL;
2693 }
#define WARN(fmt,...)
Definition: debug.h:112
#define D3DERR_INVALIDCALL
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_a
Definition: kernel32.h:31
GLfloat param
Definition: glext.h:5796
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:504
#define D3D_OK
Definition: d3d.h:106

Referenced by ID3DXEffectImpl_GetString().

◆ d3dx9_base_effect_get_technique()

static D3DXHANDLE d3dx9_base_effect_get_technique ( struct d3dx9_base_effect base,
UINT  index 
)
static

Definition at line 1347 of file effect.c.

1348 {
1349  if (index >= base->technique_count)
1350  {
1351  WARN("Invalid argument specified.\n");
1352  return NULL;
1353  }
1354 
1355  TRACE("Returning technique %p.\n", &base->techniques[index]);
1356 
1357  return get_technique_handle(&base->techniques[index]);
1358 }
#define WARN(fmt,...)
Definition: debug.h:112
smooth NULL
Definition: ftsmooth.c:416
GLuint index
Definition: glext.h:6031
#define TRACE(s)
Definition: solgame.cpp:4
static D3DXHANDLE get_technique_handle(struct d3dx_technique *technique)
Definition: effect.c:448

Referenced by ID3DXEffectImpl_GetTechnique().

◆ d3dx9_base_effect_get_technique_by_name()

static D3DXHANDLE d3dx9_base_effect_get_technique_by_name ( struct d3dx9_base_effect base,
const char name 
)
static

Definition at line 1360 of file effect.c.

1361 {
1362  struct d3dx_technique *tech = get_technique_by_name(base, name);
1363 
1364  if (tech)
1365  {
1367  TRACE("Returning technique %p\n", t);
1368  return t;
1369  }
1370 
1371  WARN("Technique not found.\n");
1372 
1373  return NULL;
1374 }
const char * D3DXHANDLE
Definition: d3dx9shader.h:48
#define WARN(fmt,...)
Definition: debug.h:112
GLdouble GLdouble t
Definition: gl.h:2047
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
static struct d3dx_technique * get_technique_by_name(struct d3dx9_base_effect *base, const char *name)
Definition: effect.c:458
static D3DXHANDLE get_technique_handle(struct d3dx_technique *technique)
Definition: effect.c:448
Definition: name.c:38

Referenced by ID3DXEffectImpl_GetTechniqueByName().

◆ d3dx9_base_effect_get_technique_desc()

static HRESULT d3dx9_base_effect_get_technique_desc ( struct d3dx9_base_effect base,
D3DXHANDLE  technique,
D3DXTECHNIQUE_DESC desc 
)
static

Definition at line 1046 of file effect.c.

1048 {
1049  struct d3dx_technique *tech = technique ? get_valid_technique(base, technique) : &base->techniques[0];
1050 
1051  if (!desc || !tech)
1052  {
1053  WARN("Invalid argument specified.\n");
1054  return D3DERR_INVALIDCALL;
1055  }
1056 
1057  desc->Name = tech->name;
1058  desc->Passes = tech->pass_count;
1059  desc->Annotations = tech->annotation_count;
1060 
1061  return D3D_OK;
1062 }
#define WARN(fmt,...)
Definition: debug.h:112
#define D3DERR_INVALIDCALL
char * name
Definition: effect.c:141
static const WCHAR desc[]
Definition: protectdata.c:36
static struct d3dx_technique * get_valid_technique(struct d3dx9_base_effect *base, D3DXHANDLE technique)
Definition: effect.c:473
UINT pass_count
Definition: effect.c:142
#define D3D_OK
Definition: d3d.h:106
UINT annotation_count
Definition: effect.c:143

Referenced by ID3DXEffectImpl_GetTechniqueDesc().

◆ d3dx9_base_effect_get_texture()

static HRESULT d3dx9_base_effect_get_texture ( struct d3dx9_base_effect base,
D3DXHANDLE  parameter,
struct IDirect3DBaseTexture9 **  texture 
)
static

Definition at line 2724 of file effect.c.

2726 {
2727  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
2728 
2729  if (texture && param && !param->element_count &&
2730  (param->type == D3DXPT_TEXTURE || param->type == D3DXPT_TEXTURE1D
2731  || param->type == D3DXPT_TEXTURE2D || param->type == D3DXPT_TEXTURE3D
2732  || param->type == D3DXPT_TEXTURECUBE))
2733  {
2734  *texture = *(struct IDirect3DBaseTexture9 **)param->data;
2736  TRACE("Returning %p\n", *texture);
2737  return D3D_OK;
2738  }
2739 
2740  WARN("Parameter not found.\n");
2741 
2742  return D3DERR_INVALIDCALL;
2743 }
#define IDirect3DBaseTexture9_AddRef(p)
Definition: d3d9.h:834
#define WARN(fmt,...)
Definition: debug.h:112
#define D3DERR_INVALIDCALL
#define TRACE(s)
Definition: solgame.cpp:4
if(!(yy_init))
Definition: macro.lex.yy.c:714
GLenum GLuint texture
Definition: glext.h:6295
GLfloat param
Definition: glext.h:5796
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:504
#define D3D_OK
Definition: d3d.h:106

Referenced by ID3DXEffectImpl_GetTexture().

◆ d3dx9_base_effect_get_value()

static HRESULT d3dx9_base_effect_get_value ( struct d3dx9_base_effect base,
D3DXHANDLE  parameter,
void data,
UINT  bytes 
)
static

Definition at line 1648 of file effect.c.

1650 {
1651  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
1652 
1653  if (!param)
1654  {
1655  WARN("Invalid parameter %p specified\n", parameter);
1656  return D3DERR_INVALIDCALL;
1657  }
1658 
1659  /* samplers don't touch data */
1660  if (param->class == D3DXPC_OBJECT && is_param_type_sampler(param->type))
1661  {
1662  TRACE("Sampler: returning E_FAIL\n");
1663  return E_FAIL;
1664  }
1665 
1666  if (data && param->bytes <= bytes)
1667  {
1668  TRACE("Type %s\n", debug_d3dxparameter_type(param->type));
1669 
1670  switch (param->type)
1671  {
1672  case D3DXPT_VOID:
1673  case D3DXPT_BOOL:
1674  case D3DXPT_INT:
1675  case D3DXPT_FLOAT:
1676  case D3DXPT_STRING:
1677  break;
1678 
1679  case D3DXPT_VERTEXSHADER:
1680  case D3DXPT_PIXELSHADER:
1681  case D3DXPT_TEXTURE:
1682  case D3DXPT_TEXTURE1D:
1683  case D3DXPT_TEXTURE2D:
1684  case D3DXPT_TEXTURE3D:
1685  case D3DXPT_TEXTURECUBE:
1686  {
1687  UINT i;
1688 
1689  for (i = 0; i < (param->element_count ? param->element_count : 1); ++i)
1690  {
1691  IUnknown *unk = ((IUnknown **)param->data)[i];
1692  if (unk) IUnknown_AddRef(unk);
1693  }
1694  break;
1695  }
1696 
1697  default:
1698  FIXME("Unhandled type %s\n", debug_d3dxparameter_type(param->type));
1699  break;
1700  }
1701 
1702  TRACE("Copy %u bytes\n", param->bytes);
1703  memcpy(data, param->data, param->bytes);
1704  return D3D_OK;
1705  }
1706 
1707  WARN("Parameter not found.\n");
1708 
1709  return D3DERR_INVALIDCALL;
1710 }
static BOOL is_param_type_sampler(D3DXPARAMETER_TYPE type)
#define WARN(fmt,...)
Definition: debug.h:112
#define D3DERR_INVALIDCALL
#define E_FAIL
Definition: ddrawi.h:102
const char * debug_d3dxparameter_type(D3DXPARAMETER_TYPE t) DECLSPEC_HIDDEN
Definition: util.c:249
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
Definition: glfuncs.h:248
static unsigned char bytes[4]
Definition: adnsresfilter.c:74
#define FIXME(fmt,...)
Definition: debug.h:111
#define TRACE(s)
Definition: solgame.cpp:4
GLfloat param
Definition: glext.h:5796
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:504
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define D3D_OK
Definition: d3d.h:106
unsigned int UINT
Definition: ndis.h:50

Referenced by ID3DXEffectImpl_GetValue().

◆ d3dx9_base_effect_get_vector()

static HRESULT d3dx9_base_effect_get_vector ( struct d3dx9_base_effect base,
D3DXHANDLE  parameter,
D3DXVECTOR4 vector 
)
static

Definition at line 2100 of file effect.c.

2102 {
2103  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
2104 
2105  if (vector && param && !param->element_count)
2106  {
2107  TRACE("Class %s\n", debug_d3dxparameter_class(param->class));
2108 
2109  switch (param->class)
2110  {
2111  case D3DXPC_SCALAR:
2112  case D3DXPC_VECTOR:
2113  if (param->type == D3DXPT_INT && param->bytes == 4)
2114  {
2115  TRACE("INT fixup\n");
2116  vector->x = (((*(INT *)param->data) & 0xff0000) >> 16) * INT_FLOAT_MULTI_INVERSE;
2117  vector->y = (((*(INT *)param->data) & 0xff00) >> 8) * INT_FLOAT_MULTI_INVERSE;
2118  vector->z = ((*(INT *)param->data) & 0xff) * INT_FLOAT_MULTI_INVERSE;
2119  vector->w = (((*(INT *)param->data) & 0xff000000) >> 24) * INT_FLOAT_MULTI_INVERSE;
2120  return D3D_OK;
2121  }
2123  return D3D_OK;
2124 
2125  case D3DXPC_MATRIX_ROWS:
2126  case D3DXPC_OBJECT:
2127  case D3DXPC_STRUCT:
2128  break;
2129 
2130  default:
2131  FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class));
2132  break;
2133  }
2134  }
2135 
2136  WARN("Parameter not found.\n");
2137 
2138  return D3DERR_INVALIDCALL;
2139 }
#define INT_FLOAT_MULTI_INVERSE
Definition: effect.c:31
const char * debug_d3dxparameter_class(D3DXPARAMETER_CLASS c) DECLSPEC_HIDDEN
Definition: util.c:233
static void get_vector(struct d3dx_parameter *param, D3DXVECTOR4 *vector)
Definition: effect.c:738
#define WARN(fmt,...)
Definition: debug.h:112
#define D3DERR_INVALIDCALL
int32_t INT
Definition: typedefs.h:57
#define FIXME(fmt,...)
Definition: debug.h:111
#define TRACE(s)
Definition: solgame.cpp:4
GLfloat param
Definition: glext.h:5796
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:504
#define D3D_OK
Definition: d3d.h:106

Referenced by ID3DXEffectImpl_GetVector().

◆ d3dx9_base_effect_get_vector_array()

static HRESULT d3dx9_base_effect_get_vector_array ( struct d3dx9_base_effect base,
D3DXHANDLE  parameter,
D3DXVECTOR4 vector,
UINT  count 
)
static

Definition at line 2190 of file effect.c.

2192 {
2193  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
2194 
2195  if (!count) return D3D_OK;
2196 
2198  {
2199  UINT i;
2200 
2201  TRACE("Class %s\n", debug_d3dxparameter_class(param->class));
2202 
2203  switch (param->class)
2204  {
2205  case D3DXPC_VECTOR:
2206  for (i = 0; i < count; ++i)
2207  {
2208  get_vector(&param->members[i], &vector[i]);
2209  }
2210  return D3D_OK;
2211 
2212  case D3DXPC_SCALAR:
2213  case D3DXPC_MATRIX_ROWS:
2214  case D3DXPC_OBJECT:
2215  case D3DXPC_STRUCT:
2216  break;
2217 
2218  default:
2219  FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class));
2220  break;
2221  }
2222  }
2223 
2224  WARN("Parameter not found.\n");
2225 
2226  return D3DERR_INVALIDCALL;
2227 }
const char * debug_d3dxparameter_class(D3DXPARAMETER_CLASS c) DECLSPEC_HIDDEN
Definition: util.c:233
static void get_vector(struct d3dx_parameter *param, D3DXVECTOR4 *vector)
Definition: effect.c:738
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define WARN(fmt,...)
Definition: debug.h:112
#define D3DERR_INVALIDCALL
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
Definition: glfuncs.h:248
#define FIXME(fmt,...)
Definition: debug.h:111
#define TRACE(s)
Definition: solgame.cpp:4
GLfloat param
Definition: glext.h:5796
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:504
#define D3D_OK
Definition: d3d.h:106
unsigned int UINT
Definition: ndis.h:50

Referenced by ID3DXEffectImpl_GetVectorArray().

◆ d3dx9_base_effect_get_vertex_shader()

static HRESULT d3dx9_base_effect_get_vertex_shader ( struct d3dx9_base_effect base,
D3DXHANDLE  parameter,
struct IDirect3DVertexShader9 **  shader 
)
static

Definition at line 2763 of file effect.c.

2765 {
2766  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
2767 
2768  if (shader && param && !param->element_count && param->type == D3DXPT_VERTEXSHADER)
2769  {
2770  if ((*shader = *(struct IDirect3DVertexShader9 **)param->data))
2772  TRACE("Returning %p.\n", *shader);
2773  return D3D_OK;
2774  }
2775 
2776  WARN("Parameter not found.\n");
2777 
2778  return D3DERR_INVALIDCALL;
2779 }
#define WARN(fmt,...)
Definition: debug.h:112
#define D3DERR_INVALIDCALL
GLuint shader
Definition: glext.h:6030
#define TRACE(s)
Definition: solgame.cpp:4
GLfloat param
Definition: glext.h:5796
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:504
#define IDirect3DVertexShader9_AddRef(p)
Definition: d3d9.h:1222
#define D3D_OK
Definition: d3d.h:106