ReactOS  0.4.14-dev-604-gcfdd483
effect.c File Reference
#include "config.h"
#include "wine/port.h"
#include <stdio.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 6505 of file effect.c.

◆ INITIAL_POOL_SIZE

#define INITIAL_POOL_SIZE   16

Definition at line 36 of file effect.c.

◆ INITIAL_SHARED_DATA_SIZE

#define INITIAL_SHARED_DATA_SIZE   4

Definition at line 193 of file effect.c.

◆ INT_FLOAT_MULTI

#define INT_FLOAT_MULTI   255.0f

Definition at line 29 of file effect.c.

◆ INT_FLOAT_MULTI_INVERSE

#define INT_FLOAT_MULTI_INVERSE   (1/INT_FLOAT_MULTI)

Definition at line 30 of file effect.c.

◆ PARAMETER_FLAG_SHARED

#define PARAMETER_FLAG_SHARED   1

Definition at line 34 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 218 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 68 of file effect.c.

◆ MATERIAL_TYPE

Enumerator
MT_DIFFUSE 
MT_AMBIENT 
MT_SPECULAR 
MT_EMISSIVE 
MT_POWER 

Definition at line 59 of file effect.c.

60 {
61  MT_DIFFUSE,
62  MT_AMBIENT,
65  MT_POWER,
66 };

◆ SHADER_CONSTANT_TYPE

Enumerator
SCT_VSFLOAT 
SCT_VSBOOL 
SCT_VSINT 
SCT_PSFLOAT 
SCT_PSBOOL 
SCT_PSINT 

Definition at line 85 of file effect.c.

86 {
88  SCT_VSBOOL,
89  SCT_VSINT,
91  SCT_PSBOOL,
92  SCT_PSINT,
93 };

◆ 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 40 of file effect.c.

◆ STATE_TYPE

Enumerator
ST_CONSTANT 
ST_PARAMETER 
ST_FXLC 
ST_ARRAY_SELECTOR 

Definition at line 95 of file effect.c.

96 {
99  ST_FXLC,
101 };
Definition: effect.c:99

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 5462 of file effect.c.

5464 {
5465  const char *parent_name = parent ? parent->full_name : NULL;
5466  unsigned int i;
5467 
5468  TRACE("Adding parameter %p (%s - parent %p, element %u) to the rbtree.\n",
5469  param, debugstr_a(param->name), parent, element);
5470 
5471  if (parent_name)
5472  {
5473  unsigned int parent_name_len = strlen(parent_name);
5474  unsigned int name_len = strlen(param->name);
5475  unsigned int part_str_len;
5476  unsigned int len;
5477  char part_str[16];
5478 
5479  if (separator == '[')
5480  {
5481  sprintf(part_str, "[%u]", element);
5482  part_str_len = strlen(part_str);
5483  name_len = 0;
5484  }
5485  else
5486  {
5487  part_str[0] = separator;
5488  part_str[1] = 0;
5489  part_str_len = 1;
5490  }
5491  len = parent_name_len + part_str_len + name_len + 1;
5492 
5493  if (!(param->full_name = heap_alloc(len)))
5494  {
5495  ERR("Out of memory.\n");
5496  return;
5497  }
5498 
5499  memcpy(param->full_name, parent_name, parent_name_len);
5500  memcpy(param->full_name + parent_name_len, part_str, part_str_len);
5501  memcpy(param->full_name + parent_name_len + part_str_len, param->name, name_len);
5502  param->full_name[len - 1] = 0;
5503  }
5504  else
5505  {
5506  unsigned int len = strlen(param->name) + 1;
5507 
5508  if (!(param->full_name = heap_alloc(len)))
5509  {
5510  ERR("Out of memory.\n");
5511  return;
5512  }
5513 
5514  memcpy(param->full_name, param->name, len);
5515  }
5516  TRACE("Full name is %s.\n", param->full_name);
5517  wine_rb_put(&base->param_tree, param->full_name, &param->rb_entry);
5518 
5520  for (i = 0; i < param->top_level_param->annotation_count; ++i)
5521  add_param_to_tree(base, &param->top_level_param->annotations[i], param, '@', 0);
5522 
5523  if (param->element_count)
5524  for (i = 0; i < param->element_count; ++i)
5525  add_param_to_tree(base, &param->members[i], param, '[', i);
5526  else
5527  for (i = 0; i < param->member_count; ++i)
5528  add_param_to_tree(base, &param->members[i], param, '.', 0);
5529 }
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:2869
#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:109
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:5462
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 3139 of file effect.c.

3140 {
3141  unsigned int i;
3142  HRESULT ret;
3143  HRESULT hr;
3144  ULONG64 new_update_version = next_effect_update_version(&effect->base_effect);
3145 
3146  TRACE("effect %p, pass %p, state_count %u.\n", effect, pass, pass->state_count);
3147 
3148  ret = D3D_OK;
3149  for (i = 0; i < pass->state_count; ++i)
3150  {
3151  if (FAILED(hr = d3dx9_apply_state(effect, pass, &pass->states[i], ~0u, update_all)))
3152  {
3153  WARN("Error applying state, hr %#x.\n", hr);
3154  ret = hr;
3155  }
3156  }
3157 
3158  if (effect->light_updated)
3159  {
3160  for (i = 0; i < ARRAY_SIZE(effect->current_light); ++i)
3161  {
3162  if ((effect->light_updated & (1u << i))
3163  && FAILED(hr = SET_D3D_STATE(effect, SetLight, i, &effect->current_light[i])))
3164  {
3165  WARN("Error setting light, hr %#x.\n", hr);
3166  ret = hr;
3167  }
3168  }
3169  effect->light_updated = 0;
3170  }
3171 
3172  if (effect->material_updated
3173  && FAILED(hr = SET_D3D_STATE(effect, SetMaterial, &effect->current_material)))
3174  {
3175  WARN("Error setting material, hr %#x.\n", hr);
3176  ret = hr;
3177  }
3178  effect->material_updated = FALSE;
3179 
3180  pass->update_version = new_update_version;
3181  return ret;
3182 }
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
static ULONG64 next_effect_update_version(struct d3dx9_base_effect *base)
Definition: effect.c:1540
HRESULT hr
Definition: shlfolder.c:183
#define WARN(fmt,...)
Definition: debug.h:111
#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
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:3003
#define TRACE(s)
Definition: solgame.cpp:4
ID3DXEffect * effect
Definition: effect.c:126
LONG HRESULT
Definition: typedefs.h:77
unsigned __int64 ULONG64
Definition: imports.h:198
int ret
#define D3D_OK
Definition: d3d.h:106
#define ARRAY_SIZE(a)
Definition: main.h:24

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 3003 of file effect.c.

3005 {
3006  struct d3dx_parameter *param;
3007  void *param_value;
3008  BOOL param_dirty;
3009  HRESULT hr;
3010 
3011  TRACE("operation %u, index %u, type %u.\n", state->operation, state->index, state->type);
3012 
3013  if (FAILED(hr = d3dx9_get_param_value_ptr(pass, state, &param_value, &param,
3014  update_all, &param_dirty)))
3015  {
3016  if (!update_all && hr == E_FAIL)
3017  {
3018  /* Native d3dx9 returns D3D_OK from CommitChanges() involving
3019  * out of bounds array access and does not touch the affected
3020  * states. */
3021  WARN("Returning D3D_OK on out of bounds array access.\n");
3022  return D3D_OK;
3023  }
3024  return hr;
3025  }
3026 
3027  if (!(update_all || param_dirty
3028  || state_table[state->operation].class == SC_VERTEXSHADER
3029  || state_table[state->operation].class == SC_PIXELSHADER
3030  || state_table[state->operation].class == SC_SETSAMPLER))
3031  return D3D_OK;
3032 
3033  switch (state_table[state->operation].class)
3034  {
3035  case SC_RENDERSTATE:
3036  TRACE("%s, operation %u, value %u.\n", state_table[state->operation].name,
3037  state_table[state->operation].op, *(DWORD *)param_value);
3038  return SET_D3D_STATE(effect, SetRenderState, state_table[state->operation].op, *(DWORD *)param_value);
3039  case SC_FVF:
3040  TRACE("%s, value %#x.\n", state_table[state->operation].name, *(DWORD *)param_value);
3041  return SET_D3D_STATE(effect, SetFVF, *(DWORD *)param_value);
3042  case SC_TEXTURE:
3043  {
3044  UINT unit;
3045 
3046  unit = parent_index == ~0u ? state->index : parent_index;
3047  TRACE("%s, unit %u, value %p.\n", state_table[state->operation].name, unit,
3048  *(IDirect3DBaseTexture9 **)param_value);
3049  return SET_D3D_STATE(effect, SetTexture, unit, *(IDirect3DBaseTexture9 **)param_value);
3050  }
3051  case SC_TEXTURESTAGE:
3052  TRACE("%s, stage %u, value %u.\n", state_table[state->operation].name, state->index, *(DWORD *)param_value);
3053  return SET_D3D_STATE(effect, SetTextureStageState, state->index,
3054  state_table[state->operation].op, *(DWORD *)param_value);
3055  case SC_SETSAMPLER:
3056  {
3057  struct d3dx_sampler *sampler;
3058  HRESULT ret, hr;
3059  unsigned int i;
3060 
3061  sampler = (struct d3dx_sampler *)param_value;
3062  TRACE("%s, sampler %u, applying %u states.\n", state_table[state->operation].name, state->index,
3063  sampler->state_count);
3064  ret = D3D_OK;
3065  for (i = 0; i < sampler->state_count; i++)
3066  {
3067  if (FAILED(hr = d3dx9_apply_state(effect, pass, &sampler->states[i], state->index, update_all)))
3068  ret = hr;
3069  }
3070  return ret;
3071  }
3072  case SC_SAMPLERSTATE:
3073  {
3074  UINT sampler;
3075 
3076  sampler = parent_index == ~0u ? state->index : parent_index;
3077  TRACE("%s, sampler %u, value %u.\n", state_table[state->operation].name, sampler, *(DWORD *)param_value);
3078  return SET_D3D_STATE(effect, SetSamplerState, sampler, state_table[state->operation].op,
3079  *(DWORD *)param_value);
3080  }
3081  case SC_VERTEXSHADER:
3082  TRACE("%s, shader %p.\n", state_table[state->operation].name, *(IDirect3DVertexShader9 **)param_value);
3083  if ((update_all || param_dirty)
3084  && FAILED(hr = SET_D3D_STATE(effect, SetVertexShader,
3085  *(IDirect3DVertexShader9 **)param_value)))
3086  ERR("Could not set vertex shader, hr %#x.\n", hr);
3087  else if (*(IDirect3DVertexShader9 **)param_value)
3088  hr = d3dx_set_shader_constants(effect, pass, param, TRUE, update_all || param_dirty);
3089  return hr;
3090  case SC_PIXELSHADER:
3091  TRACE("%s, shader %p.\n", state_table[state->operation].name, *(IDirect3DPixelShader9 **)param_value);
3092  if ((update_all || param_dirty)
3093  && FAILED(hr = SET_D3D_STATE(effect, SetPixelShader,
3094  *(IDirect3DPixelShader9 **)param_value)))
3095  ERR("Could not set pixel shader, hr %#x.\n", hr);
3096  else if (*(IDirect3DPixelShader9 **)param_value)
3097  hr = d3dx_set_shader_constants(effect, pass, param, FALSE, update_all || param_dirty);
3098  return hr;
3099  case SC_TRANSFORM:
3100  TRACE("%s, state %u.\n", state_table[state->operation].name, state->index);
3101  return SET_D3D_STATE(effect, SetTransform, state_table[state->operation].op + state->index,
3102  (D3DMATRIX *)param_value);
3103  case SC_LIGHTENABLE:
3104  TRACE("%s, index %u, value %u.\n", state_table[state->operation].name, state->index, *(BOOL *)param_value);
3105  return SET_D3D_STATE(effect, LightEnable, state->index, *(BOOL *)param_value);
3106  case SC_LIGHT:
3107  {
3108  TRACE("%s, index %u, op %u.\n", state_table[state->operation].name, state->index,
3109  state_table[state->operation].op);
3111  &effect->current_light[state->index], param_value);
3112  effect->light_updated |= 1u << state->index;
3113  return D3D_OK;
3114  }
3115  case SC_MATERIAL:
3116  {
3117  TRACE("%s, index %u, op %u.\n", state_table[state->operation].name, state->index,
3118  state_table[state->operation].op);
3120  &effect->current_material, param_value);
3121  effect->material_updated = TRUE;
3122  return D3D_OK;
3123  }
3124  case SC_NPATCHMODE:
3125  TRACE("%s, nsegments %f.\n", state_table[state->operation].name, *(float *)param_value);
3126  return SET_D3D_STATE(effect, SetNPatchMode, *(float *)param_value);
3127  case SC_SHADERCONST:
3128  TRACE("%s, index %u, op %u.\n", state_table[state->operation].name, state->index,
3129  state_table[state->operation].op);
3130  return d3dx_set_shader_const_state(effect, state_table[state->operation].op, state->index,
3131  param, param_value);
3132  default:
3133  FIXME("%s not handled.\n", state_table[state->operation].name);
3134  break;
3135  }
3136  return D3D_OK;
3137 }
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 @242 state_table[]
#define WARN(fmt,...)
Definition: debug.h:111
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:2957
D3DMATERIAL9 current_material
Definition: effect.c:189
#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
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:3003
#define FIXME(fmt,...)
Definition: debug.h:110
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:1063
png_const_structrp png_const_inforp int * unit
Definition: png.h:2161
Definition: effect.c:43
BOOL material_updated
Definition: effect.c:190
static void d3dx9_set_material_parameter(enum MATERIAL_TYPE op, D3DMATERIAL9 *material, void *value)
Definition: effect.c:2855
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
GLfloat param
Definition: glext.h:5796
unsigned long DWORD
Definition: ntddk_ex.h:95
int ret
static int state
Definition: maze.c:121
#define ERR(fmt,...)
Definition: debug.h:109
#define D3D_OK
Definition: d3d.h:106
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:2898
static void d3dx9_set_light_parameter(enum LIGHT_TYPE op, D3DLIGHT9 *light, void *value)
Definition: effect.c:2788
unsigned int UINT
Definition: ndis.h:50
D3DLIGHT9 current_light[8]
Definition: effect.c:187
unsigned int light_updated
Definition: effect.c:188
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 683 of file effect.c.

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

1473 {
1474  struct d3dx_parameter *annotations = NULL;
1475  UINT annotation_count = 0;
1476 
1477  annotation_count = get_annotation_from_object(base, object, &annotations);
1478 
1479  if (index < annotation_count)
1480  {
1481  TRACE("Returning parameter %p\n", &annotations[index]);
1482  return get_parameter_handle(&annotations[index]);
1483  }
1484 
1485  WARN("Annotation not found.\n");
1486 
1487  return NULL;
1488 }
static D3DXHANDLE get_parameter_handle(struct d3dx_parameter *parameter)
Definition: effect.c:442
#define WARN(fmt,...)
Definition: debug.h:111
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:1431
GLuint index
Definition: glext.h:6031
#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 1490 of file effect.c.

1492 {
1493  struct d3dx_parameter *annotation = NULL;
1494  struct d3dx_parameter *annotations = NULL;
1495  UINT annotation_count = 0;
1496 
1497  if (!name)
1498  {
1499  WARN("Invalid argument specified\n");
1500  return NULL;
1501  }
1502 
1503  annotation_count = get_annotation_from_object(base, object, &annotations);
1504 
1505  annotation = get_annotation_by_name(base, annotation_count, annotations, name);
1506  if (annotation)
1507  {
1508  TRACE("Returning parameter %p\n", annotation);
1510  }
1511 
1512  WARN("Annotation not found.\n");
1513 
1514  return NULL;
1515 }
static D3DXHANDLE get_parameter_handle(struct d3dx_parameter *parameter)
Definition: effect.c:442
#define WARN(fmt,...)
Definition: debug.h:111
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:854
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:1431
#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 1727 of file effect.c.

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

1784 {
1785  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
1786 
1787  if (b && param && (param->class == D3DXPC_SCALAR
1788  || param->class == D3DXPC_VECTOR
1789  || param->class == D3DXPC_MATRIX_ROWS
1790  || param->class == D3DXPC_MATRIX_COLUMNS))
1791  {
1792  UINT i, size = min(count, param->bytes / sizeof(DWORD));
1793 
1794  for (i = 0; i < size; ++i)
1795  {
1796  set_number(&b[i], D3DXPT_BOOL, (DWORD *)param->data + i, param->type);
1797  }
1798  return D3D_OK;
1799  }
1800 
1801  WARN("Parameter not found.\n");
1802 
1803  return D3DERR_INVALIDCALL;
1804 }
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:503
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define WARN(fmt,...)
Definition: debug.h:111
#define D3DERR_INVALIDCALL
static void set_number(void *outdata, D3DXPARAMETER_TYPE outtype, const void *indata, D3DXPARAMETER_TYPE intype)
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
#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 999 of file effect.c.

1000 {
1001  if (!desc)
1002  {
1003  WARN("Invalid argument specified.\n");
1004  return D3DERR_INVALIDCALL;
1005  }
1006 
1007  FIXME("partial stub!\n");
1008 
1009  /* TODO: add creator and function count. */
1010  desc->Creator = NULL;
1011  desc->Functions = 0;
1012  desc->Parameters = base->parameter_count;
1013  desc->Techniques = base->technique_count;
1014 
1015  return D3D_OK;
1016 }
#define WARN(fmt,...)
Definition: debug.h:111
#define D3DERR_INVALIDCALL
static const WCHAR desc[]
Definition: protectdata.c:36
#define FIXME(fmt,...)
Definition: debug.h:110
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 1969 of file effect.c.

1970 {
1971  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
1972 
1973  if (f && param && !param->element_count && param->columns == 1 && param->rows == 1)
1974  {
1975  set_number(f, D3DXPT_FLOAT, (DWORD *)param->data, param->type);
1976  TRACE("Returning %f\n", *f);
1977  return D3D_OK;
1978  }
1979 
1980  WARN("Parameter not found.\n");
1981 
1982  return D3DERR_INVALIDCALL;
1983 }
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:503
#define WARN(fmt,...)
Definition: debug.h:111
#define D3DERR_INVALIDCALL
static void set_number(void *outdata, D3DXPARAMETER_TYPE outtype, const void *indata, D3DXPARAMETER_TYPE intype)
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
#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 2023 of file effect.c.

2025 {
2026  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
2027 
2028  if (f && param && (param->class == D3DXPC_SCALAR
2029  || param->class == D3DXPC_VECTOR
2030  || param->class == D3DXPC_MATRIX_ROWS
2031  || param->class == D3DXPC_MATRIX_COLUMNS))
2032  {
2033  UINT i, size = min(count, param->bytes / sizeof(DWORD));
2034 
2035  for (i = 0; i < size; ++i)
2036  {
2037  set_number(&f[i], D3DXPT_FLOAT, (DWORD *)param->data + i, param->type);
2038  }
2039  return D3D_OK;
2040  }
2041 
2042  WARN("Parameter not found.\n");
2043 
2044  return D3DERR_INVALIDCALL;
2045 }
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:503
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define WARN(fmt,...)
Definition: debug.h:111
#define D3DERR_INVALIDCALL
static void set_number(void *outdata, D3DXPARAMETER_TYPE outtype, const void *indata, D3DXPARAMETER_TYPE intype)
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
#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 1417 of file effect.c.

1418 {
1419  FIXME("stub!\n");
1420 
1421  return NULL;
1422 }
#define FIXME(fmt,...)
Definition: debug.h:110
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 1424 of file effect.c.

1425 {
1426  FIXME("stub!\n");
1427 
1428  return NULL;
1429 }
#define FIXME(fmt,...)
Definition: debug.h:110
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 1206 of file effect.c.

1208 {
1209  FIXME("stub!\n");
1210 
1211  return E_NOTIMPL;
1212 }
#define FIXME(fmt,...)
Definition: debug.h:110
#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 1849 of file effect.c.

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

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 1925 of file effect.c.

1927 {
1928  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
1929 
1930  if (n && param && (param->class == D3DXPC_SCALAR
1931  || param->class == D3DXPC_VECTOR
1932  || param->class == D3DXPC_MATRIX_ROWS
1933  || param->class == D3DXPC_MATRIX_COLUMNS))
1934  {
1935  UINT i, size = min(count, param->bytes / sizeof(DWORD));
1936 
1937  for (i = 0; i < size; ++i)
1938  {
1939  set_number(&n[i], D3DXPT_INT, (DWORD *)param->data + i, param->type);
1940  }
1941  return D3D_OK;
1942  }
1943 
1944  WARN("Parameter not found.\n");
1945 
1946  return D3DERR_INVALIDCALL;
1947 }
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:503
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define WARN(fmt,...)
Definition: debug.h:111
GLdouble n
Definition: glext.h:7729
#define D3DERR_INVALIDCALL
static void set_number(void *outdata, D3DXPARAMETER_TYPE outtype, const void *indata, D3DXPARAMETER_TYPE intype)
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
#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 2261 of file effect.c.

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

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 2331 of file effect.c.

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

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 2405 of file effect.c.

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

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 2476 of file effect.c.

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

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 2549 of file effect.c.

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

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 2623 of file effect.c.

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

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 1214 of file effect.c.

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

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 1241 of file effect.c.

1243 {
1244  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
1246 
1247  if (!name)
1248  {
1250  TRACE("Returning parameter %p.\n", handle);
1251  return handle;
1252  }
1253 
1255  TRACE("Returning parameter %p.\n", handle);
1256 
1257  return handle;
1258 }
static D3DXHANDLE get_parameter_handle(struct d3dx_parameter *parameter)
Definition: effect.c:442
namespace GUID const ADDRINFOEXW ADDRINFOEXW struct timeval OVERLAPPED LPLOOKUPSERVICE_COMPLETION_ROUTINE HANDLE * handle
Definition: sock.c:82
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:503
const char * D3DXHANDLE
Definition: d3dx9shader.h:48
#define TRACE(s)
Definition: solgame.cpp:4
GLfloat param
Definition: glext.h:5796
struct d3dx_parameter * get_parameter_by_name(struct d3dx9_base_effect *base, struct d3dx_parameter *parameter, const char *name)
Definition: effect.c:898
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 1260 of file effect.c.

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

1020 {
1021  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
1022 
1023  if (!desc || !param)
1024  {
1025  WARN("Invalid argument specified.\n");
1026  return D3DERR_INVALIDCALL;
1027  }
1028 
1029  desc->Name = param->name;
1030  desc->Semantic = param->semantic;
1031  desc->Class = param->class;
1032  desc->Type = param->type;
1033  desc->Rows = param->rows;
1034  desc->Columns = param->columns;
1035  desc->Elements = param->element_count;
1036  desc->Annotations = is_top_level_parameter(param)
1037  ? top_level_parameter_from_parameter(param)->annotation_count : 0;
1038  desc->StructMembers = param->member_count;
1039  desc->Flags = param->flags;
1040  desc->Bytes = param->bytes;
1041 
1042  return D3D_OK;
1043 }
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:503
#define WARN(fmt,...)
Definition: debug.h:111
#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
#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 1319 of file effect.c.

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

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 1375 of file effect.c.

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

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 1391 of file effect.c.

1393 {
1394  struct d3dx_technique *tech = get_valid_technique(base, technique);
1395 
1396  if (tech && name)
1397  {
1398  unsigned int i;
1399 
1400  for (i = 0; i < tech->pass_count; ++i)
1401  {
1402  struct d3dx_pass *pass = &tech->passes[i];
1403 
1404  if (!strcmp(pass->name, name))
1405  {
1406  TRACE("Returning pass %p\n", pass);
1407  return get_pass_handle(pass);
1408  }
1409  }
1410  }
1411 
1412  WARN("Pass not found.\n");
1413 
1414  return NULL;
1415 }
#define WARN(fmt,...)
Definition: debug.h:111
static D3DXHANDLE get_pass_handle(struct d3dx_pass *pass)
Definition: effect.c:452
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:472
smooth NULL
Definition: ftsmooth.c:416
UINT pass_count
Definition: effect.c:141
#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:145

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 1157 of file effect.c.

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

2746 {
2747  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
2748 
2749  if (shader && param && !param->element_count && param->type == D3DXPT_PIXELSHADER)
2750  {
2751  if ((*shader = *(struct IDirect3DPixelShader9 **)param->data))
2753  TRACE("Returning %p.\n", *shader);
2754  return D3D_OK;
2755  }
2756 
2757  WARN("Parameter not found.\n");
2758 
2759  return D3DERR_INVALIDCALL;
2760 }
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:503
#define WARN(fmt,...)
Definition: debug.h:111
#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
#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 2677 of file effect.c.

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

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

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 1359 of file effect.c.

1360 {
1361  struct d3dx_technique *tech = get_technique_by_name(base, name);
1362 
1363  if (tech)
1364  {
1366  TRACE("Returning technique %p\n", t);
1367  return t;
1368  }
1369 
1370  WARN("Technique not found.\n");
1371 
1372  return NULL;
1373 }
static D3DXHANDLE get_technique_handle(struct d3dx_technique *technique)
Definition: effect.c:447
const char * D3DXHANDLE
Definition: d3dx9shader.h:48
#define WARN(fmt,...)
Definition: debug.h:111
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:457
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 1045 of file effect.c.

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

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 2723 of file effect.c.

2725 {
2726  struct d3dx_parameter *param = get_valid_parameter(base, parameter);
2727 
2728  if (texture && param && !param->element_count &&
2729  (param->type == D3DXPT_TEXTURE || param->type == D3DXPT_TEXTURE1D
2730  || param->type == D3DXPT_TEXTURE2D || param->type == D3DXPT_TEXTURE3D
2731  || param->type == D3DXPT_TEXTURECUBE))
2732  {
2733  *texture = *(struct IDirect3DBaseTexture9 **)param->data;
2735  TRACE("Returning %p\n", *texture);
2736  return D3D_OK;
2737  }
2738 
2739  WARN("Parameter not found.\n");
2740 
2741  return D3DERR_INVALIDCALL;
2742 }
static struct d3dx_parameter * get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter)
Definition: effect.c:503
#define IDirect3DBaseTexture9_AddRef(p)
Definition: d3d9.h:834
#define WARN(fmt,...)
Definition: debug.h:111
#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
#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 1647 of file effect.c.

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

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

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

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

Referenced by ID3DXEffectImpl_GetVertexShader().

◆ d3dx9_base_effect_init()

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

Definition at line 6560 of file effect.c.

6564 {
6565  DWORD tag, offset;
6566  const char *ptr = data;
6567  HRESULT hr;
6568  ID3DBlob *bytecode = NULL, *temp_errors = NULL;
6569  char *skip_constants_buffer = NULL;
6570  const char **skip_constants = NULL;
6571  unsigned int skip_constants_count = 0;
6572 #if D3DX_SDK_VERSION <= 36
6574 #else
6575  UINT compile_flags = 0;
6576 #endif
6577  unsigned int i, j;
6578 
6579  TRACE("base %p, data %p, data_size %lu, defines %p, include %p, eflags %#x, errors %p, "
6580  "effect %p, pool %p, skip_constants %s.\n",
6581  base, data, data_size, defines, include, eflags, errors, effect, pool,
6582  debugstr_a(skip_constants_string));
6583 
6584  base->effect = effect;
6585  base->pool = pool;
6586  base->flags = eflags;
6587 
6588  read_dword(&ptr, &tag);
6589  TRACE("Tag: %x\n", tag);
6590 
6591  if (tag != d3dx9_effect_version(9, 1))
6592  {
6593  TRACE("HLSL ASCII effect, trying to compile it.\n");
6594  hr = D3DCompile(data, data_size, NULL, defines, include,
6595  NULL, "fx_2_0", compile_flags, eflags, &bytecode, &temp_errors);
6596  if (FAILED(hr))
6597  {
6598  WARN("Failed to compile ASCII effect.\n");
6599  if (bytecode)
6600  ID3D10Blob_Release(bytecode);
6601  if (temp_errors)
6602  {
6603  const char *error_string = ID3D10Blob_GetBufferPointer(temp_errors);
6604  const char *string_ptr;
6605 
6606  while (*error_string)
6607  {
6608  string_ptr = error_string;
6609  while (*string_ptr && *string_ptr != '\n' && *string_ptr != '\r'
6610  && string_ptr - error_string < 80)
6611  ++string_ptr;
6612  TRACE("%s\n", debugstr_an(error_string, string_ptr - error_string));
6613  error_string = string_ptr;
6614  while (*error_string == '\n' || *error_string == '\r')
6615  ++error_string;
6616  }
6617  }
6618  if (errors)
6619  *errors = temp_errors;
6620  else if (temp_errors)
6621  ID3D10Blob_Release(temp_errors);
6622  return hr;
6623  }
6624  if (!bytecode)
6625  {
6626  FIXME("No output from effect compilation.\n");
6627  return D3DERR_INVALIDCALL;
6628  }
6629  if (errors)
6630  *errors = temp_errors;
6631  else if (temp_errors)
6632  ID3D10Blob_Release(temp_errors);
6633 
6634  ptr = ID3D10Blob_GetBufferPointer(bytecode);
6635  read_dword(&ptr, &tag);
6636  TRACE("Tag: %x\n", tag);
6637  }
6638 
6639  if (skip_constants_string)
6640  {
6641  skip_constants_buffer = HeapAlloc(GetProcessHeap(), 0,
6642  sizeof(*skip_constants_buffer) * (strlen(skip_constants_string) + 1));
6643  if (!skip_constants_buffer)
6644  {
6645  if (bytecode)
6646  ID3D10Blob_Release(bytecode);
6647  return E_OUTOFMEMORY;
6648  }
6649  strcpy(skip_constants_buffer, skip_constants_string);
6650 
6651  if (!(skip_constants = parse_skip_constants_string(skip_constants_buffer, &skip_constants_count)))
6652  {
6653  HeapFree(GetProcessHeap(), 0, skip_constants_buffer);
6654  if (bytecode)
6655  ID3D10Blob_Release(bytecode);
6656  return E_OUTOFMEMORY;
6657  }
6658  }
6659  read_dword(&ptr, &offset);
6660  TRACE("Offset: %x\n", offset);
6661 
6662