ReactOS 0.4.15-dev-7788-g1ad9096
shader.c File Reference
#include "wine/test.h"
#include "d3dx9.h"
Include dependency graph for shader.c:

Go to the source code of this file.

Classes

struct  registerset_test
 
struct  registerset_constants
 

Macros

#define FCC_TEXT   MAKEFOURCC('T','E','X','T')
 
#define FCC_CTAB   MAKEFOURCC('C','T','A','B')
 
#define REGISTER_OUTPUT_SIZE   48
 

Enumerations

enum  Type {
  T_UNKNOWN = -1 , T_IGNORED_STATEMENT , T_TIDENT , T_MACRO ,
  T_DEFINE , T_VARIABLE , T_FUNCTION , T_FUNCTION_PTR ,
  T_IF , T_WHILE , T_DO , T_STRUCT ,
  SetFloat , SetInt , SetBool , SetIntArray ,
  SetBoolArray , SetFloatArray , SetMatrix , SetMatrixTranspose ,
  SetMatrixArray , SetMatrixTransposeArray , SetVector , SetVectorArray ,
  SetValue , SetMatrixPointerArray , SetMatrixTransposePointerArray
}
 

Functions

static void test_get_shader_size (void)
 
static void test_get_shader_version (void)
 
static void test_find_shader_comment (void)
 
static void test_get_shader_constant_table_ex (void)
 
static void test_constant_table (const char *test_name, const DWORD *ctable_fn, const D3DXCONSTANT_DESC *expecteds, UINT count)
 
static void test_constant_tables (void)
 
static void test_setting_basic_table (IDirect3DDevice9 *device)
 
static void test_setting_matrices_table (IDirect3DDevice9 *device)
 
static void test_setting_arrays_table (IDirect3DDevice9 *device)
 
static void test_SetDefaults (IDirect3DDevice9 *device)
 
static void test_SetValue (IDirect3DDevice9 *device)
 
static void test_setting_constants (void)
 
static void test_get_sampler_index (void)
 
static void test_get_shader_samplers (void)
 
static void test_get_shader_constant_variables (void)
 
static void registerset_clear (IDirect3DDevice9 *device)
 
static UINT registerset_compare (IDirect3DDevice9 *device, BOOL is_vs, D3DXREGISTER_SET regset, UINT start, UINT in_count, const DWORD *expected)
 
static UINT registerset_compare_all (IDirect3DDevice9 *device, BOOL is_vs, D3DXREGISTER_SET regset, UINT start, UINT in_count, const DWORD *expected)
 
static HRESULT registerset_apply (ID3DXConstantTable *ctable, IDirect3DDevice9 *device, D3DXHANDLE constant, UINT index, DWORD count, enum Type type)
 
static void test_registerset (void)
 
static void test_registerset_defaults (void)
 
static void test_shader_semantics (void)
 
static void test_fragment_linker (void)
 
static void test_disassemble_shader (void)
 
 START_TEST (shader)
 

Variables

static const DWORD shader_zero [] = {0x0}
 
static const DWORD shader_invalid [] = {0xeeee0100}
 
static const DWORD shader_empty [] = {0xfffe0200, 0x0000ffff}
 
static const DWORD simple_fx [] = {0x46580000, 0x0002fffe, FCC_TEXT, 0x00000000, 0x0000ffff}
 
static const DWORD simple_tx [] = {0x54580000, 0x0002fffe, FCC_TEXT, 0x00000000, 0x0000ffff}
 
static const DWORD simple_7ffe [] = {0x7ffe0000, 0x0002fffe, FCC_TEXT, 0x00000000, 0x0000ffff}
 
static const DWORD simple_7fff [] = {0x7fff0000, 0x0002fffe, FCC_TEXT, 0x00000000, 0x0000ffff}
 
static const DWORD simple_vs []
 
static const DWORD simple_ps []
 
static const DWORD shader_with_ctab []
 
static const DWORD shader_with_invalid_ctab []
 
static const DWORD shader_with_ctab_constants []
 
static const DWORD ctab_basic []
 
static const D3DXCONSTANT_DESC ctab_basic_expected []
 
static const DWORD ctab_matrices []
 
static const D3DXCONSTANT_DESC ctab_matrices_expected []
 
static const DWORD ctab_matrices2 []
 
static const D3DXCONSTANT_DESC ctab_matrices2_expected []
 
static const DWORD ctab_arrays []
 
static const D3DXCONSTANT_DESC ctab_arrays_expected []
 
static const DWORD ctab_with_default_values []
 
static const float mat4_default_value [] = {1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15, 4, 8, 12, 16}
 
static const float mat3_default_value [] = {11, 55, 99, 1313, 22, 66, 1010, 1414, 33, 77, 1111, 1515, 44, 88, 1212, 1616}
 
static const float arr_default_value [] = {100, 0, 0, 0, 200, 0, 0, 0, 300, 0, 0, 0}
 
static const float vec4_default_value [] = {10, 20, 30, 40}
 
static const float flt_default_value [] = {9.99, 0, 0, 0}
 
static const D3DXCONSTANT_DESC ctab_with_default_values_expected []
 
static const DWORD ctab_samplers []
 
static const D3DXCONSTANT_DESC ctab_samplers_expected []
 
static const DWORD fx_shader_with_ctab []
 
static const DWORD get_shader_samplers_blob []
 
static const DWORD test_get_shader_constant_variables_blob []
 
struct {
   const char *   fullname
 
   D3DXCONSTANT_DESC   desc
 
   UINT   ctaboffset
 
test_get_shader_constant_variables_data []
 
static const DWORD registerset_test_input [][REGISTER_OUTPUT_SIZE]
 
static const DWORD registerset_blob_scalar []
 
static const struct registerset_constants registerset_constants_scalar_float []
 
static const struct registerset_test registerset_test_scalar_float []
 
static const struct registerset_constants registerset_constants_scalar_int []
 
static const struct registerset_test registerset_test_scalar_int []
 
static const struct registerset_constants registerset_constants_scalar_int_float []
 
static const struct registerset_test registerset_test_scalar_int_float []
 
static const struct registerset_constants registerset_constants_scalar_bool_float []
 
static const struct registerset_test registerset_test_scalar_bool_float []
 
static const struct registerset_constants registerset_constants_scalar_bool []
 
static const struct registerset_test registerset_test_scalar_bool []
 
static const DWORD registerset_blob_scalar_array []
 
static const struct registerset_constants registerset_constants_scalar_array_float []
 
static const struct registerset_test registerset_test_scalar_array_float []
 
static const struct registerset_constants registerset_constants_scalar_array_int []
 
static const struct registerset_test registerset_test_scalar_array_int []
 
static const struct registerset_constants registerset_constants_scalar_array_bool []
 
static const struct registerset_test registerset_test_scalar_array_bool []
 
static const struct registerset_constants registerset_constants_scalar_array_bool_float []
 
static const struct registerset_test registerset_test_scalar_array_bool_float []
 
static const struct registerset_constants registerset_constants_scalar_array_int_float []
 
static const struct registerset_test registerset_test_scalar_array_int_float []
 
static const DWORD registerset_blob_vector []
 
static const struct registerset_constants registerset_constants_vector_float []
 
static const struct registerset_test registerset_test_vector_float []
 
static const struct registerset_constants registerset_constants_vector_int []
 
static const struct registerset_test registerset_test_vector_int []
 
static const struct registerset_constants registerset_constants_vector_bool []
 
static const struct registerset_test registerset_test_vector_bool []
 
static const struct registerset_constants registerset_constants_vector_bool_float []
 
static const struct registerset_test registerset_test_vector_bool_float []
 
static const struct registerset_constants registerset_constants_vector_int_float []
 
static const struct registerset_test registerset_test_vector_int_float []
 
static const DWORD registerset_blob_vector_array []
 
static const struct registerset_constants registerset_constants_vector_array_float []
 
static const struct registerset_test registerset_test_vector_array_float []
 
static const struct registerset_constants registerset_constants_vector_array_int []
 
static const struct registerset_test registerset_test_vector_array_int []
 
static const struct registerset_constants registerset_constants_vector_array_bool []
 
static const struct registerset_test registerset_test_vector_array_bool []
 
static const struct registerset_constants registerset_constants_vector_array_bool_float []
 
static const struct registerset_test registerset_test_vector_array_bool_float []
 
static const struct registerset_constants registerset_constants_vector_array_int_float []
 
static const struct registerset_test registerset_test_vector_array_int_float []
 
static const DWORD registerset_blob_column []
 
static const struct registerset_constants registerset_constants_column_float []
 
static const struct registerset_test registerset_test_column_float []
 
static const struct registerset_constants registerset_constants_column_int []
 
static const struct registerset_test registerset_test_column_int []
 
static const struct registerset_constants registerset_constants_column_bool []
 
static const struct registerset_test registerset_test_column_bool []
 
static const struct registerset_constants registerset_constants_column_int_float []
 
static const struct registerset_test registerset_test_column_int_float []
 
static const struct registerset_constants registerset_constants_column_bool_float []
 
static const struct registerset_test registerset_test_column_bool_float []
 
static const DWORD registerset_blob_column_array []
 
static const struct registerset_constants registerset_constants_column_array_float []
 
static const struct registerset_test registerset_test_column_array_float []
 
static const struct registerset_constants registerset_constants_column_array_int []
 
static const struct registerset_test registerset_test_column_array_int []
 
static const struct registerset_constants registerset_constants_column_array_bool []
 
static const struct registerset_test registerset_test_column_array_bool []
 
static const struct registerset_constants registerset_constants_column_array_int_float []
 
static const struct registerset_test registerset_test_column_array_int_float []
 
static const struct registerset_constants registerset_constants_column_array_bool_float []
 
static const struct registerset_test registerset_test_column_array_bool_float []
 
static const DWORD registerset_blob_row []
 
static const struct registerset_constants registerset_constants_row_float []
 
static const struct registerset_test registerset_test_row_float []
 
static const struct registerset_constants registerset_constants_row_int []
 
static const struct registerset_test registerset_test_row_int []
 
static const struct registerset_constants registerset_constants_row_bool []
 
static const struct registerset_test registerset_test_row_bool []
 
static const struct registerset_constants registerset_constants_row_int_float []
 
static const struct registerset_test registerset_test_row_int_float []
 
static const struct registerset_constants registerset_constants_row_bool_float []
 
static const struct registerset_test registerset_test_row_bool_float []
 
static const DWORD registerset_blob_row_array []
 
static const struct registerset_constants registerset_constants_row_array_float []
 
static const struct registerset_test registerset_test_row_array_float []
 
static const struct registerset_constants registerset_constants_row_array_int []
 
static const struct registerset_test registerset_test_row_array_int []
 
static const struct registerset_constants registerset_constants_row_array_bool []
 
static const struct registerset_test registerset_test_row_array_bool []
 
static const struct registerset_constants registerset_constants_row_array_int_float []
 
static const struct registerset_test registerset_test_row_array_int_float []
 
static const struct registerset_constants registerset_constants_row_array_bool_float []
 
static const struct registerset_test registerset_test_row_array_bool_float []
 
static const DWORD registerset_blob_struct []
 
static const struct registerset_constants registerset_constants_struct_float []
 
static const struct registerset_test registerset_test_struct_float []
 
static const struct registerset_constants registerset_constants_struct_int []
 
static const struct registerset_test registerset_test_struct_int []
 
static const struct registerset_constants registerset_constants_struct_bool []
 
static const struct registerset_test registerset_test_struct_bool []
 
static const struct registerset_constants registerset_constants_struct_int_float []
 
static const struct registerset_test registerset_test_struct_int_float []
 
static const struct registerset_constants registerset_constants_struct_bool_float []
 
static const struct registerset_test registerset_test_struct_bool_float []
 
static const DWORD registerset_blob_struct_array []
 
static const struct registerset_constants registerset_constants_struct_array_float []
 
static const struct registerset_test registerset_test_struct_array_float []
 
static const struct registerset_constants registerset_constants_struct_array_int []
 
static const struct registerset_test registerset_test_struct_array_int []
 
static const struct registerset_constants registerset_constants_struct_array_bool []
 
static const struct registerset_test registerset_test_struct_array_bool []
 
static const struct registerset_constants registerset_constants_struct_array_int_float []
 
static const struct registerset_test registerset_test_struct_array_int_float []
 
static const struct registerset_constants registerset_constants_struct_array_bool_float []
 
static const struct registerset_test registerset_test_struct_array_bool_float []
 
static const DWORD registerset_blob_struct_struct []
 
static const struct registerset_constants registerset_constants_struct_struct_float []
 
static const struct registerset_test registerset_test_struct_struct_float []
 
static const struct registerset_constants registerset_constants_struct_struct_int []
 
static const struct registerset_test registerset_test_struct_struct_int []
 
static const struct registerset_constants registerset_constants_struct_struct_bool []
 
static const struct registerset_test registerset_test_struct_struct_bool []
 
static const struct registerset_constants registerset_constants_struct_struct_int_float []
 
static const struct registerset_test registerset_test_struct_struct_int_float []
 
static const struct registerset_constants registerset_constants_struct_struct_bool_float []
 
static const struct registerset_test registerset_test_struct_struct_bool_float []
 
static const DWORD registerset_blob_special_int []
 
static const struct registerset_constants registerset_constants_special_int []
 
static const DWORD registerset_blob_bigvec []
 
static const struct registerset_constants registerset_constants_bigvec_float []
 
static const struct registerset_test registerset_test_bigvec_float []
 
static const DWORD registerset_blob_matrix_column_clamp []
 
static const struct registerset_constants registerset_constants_matrix_column_clamp []
 
static const struct registerset_test registerset_test_matrix_column_clamp []
 
struct {
   const char *   name
 
   const char *   var
 
   UINT   start
 
   D3DXREGISTER_SET   regset
 
   const DWORD *   blob
 
   const struct registerset_test *   tests
 
   UINT   test_count
 
   const struct registerset_constants *   constants
 
   UINT   constant_count
 
registerset_data []
 
struct {
   const char *   name
 
   const DWORD *   blob
 
   unsigned int   float_count
 
   unsigned int   int_count
 
   unsigned int   bool_count
 
   const DWORD   floats [1024]
 
   const DWORD   ints [256]
 
   const DWORD   bools [16]
 
registerset_defaults_data []
 
static const DWORD ps_tex []
 
static const DWORD ps_texld_1_4 []
 
static const DWORD ps_texld_2_0 []
 
static const DWORD ps_texcoord []
 
static const DWORD ps_texcrd []
 
static const DWORD ps_sincos_2_0 []
 
static const DWORD ps_sincos_3_0 []
 
static const DWORD vs_sincos_2_0 []
 
static const DWORD vs_sincos_3_0 []
 

Macro Definition Documentation

◆ FCC_CTAB

#define FCC_CTAB   MAKEFOURCC('C','T','A','B')

Definition at line 24 of file shader.c.

◆ FCC_TEXT

#define FCC_TEXT   MAKEFOURCC('T','E','X','T')

Definition at line 23 of file shader.c.

◆ REGISTER_OUTPUT_SIZE

#define REGISTER_OUTPUT_SIZE   48

Definition at line 1964 of file shader.c.

Enumeration Type Documentation

◆ Type

Enumerator
T_UNKNOWN 
T_IGNORED_STATEMENT 
T_TIDENT 
T_MACRO 
T_DEFINE 
T_VARIABLE 
T_FUNCTION 
T_FUNCTION_PTR 
T_IF 
T_WHILE 
T_DO 
T_STRUCT 
SetFloat 
SetInt 
SetBool 
SetIntArray 
SetBoolArray 
SetFloatArray 
SetMatrix 
SetMatrixTranspose 
SetMatrixArray 
SetMatrixTransposeArray 
SetVector 
SetVectorArray 
SetValue 
SetMatrixPointerArray 
SetMatrixTransposePointerArray 

Definition at line 1966 of file shader.c.

@ SetMatrixTransposePointerArray
Definition: shader.c:1968
@ SetMatrixArray
Definition: shader.c:1967
@ SetIntArray
Definition: shader.c:1966
@ SetVectorArray
Definition: shader.c:1967
@ SetMatrixPointerArray
Definition: shader.c:1968
@ SetBoolArray
Definition: shader.c:1966
@ SetBool
Definition: shader.c:1966
@ SetVector
Definition: shader.c:1967
@ SetMatrixTransposeArray
Definition: shader.c:1967
@ SetMatrix
Definition: shader.c:1966
@ SetValue
Definition: shader.c:1968
@ SetFloat
Definition: shader.c:1966
@ SetFloatArray
Definition: shader.c:1966
@ SetInt
Definition: shader.c:1966
@ SetMatrixTranspose
Definition: shader.c:1967

Function Documentation

◆ registerset_apply()

static HRESULT registerset_apply ( ID3DXConstantTable *  ctable,
IDirect3DDevice9 *  device,
D3DXHANDLE  constant,
UINT  index,
DWORD  count,
enum Type  type 
)
static

Definition at line 5964 of file shader.c.

5966{
5968 const D3DXMATRIX *inp[REGISTER_OUTPUT_SIZE / 16];
5969 unsigned int i;
5970
5971 /* overlap, to see the difference between Array and PointerArray */
5972 for (i = 0; i < REGISTER_OUTPUT_SIZE / 16; i++)
5973 {
5974 inp[i] = (D3DXMATRIX *)&in[i * 15];
5975 }
5976
5977 switch (type)
5978 {
5979 case SetInt:
5981 case SetFloat:
5983 case SetBool:
5985 case SetIntArray:
5987 case SetBoolArray:
5989 case SetFloatArray:
5991 case SetMatrix:
5993 case SetMatrixTranspose:
5995 case SetMatrixArray:
5999 case SetVector:
6001 case SetVectorArray:
6003 case SetValue:
6009 }
6010
6011 ok(0, "This should not happen!\n");
6012 return D3D_OK;
6013}
#define ok(value,...)
Definition: atltest.h:57
#define index(s, c)
Definition: various.h:29
static _Locale_mask_t ctable[256]
#define D3D_OK
Definition: d3d.h:106
#define ID3DXConstantTable_SetMatrixTransposeArray(p, a, b, c, d)
Definition: d3dx9shader.h:202
#define ID3DXConstantTable_SetBool(p, a, b, c)
Definition: d3dx9shader.h:190
#define ID3DXConstantTable_SetIntArray(p, a, b, c, d)
Definition: d3dx9shader.h:193
#define ID3DXConstantTable_SetVectorArray(p, a, b, c, d)
Definition: d3dx9shader.h:197
#define ID3DXConstantTable_SetMatrixPointerArray(p, a, b, c, d)
Definition: d3dx9shader.h:200
#define ID3DXConstantTable_SetMatrixArray(p, a, b, c, d)
Definition: d3dx9shader.h:199
#define ID3DXConstantTable_SetValue(p, a, b, c, d)
Definition: d3dx9shader.h:189
#define ID3DXConstantTable_SetMatrixTranspose(p, a, b, c)
Definition: d3dx9shader.h:201
#define ID3DXConstantTable_SetBoolArray(p, a, b, c, d)
Definition: d3dx9shader.h:191
#define ID3DXConstantTable_SetMatrixTransposePointerArray(p, a, b, c, d)
Definition: d3dx9shader.h:203
#define ID3DXConstantTable_SetVector(p, a, b, c)
Definition: d3dx9shader.h:196
#define ID3DXConstantTable_SetFloat(p, a, b, c)
Definition: d3dx9shader.h:194
#define ID3DXConstantTable_SetFloatArray(p, a, b, c, d)
Definition: d3dx9shader.h:195
#define ID3DXConstantTable_SetMatrix(p, a, b, c)
Definition: d3dx9shader.h:198
#define ID3DXConstantTable_SetInt(p, a, b, c)
Definition: d3dx9shader.h:192
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLuint in
Definition: glext.h:9616
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 const DWORD registerset_test_input[][REGISTER_OUTPUT_SIZE]
Definition: shader.c:1987
#define REGISTER_OUTPUT_SIZE
Definition: shader.c:1964
Definition: devices.h:37
float FLOAT
Definition: typedefs.h:69
int32_t INT
Definition: typedefs.h:58

Referenced by test_registerset().

◆ registerset_clear()

static void registerset_clear ( IDirect3DDevice9 *  device)
static

Definition at line 5864 of file shader.c.

5865{
5866 DWORD zero[1024];
5867 HRESULT hr;
5868
5869 memset(zero, 0xde, 4096);
5870
5872 ok(hr == D3D_OK, "Clear failed, got %08x, expected %08x\n", hr, D3D_OK);
5873
5875 ok(hr == D3D_OK, "Clear failed, got %08x, expected %08x\n", hr, D3D_OK);
5876
5878 ok(hr == D3D_OK, "Clear failed, got %08x, expected %08x\n", hr, D3D_OK);
5879
5881 ok(hr == D3D_OK, "Clear failed, got %08x, expected %08x\n", hr, D3D_OK);
5882
5884 ok(hr == D3D_OK, "Clear failed, got %08x, expected %08x\n", hr, D3D_OK);
5885
5887 ok(hr == D3D_OK, "Clear failed, got %08x, expected %08x\n", hr, D3D_OK);
5888}
#define IDirect3DDevice9_SetPixelShaderConstantI(p, a, b, c)
Definition: d3d9.h:1618
#define IDirect3DDevice9_SetVertexShaderConstantF(p, a, b, c)
Definition: d3d9.h:1601
#define IDirect3DDevice9_SetPixelShaderConstantF(p, a, b, c)
Definition: d3d9.h:1616
#define IDirect3DDevice9_SetVertexShaderConstantI(p, a, b, c)
Definition: d3d9.h:1603
#define IDirect3DDevice9_SetPixelShaderConstantB(p, a, b, c)
Definition: d3d9.h:1620
#define IDirect3DDevice9_SetVertexShaderConstantB(p, a, b, c)
Definition: d3d9.h:1605
#define memset(x, y, z)
Definition: compat.h:39
int zero
Definition: sehframes.cpp:29
HRESULT hr
Definition: shlfolder.c:183

Referenced by test_registerset(), and test_registerset_defaults().

◆ registerset_compare()

static UINT registerset_compare ( IDirect3DDevice9 *  device,
BOOL  is_vs,
D3DXREGISTER_SET  regset,
UINT  start,
UINT  in_count,
const DWORD expected 
)
static

Definition at line 5890 of file shader.c.

5892{
5893 DWORD ret[1024] = {0};
5894 HRESULT hr;
5895 UINT count = 1024, i, err = 0;
5896
5897 memset(ret, 0xde, 4096);
5898
5899 /* get shader constants */
5900 switch (regset)
5901 {
5902 case D3DXRS_BOOL:
5903 count = 16;
5906 ok(hr == D3D_OK, "Get*ShaderConstantB failed, got %08x\n", hr);
5907 break;
5908
5909 case D3DXRS_INT4:
5910 count = 256;
5913 ok(hr == D3D_OK, "Get*ShaderConstantI failed, got %08x\n", hr);
5914 break;
5915
5916 case D3DXRS_FLOAT4:
5918 else
5919 {
5920 count = 896;
5922 }
5923 ok(hr == D3D_OK, "Get*ShaderConstantF failed, got %08x\n", hr);
5924 break;
5925
5926 default:
5927 ok(0, "This should not happen!\n");
5928 break;
5929 }
5930
5931 /* compare shader constants */
5932 for (i = 0; i < count; ++i)
5933 {
5934 DWORD value = 0xdededede;
5935 if (i >= start && i < start + in_count) value = expected[i - start];
5936
5937 ok(ret[i] == value, "Get*ShaderConstant failed, %u got 0x%x(%f) expected 0x%x(%f)\n", i,
5938 ret[i], ((FLOAT *)ret)[i], value, *((FLOAT *)&value));
5939 if (ret[i] != value) err++;
5940 }
5941
5942 return err;
5943}
#define IDirect3DDevice9_GetPixelShaderConstantB(p, a, b, c)
Definition: d3d9.h:1621
#define IDirect3DDevice9_GetPixelShaderConstantI(p, a, b, c)
Definition: d3d9.h:1619
#define IDirect3DDevice9_GetVertexShaderConstantI(p, a, b, c)
Definition: d3d9.h:1604
#define IDirect3DDevice9_GetPixelShaderConstantF(p, a, b, c)
Definition: d3d9.h:1617
#define IDirect3DDevice9_GetVertexShaderConstantB(p, a, b, c)
Definition: d3d9.h:1606
#define IDirect3DDevice9_GetVertexShaderConstantF(p, a, b, c)
Definition: d3d9.h:1602
@ D3DXRS_FLOAT4
Definition: d3dx9shader.h:55
@ D3DXRS_BOOL
Definition: d3dx9shader.h:53
@ D3DXRS_INT4
Definition: d3dx9shader.h:54
GLuint start
Definition: gl.h:1545
BOOL expected
Definition: store.c:2063
D3DXREGISTER_SET regset
Definition: shader.c:5668
unsigned int UINT
Definition: ndis.h:50
#define err(...)
Definition: pdh_main.c:94
int ret

Referenced by registerset_compare_all(), and test_registerset_defaults().

◆ registerset_compare_all()

static UINT registerset_compare_all ( IDirect3DDevice9 *  device,
BOOL  is_vs,
D3DXREGISTER_SET  regset,
UINT  start,
UINT  in_count,
const DWORD expected 
)
static

Definition at line 5945 of file shader.c.

5947{
5949 UINT err = 0, i;
5950
5951 for (i = 0; i < ARRAY_SIZE(regsets); i++)
5952 {
5953 if (regset == regsets[i])
5954 err += registerset_compare(device, is_vs, regset, start, in_count, expected);
5955 else
5956 err += registerset_compare(device, is_vs, regsets[i], 0, 0, NULL);
5957
5958 err += registerset_compare(device, !is_vs, regsets[i], 0, 0, NULL);
5959 }
5960
5961 return err;
5962}
#define ARRAY_SIZE(A)
Definition: main.h:33
enum _D3DXREGISTER_SET D3DXREGISTER_SET
#define NULL
Definition: types.h:112
static UINT registerset_compare(IDirect3DDevice9 *device, BOOL is_vs, D3DXREGISTER_SET regset, UINT start, UINT in_count, const DWORD *expected)
Definition: shader.c:5890

Referenced by test_registerset().

◆ START_TEST()

START_TEST ( shader  )

Definition at line 6834 of file shader.c.

6835{
6850}
static void test_shader_semantics(void)
Definition: shader.c:6415
static void test_get_shader_size(void)
Definition: shader.c:302
static void test_get_sampler_index(void)
Definition: shader.c:1499
static void test_find_shader_comment(void)
Definition: shader.c:334
static void test_get_shader_samplers(void)
Definition: shader.c:1592
static void test_registerset_defaults(void)
Definition: shader.c:6320
static void test_registerset(void)
Definition: shader.c:6015
static void test_get_shader_constant_variables(void)
Definition: shader.c:1830
static void test_constant_tables(void)
Definition: shader.c:649
static void test_get_shader_version(void)
Definition: shader.c:318
static void test_setting_constants(void)
Definition: shader.c:1449
static void test_get_shader_constant_table_ex(void)
Definition: shader.c:404
static void test_disassemble_shader(void)
Definition: shader.c:6680
static void test_fragment_linker(void)
Definition: shader.c:6578

◆ test_constant_table()

static void test_constant_table ( const char test_name,
const DWORD ctable_fn,
const D3DXCONSTANT_DESC expecteds,
UINT  count 
)
static

Definition at line 571 of file shader.c.

573{
574 UINT i;
575 ID3DXConstantTable *ctable;
576
577 HRESULT res;
578
579 /* Get the constant table from the shader itself */
581 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed on %s: got %08x\n", test_name, res);
582
583 for (i = 0; i < count; i++)
584 {
585 const D3DXCONSTANT_DESC *expected = &expecteds[i];
586 D3DXHANDLE const_handle;
587 D3DXCONSTANT_DESC actual;
588 UINT pCount = 1;
589
591
592 res = ID3DXConstantTable_GetConstantDesc(ctable, const_handle, &actual, &pCount);
593 ok(SUCCEEDED(res), "%s in %s: ID3DXConstantTable_GetConstantDesc returned %08x\n", expected->Name,
594 test_name, res);
595 ok(pCount == 1, "%s in %s: Got more or less descriptions: %d\n", expected->Name, test_name, pCount);
596
597 ok(strcmp(actual.Name, expected->Name) == 0,
598 "%s in %s: Got different names: Got %s, expected %s\n", expected->Name,
599 test_name, actual.Name, expected->Name);
600 ok(actual.RegisterSet == expected->RegisterSet,
601 "%s in %s: Got different register sets: Got %d, expected %d\n",
602 expected->Name, test_name, actual.RegisterSet, expected->RegisterSet);
603 ok(actual.RegisterIndex == expected->RegisterIndex,
604 "%s in %s: Got different register indices: Got %d, expected %d\n",
605 expected->Name, test_name, actual.RegisterIndex, expected->RegisterIndex);
606 ok(actual.RegisterCount == expected->RegisterCount,
607 "%s in %s: Got different register counts: Got %d, expected %d\n",
608 expected->Name, test_name, actual.RegisterCount, expected->RegisterCount);
609 ok(actual.Class == expected->Class,
610 "%s in %s: Got different classes: Got %d, expected %d\n", expected->Name,
611 test_name, actual.Class, expected->Class);
612 ok(actual.Type == expected->Type,
613 "%s in %s: Got different types: Got %d, expected %d\n", expected->Name,
614 test_name, actual.Type, expected->Type);
615 ok(actual.Rows == expected->Rows && actual.Columns == expected->Columns,
616 "%s in %s: Got different dimensions: Got (%d, %d), expected (%d, %d)\n",
617 expected->Name, test_name, actual.Rows, actual.Columns, expected->Rows,
618 expected->Columns);
619 ok(actual.Elements == expected->Elements,
620 "%s in %s: Got different element count: Got %d, expected %d\n",
621 expected->Name, test_name, actual.Elements, expected->Elements);
622 ok(actual.StructMembers == expected->StructMembers,
623 "%s in %s: Got different struct member count: Got %d, expected %d\n",
624 expected->Name, test_name, actual.StructMembers, expected->StructMembers);
625 ok(actual.Bytes == expected->Bytes,
626 "%s in %s: Got different byte count: Got %d, expected %d\n",
627 expected->Name, test_name, actual.Bytes, expected->Bytes);
628
629 if (!expected->DefaultValue)
630 {
631 ok(actual.DefaultValue == NULL,
632 "%s in %s: Got different default value: expected NULL\n",
633 expected->Name, test_name);
634 }
635 else
636 {
637 ok(actual.DefaultValue != NULL,
638 "%s in %s: Got different default value: expected non-NULL\n",
639 expected->Name, test_name);
640 ok(memcmp(actual.DefaultValue, expected->DefaultValue, expected->Bytes) == 0,
641 "%s in %s: Got different default value\n", expected->Name, test_name);
642 }
643 }
644
645 /* Finally, release the constant table */
647}
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
#define ID3DXConstantTable_Release(p)
Definition: d3dx9shader.h:177
const char * D3DXHANDLE
Definition: d3dx9shader.h:48
#define ID3DXConstantTable_GetConstantDesc(p, a, b, c)
Definition: d3dx9shader.h:183
#define ID3DXConstantTable_GetConstantByName(p, a, b)
Definition: d3dx9shader.h:186
HRESULT WINAPI D3DXGetShaderConstantTable(const DWORD *byte_code, ID3DXConstantTable **constant_table)
Definition: shader.c:2111
GLuint res
Definition: glext.h:9613
#define SUCCEEDED(hr)
Definition: intsafe.h:50
static const char * test_name
Definition: run.c:177
const void * DefaultValue
Definition: d3dx9shader.h:116
D3DXPARAMETER_CLASS Class
Definition: d3dx9shader.h:109
D3DXREGISTER_SET RegisterSet
Definition: d3dx9shader.h:106
D3DXPARAMETER_TYPE Type
Definition: d3dx9shader.h:110
const char * Name
Definition: d3dx9shader.h:105

Referenced by test_constant_tables().

◆ test_constant_tables()

static void test_constant_tables ( void  )
static

Definition at line 649 of file shader.c.

650{
663}
static void test_constant_table(const char *test_name, const DWORD *ctable_fn, const D3DXCONSTANT_DESC *expecteds, UINT count)
Definition: shader.c:571
static const DWORD ctab_samplers[]
Definition: shader.c:260
static const D3DXCONSTANT_DESC ctab_samplers_expected[]
Definition: shader.c:278
static const DWORD ctab_matrices[]
Definition: shader.c:116
static const DWORD ctab_matrices2[]
Definition: shader.c:140
static const DWORD ctab_basic[]
Definition: shader.c:90
static const D3DXCONSTANT_DESC ctab_matrices_expected[]
Definition: shader.c:134
static const D3DXCONSTANT_DESC ctab_basic_expected[]
Definition: shader.c:109
static const D3DXCONSTANT_DESC ctab_with_default_values_expected[]
Definition: shader.c:253
static const DWORD ctab_arrays[]
Definition: shader.c:174
static const D3DXCONSTANT_DESC ctab_matrices2_expected[]
Definition: shader.c:166
static const D3DXCONSTANT_DESC ctab_arrays_expected[]
Definition: shader.c:201
static const DWORD ctab_with_default_values[]
Definition: shader.c:209

Referenced by START_TEST().

◆ test_disassemble_shader()

static void test_disassemble_shader ( void  )
static

Definition at line 6680 of file shader.c.

6681{
6682 static const char disasm_vs[] = " vs_1_1\n"
6683 " dcl_position v0\n"
6684 " dp4 oPos.x, v0, c0\n"
6685 " dp4 oPos.y, v0, c1\n"
6686 " dp4 oPos.z, v0, c2\n"
6687 " dp4 oPos.w, v0, c3\n";
6688 static const char disasm_ps[] = " ps_1_1\n"
6689 " def c1, 1, 0, 0, 0\n"
6690 " tex t0\n"
6691 " dp3 r0, c1, c0\n"
6692 " mul r0, v0, r0\n"
6693 " mul r0, t0, r0\n";
6694 static const char disasm_ps_tex[] = " ps_1_3\n"
6695 " tex t0\n"
6696 " nop\n";
6697 static const char disasm_ps_texld_1_4[] = " ps_1_4\n"
6698 " texld t0, c0\n"
6699 " nop\n";
6700 static const char disasm_ps_texld_2_0[] = " ps_2_0\n"
6701 " texld t0, c0, c1\n"
6702 " nop\n";
6703 static const char disasm_ps_texcoord[] = " ps_1_3\n"
6704 " texcoord t0\n"
6705 " nop\n";
6706 static const char disasm_ps_texcrd[] = " ps_1_4\n"
6707 " texcrd t0, c0\n"
6708 " nop\n";
6709 static const char disasm_ps_sincos_2_0[] = " ps_2_0\n"
6710 " sincos t0, c0, c1, c2\n"
6711 " nop\n";
6712 static const char disasm_ps_sincos_3_0[] = " ps_3_0\n"
6713 " sincos t0, c0\n"
6714 " nop\n";
6715 static const char disasm_vs_sincos_2_0[] = " vs_2_0\n"
6716 " sincos a0, c0, c1, c2\n"
6717 " nop\n";
6718 static const char disasm_vs_sincos_3_0[] = " vs_3_0\n"
6719 " sincos a0, c0\n"
6720 " nop\n";
6721 ID3DXBuffer *disassembly;
6722 HRESULT ret;
6723 char *ptr;
6724
6725 /* Check wrong parameters */
6727 ok(ret == D3DERR_INVALIDCALL, "Returned %#x, expected %#x\n", ret, D3DERR_INVALIDCALL);
6728 ret = D3DXDisassembleShader(NULL, FALSE, NULL, &disassembly);
6729 ok(ret == D3DERR_INVALIDCALL, "Returned %#x, expected %#x\n", ret, D3DERR_INVALIDCALL);
6731 ok(ret == D3DERR_INVALIDCALL, "Returned %#x, expected %#x\n", ret, D3DERR_INVALIDCALL);
6732
6733 /* Test with vertex shader */
6734 disassembly = (void *)0xdeadbeef;
6735 ret = D3DXDisassembleShader(simple_vs, FALSE, NULL, &disassembly);
6736 ok(ret == D3D_OK, "Failed with %#x\n", ret);
6737 ptr = ID3DXBuffer_GetBufferPointer(disassembly);
6738 ok(!memcmp(ptr, disasm_vs, sizeof(disasm_vs) - 1), /* compare beginning */
6739 "Returned '%s', expected '%s'\n", ptr, disasm_vs);
6740 ID3DXBuffer_Release(disassembly);
6741
6742 /* Test with pixel shader */
6743 disassembly = (void *)0xdeadbeef;
6744 ret = D3DXDisassembleShader(simple_ps, FALSE, NULL, &disassembly);
6745 ok(ret == D3D_OK, "Failed with %#x\n", ret);
6746 ptr = ID3DXBuffer_GetBufferPointer(disassembly);
6747 ok(!memcmp(ptr, disasm_ps, sizeof(disasm_ps) - 1), /* compare beginning */
6748 "Returned '%s', expected '%s'\n", ptr, disasm_ps);
6749 ID3DXBuffer_Release(disassembly);
6750
6751 /* Test tex instruction with pixel shader 1.3 */
6752 disassembly = (void *)0xdeadbeef;
6753 ret = D3DXDisassembleShader(ps_tex, FALSE, NULL, &disassembly);
6754 ok(ret == D3D_OK, "Failed with %#x\n", ret);
6755 ptr = ID3DXBuffer_GetBufferPointer(disassembly);
6756 ok(!memcmp(ptr, disasm_ps_tex, sizeof(disasm_ps_tex) - 1), /* compare beginning */
6757 "Returned '%s', expected '%s'\n", ptr, disasm_ps_tex);
6758 ID3DXBuffer_Release(disassembly);
6759
6760 /* Test texld instruction with pixel shader 1.4 */
6761 disassembly = (void *)0xdeadbeef;
6762 ret = D3DXDisassembleShader(ps_texld_1_4, FALSE, NULL, &disassembly);
6763 ok(ret == D3D_OK, "Failed with %#x\n", ret);
6764 ptr = ID3DXBuffer_GetBufferPointer(disassembly);
6765 ok(!memcmp(ptr, disasm_ps_texld_1_4, sizeof(disasm_ps_texld_1_4) - 1), /* compare beginning */
6766 "Returned '%s', expected '%s'\n", ptr, disasm_ps_texld_1_4);
6767 ID3DXBuffer_Release(disassembly);
6768
6769 /* Test texld instruction with pixel shader 2.0 */
6770 disassembly = (void *)0xdeadbeef;
6771 ret = D3DXDisassembleShader(ps_texld_2_0, FALSE, NULL, &disassembly);
6772 ok(ret == D3D_OK, "Failed with %#x\n", ret);
6773 ptr = ID3DXBuffer_GetBufferPointer(disassembly);
6774 ok(!memcmp(ptr, disasm_ps_texld_2_0, sizeof(disasm_ps_texld_2_0) - 1), /* compare beginning */
6775 "Returned '%s', expected '%s'\n", ptr, disasm_ps_texld_2_0);
6776 ID3DXBuffer_Release(disassembly);
6777
6778 /* Test texcoord instruction with pixel shader 1.3 */
6779 disassembly = (void *)0xdeadbeef;
6780 ret = D3DXDisassembleShader(ps_texcoord, FALSE, NULL, &disassembly);
6781 ok(ret == D3D_OK, "Failed with %#x\n", ret);
6782 ptr = ID3DXBuffer_GetBufferPointer(disassembly);
6783 ok(!memcmp(ptr, disasm_ps_texcoord, sizeof(disasm_ps_texcoord) - 1), /* compare beginning */
6784 "Returned '%s', expected '%s'\n", ptr, disasm_ps_texcoord);
6785 ID3DXBuffer_Release(disassembly);
6786
6787 /* Test texcrd instruction with pixel shader 1.4 */
6788 disassembly = (void *)0xdeadbeef;
6789 ret = D3DXDisassembleShader(ps_texcrd, FALSE, NULL, &disassembly);
6790 ok(ret == D3D_OK, "Failed with %#x\n", ret);
6791 ptr = ID3DXBuffer_GetBufferPointer(disassembly);
6792 ok(!memcmp(ptr, disasm_ps_texcrd, sizeof(disasm_ps_texcrd) - 1), /* compare beginning */
6793 "Returned '%s', expected '%s'\n", ptr, disasm_ps_texcrd);
6794 ID3DXBuffer_Release(disassembly);
6795
6796 /* Test sincos instruction pixel shader 2.0 */
6797 disassembly = (void *)0xdeadbeef;
6799 ok(ret == D3D_OK, "Failed with %#x\n", ret);
6800 ptr = ID3DXBuffer_GetBufferPointer(disassembly);
6801 ok(!memcmp(ptr, disasm_ps_sincos_2_0, sizeof(disasm_ps_sincos_2_0) - 1), /* compare beginning */
6802 "Returned '%s', expected '%s'\n", ptr, disasm_ps_sincos_2_0);
6803 ID3DXBuffer_Release(disassembly);
6804
6805 /* Test sincos instruction with pixel shader 3.0 */
6806 disassembly = (void *)0xdeadbeef;
6808 ok(ret == D3D_OK, "Failed with %#x\n", ret);
6809 ptr = ID3DXBuffer_GetBufferPointer(disassembly);
6810 ok(!memcmp(ptr, disasm_ps_sincos_3_0, sizeof(disasm_ps_sincos_3_0) - 1), /* compare beginning */
6811 "Returned '%s', expected '%s'\n", ptr, disasm_ps_sincos_3_0);
6812 ID3DXBuffer_Release(disassembly);
6813
6814 /* Test sincos instruction with pixel shader 2.0 */
6815 disassembly = (void *)0xdeadbeef;
6817 ok(ret == D3D_OK, "Failed with %#x\n", ret);
6818 ptr = ID3DXBuffer_GetBufferPointer(disassembly);
6819 ok(!memcmp(ptr, disasm_vs_sincos_2_0, sizeof(disasm_vs_sincos_2_0) - 1), /* compare beginning */
6820 "Returned '%s', expected '%s'\n", ptr, disasm_vs_sincos_2_0);
6821 ID3DXBuffer_Release(disassembly);
6822
6823 /* Test sincos instruction with pixel shader 3.0 */
6824 disassembly = (void *)0xdeadbeef;
6826 ok(ret == D3D_OK, "Failed with %#x\n", ret);
6827 ptr = ID3DXBuffer_GetBufferPointer(disassembly);
6828 ok(!memcmp(ptr, disasm_vs_sincos_3_0, sizeof(disasm_vs_sincos_3_0) - 1), /* compare beginning */
6829 "Returned '%s', expected '%s'\n", ptr, disasm_vs_sincos_3_0);
6830 ID3DXBuffer_Release(disassembly);
6831
6832}
#define D3DERR_INVALIDCALL
struct ID3DXBuffer ID3DXBuffer
Definition: d3dx8core.h:51
#define ID3DXBuffer_GetBufferPointer(p)
Definition: d3dx9core.h:85
#define ID3DXBuffer_Release(p)
Definition: d3dx9core.h:83
#define FALSE
Definition: types.h:117
HRESULT WINAPI D3DXDisassembleShader(const DWORD *shader, BOOL colorcode, const char *comments, ID3DXBuffer **disassembly)
Definition: shader.c:2645
static PVOID ptr
Definition: dispmode.c:27
static const DWORD ps_texcoord[]
Definition: shader.c:6644
static const DWORD ps_texcrd[]
Definition: shader.c:6650
static const DWORD simple_vs[]
Definition: shader.c:40
static const DWORD ps_sincos_3_0[]
Definition: shader.c:6662
static const DWORD simple_ps[]
Definition: shader.c:49
static const DWORD ps_sincos_2_0[]
Definition: shader.c:6656
static const DWORD vs_sincos_3_0[]
Definition: shader.c:6674
static const DWORD ps_texld_1_4[]
Definition: shader.c:6632
static const DWORD vs_sincos_2_0[]
Definition: shader.c:6668
static const DWORD ps_texld_2_0[]
Definition: shader.c:6638
static const DWORD ps_tex[]
Definition: shader.c:6626

Referenced by START_TEST().

◆ test_find_shader_comment()

static void test_find_shader_comment ( void  )
static

Definition at line 334 of file shader.c.

335{
336 const void *data = (void *)0xdeadbeef;
337 HRESULT hr;
338 UINT size = 100;
339
340 hr = D3DXFindShaderComment(NULL, MAKEFOURCC('C','T','A','B'), &data, &size);
341 ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
342 ok(!data, "Got %p, expected NULL\n", data);
343 ok(!size, "Got %u, expected 0\n", size);
344
346 ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr);
347 ok(size == 28, "Got %u, expected 28\n", size);
348
350 ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr);
351 ok(data == shader_with_ctab + 6, "Got result %p, expected %p\n", data, shader_with_ctab + 6);
352
354 ok(hr == S_FALSE, "Got result %x, expected 1 (S_FALSE)\n", hr);
355 ok(!data, "Got %p, expected NULL\n", data);
356 ok(!size, "Got %u, expected 0\n", size);
357
359 ok(hr == S_FALSE, "Got result %x, expected 1 (S_FALSE)\n", hr);
360 ok(!data, "Got %p, expected NULL\n", data);
361 ok(!size, "Got %u, expected 0\n", size);
362
364 ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr);
365 ok(data == shader_with_ctab + 6, "Got result %p, expected %p\n", data, shader_with_ctab + 6);
366 ok(size == 28, "Got result %u, expected 28\n", size);
367
368 hr = D3DXFindShaderComment(shader_zero, MAKEFOURCC('C','T','A','B'), &data, &size);
369 ok(hr == D3DXERR_INVALIDDATA, "Got result %x, expected %x (D3DXERR_INVALIDDATA)\n", hr, D3DXERR_INVALIDDATA);
370 ok(!data, "Got %p, expected NULL\n", data);
371 ok(!size, "Got %u, expected 0\n", size);
372
374 ok(hr == D3DXERR_INVALIDDATA, "Got result %x, expected %x (D3DXERR_INVALIDDATA)\n", hr, D3DXERR_INVALIDDATA);
375 ok(!data, "Got %p, expected NULL\n", data);
376 ok(!size, "Got %u, expected 0\n", size);
377
378 hr = D3DXFindShaderComment(shader_empty, MAKEFOURCC('C','T','A','B'), &data, &size);
379 ok(hr == S_FALSE, "Got result %x, expected %x (S_FALSE)\n", hr, S_FALSE);
380 ok(!data, "Got %p, expected NULL\n", data);
381 ok(!size, "Got %u, expected 0\n", size);
382
384 ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr);
385 ok(data == simple_fx + 3, "Got result %p, expected %p\n", data, simple_fx + 3);
386 ok(size == 4, "Got result %u, expected 4\n", size);
387
389 ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr);
390 ok(data == simple_tx + 3, "Got result %p, expected %p\n", data, simple_tx + 3);
391 ok(size == 4, "Got result %u, expected 4\n", size);
392
394 ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr);
395 ok(data == simple_7ffe + 3, "Got result %p, expected %p\n", data, simple_7ffe + 3);
396 ok(size == 4, "Got result %u, expected 4\n", size);
397
399 ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr);
400 ok(data == simple_7fff + 3, "Got result %p, expected %p\n", data, simple_7fff + 3);
401 ok(size == 4, "Got result %u, expected 4\n", size);
402}
#define D3DXERR_INVALIDDATA
Definition: compiler.c:30
HRESULT WINAPI D3DXFindShaderComment(const DWORD *byte_code, DWORD fourcc, const void **data, UINT *size)
Definition: shader.c:150
#define MAKEFOURCC(ch0, ch1, ch2, ch3)
Definition: dmdls.h:24
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLsizeiptr size
Definition: glext.h:5919
static const DWORD shader_invalid[]
Definition: shader.c:28
static const DWORD simple_7ffe[]
Definition: shader.c:36
#define FCC_TEXT
Definition: shader.c:23
static const DWORD shader_empty[]
Definition: shader.c:30
static const DWORD shader_with_ctab[]
Definition: shader.c:58
static const DWORD simple_7fff[]
Definition: shader.c:38
static const DWORD simple_tx[]
Definition: shader.c:34
static const DWORD shader_zero[]
Definition: shader.c:26
static const DWORD simple_fx[]
Definition: shader.c:32
#define S_FALSE
Definition: winerror.h:2357

Referenced by START_TEST().

◆ test_fragment_linker()

static void test_fragment_linker ( void  )
static

Definition at line 6578 of file shader.c.

6579{
6580 ID3DXFragmentLinker *linker;
6582 IDirect3DDevice9 *device;
6583 IDirect3D9 *d3d;
6584 ULONG refcount;
6585 HWND window;
6586 HRESULT hr;
6587
6588 window = CreateWindowA("static", "d3dx9_test", WS_OVERLAPPEDWINDOW, 0, 0, 640, 480, NULL, NULL, NULL, NULL);
6589 if (!(d3d = Direct3DCreate9(D3D_SDK_VERSION)))
6590 {
6591 skip("Failed to create a D3D object.\n");
6593 return;
6594 }
6595
6596 ZeroMemory(&d3dpp, sizeof(d3dpp));
6597 d3dpp.Windowed = TRUE;
6601 if (FAILED(hr))
6602 {
6603 skip("Failed to create a D3D device, hr %#x.\n", hr);
6604 IDirect3D9_Release(d3d);
6606 return;
6607 }
6608
6609 hr = D3DXCreateFragmentLinker(device, 1024, &linker);
6610 ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr);
6611 ok(!!linker, "Unexpected linker %p.\n", linker);
6612 linker->lpVtbl->Release(linker);
6613
6614 hr = D3DXCreateFragmentLinkerEx(device, 1024, 0, &linker);
6615 ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr);
6616 ok(!!linker, "Unexpected linker %p.\n", linker);
6617 linker->lpVtbl->Release(linker);
6618
6619 refcount = IDirect3DDevice9_Release(device);
6620 ok(!refcount, "Device has %u references left.\n", refcount);
6621 refcount = IDirect3D9_Release(d3d);
6622 ok(!refcount, "The D3D object has %u references left.\n", refcount);
6624}
#define skip(...)
Definition: atltest.h:64
@ D3DSWAPEFFECT_DISCARD
Definition: d3d8types.h:851
@ D3DDEVTYPE_HAL
Definition: d3d8types.h:576
IDirect3D9 *WINAPI Direct3DCreate9(UINT SDKVersion)
Definition: d3d9.c:57
#define IDirect3D9_CreateDevice(p, a, b, c, d, e, f)
Definition: d3d9.h:235
#define IDirect3D9_Release(p)
Definition: d3d9.h:220
#define IDirect3DDevice9_Release(p)
Definition: d3d9.h:1508
#define TRUE
Definition: types.h:120
HRESULT WINAPI D3DXCreateFragmentLinkerEx(IDirect3DDevice9 *device, UINT size, DWORD flags, ID3DXFragmentLinker **linker)
Definition: shader.c:2302
HRESULT WINAPI D3DXCreateFragmentLinker(IDirect3DDevice9 *device, UINT size, ID3DXFragmentLinker **linker)
Definition: shader.c:2325
#define FAILED(hr)
Definition: intsafe.h:51
static IHTMLWindow2 * window
Definition: events.c:77
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
#define D3DADAPTER_DEFAULT
Definition: d3d8.h:57
#define D3D_SDK_VERSION
Definition: d3d8.h:56
#define D3DCREATE_MIXED_VERTEXPROCESSING
Definition: d3d8.h:46
D3DSWAPEFFECT SwapEffect
Definition: d3d8types.h:1128
uint32_t ULONG
Definition: typedefs.h:59
#define ZeroMemory
Definition: winbase.h:1712
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4315
BOOL WINAPI DestroyWindow(_In_ HWND)

Referenced by START_TEST().

◆ test_get_sampler_index()

static void test_get_sampler_index ( void  )
static

Definition at line 1499 of file shader.c.

1500{
1501 ID3DXConstantTable *ctable;
1502
1503 HRESULT res;
1504 UINT index;
1505
1506 ULONG refcnt;
1507
1509 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed on ctab_samplers: got %08x\n", res);
1510
1512 ok(index == 0, "ID3DXConstantTable_GetSamplerIndex returned wrong index: Got %d, expected 0\n", index);
1513
1515 ok(index == 3, "ID3DXConstantTable_GetSamplerIndex returned wrong index: Got %d, expected 3\n", index);
1516
1518 ok(index == -1, "ID3DXConstantTable_GetSamplerIndex found nonexistent sampler: Got %d\n",
1519 index);
1520
1522 ok(index == -1, "ID3DXConstantTable_GetSamplerIndex succeeded on non-sampler constant: Got %d\n",
1523 index);
1524
1526 ok(refcnt == 0, "The ID3DXConstantTable reference count was %u, should be 0\n", refcnt);
1527}
#define ID3DXConstantTable_GetSamplerIndex(p, a)
Definition: d3dx9shader.h:184
GLuint index
Definition: glext.h:6031

Referenced by START_TEST().

◆ test_get_shader_constant_table_ex()

static void test_get_shader_constant_table_ex ( void  )
static

Definition at line 404 of file shader.c.

405{
406 ID3DXConstantTable *constant_table;
407 HRESULT hr;
408 void *data;
409 DWORD size;
411
412 constant_table = (ID3DXConstantTable *)0xdeadbeef;
413 hr = D3DXGetShaderConstantTableEx(NULL, 0, &constant_table);
414 ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
415 ok(constant_table == NULL, "D3DXGetShaderConstantTableEx() failed, got %p\n", constant_table);
416
417 constant_table = (ID3DXConstantTable *)0xdeadbeef;
418 hr = D3DXGetShaderConstantTableEx(shader_zero, 0, &constant_table);
419 ok(hr == D3D_OK, "Got result %x, expected %x (D3D_OK)\n", hr, D3D_OK);
420 ok(constant_table == NULL, "D3DXGetShaderConstantTableEx() failed, got %p\n", constant_table);
421
422 constant_table = (ID3DXConstantTable *)0xdeadbeef;
423 hr = D3DXGetShaderConstantTableEx(shader_invalid, 0, &constant_table);
424 ok(hr == D3D_OK, "Got result %x, expected %x (D3D_OK)\n", hr, D3D_OK);
425 ok(constant_table == NULL, "D3DXGetShaderConstantTableEx() failed, got %p\n", constant_table);
426
427 constant_table = (ID3DXConstantTable *)0xdeadbeef;
428 hr = D3DXGetShaderConstantTableEx(shader_empty, 0, &constant_table);
429 ok(hr == D3DXERR_INVALIDDATA, "Got result %x, expected %x (D3DXERR_INVALIDDATA)\n", hr, D3DXERR_INVALIDDATA);
430 ok(constant_table == NULL, "D3DXGetShaderConstantTableEx() failed, got %p\n", constant_table);
431
432 /* No CTAB data */
433 constant_table = (ID3DXConstantTable *)0xdeadbeef;
434 hr = D3DXGetShaderConstantTableEx(simple_ps, 0, &constant_table);
435 ok(hr == D3DXERR_INVALIDDATA, "Got result %x, expected %x (D3DXERR_INVALIDDATA)\n", hr, D3DXERR_INVALIDDATA);
436 ok(constant_table == NULL, "D3DXGetShaderConstantTableEx() failed, got %p\n", constant_table);
437
438 /* With invalid CTAB data */
440 ok(hr == D3DXERR_INVALIDDATA || broken(hr == D3D_OK), /* winxp 64-bit, w2k3 64-bit */
441 "Got result %x, expected %x (D3DXERR_INVALIDDATA)\n", hr, D3DXERR_INVALIDDATA);
442 if (constant_table) ID3DXConstantTable_Release(constant_table);
443
444 hr = D3DXGetShaderConstantTableEx(simple_fx, 0, &constant_table);
445 ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr);
446 ok(!constant_table, "D3DXGetShaderConstantTableEx() returned a non-NULL constant table.\n");
447
448 hr = D3DXGetShaderConstantTableEx(simple_tx, 0, &constant_table);
449 ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr);
450 ok(!constant_table, "D3DXGetShaderConstantTableEx() returned a non-NULL constant table.\n");
451
452 hr = D3DXGetShaderConstantTableEx(shader_with_ctab, 0, &constant_table);
453 ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr);
454 ok(constant_table != NULL, "D3DXGetShaderConstantTableEx() failed, got NULL\n");
455
456 if (constant_table)
457 {
458 size = ID3DXConstantTable_GetBufferSize(constant_table);
459 ok(size == 28, "Got result %x, expected 28\n", size);
460
462 ok(!memcmp(data, shader_with_ctab + 6, size), "Retrieved wrong CTAB data\n");
463
464 hr = ID3DXConstantTable_GetDesc(constant_table, NULL);
465 ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
466
467 hr = ID3DXConstantTable_GetDesc(constant_table, &desc);
468 ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr);
469 ok(desc.Creator == (const char *)data + 0x10, "Got result %p, expected %p\n",
470 desc.Creator, (const char *)data + 0x10);
471 ok(desc.Version == D3DVS_VERSION(3, 0), "Got result %x, expected %x\n", desc.Version, D3DVS_VERSION(3, 0));
472 ok(desc.Constants == 0, "Got result %x, expected 0\n", desc.Constants);
473
474 ID3DXConstantTable_Release(constant_table);
475 }
476
478 ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr);
479 ok(constant_table != NULL, "D3DXGetShaderConstantTableEx() failed, got NULL\n");
480
481 if (constant_table)
482 {
484 D3DXCONSTANT_DESC constant_desc;
485 D3DXCONSTANT_DESC constant_desc_save;
486 UINT nb;
487
488 /* Test GetDesc */
489 hr = ID3DXConstantTable_GetDesc(constant_table, &desc);
490 ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr);
491 ok(!strcmp(desc.Creator, "Wine project"), "Got result '%s', expected 'Wine project'\n", desc.Creator);
492 ok(desc.Version == D3DVS_VERSION(3, 0), "Got result %x, expected %x\n", desc.Version, D3DVS_VERSION(3, 0));
493 ok(desc.Constants == 3, "Got result %x, expected 3\n", desc.Constants);
494
495 /* Test GetConstant */
496 constant = ID3DXConstantTable_GetConstant(constant_table, NULL, 0);
497 ok(constant != NULL, "No constant found\n");
498 hr = ID3DXConstantTable_GetConstantDesc(constant_table, constant, &constant_desc, &nb);
499 ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr);
500 ok(!strcmp(constant_desc.Name, "Constant1"), "Got result '%s', expected 'Constant1'\n",
501 constant_desc.Name);
502 ok(constant_desc.Class == D3DXPC_VECTOR, "Got result %x, expected %u (D3DXPC_VECTOR)\n",
503 constant_desc.Class, D3DXPC_VECTOR);
504 ok(constant_desc.Type == D3DXPT_FLOAT, "Got result %x, expected %u (D3DXPT_FLOAT)\n",
505 constant_desc.Type, D3DXPT_FLOAT);
506 ok(constant_desc.Rows == 1, "Got result %x, expected 1\n", constant_desc.Rows);
507 ok(constant_desc.Columns == 4, "Got result %x, expected 4\n", constant_desc.Columns);
508
509 constant = ID3DXConstantTable_GetConstant(constant_table, NULL, 1);
510 ok(constant != NULL, "No constant found\n");
511 hr = ID3DXConstantTable_GetConstantDesc(constant_table, constant, &constant_desc, &nb);
512 ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr);
513 ok(!strcmp(constant_desc.Name, "Constant2"), "Got result '%s', expected 'Constant2'\n",
514 constant_desc.Name);
515 ok(constant_desc.Class == D3DXPC_MATRIX_COLUMNS, "Got result %x, expected %u (D3DXPC_MATRIX_COLUMNS)\n",
516 constant_desc.Class, D3DXPC_MATRIX_COLUMNS);
517 ok(constant_desc.Type == D3DXPT_FLOAT, "Got result %x, expected %u (D3DXPT_FLOAT)\n",
518 constant_desc.Type, D3DXPT_FLOAT);
519 ok(constant_desc.Rows == 4, "Got result %x, expected 1\n", constant_desc.Rows);
520 ok(constant_desc.Columns == 4, "Got result %x, expected 4\n", constant_desc.Columns);
521
522 constant = ID3DXConstantTable_GetConstant(constant_table, NULL, 2);
523 ok(constant != NULL, "No constant found\n");
524 hr = ID3DXConstantTable_GetConstantDesc(constant_table, constant, &constant_desc, &nb);
525 ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr);
526 ok(!strcmp(constant_desc.Name, "Constant3"), "Got result '%s', expected 'Constant3'\n",
527 constant_desc.Name);
528 ok(constant_desc.Class == D3DXPC_MATRIX_COLUMNS, "Got result %x, expected %u (D3DXPC_MATRIX_COLUMNS)\n",
529 constant_desc.Class, D3DXPC_MATRIX_COLUMNS);
530 ok(constant_desc.Type == D3DXPT_FLOAT, "Got result %x, expected %u (D3DXPT_FLOAT)\n",
531 constant_desc.Type, D3DXPT_FLOAT);
532 ok(constant_desc.Rows == 4, "Got result %x, expected 1\n", constant_desc.Rows);
533 ok(constant_desc.Columns == 4, "Got result %x, expected 4\n", constant_desc.Columns);
534 constant_desc_save = constant_desc; /* For GetConstantDesc test */
535
536 constant = ID3DXConstantTable_GetConstant(constant_table, NULL, 3);
537 ok(constant == NULL, "Got result %p, expected NULL\n", constant);
538
539 /* Test GetConstantByName */
540 constant = ID3DXConstantTable_GetConstantByName(constant_table, NULL, "Constant unknown");
541 ok(constant == NULL, "Got result %p, expected NULL\n", constant);
542 constant = ID3DXConstantTable_GetConstantByName(constant_table, NULL, "Constant3");
543 ok(constant != NULL, "No constant found\n");
544 hr = ID3DXConstantTable_GetConstantDesc(constant_table, constant, &constant_desc, &nb);
545 ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr);
546 ok(!memcmp(&constant_desc, &constant_desc_save, sizeof(D3DXCONSTANT_DESC)), "Got different constant data\n");
547
548 /* Test GetConstantDesc */
549 constant = ID3DXConstantTable_GetConstant(constant_table, NULL, 0);
550 ok(constant != NULL, "No constant found\n");
551 hr = ID3DXConstantTable_GetConstantDesc(constant_table, NULL, &constant_desc, &nb);
552 ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
553 hr = ID3DXConstantTable_GetConstantDesc(constant_table, constant, NULL, &nb);
554 ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr);
555 hr = ID3DXConstantTable_GetConstantDesc(constant_table, constant, &constant_desc, NULL);
556 ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr);
557 hr = ID3DXConstantTable_GetConstantDesc(constant_table, "Constant unknown", &constant_desc, &nb);
558 ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
559 hr = ID3DXConstantTable_GetConstantDesc(constant_table, "Constant3", &constant_desc, &nb);
560 ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr);
561 ok(!memcmp(&constant_desc, &constant_desc_save, sizeof(D3DXCONSTANT_DESC)), "Got different constant data\n");
562
563 ID3DXConstantTable_Release(constant_table);
564 }
565
567 ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr);
568 ok(!constant_table, "D3DXGetShaderConstantTableEx() returned a non-NULL constant table.\n");
569}
#define broken(x)
Definition: _sntprintf.h:21
#define D3DVS_VERSION(major, minor)
Definition: d3d8types.h:475
@ D3DXPC_MATRIX_COLUMNS
Definition: d3dx9shader.h:65
@ D3DXPC_VECTOR
Definition: d3dx9shader.h:63
#define ID3DXConstantTable_GetBufferPointer(p)
Definition: d3dx9shader.h:179
#define ID3DXConstantTable_GetBufferSize(p)
Definition: d3dx9shader.h:180
#define ID3DXConstantTable_GetDesc(p, a)
Definition: d3dx9shader.h:182
@ D3DXPT_FLOAT
Definition: d3dx9shader.h:76
#define ID3DXConstantTable_GetConstant(p, a, b)
Definition: d3dx9shader.h:185
HRESULT WINAPI D3DXGetShaderConstantTableEx(const DWORD *byte_code, DWORD flags, ID3DXConstantTable **constant_table)
Definition: shader.c:1993
static const WCHAR desc[]
Definition: protectdata.c:36
static const DWORD shader_with_ctab_constants[]
Definition: shader.c:73
static const DWORD fx_shader_with_ctab[]
Definition: shader.c:283
static const DWORD shader_with_invalid_ctab[]
Definition: shader.c:66

Referenced by START_TEST().

◆ test_get_shader_constant_variables()

static void test_get_shader_constant_variables ( void  )
static

Definition at line 1830 of file shader.c.

1831{
1832 ID3DXConstantTable *ctable;
1833 HRESULT hr;
1834 ULONG count;
1835 UINT i;
1836 UINT nr = 1;
1839 DWORD *ctab;
1840
1842 ok(hr == D3D_OK, "D3DXGetShaderConstantTable failed, got %08x, expected %08x\n", hr, D3D_OK);
1843
1845 ok(ctab[0] == test_get_shader_constant_variables_blob[3], "ID3DXConstantTable_GetBufferPointer failed\n");
1846
1848 {
1849 const char *fullname = test_get_shader_constant_variables_data[i].fullname;
1850 const D3DXCONSTANT_DESC *expected_desc = &test_get_shader_constant_variables_data[i].desc;
1852
1854 ok(constant != NULL, "GetConstantByName \"%s\" failed\n", fullname);
1855
1857 ok(hr == D3D_OK, "GetConstantDesc \"%s\" failed, got %08x, expected %08x\n", fullname, hr, D3D_OK);
1858
1859 ok(!strcmp(expected_desc->Name, desc.Name), "GetConstantDesc \"%s\" failed, got \"%s\", expected \"%s\"\n",
1860 fullname, desc.Name, expected_desc->Name);
1861 ok(expected_desc->RegisterSet == desc.RegisterSet, "GetConstantDesc \"%s\" failed, got %#x, expected %#x\n",
1862 fullname, desc.RegisterSet, expected_desc->RegisterSet);
1863 ok(expected_desc->RegisterIndex == desc.RegisterIndex, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
1864 fullname, desc.RegisterIndex, expected_desc->RegisterIndex);
1865 ok(expected_desc->RegisterCount == desc.RegisterCount, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
1866 fullname, desc.RegisterCount, expected_desc->RegisterCount);
1867 ok(expected_desc->Class == desc.Class, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
1868 fullname, desc.Class, expected_desc->Class);
1869 ok(expected_desc->Type == desc.Type, "GetConstantDesc \"%s\" failed, got %#x, expected %#x\n",
1870 fullname, desc.Type, expected_desc->Type);
1871 ok(expected_desc->Rows == desc.Rows, "GetConstantDesc \"%s\" failed, got %#x, expected %#x\n",
1872 fullname, desc.Rows, expected_desc->Rows);
1873 ok(expected_desc->Columns == desc.Columns, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
1874 fullname, desc.Columns, expected_desc->Columns);
1875 ok(expected_desc->Elements == desc.Elements, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
1876 fullname, desc.Elements, expected_desc->Elements);
1877 ok(expected_desc->StructMembers == desc.StructMembers, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
1878 fullname, desc.StructMembers, expected_desc->StructMembers);
1879 ok(expected_desc->Bytes == desc.Bytes, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
1880 fullname, desc.Bytes, expected_desc->Bytes);
1881 ok(ctaboffset == (DWORD *)desc.DefaultValue - ctab, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
1882 fullname, (UINT)((DWORD *)desc.DefaultValue - ctab), ctaboffset);
1883 }
1884
1886 ok(element == NULL, "GetConstantElement failed\n");
1887
1889 ok(constant != NULL, "GetConstantByName failed\n");
1890
1892 ok(constant == element, "GetConstantByName failed, got %p, expected %p\n", element, constant);
1893
1895 ok(element == constant, "GetConstantElement failed, got %p, expected %p\n", element, constant);
1896
1898 ok(constant != NULL, "GetConstantByName failed\n");
1899
1901 ok(element == constant, "GetConstant failed, got %p, expected %p\n", element, constant);
1902
1904 ok(element == NULL, "GetConstant failed\n");
1905
1907 ok(element == NULL, "GetConstant failed\n");
1908
1910 ok(constant == element, "GetConstantByName failed, got %p, expected %p\n", element, constant);
1911
1913 ok(NULL == element, "GetConstantByName failed\n");
1914
1916 ok(constant == element, "GetConstantByName failed, got %p, expected %p\n", element, constant);
1917
1919 ok(element == NULL, "GetConstantByName failed\n");
1920
1922 ok(element == constant, "GetConstantElement failed, got %p, expected %p\n", element, constant);
1923
1925 ok(element == NULL, "GetConstantElement failed\n");
1926
1928 ok(constant != NULL, "GetConstantByName failed\n");
1929
1931 ok(element != constant, "GetConstantByName failed, got %p, expected %p\n", element, constant);
1932
1934 ok(element == constant, "GetConstantElement failed, got %p, expected %p\n", element, constant);
1935
1937 ok(constant != NULL, "GetConstantByName failed\n");
1938
1940 ok(element == constant, "GetConstantElement failed, got %p, expected %p\n", element, constant);
1941
1943 ok(constant != NULL, "GetConstantByName failed\n");
1944
1946 ok(element == constant, "GetConstant failed, got %p, expected %p\n", element, constant);
1947
1949 ok(element == constant, "GetConstantByName failed, got %p, expected %p\n", element, constant);
1950
1951 element = ID3DXConstantTable_GetConstantByName(ctable, "s_2[0]", "invalid");
1952 ok(element == NULL, "GetConstantByName failed\n");
1953
1955 ok(constant != NULL, "GetConstantByName failed\n");
1956
1958 ok(constant == element, "GetConstantByName failed, got %p, expected %p\n", element, constant);
1959
1961 ok(count == 0, "Release failed, got %u, expected %u\n", count, 0);
1962}
#define ID3DXConstantTable_GetConstantElement(p, a, b)
Definition: d3dx9shader.h:187
ULONG nr
Definition: thread.c:7
const struct @1649 test_get_shader_constant_variables_data[]
static const DWORD test_get_shader_constant_variables_blob[]
Definition: shader.c:1700
UINT ctaboffset
Definition: shader.c:1768
const char * fullname
Definition: shader.c:1766

Referenced by START_TEST().

◆ test_get_shader_samplers()

static void test_get_shader_samplers ( void  )
static

Definition at line 1592 of file shader.c.

1593{
1594 const char *samplers[16] = {NULL}; /* maximum number of sampler registers v/ps 3.0 = 16 */
1595 const char *sampler_orig;
1596 UINT count = 2;
1597 HRESULT hr;
1598
1599if (0)
1600{
1601 /* crashes if bytecode is NULL */
1603 ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %x, expected %x\n", hr, D3D_OK);
1604}
1605
1607 ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %x, expected %x\n", hr, D3D_OK);
1608
1609 samplers[5] = "dummy";
1610
1612 ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %x, expected %x\n", hr, D3D_OK);
1613
1614 /* check that sampler points to shader blob */
1615 sampler_orig = (const char *)&get_shader_samplers_blob[0x2e];
1616 ok(sampler_orig == samplers[0], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[0], sampler_orig);
1617
1618 sampler_orig = (const char *)&get_shader_samplers_blob[0x33];
1619 ok(sampler_orig == samplers[1], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[1], sampler_orig);
1620
1621 sampler_orig = (const char *)&get_shader_samplers_blob[0x38];
1622 ok(sampler_orig == samplers[2], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[2], sampler_orig);
1623
1624 sampler_orig = (const char *)&get_shader_samplers_blob[0x3d];
1625 ok(sampler_orig == samplers[3], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[3], sampler_orig);
1626
1627 sampler_orig = (const char *)&get_shader_samplers_blob[0x42];
1628 ok(sampler_orig == samplers[4], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[4], sampler_orig);
1629
1630 ok(!strcmp(samplers[5], "dummy"), "D3DXGetShaderSamplers failed, got \"%s\", expected \"%s\"\n", samplers[5], "dummy");
1631
1632 /* reset samplers */
1633 memset(samplers, 0, sizeof(samplers));
1634 samplers[5] = "dummy";
1635
1637 ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %x, expected %x\n", hr, D3D_OK);
1638 ok(count == 5, "D3DXGetShaderSamplers failed, got %u, expected %u\n", count, 5);
1639
1641 ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %x, expected %x\n", hr, D3D_OK);
1642 ok(count == 5, "D3DXGetShaderSamplers failed, got %u, expected %u\n", count, 5);
1643
1644 /* check that sampler points to shader blob */
1645 sampler_orig = (const char *)&get_shader_samplers_blob[0x2e];
1646 ok(sampler_orig == samplers[0], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[0], sampler_orig);
1647
1648 sampler_orig = (const char *)&get_shader_samplers_blob[0x33];
1649 ok(sampler_orig == samplers[1], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[1], sampler_orig);
1650
1651 sampler_orig = (const char *)&get_shader_samplers_blob[0x38];
1652 ok(sampler_orig == samplers[2], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[2], sampler_orig);
1653
1654 sampler_orig = (const char *)&get_shader_samplers_blob[0x3d];
1655 ok(sampler_orig == samplers[3], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[3], sampler_orig);
1656
1657 sampler_orig = (const char *)&get_shader_samplers_blob[0x42];
1658 ok(sampler_orig == samplers[4], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[4], sampler_orig);
1659
1660 ok(!strcmp(samplers[5], "dummy"), "D3DXGetShaderSamplers failed, got \"%s\", expected \"%s\"\n", samplers[5], "dummy");
1661
1662 /* check without ctab */
1664 ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %x, expected %x\n", hr, D3D_OK);
1665 ok(count == 0, "D3DXGetShaderSamplers failed, got %u, expected %u\n", count, 0);
1666
1667 /* check invalid ctab */
1669 ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %x, expected %x\n", hr, D3D_OK);
1670 ok(count == 0, "D3DXGetShaderSamplers failed, got %u, expected %u\n", count, 0);
1671}
HRESULT WINAPI D3DXGetShaderSamplers(const DWORD *byte_code, const char **samplers, UINT *count)
Definition: shader.c:2332
GLuint * samplers
Definition: glext.h:7280
static const DWORD get_shader_samplers_blob[]
Definition: shader.c:1551

Referenced by START_TEST().

◆ test_get_shader_size()

static void test_get_shader_size ( void  )
static

Definition at line 302 of file shader.c.

303{
304 UINT shader_size, expected;
305
306 shader_size = D3DXGetShaderSize(simple_vs);
307 expected = sizeof(simple_vs);
308 ok(shader_size == expected, "Got shader size %u, expected %u\n", shader_size, expected);
309
310 shader_size = D3DXGetShaderSize(simple_ps);
311 expected = sizeof(simple_ps);
312 ok(shader_size == expected, "Got shader size %u, expected %u\n", shader_size, expected);
313
314 shader_size = D3DXGetShaderSize(NULL);
315 ok(shader_size == 0, "Got shader size %u, expected 0\n", shader_size);
316}
UINT WINAPI D3DXGetShaderSize(const DWORD *byte_code)
Definition: shader.c:91

Referenced by START_TEST().

◆ test_get_shader_version()

static void test_get_shader_version ( void  )
static

Definition at line 318 of file shader.c.

319{
320 DWORD shader_version;
321
322 shader_version = D3DXGetShaderVersion(simple_vs);
323 ok(shader_version == D3DVS_VERSION(1, 1), "Got shader version 0x%08x, expected 0x%08x\n",
324 shader_version, D3DVS_VERSION(1, 1));
325
326 shader_version = D3DXGetShaderVersion(simple_ps);
327 ok(shader_version == D3DPS_VERSION(1, 1), "Got shader version 0x%08x, expected 0x%08x\n",
328 shader_version, D3DPS_VERSION(1, 1));
329
330 shader_version = D3DXGetShaderVersion(NULL);
331 ok(shader_version == 0, "Got shader version 0x%08x, expected 0\n", shader_version);
332}
#define D3DPS_VERSION(major, minor)
Definition: d3d8types.h:474
DWORD WINAPI D3DXGetShaderVersion(const DWORD *byte_code)
Definition: shader.c:114

Referenced by START_TEST().

◆ test_registerset()

static void test_registerset ( void  )
static

Definition at line 6015 of file shader.c.

6016{
6017 UINT k;
6018 HWND wnd;
6019 IDirect3D9 *d3d;
6020 IDirect3DDevice9 *device;
6022 HRESULT hr;
6023 ULONG count;
6024 D3DCAPS9 caps;
6025
6026 if (!(wnd = CreateWindowA("static", "d3dx9_test", WS_OVERLAPPEDWINDOW, 0, 0,
6027 640, 480, NULL, NULL, NULL, NULL)))
6028 {
6029 skip("Couldn't create application window\n");
6030 return;
6031 }
6032 if (!(d3d = Direct3DCreate9(D3D_SDK_VERSION)))
6033 {
6034 skip("Couldn't create IDirect3D9 object\n");
6035 DestroyWindow(wnd);
6036 return;
6037 }
6038
6039 ZeroMemory(&d3dpp, sizeof(d3dpp));
6040 d3dpp.Windowed = TRUE;
6043 if (FAILED(hr))
6044 {
6045 skip("Failed to create IDirect3DDevice9 object %#x\n", hr);
6046 IDirect3D9_Release(d3d);
6047 DestroyWindow(wnd);
6048 return;
6049 }
6050
6052 ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr);
6053 if (caps.VertexShaderVersion < D3DVS_VERSION(3, 0)
6054 || caps.PixelShaderVersion < D3DPS_VERSION(3, 0))
6055 {
6056 skip("Skipping: Test requires VS >= 3 and PS >= 3.\n");
6058 IDirect3D9_Release(d3d);
6059 DestroyWindow(wnd);
6060 return;
6061 }
6062
6063 for (k = 0; k < ARRAY_SIZE(registerset_data); ++k)
6064 {
6065 const char *tablename = registerset_data[k].name;
6066 const char *name = registerset_data[k].var;
6067 ID3DXConstantTable *ctable;
6070 UINT i;
6071 BOOL is_vs;
6072 DWORD *ctab;
6073
6075 ok(hr == D3D_OK, "D3DXGetShaderConstantTable \"%s\" failed, got %08x, expected %08x\n", tablename, hr, D3D_OK);
6076
6078 ok(hr == D3D_OK, "GetDesc \"%s\" failed, got %08x, expected %08x\n", tablename, hr, D3D_OK);
6079
6081 ok(ctab[0] == registerset_data[k].blob[3], "ID3DXConstantTable_GetBufferPointer failed\n");
6082
6083 is_vs = (tdesc.Version & 0xFFFF0000) == 0xFFFE0000;
6084
6085 for (i = 0; i < registerset_data[k].constant_count; ++i)
6086 {
6087 const char *fullname = registerset_data[k].constants[i].fullname;
6088 const D3DXCONSTANT_DESC *expected_desc = &registerset_data[k].constants[i].desc;
6090 UINT nr = 0;
6091 UINT ctaboffset = registerset_data[k].constants[i].ctaboffset;
6092
6094 ok(constant != NULL, "GetConstantByName \"%s\" failed\n", fullname);
6095
6097 ok(hr == D3D_OK, "GetConstantDesc \"%s\" failed, got %08x, expected %08x\n", fullname, hr, D3D_OK);
6098
6099 ok(!strcmp(expected_desc->Name, desc.Name), "GetConstantDesc \"%s\" failed, got \"%s\", expected \"%s\"\n",
6100 fullname, desc.Name, expected_desc->Name);
6101 ok(expected_desc->RegisterSet == desc.RegisterSet, "GetConstantDesc \"%s\" failed, got %#x, expected %#x\n",
6102 fullname, desc.RegisterSet, expected_desc->RegisterSet);
6103 ok(expected_desc->RegisterIndex == desc.RegisterIndex,
6104 "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
6105 fullname, desc.RegisterIndex, expected_desc->RegisterIndex);
6106 ok(expected_desc->RegisterCount == desc.RegisterCount,
6107 "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
6108 fullname, desc.RegisterCount, expected_desc->RegisterCount);
6109 ok(expected_desc->Class == desc.Class, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
6110 fullname, desc.Class, expected_desc->Class);
6111 ok(expected_desc->Type == desc.Type, "GetConstantDesc \"%s\" failed, got %#x, expected %#x\n",
6112 fullname, desc.Type, expected_desc->Type);
6113 ok(expected_desc->Rows == desc.Rows, "GetConstantDesc \"%s\" failed, got %#x, expected %#x\n",
6114 fullname, desc.Rows, expected_desc->Rows);
6115 ok(expected_desc->Columns == desc.Columns, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
6116 fullname, desc.Columns, expected_desc->Columns);
6117 ok(expected_desc->Elements == desc.Elements, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
6118 fullname, desc.Elements, expected_desc->Elements);
6119 ok(expected_desc->StructMembers == desc.StructMembers,
6120 "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
6121 fullname, desc.StructMembers, expected_desc->StructMembers);
6122 ok(expected_desc->Bytes == desc.Bytes, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
6123 fullname, desc.Bytes, expected_desc->Bytes);
6124 if (ctaboffset)
6125 {
6126 ok(ctaboffset == (DWORD *)desc.DefaultValue - ctab,
6127 "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
6128 fullname, (UINT)((DWORD *)desc.DefaultValue - ctab), ctaboffset);
6129 }
6130 }
6131
6133 ok(constant != NULL, "GetConstantByName \"%s\" \"%s\" failed\n", tablename, name);
6134
6135 for (i = 0; i < registerset_data[k].test_count; ++i)
6136 {
6137 const struct registerset_test *test = &registerset_data[k].tests[i];
6138 UINT ret;
6139
6141
6142 hr = registerset_apply(ctable, device, constant, test->in_index, test->in_count_min, test->type);
6143 ok(hr == D3D_OK, "Set* \"%s\" index %u, count %u failed, got %x, expected %x\n", tablename, i,
6144 test->in_count_min, hr, D3D_OK);
6145
6147 registerset_data[k].start, test->out_count, test->out);
6148 ok(ret == 0, "Get*ShaderConstant \"%s\" index %u, count %u failed\n", tablename, i, test->in_count_min);
6149
6150 if (test->in_count_max > test->in_count_min)
6151 {
6153
6154 hr = registerset_apply(ctable, device, constant, test->in_index, test->in_count_max, test->type);
6155 ok(hr == D3D_OK, "Set* \"%s\" index %u, count %u failed, got %x, expected %x\n", tablename, i,
6156 test->in_count_max, hr, D3D_OK);
6157
6159 registerset_data[k].start, test->out_count, test->out);
6160 ok(ret == 0, "Get*ShaderConstant \"%s\" index %u, count %u failed\n", tablename, i, test->in_count_max);
6161 }
6162 }
6163
6165 ok(count == 0, "Release \"%s\" failed, got %u, expected %u\n", tablename, count, 0);
6166 }
6167
6168 /* Release resources */
6170 ok(count == 0, "The Direct3D device reference count was %u, should be 0\n", count);
6171
6173 ok(count == 0, "The Direct3D object reference count was %u, should be 0\n", count);
6174
6175 if (wnd) DestroyWindow(wnd);
6176}
#define IDirect3DDevice9_GetDeviceCaps(p, a)
Definition: d3d9.h:1514
static const struct @1650 registerset_data[]
static void registerset_clear(IDirect3DDevice9 *device)
Definition: shader.c:5864
static UINT registerset_compare_all(IDirect3DDevice9 *device, BOOL is_vs, D3DXREGISTER_SET regset, UINT start, UINT in_count, const DWORD *expected)
Definition: shader.c:5945
static HRESULT registerset_apply(ID3DXConstantTable *ctable, IDirect3DDevice9 *device, D3DXHANDLE constant, UINT index, DWORD count, enum Type type)
Definition: shader.c:5964
int k
Definition: mpi.c:3369
#define test
Definition: rosglue.h:37
DWORD PixelShaderVersion
Definition: d3d9caps.h:315
DWORD VertexShaderVersion
Definition: d3d9caps.h:313
Definition: image.c:134
Definition: name.c:39

Referenced by START_TEST().

◆ test_registerset_defaults()

static void test_registerset_defaults ( void  )
static

Definition at line 6320 of file shader.c.

6321{
6322 UINT k;
6323 HWND wnd;
6324 IDirect3D9 *d3d;
6325 IDirect3DDevice9 *device;
6327 HRESULT hr;
6328 ULONG count;
6329 D3DCAPS9 caps;
6330
6331 if (!(wnd = CreateWindowA("static", "d3dx9_test", WS_OVERLAPPEDWINDOW, 0, 0,
6332 640, 480, NULL, NULL, NULL, NULL)))
6333 {
6334 skip("Couldn't create application window\n");
6335 return;
6336 }
6337 if (!(d3d = Direct3DCreate9(D3D_SDK_VERSION)))
6338 {
6339 skip("Couldn't create IDirect3D9 object\n");
6340 DestroyWindow(wnd);
6341 return;
6342 }
6343
6344 ZeroMemory(&d3dpp, sizeof(d3dpp));
6345 d3dpp.Windowed = TRUE;
6348 if (FAILED(hr))
6349 {
6350 skip("Failed to create IDirect3DDevice9 object %#x\n", hr);
6351 IDirect3D9_Release(d3d);
6352 DestroyWindow(wnd);
6353 return;
6354 }
6355
6357 ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr);
6358 if (caps.VertexShaderVersion < D3DVS_VERSION(3, 0)
6359 || caps.PixelShaderVersion < D3DPS_VERSION(3, 0))
6360 {
6361 skip("Skipping: Test requires VS >= 3 and PS >= 3.\n");
6363 IDirect3D9_Release(d3d);
6364 DestroyWindow(wnd);
6365 return;
6366 }
6367
6368 for (k = 0; k < ARRAY_SIZE(registerset_defaults_data); ++k)
6369 {
6370 const char *tablename = registerset_defaults_data[k].name;
6371 ID3DXConstantTable *ctable;
6373 BOOL is_vs;
6374 UINT ret;
6375
6377 ok(hr == D3D_OK, "D3DXGetShaderConstantTable \"%s\" failed, got %08x, expected %08x\n", tablename, hr, D3D_OK);
6378
6380 ok(hr == D3D_OK, "GetDesc \"%s\" failed, got %08x, expected %08x\n", tablename, hr, D3D_OK);
6381
6382 is_vs = (tdesc.Version & 0xFFFF0000) == 0xFFFE0000;
6383
6385
6387 ok(hr == D3D_OK, "SetDefaults \"%s\" failed, got %08x, expected %08x\n", tablename, hr, D3D_OK);
6388
6391 ok(ret == 0, "Get*ShaderConstantF \"%s\" failed\n", tablename);
6392
6395 ok(ret == 0, "Get*ShaderConstantI \"%s\" failed\n", tablename);
6396
6399 ok(ret == 0, "Get*ShaderConstantB \"%s\" failed\n", tablename);
6400
6402 ok(count == 0, "Release \"%s\" failed, got %u, expected %u\n", tablename, count, 0);
6403 }
6404
6405 /* Release resources */
6407 ok(count == 0, "The Direct3D device reference count was %u, should be 0\n", count);
6408
6410 ok(count == 0, "The Direct3D object reference count was %u, should be 0\n", count);
6411
6412 if (wnd) DestroyWindow(wnd);
6413}
#define ID3DXConstantTable_SetDefaults(p, a)
Definition: d3dx9shader.h:188
const DWORD floats[1024]
Definition: shader.c:6191
unsigned int float_count
Definition: shader.c:6188
static const struct @1651 registerset_defaults_data[]
unsigned int bool_count
Definition: shader.c:6190
const DWORD bools[16]
Definition: shader.c:6193
unsigned int int_count
Definition: shader.c:6189
const DWORD ints[256]
Definition: shader.c:6192

Referenced by START_TEST().

◆ test_SetDefaults()

static void test_SetDefaults ( IDirect3DDevice9 *  device)
static

Definition at line 1198 of file shader.c.

1199{
1200 static const D3DXMATRIX mvp = {{{
1201 0.51f, 0.62f, 0.80f, 0.78f,
1202 0.23f, 0.95f, 0.37f, 0.48f,
1203 0.10f, 0.58f, 0.90f, 0.25f,
1204 0.89f, 0.41f, 0.93f, 0.27f}}};
1205 static const D3DXVECTOR4 f4 = {0.2f, 0.4f, 0.8f, 1.2f};
1206
1207 float out[16];
1208
1209 HRESULT res;
1210 ID3DXConstantTable *ctable;
1211
1213 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %08x\n", res);
1214
1216 ok(res == D3D_OK, "ID3DXConstantTable_SetVector failed: got %08x\n", res);
1217
1219 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed: got %08x\n", res);
1220
1222 ok(res == D3D_OK, "ID3dXConstantTable_SetDefaults failed: got %08x\n", res);
1223
1224 /* SetDefaults doesn't change constants without default values */
1226 ok(out[0] == S(U(mvp))._11 && out[4] == S(U(mvp))._12 && out[8] == S(U(mvp))._13 && out[12] == S(U(mvp))._14,
1227 "The first row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1228 out[0], out[4], out[8], out[12], S(U(mvp))._11, S(U(mvp))._12, S(U(mvp))._13, S(U(mvp))._14);
1229 ok(out[1] == S(U(mvp))._21 && out[5] == S(U(mvp))._22 && out[9] == S(U(mvp))._23 && out[13] == S(U(mvp))._24,
1230 "The second row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1231 out[1], out[5], out[9], out[13], S(U(mvp))._21, S(U(mvp))._22, S(U(mvp))._23, S(U(mvp))._24);
1232 ok(out[2] == S(U(mvp))._31 && out[6] == S(U(mvp))._32 && out[10] == S(U(mvp))._33 && out[14] == S(U(mvp))._34,
1233 "The third row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1234 out[2], out[6], out[10], out[14], S(U(mvp))._31, S(U(mvp))._32, S(U(mvp))._33, S(U(mvp))._34);
1235 ok(out[3] == S(U(mvp))._41 && out[7] == S(U(mvp))._42 && out[11] == S(U(mvp))._43 && out[15] == S(U(mvp))._44,
1236 "The fourth row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1237 out[3], out[7], out[11], out[15], S(U(mvp))._41, S(U(mvp))._42, S(U(mvp))._43, S(U(mvp))._44);
1238
1240 ok(memcmp(out, &f4, sizeof(f4)) == 0,
1241 "The variable f4 was not set correctly, out={%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1242 out[0], out[1], out[2], out[3], f4.x, f4.y, f4.z, f4.w);
1243
1245
1247 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %08x\n", res);
1248
1250 ok(res == D3D_OK, "ID3DXConstantTable_SetDefaults failed: got %08x\n", res);
1251
1254 "The variable mat4 was not set correctly to default value\n");
1255
1258 "The variable mat3 was not set correctly to default value\n");
1259
1262 "The variable array was not set correctly to default value\n");
1263
1266 "The variable vec4 was not set correctly to default value\n");
1267
1270 "The variable flt was not set correctly to default value\n");
1271
1273}
#define U(x)
Definition: wordpad.c:45
#define _11
Definition: ke_i.h:85
static const float mat3_default_value[]
Definition: shader.c:248
static const float flt_default_value[]
Definition: shader.c:251
static const float vec4_default_value[]
Definition: shader.c:250
static const float arr_default_value[]
Definition: shader.c:249
static const float mat4_default_value[]
Definition: shader.c:247
static FILE * out
Definition: regtests2xml.c:44
#define S(x)
Definition: test.h:217
#define f4(x, y, z)
Definition: sha1.c:33

Referenced by test_setting_constants().

◆ test_setting_arrays_table()

static void test_setting_arrays_table ( IDirect3DDevice9 *  device)
static

Definition at line 1086 of file shader.c.

1087{
1088 static const float farray[8] = {
1089 0.005f, 0.745f, 0.973f, 0.264f,
1090 0.010f, 0.020f, 0.030f, 0.040f};
1091 static const D3DXMATRIX fmtxarray[2] = {
1092 {{{0.001f, 0.002f, 0.003f, 0.004f,
1093 0.005f, 0.006f, 0.007f, 0.008f,
1094 0.009f, 0.010f, 0.011f, 0.012f,
1095 0.013f, 0.014f, 0.015f, 0.016f}}},
1096 {{{0.010f, 0.020f, 0.030f, 0.040f,
1097 0.050f, 0.060f, 0.070f, 0.080f,
1098 0.090f, 0.100f, 0.110f, 0.120f,
1099 0.130f, 0.140f, 0.150f, 0.160f}}}};
1100 static const int iarray[4] = {1, 2, 3, 4};
1101 static const D3DXVECTOR4 fvecarray[2] = {
1102 {0.745f, 0.997f, 0.353f, 0.237f},
1103 {0.060f, 0.455f, 0.333f, 0.983f}};
1104 static BOOL barray[4] = {FALSE, 100, TRUE, TRUE};
1105
1106 ID3DXConstantTable *ctable;
1107
1108 HRESULT res;
1109 float out[32];
1110 ULONG refcnt;
1111
1112 /* Clear registers */
1113 memset(out, 0, sizeof(out));
1116
1117 /* Get the constant table from the shader */
1119 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got 0x%08x\n", res);
1120
1121 /* Set constants */
1122
1123 /* Make sure that we cannot set registers that do not belong to this constant */
1124 res = ID3DXConstantTable_SetFloatArray(ctable, device, "farray", farray, 8);
1125 ok(res == D3D_OK, "ID3DXConstantTable_SetFloatArray failed: got 0x%08x\n", res);
1126
1128 ok(out[0] == farray[0] && out[4] == farray[1] && out[8] == farray[2] && out[12] == farray[3],
1129 "The in-bounds elements of the array were not set, out={%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1130 out[0], out[4], out[8], out[12], farray[0], farray[1], farray[2], farray[3]);
1131 ok(out[16] == 0.0f && out[20] == 0.0f && out[24] == 0.0f && out[28] == 0.0f,
1132 "The excess elements of the array were set, out={%f, %f, %f, %f}, should be all 0.0f\n",
1133 out[16], out[20], out[24], out[28]);
1134
1135 /* ivecarray takes up only 1 register, but a matrix takes up 4, so no elements should be set */
1136 res = ID3DXConstantTable_SetMatrix(ctable, device, "ivecarray", &fmtxarray[0]);
1137 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed: got 0x%08x\n", res);
1138
1140 ok(out[0] == 0.0f && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f,
1141 "The array was set, out={%f, %f, %f, %f}, should be all 0.0f\n", out[0], out[1], out[2], out[3]);
1142
1143 /* Try setting an integer array to an array declared as a float array */
1144 res = ID3DXConstantTable_SetIntArray(ctable, device, "farray", iarray, 4);
1145 ok(res == D3D_OK, "ID3DXConstantTable_SetIntArray failed: got 0x%08x\n", res);
1146
1148 ok(out[0] == iarray[0] && out[4] == iarray[1] && out[8] == iarray[2] && out[12] == iarray[3],
1149 "SetIntArray did not properly set a float array: out={%f, %f, %f, %f}, should be {%d, %d, %d, %d}\n",
1150 out[0], out[4], out[8], out[12], iarray[0], iarray[1], iarray[2], iarray[3]);
1151
1152 res = ID3DXConstantTable_SetFloatArray(ctable, device, "farray", farray, 4);
1153 ok(res == D3D_OK, "ID3DXConstantTable_SetFloatArray failed: got x0%08x\n", res);
1154
1155 res = ID3DXConstantTable_SetVectorArray(ctable, device, "fvecarray", fvecarray, 2);
1156 ok(res == D3D_OK, "ID3DXConstantTable_SetVectorArray failed: got 0x%08x\n", res);
1157
1158 res = ID3DXConstantTable_SetMatrixArray(ctable, device, "fmtxarray", fmtxarray, 2);
1159 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixArray failed: got 0x%08x\n", res);
1160
1161 res = ID3DXConstantTable_SetBoolArray(ctable, device, "barray", barray, 2);
1162 ok(res == D3D_OK, "ID3DXConstantTable_SetBoolArray failed: got 0x%08x\n", res);
1163
1164 /* Read back constants */
1166 ok(out[0] == farray[0] && out[4] == farray[1] && out[8] == farray[2] && out[12] == farray[3],
1167 "The variable farray was not set correctly, out={%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1168 out[0], out[4], out[8], out[12], farray[0], farray[1], farray[2], farray[3]);
1169
1171 ok(out[0] == fvecarray[0].x && out[1] == fvecarray[0].y && out[2] == fvecarray[0].z && out[3] == fvecarray[0].w &&
1172 out[4] == fvecarray[1].x && out[5] == fvecarray[1].y && out[6] == fvecarray[1].z && out[7] == fvecarray[1].w,
1173 "The variable fvecarray was not set correctly, out={{%f, %f, %f, %f}, {%f, %f, %f, %f}}, should be "
1174 "{{%f, %f, %f, %f}, {%f, %f, %f, %f}}\n", out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1175 fvecarray[0].x, fvecarray[0].y, fvecarray[0].z, fvecarray[0].w, fvecarray[1].x, fvecarray[1].y,
1176 fvecarray[1].z, fvecarray[1].w);
1177
1179 ok(out[0] == 0.0f && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f
1180 && out[4] == 1.0f && out[5] == 0.0f && out[6] == 0.0f && out[7] == 0.0f,
1181 "The variable barray was not set correctly, out={%f, %f %f, %f; %f, %f, %f, %f}, should be {%f, %f, %f, %f; %f, %f, %f, %f}\n",
1182 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1183 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f);
1184
1186 /* Just check a few elements in each matrix to make sure fmtxarray was set row-major */
1187 ok(out[0] == S(U(fmtxarray[0]))._11 && out[1] == S(U(fmtxarray[0]))._12 && out[2] == S(U(fmtxarray[0]))._13 && out[3] == S(U(fmtxarray[0]))._14,
1188 "The variable fmtxarray was not set row-major, out={%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1189 out[0], out[1], out[2], out[3], S(U(fmtxarray[0]))._11, S(U(fmtxarray[0]))._12, S(U(fmtxarray[0]))._13, S(U(fmtxarray[0]))._14);
1190 ok(out[16] == S(U(fmtxarray[1]))._11 && out[17] == S(U(fmtxarray[1]))._12 && out[18] == S(U(fmtxarray[1]))._13 && out[19] == S(U(fmtxarray[1]))._14,
1191 "The variable fmtxarray was not set row-major, out={%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1192 out[16], out[17], out[18], out[19], S(U(fmtxarray[1]))._11, S(U(fmtxarray[1]))._12, S(U(fmtxarray[1]))._13, S(U(fmtxarray[1]))._14);
1193
1195 ok(refcnt == 0, "The constant table reference count was %u, should be 0\n", refcnt);
1196}
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
GLdouble GLdouble z
Definition: glext.h:5874

Referenced by test_setting_constants().

◆ test_setting_basic_table()

static void test_setting_basic_table ( IDirect3DDevice9 *  device)
static

Definition at line 665 of file shader.c.

666{
667 static const D3DXMATRIX mvp = {{{
668 0.514f, 0.626f, 0.804f, 0.786f,
669 0.238f, 0.956f, 0.374f, 0.483f,
670 0.109f, 0.586f, 0.900f, 0.255f,
671 0.898f, 0.411f, 0.932f, 0.275f}}};
672 static const D3DXVECTOR4 f4 = {0.350f, 0.526f, 0.925f, 0.021f};
673 static const float f = 0.12543f;
674 static const int i = 321;
675 static const D3DXMATRIX *matrix_pointer[] = {&mvp};
676
677 ID3DXConstantTable *ctable;
678
679 HRESULT res;
680 float out[16];
681 ULONG refcnt;
682
683 /* Get the constant table from the shader itself */
685 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got 0x%08x\n", res);
686
687 /* Set constants */
689 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable mvp: got 0x%08x\n", res);
690
692 ok(res == D3D_OK, "ID3DXConstantTable_SetInt failed on variable i: got 0x%08x\n", res);
693
694 /* Check that setting i again will overwrite the previous value */
696 ok(res == D3D_OK, "ID3DXConstantTable_SetInt failed on variable i: got 0x%08x\n", res);
697
699 ok(res == D3D_OK, "ID3DXConstantTable_SetFloat failed on variable f: got 0x%08x\n", res);
700
702 ok(res == D3D_OK, "ID3DXConstantTable_SetVector failed on variable f4: got 0x%08x\n", res);
703
704 /* Get constants back and validate */
706 ok(out[0] == S(U(mvp))._11 && out[4] == S(U(mvp))._12 && out[8] == S(U(mvp))._13 && out[12] == S(U(mvp))._14,
707 "The first row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
708 out[0], out[4], out[8], out[12], S(U(mvp))._11, S(U(mvp))._12, S(U(mvp))._13, S(U(mvp))._14);
709 ok(out[1] == S(U(mvp))._21 && out[5] == S(U(mvp))._22 && out[9] == S(U(mvp))._23 && out[13] == S(U(mvp))._24,
710 "The second row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
711 out[1], out[5], out[9], out[13], S(U(mvp))._21, S(U(mvp))._22, S(U(mvp))._23, S(U(mvp))._24);
712 ok(out[2] == S(U(mvp))._31 && out[6] == S(U(mvp))._32 && out[10] == S(U(mvp))._33 && out[14] == S(U(mvp))._34,
713 "The third row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
714 out[2], out[6], out[10], out[14], S(U(mvp))._31, S(U(mvp))._32, S(U(mvp))._33, S(U(mvp))._34);
715 ok(out[3] == S(U(mvp))._41 && out[7] == S(U(mvp))._42 && out[11] == S(U(mvp))._43 && out[15] == S(U(mvp))._44,
716 "The fourth row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
717 out[3], out[7], out[11], out[15], S(U(mvp))._41, S(U(mvp))._42, S(U(mvp))._43, S(U(mvp))._44);
718
720 ok(out[0] == (float)i && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f,
721 "The variable i was not set correctly, out={%f, %f, %f, %f}, should be {%d, 0.0, 0.0, 0.0}\n",
722 out[0], out[1], out[2], out[3], i);
723
725 ok(out[0] == f && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f,
726 "The variable f was not set correctly, out={%f, %f, %f, %f}, should be {%f, 0.0, 0.0, 0.0}\n",
727 out[0], out[1], out[2], out[3], f);
728
730 ok(memcmp(out, &f4, sizeof(f4)) == 0,
731 "The variable f4 was not set correctly, out={%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
732 out[0], out[1], out[2], out[3], f4.x, f4.y, f4.z, f4.w);
733
734 /* Finally test using a set* function for one type to set a variable of another type (should succeed) */
736 ok(res == D3D_OK, "ID3DXConstantTable_SetVector failed on variable f: 0x%08x\n", res);
737
739 ok(out[0] == f4.x && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f,
740 "The variable f was not set correctly by ID3DXConstantTable_SetVector, got %f, should be %f\n",
741 out[0], f4.x);
742
743 memset(out, 0, sizeof(out));
746 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable f: 0x%08x\n", res);
747
749 ok(out[0] == S(U(mvp))._11 && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f,
750 "The variable f was not set correctly by ID3DXConstantTable_SetMatrix, got %f, should be %f\n",
751 out[0], S(U(mvp))._11);
752
753 /* Clear registers */
754 memset(out, 0, sizeof(out));
758
759 /* SetVector shouldn't change the value of a matrix constant */
761 ok(res == D3D_OK, "ID3DXConstantTable_SetVector failed on variable f: 0x%08x\n", res);
762
764 ok(out[0] == 0.0f && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f
765 && out[4] == 0.0f && out[5] == 0.0f && out[6] == 0.0f && out[7] == 0.0f
766 && out[8] == 0.0f && out[9] == 0.0f && out[10] == 0.0f && out[11] == 0.0f
767 && out[12] == 0.0f && out[13] == 0.0f && out[14] == 0.0f && out[15] == 0.0f,
768 "The variable mvp was not set correctly by ID3DXConstantTable_SetVector, "
769 "got {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f %f; %f, %f, %f, %f}, "
770 "should be all 0.0f\n",
771 out[0], out[1], out[2], out[3],
772 out[4], out[5], out[6], out[7],
773 out[8], out[9], out[10], out[11],
774 out[12], out[13], out[14], out[15]);
775
777 ok(res == D3D_OK, "ID3DXConstantTable_SetFloat failed on variable mvp: 0x%08x\n", res);
778
780 ok(out[0] == 0.0f && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f
781 && out[4] == 0.0f && out[5] == 0.0f && out[6] == 0.0f && out[7] == 0.0f
782 && out[8] == 0.0f && out[9] == 0.0f && out[10] == 0.0f && out[11] == 0.0f
783 && out[12] == 0.0f && out[13] == 0.0f && out[14] == 0.0f && out[15] == 0.0f,
784 "The variable mvp was not set correctly by ID3DXConstantTable_SetFloat, "
785 "got {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f %f; %f, %f, %f, %f}, "
786 "should be all 0.0f\n",
787 out[0], out[1], out[2], out[3],
788 out[4], out[5], out[6], out[7],
789 out[8], out[9], out[10], out[11],
790 out[12], out[13], out[14], out[15]);
791
793 ok(res == D3D_OK, "ID3DXConstantTable_SetFloat failed on variable f4: 0x%08x\n", res);
794
796 ok(out[0] == 0.0f && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f,
797 "The variable f4 was not set correctly by ID3DXConstantTable_SetFloat, "
798 "got {%f, %f, %f, %f}, should be all 0.0f\n",
799 out[0], out[1], out[2], out[3]);
800
802 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTranspose failed on variable f: 0x%08x\n", res);
803
805 ok(out[0] == S(U(mvp))._11 && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f,
806 "The variable f was not set correctly by ID3DXConstantTable_SetMatrixTranspose, got %f, should be %f\n",
807 out[0], S(U(mvp))._11);
808
810 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTranspose failed on variable f4: 0x%08x\n", res);
811
813 ok(out[0] == S(U(mvp))._11 && out[1] == S(U(mvp))._21 && out[2] == S(U(mvp))._31 && out[3] == S(U(mvp))._41,
814 "The variable f4 was not set correctly by ID3DXConstantTable_SetMatrixTranspose, "
815 "got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
816 out[0], out[1], out[2], out[3],
817 S(U(mvp))._11, S(U(mvp))._21, S(U(mvp))._31, S(U(mvp))._41);
818
819 memset(out, 0, sizeof(out));
821 res = ID3DXConstantTable_SetMatrixPointerArray(ctable, device, "f", matrix_pointer, 1);
822 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixPointerArray failed on variable f: got %#x\n", res);
823
825 ok(out[0] == S(U(mvp))._11 && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f,
826 "The variable f was not set correctly by ID3DXConstantTable_SetMatrixPointerArray, "
827 "got %f, should be %f\n",
828 out[0], S(U(mvp))._11);
829
830 res = ID3DXConstantTable_SetMatrixPointerArray(ctable, device, "f4", matrix_pointer, 1);
831 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixPointerArray failed on variable f4: got %#x\n", res);
832
834 ok(out[0] == S(U(mvp))._11 && out[1] == S(U(mvp))._12 && out[2] == S(U(mvp))._13 && out[3] == S(U(mvp))._14,
835 "The variable f4 was not set correctly by ID3DXConstantTable_SetMatrixPointerArray, "
836 "got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
837 out[0], out[1], out[2], out[3],
838 S(U(mvp))._11, S(U(mvp))._12, S(U(mvp))._13, S(U(mvp))._14);
839
840 memset(out, 0, sizeof(out));
843 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTransposePointerArray failed on variable f: got %#x\n", res);
844
846 ok(out[0] == S(U(mvp))._11 && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f,
847 "The variable f was not set correctly by ID3DXConstantTable_SetMatrixTransposePointerArray, "
848 "got %f, should be %f\n",
849 out[0], S(U(mvp))._11);
850
852 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTransposePointerArray failed on variable f4: got %#x\n", res);
853
855 ok(out[0] == S(U(mvp))._11 && out[1] == S(U(mvp))._21 && out[2] == S(U(mvp))._31 && out[3] == S(U(mvp))._41,
856 "The variable f4 was not set correctly by ID3DXConstantTable_SetMatrixTransposePointerArray, "
857 "got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
858 out[0], out[1], out[2], out[3],
859 S(U(mvp))._11, S(U(mvp))._21, S(U(mvp))._31, S(U(mvp))._41);
860
862 ok(refcnt == 0, "The constant table reference count was %u, should be 0\n", refcnt);
863}
GLfloat f
Definition: glext.h:7540

Referenced by test_setting_constants().

◆ test_setting_constants()

static void test_setting_constants ( void  )
static

Definition at line 1449 of file shader.c.

1450{
1451 HWND wnd;
1452 IDirect3D9 *d3d;
1453 IDirect3DDevice9 *device;
1455 HRESULT hr;
1456 ULONG refcnt;
1457
1458 if (!(wnd = CreateWindowA("static", "d3dx9_test", WS_OVERLAPPEDWINDOW, 0, 0,
1459 640, 480, NULL, NULL, NULL, NULL)))
1460 {
1461 skip("Couldn't create application window\n");
1462 return;
1463 }
1464 if (!(d3d = Direct3DCreate9(D3D_SDK_VERSION)))
1465 {
1466 skip("Couldn't create IDirect3D9 object\n");
1467 DestroyWindow(wnd);
1468 return;
1469 }
1470
1471 ZeroMemory(&d3dpp, sizeof(d3dpp));
1472 d3dpp.Windowed = TRUE;
1475 if (FAILED(hr))
1476 {
1477 skip("Failed to create IDirect3DDevice9 object %#x\n", hr);
1478 IDirect3D9_Release(d3d);
1479 DestroyWindow(wnd);
1480 return;
1481 }
1482
1488
1489 /* Release resources */
1491 ok(refcnt == 0, "The Direct3D device reference count was %u, should be 0\n", refcnt);
1492
1493 refcnt = IDirect3D9_Release(d3d);
1494 ok(refcnt == 0, "The Direct3D object reference count was %u, should be 0\n", refcnt);
1495
1496 if (wnd) DestroyWindow(wnd);
1497}
static void test_SetValue(IDirect3DDevice9 *device)
Definition: shader.c:1275
static void test_setting_matrices_table(IDirect3DDevice9 *device)
Definition: shader.c:865
static void test_setting_basic_table(IDirect3DDevice9 *device)
Definition: shader.c:665
static void test_setting_arrays_table(IDirect3DDevice9 *device)
Definition: shader.c:1086
static void test_SetDefaults(IDirect3DDevice9 *device)
Definition: shader.c:1198
#define D3DCREATE_SOFTWARE_VERTEXPROCESSING
Definition: d3d8.h:44

Referenced by START_TEST().

◆ test_setting_matrices_table()

static void test_setting_matrices_table ( IDirect3DDevice9 *  device)
static

Definition at line 865 of file shader.c.

866{
867 static const D3DXMATRIX fmatrix =
868 {{{2.001f, 1.502f, 9.003f, 1.004f,
869 5.005f, 3.006f, 3.007f, 6.008f,
870 9.009f, 5.010f, 7.011f, 1.012f,
871 5.013f, 5.014f, 5.015f, 9.016f}}};
872 static const D3DXMATRIX *matrix_pointer[] = {&fmatrix};
873
874 ID3DXConstantTable *ctable;
875
876 HRESULT res;
877 float out[32];
878
880 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %#x\n", res);
881
882 res = ID3DXConstantTable_SetMatrix(ctable, device, "imatrix2x3", &fmatrix);
883 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable imatrix2x3: got %#x\n", res);
884
885 res = ID3DXConstantTable_SetMatrix(ctable, device, "fmatrix3x1", &fmatrix);
886 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable fmatrix3x1: got %#x\n", res);
887
889 ok(out[0] == (int)S(U(fmatrix))._11 && out[1] == (int)S(U(fmatrix))._12 && out[2] == (int)S(U(fmatrix))._13
890 && out[3] == 0
891 && out[4] == (int)S(U(fmatrix))._21 && out[5] == (int)S(U(fmatrix))._22 && out[6] == (int)S(U(fmatrix))._23
892 && out[7] == 0,
893 "The variable imatrix2x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f}, "
894 "should be {%d, %d, %d, %d; %d, %d, %d, %d}\n",
895 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
896 (int)S(U(fmatrix))._11, (int)S(U(fmatrix))._12, (int)S(U(fmatrix))._13, 0,
897 (int)S(U(fmatrix))._21, (int)S(U(fmatrix))._22, (int)S(U(fmatrix))._23, 0);
898
900 ok(out[0] == S(U(fmatrix))._11 && out[1] == S(U(fmatrix))._21 && out[2] == S(U(fmatrix))._31 && out[3] == 0.0f,
901 "The variable fmatrix3x1 was not set correctly, out={%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
902 out[0], out[1], out[2], out[3],
903 S(U(fmatrix))._11, S(U(fmatrix))._21, S(U(fmatrix))._31, 0.0f);
904
906
908 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %#x\n", res);
909
910 /* SetMatrix */
911 res = ID3DXConstantTable_SetMatrix(ctable, device, "c2x3", &fmatrix);
912 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable c2x3: got %#x\n", res);
913
914 res = ID3DXConstantTable_SetMatrix(ctable, device, "r2x3", &fmatrix);
915 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable r2x3: got %#x\n", res);
916
917 res = ID3DXConstantTable_SetMatrix(ctable, device, "c3x2", &fmatrix);
918 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable c3x2: got %#x\n", res);
919
920 res = ID3DXConstantTable_SetMatrix(ctable, device, "r3x2", &fmatrix);
921 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable r3x2: got %#x\n", res);
922
923 res = ID3DXConstantTable_SetMatrix(ctable, device, "c3x3", &fmatrix);
924 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable c3x3: got %#x\n", res);
925
927 ok(out[0] == S(U(fmatrix))._11 && out[1] == S(U(fmatrix))._21 && out[2] == 0.0f && out[3] == 0.0f
928 && out[4] == S(U(fmatrix))._12 && out[5] == S(U(fmatrix))._22 && out[6] == 0.0f && out[7] == 0.0f
929 && out[8] == S(U(fmatrix))._13 && out[9] == S(U(fmatrix))._23 && out[10] == 0.0f && out[11] == 0.0f,
930 "The variable c2x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}, "
931 "should be {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}\n",
932 out[0], out[1], out[2], out[3],
933 out[4], out[5], out[6], out[7],
934 out[8], out[9], out[10], out[11],
935 S(U(fmatrix))._11, S(U(fmatrix))._21, 0.0f, 0.0f,
936 S(U(fmatrix))._12, S(U(fmatrix))._22, 0.0f, 0.0f,
937 S(U(fmatrix))._13, S(U(fmatrix))._23, 0.0f, 0.0f);
938
939 res = ID3DXConstantTable_SetMatrix(ctable, device, "r4x4", &fmatrix);
940 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable r4x4: got %#x\n", res);
941
943 ok(out[0] == S(U(fmatrix))._11 && out[1] == S(U(fmatrix))._12 && out[2] == S(U(fmatrix))._13 && out[3] == 0.0f
944 && out[4] == S(U(fmatrix))._21 && out[5] == S(U(fmatrix))._22 && out[6] == S(U(fmatrix))._23 && out[7] == 0.0f,
945 "The variable r2x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f}, "
946 "should be {%f, %f, %f, %f; %f, %f, %f, %f}\n",
947 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
948 S(U(fmatrix))._11, S(U(fmatrix))._12, S(U(fmatrix))._13, 0.0f,
949 S(U(fmatrix))._21, S(U(fmatrix))._22, S(U(fmatrix))._23, 0.0f);
950
952 ok(out[0] == S(U(fmatrix))._11 && out[1] == S(U(fmatrix))._21 && out[2] == S(U(fmatrix))._31 && out[3] == 0.0f
953 && out[4] == S(U(fmatrix))._12 && out[5] == S(U(fmatrix))._22 && out[6] == S(U(fmatrix))._32 && out[7] == 0.0f,
954 "The variable c3x2 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f}, "
955 "should be {%f, %f, %f, %f; %f, %f, %f, %f}\n",
956 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
957 S(U(fmatrix))._11, S(U(fmatrix))._21, S(U(fmatrix))._31, 0.0f,
958 S(U(fmatrix))._12, S(U(fmatrix))._22, S(U(fmatrix))._32, 0.0f);
959
961 ok(out[0] == S(U(fmatrix))._11 && out[1] == S(U(fmatrix))._12 && out[2] == 0.0f && out[3] == 0.0f
962 && out[4] == S(U(fmatrix))._21 && out[5] == S(U(fmatrix))._22 && out[6] == 0.0f && out[7] == 0.0f
963 && out[8] == S(U(fmatrix))._31 && out[9] == S(U(fmatrix))._32 && out[10] == 0.0f && out[11] == 0.0f,
964 "The variable r3x2 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}, "
965 "should be {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}\n",
966 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7], out[8], out[9], out[10], out[11],
967 S(U(fmatrix))._11, S(U(fmatrix))._12, 0.0f, 0.0f,
968 S(U(fmatrix))._21, S(U(fmatrix))._22, 0.0f, 0.0f,
969 S(U(fmatrix))._31, S(U(fmatrix))._32, 0.0f, 0.0f);
970
972 ok(out[0] == S(U(fmatrix))._11 && out[1] == S(U(fmatrix))._21 && out[2] == S(U(fmatrix))._31 && out[3] == 0.0f
973 && out[4] == S(U(fmatrix))._12 && out[5] == S(U(fmatrix))._22 && out[6] == S(U(fmatrix))._32 && out[7] == 0.0f
974 && out[8] == S(U(fmatrix))._13 && out[9] == S(U(fmatrix))._23 && out[10] == S(U(fmatrix))._33 && out[11] == 0.0f,
975 "The variable c3x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}, "
976 "should be {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}\n",
977 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7], out[8], out[9], out[10], out[11],
978 S(U(fmatrix))._11, S(U(fmatrix))._21, S(U(fmatrix))._31, 0.0f,
979 S(U(fmatrix))._12, S(U(fmatrix))._22, S(U(fmatrix))._32, 0.0f,
980 S(U(fmatrix))._13, S(U(fmatrix))._23, S(U(fmatrix))._33, 0.0f);
981
983 ok(out[0] == S(U(fmatrix))._11 && out[1] == S(U(fmatrix))._12 && out[2] == S(U(fmatrix))._13 && out[3] == S(U(fmatrix))._14
984 && out[4] == S(U(fmatrix))._21 && out[5] == S(U(fmatrix))._22 && out[6] == S(U(fmatrix))._23 && out[7] == S(U(fmatrix))._24
985 && out[8] == S(U(fmatrix))._31 && out[9] == S(U(fmatrix))._32 && out[10] == S(U(fmatrix))._33 && out[11] == S(U(fmatrix))._34
986 && out[12] == S(U(fmatrix))._41 && out[13] == S(U(fmatrix))._42 && out[14] == S(U(fmatrix))._43 && out[15] == S(U(fmatrix))._44,
987 "The variable r4x4 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}, "
988 "should be {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}\n",
989 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
990 out[8], out[9], out[10], out[11], out[12], out[13], out[14], out[15],
991 S(U(fmatrix))._11, S(U(fmatrix))._12, S(U(fmatrix))._13, S(U(fmatrix))._14,
992 S(U(fmatrix))._21, S(U(fmatrix))._22, S(U(fmatrix))._23, S(U(fmatrix))._24,
993 S(U(fmatrix))._31, S(U(fmatrix))._32, S(U(fmatrix))._33, S(U(fmatrix))._34,
994 S(U(fmatrix))._41, S(U(fmatrix))._42, S(U(fmatrix))._43, S(U(fmatrix))._44);
995
996 /* SetMatrixTranspose */
998 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTranspose failed on variable c2x3: got %#x\n", res);
999
1001 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTranspose failed on variable r2x3: got %#x\n", res);
1002
1004 ok(out[0] == S(U(fmatrix))._11 && out[1] == S(U(fmatrix))._12 && out[2] == 0.0f && out[3] == 0.0f
1005 && out[4] == S(U(fmatrix))._21 && out[5] == S(U(fmatrix))._22 && out[6] == 0.0f && out[7] == 0.0f
1006 && out[8] == S(U(fmatrix))._31 && out[9] == S(U(fmatrix))._32 && out[10] == 0.0f && out[11] == 0.0f,
1007 "The variable c2x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}, "
1008 "should be {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}\n",
1009 out[0], out[1], out[2], out[3],
1010 out[4], out[5], out[6], out[7],
1011 out[8], out[9], out[10], out[11],
1012 S(U(fmatrix))._11, S(U(fmatrix))._12, 0.0f, 0.0f,
1013 S(U(fmatrix))._21, S(U(fmatrix))._22, 0.0f, 0.0f,
1014 S(U(fmatrix))._31, S(U(fmatrix))._32, 0.0f, 0.0f);
1015
1017 ok(out[0] == S(U(fmatrix))._11 && out[1] == S(U(fmatrix))._21 && out[2] == S(U(fmatrix))._31 && out[3] == 0.0f
1018 && out[4] == S(U(fmatrix))._12 && out[5] == S(U(fmatrix))._22 && out[6] == S(U(fmatrix))._32 && out[7] == 0.0f,
1019 "The variable r2x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f}, "
1020 "should be {%f, %f, %f, %f; %f, %f, %f, %f}\n",
1021 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1022 S(U(fmatrix))._11, S(U(fmatrix))._21, S(U(fmatrix))._31, 0.0f,
1023 S(U(fmatrix))._12, S(U(fmatrix))._22, S(U(fmatrix))._32, 0.0f);
1024
1025 /* SetMatrixPointerArray */
1026 res = ID3DXConstantTable_SetMatrixPointerArray(ctable, device, "c2x3", matrix_pointer, 1);
1027 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixPointerArray failed on variable c2x3: got %#x\n", res);
1028
1029 res = ID3DXConstantTable_SetMatrixPointerArray(ctable, device, "r2x3", matrix_pointer, 1);
1030 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixPointerArray failed on variable r2x3: got %#x\n", res);
1031
1033 ok(out[0] == S(U(fmatrix))._11 && out[1] == S(U(fmatrix))._21 && out[2] == 0.0f && out[3] == 0.0f
1034 && out[4] == S(U(fmatrix))._12 && out[5] == S(U(fmatrix))._22 && out[6] == 0.0f && out[7] == 0.0f
1035 && out[8] == S(U(fmatrix))._13 && out[9] == S(U(fmatrix))._23 && out[10] == 0.0f && out[11] == 0.0f,
1036 "The variable c2x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}, "
1037 "should be {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}\n",
1038 out[0], out[1], out[2], out[3],
1039 out[4], out[5], out[6], out[7],
1040 out[8], out[9], out[10], out[11],
1041 S(U(fmatrix))._11, S(U(fmatrix))._21, 0.0f, 0.0f,
1042 S(U(fmatrix))._12, S(U(fmatrix))._22, 0.0f, 0.0f,
1043 S(U(fmatrix))._13, S(U(fmatrix))._23, 0.0f, 0.0f);
1044
1046 ok(out[0] == S(U(fmatrix))._11 && out[1] == S(U(fmatrix))._12 && out[2] == S(U(fmatrix))._13 && out[3] == 0.0f
1047 && out[4] == S(U(fmatrix))._21 && out[5] == S(U(fmatrix))._22 && out[6] == S(U(fmatrix))._23 && out[7] == 0.0f,
1048 "The variable r2x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f}, "
1049 "should be {%f, %f, %f, %f; %f, %f, %f, %f}\n",
1050 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1051 S(U(fmatrix))._11, S(U(fmatrix))._12, S(U(fmatrix))._13, 0.0f,
1052 S(U(fmatrix))._21, S(U(fmatrix))._22, S(U(fmatrix))._23, 0.0f);
1053
1054 /* SetMatrixTransposePointerArray */
1056 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTransposePointerArray failed on variable c2x3: got %#x\n", res);
1057
1059 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTransposePointerArray failed on variable r2x3: got %#x\n", res);
1060
1062 ok(out[0] == S(U(fmatrix))._11 && out[1] == S(U(fmatrix))._12 && out[2] == 0.0f && out[3] == 0.0f
1063 && out[4] == S(U(fmatrix))._21 && out[5] == S(U(fmatrix))._22 && out[6] == 0.0f && out[7] == 0.0f
1064 && out[8] == S(U(fmatrix))._31 && out[9] == S(U(fmatrix))._32 && out[10] == 0.0f && out[11] == 0.0f,
1065 "The variable c2x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}, "
1066 "should be {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}\n",
1067 out[0], out[1], out[2], out[3],
1068 out[4], out[5], out[6], out[7],
1069 out[8], out[9], out[10], out[11],
1070 S(U(fmatrix))._11, S(U(fmatrix))._12, 0.0f, 0.0f,
1071 S(U(fmatrix))._21, S(U(fmatrix))._22, 0.0f, 0.0f,
1072 S(U(fmatrix))._31, S(U(fmatrix))._32, 0.0f, 0.0f);
1073
1075 ok(out[0] == S(U(fmatrix))._11 && out[1] == S(U(fmatrix))._21 && out[2] == S(U(fmatrix))._31 && out[3] == 0.0f
1076 && out[4] == S(U(fmatrix))._12 && out[5] == S(U(fmatrix))._22 && out[6] == S(U(fmatrix))._32 && out[7] == 0.0f,
1077 "The variable r2x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f}, "
1078 "should be {%f, %f, %f, %f; %f, %f, %f, %f}\n",
1079 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1080 S(U(fmatrix))._11, S(U(fmatrix))._21, S(U(fmatrix))._31, 0.0f,
1081 S(U(fmatrix))._12, S(U(fmatrix))._22, S(U(fmatrix))._32, 0.0f);
1082
1084}

Referenced by test_setting_constants().

◆ test_SetValue()

static void test_SetValue ( IDirect3DDevice9 *  device)
static

Definition at line 1275 of file shader.c.

1276{
1277 static const D3DXMATRIX mvp = {{{
1278 0.51f, 0.62f, 0.80f, 0.78f,
1279 0.23f, 0.95f, 0.37f, 0.48f,
1280 0.10f, 0.58f, 0.90f, 0.25f,
1281 0.89f, 0.41f, 0.93f, 0.27f}}};
1282 static const D3DXVECTOR4 f4 = {0.2f, 0.4f, 0.8f, 1.2f};
1283 static const FLOAT arr[] = {0.33f, 0.55f, 0.96f, 1.00f,
1284 1.00f, 1.00f, 1.00f, 1.00f,
1285 1.00f, 1.00f, 1.00f, 1.00f};
1286 static int imatrix[] = {1, 2, 3, 4, 5, 6};
1287 static float fmatrix[] = {1.1f, 2.2f, 3.3f, 4.4f};
1288 static BOOL barray[] = {TRUE, FALSE};
1289 static float fvecarray[] = {9.1f, 9.2f, 9.3f, 9.4f, 9.5f, 9.6f, 9.7f, 9.8f};
1290 static float farray[] = {2.2f, 3.3f};
1291
1292 static const float def[16] = {5.5f, 5.5f, 5.5f, 5.5f,
1293 5.5f, 5.5f, 5.5f, 5.5f,
1294 5.5f, 5.5f, 5.5f, 5.5f,
1295 5.5f, 5.5f, 5.5f, 5.5f};
1296 float out[16];
1297
1298 HRESULT res;
1299 ID3DXConstantTable *ctable;
1300
1302 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %08x\n", res);
1303
1305
1306 /* SetValue called with 0 bytes size doesn't change value */
1308 ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08x\n", res);
1309
1311 ok(memcmp(out, def, sizeof(f4)) == 0,
1312 "The variable f4 was not set correctly, out={%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1313 out[0], out[1], out[2], out[3], def[0], def[1], def[2], def[3]);
1314
1315 res = ID3DXConstantTable_SetValue(ctable, device, "f4", &f4, sizeof(f4));
1316 ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08x\n", res);
1317
1319 ok(memcmp(out, &f4, sizeof(f4)) == 0,
1320 "The variable f4 was not set correctly, out={%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1321 out[0], out[1], out[2], out[3], f4.x, f4.y, f4.z, f4.w);
1322
1324
1325 /* SetValue called with size smaller than constant size doesn't change value */
1326 res = ID3DXConstantTable_SetValue(ctable, device, "mvp", &mvp, sizeof(mvp) / 2);
1327 ok(res == D3D_OK, "ID3DXConstantTable_SetValue returned %08x\n", res);
1328
1330 ok(memcmp(out, def, sizeof(def)) == 0,
1331 "The variable mvp was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}, "
1332 "should be {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}\n",
1333 out[0], out[4], out[ 8], out[12],
1334 out[1], out[5], out[ 9], out[13],
1335 out[2], out[6], out[10], out[14],
1336 out[3], out[7], out[11], out[15],
1337 def[0], def[4], def[ 8], def[12],
1338 def[1], def[5], def[ 9], def[13],
1339 def[2], def[6], def[10], def[14],
1340 def[3], def[7], def[11], def[15]);
1341
1342 res = ID3DXConstantTable_SetValue(ctable, device, "mvp", &mvp, sizeof(mvp));
1343 ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08x\n", res);
1344
1346 ok(out[0] == S(U(mvp))._11 && out[4] == S(U(mvp))._12 && out[8] == S(U(mvp))._13 && out[12] == S(U(mvp))._14,
1347 "The first row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1348 out[0], out[4], out[8], out[12], S(U(mvp))._11, S(U(mvp))._12, S(U(mvp))._13, S(U(mvp))._14);
1349 ok(out[1] == S(U(mvp))._21 && out[5] == S(U(mvp))._22 && out[9] == S(U(mvp))._23 && out[13] == S(U(mvp))._24,
1350 "The second row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1351 out[1], out[5], out[9], out[13], S(U(mvp))._21, S(U(mvp))._22, S(U(mvp))._23, S(U(mvp))._24);
1352 ok(out[2] == S(U(mvp))._31 && out[6] == S(U(mvp))._32 && out[10] == S(U(mvp))._33 && out[14] == S(U(mvp))._34,
1353 "The third row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1354 out[2], out[6], out[10], out[14], S(U(mvp))._31, S(U(mvp))._32, S(U(mvp))._33, S(U(mvp))._34);
1355 ok(out[3] == S(U(mvp))._41 && out[7] == S(U(mvp))._42 && out[11] == S(U(mvp))._43 && out[15] == S(U(mvp))._44,
1356 "The fourth row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1357 out[3], out[7], out[11], out[15], S(U(mvp))._41, S(U(mvp))._42, S(U(mvp))._43, S(U(mvp))._44);
1358
1360
1362 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %08x\n", res);
1363
1364 res = ID3DXConstantTable_SetValue(ctable, device, "arr", arr, sizeof(arr));
1365 ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08x\n", res);
1366
1368 ok(out[0] == arr[0] && out[4] == arr[1] && out[8] == arr[2]
1369 && out[1] == 0 && out[2] == 0 && out[3] == 0 && out[5] == 0 && out[6] == 0 && out[7] == 0
1370 && out[9] == 0 && out[10] == 0 && out[11] == 0,
1371 "The variable arr was not set correctly, out={%f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f}, "
1372 "should be {0.33, 0, 0, 0, 0.55, 0, 0, 0, 0.96, 0, 0, 0}\n",
1373 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7], out[8], out[9], out[10], out[11]);
1374
1376
1378 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %08x\n", res);
1379
1380 res = ID3DXConstantTable_SetValue(ctable, device, "fmatrix3x1", fmatrix, sizeof(fmatrix));
1381 ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08x\n", res);
1382
1383 res = ID3DXConstantTable_SetValue(ctable, device, "imatrix2x3", imatrix, sizeof(imatrix));
1384 ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08x\n", res);
1385
1387 ok(out[0] == imatrix[0] && out[1] == imatrix[1] && out[2] == imatrix[2] && out[3] == 0.0f
1388 && out[4] == imatrix[3] && out[5] == imatrix[4] && out[6] == imatrix[5] && out[7] == 0.0f,
1389 "The variable imatrix2x3 was not set correctly, out={%f, %f, %f, %f, %f, %f, %f, %f}, "
1390 "should be {%d, %d, %d, 0, %d, %d, %d, 0}\n",
1391 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1392 imatrix[0], imatrix[1], imatrix[2], imatrix[3], imatrix[4], imatrix[5]);
1393
1395 ok(out[0] == fmatrix[0] && out[1] == fmatrix[1] && out[2] == fmatrix[2] && out[3] == 0.0f,
1396 "The variable fmatrix3x1 was not set correctly, out={%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1397 out[0], out[1] ,out[2], out[4],
1398 fmatrix[0], fmatrix[1], fmatrix[2], 0.0f);
1399
1401
1403 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %08x\n", res);
1404
1405 res = ID3DXConstantTable_SetValue(ctable, device, "barray", barray, sizeof(barray));
1406 ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08x\n", res);
1407
1408 res = ID3DXConstantTable_SetValue(ctable, device, "fvecarray", fvecarray, sizeof(fvecarray));
1409 ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08x\n", res);
1410
1412 res = ID3DXConstantTable_SetValue(ctable, device, "farray", farray, sizeof(farray));
1413 ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08x\n", res);
1414
1415 /* 2 elements of farray were set */
1417 ok(out[0] == farray[0] && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f
1418 && out[4] == farray[1] && out[5] == 0.0f && out[6] == 0.0f && out[7] == 0.0f
1419 && out[8] == def[8] && out[9] == def[9] && out[10] == def[10] && out[11] == def[11]
1420 && out[12] == def[12] && out[13] == def[13] && out[14] == def[14] && out[15] == def[15],
1421 "The variable farray was not set correctly, should be {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}, "
1422 "should be {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}\n",
1423 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1424 out[8], out[9], out[10], out[11], out[12], out[13], out[14], out[15],
1425 farray[0], 0.0f, 0.0f, 0.0f,
1426 farray[1], 0.0f, 0.0f, 0.0f,
1427 def[8], def[9], def[10], def[11],
1428 def[12], def[13], def[14], def[15]);
1429
1431 ok(out[0] == fvecarray[0] && out[1] == fvecarray[1] && out[2] == fvecarray[2] && out[3] == fvecarray[3]
1432 && out[4] == fvecarray[4] && out[5] == fvecarray[5] && out[6] == fvecarray[6] && out[7] == fvecarray[7],
1433 "The variable fvecarray was not set correctly, out ={%f, %f, %f, %f, %f, %f, %f, %f}, "
1434 "should be {%f, %f, %f, %f, %f, %f, %f, %f}\n",
1435 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1436 fvecarray[0], fvecarray[1], fvecarray[2], fvecarray[3], fvecarray[4], fvecarray[5], fvecarray[6], fvecarray[7]);
1437
1439 ok(out[0] == 1.0f && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f
1440 && out[4] == 0.0f && out[5] == 0.0f && out[6] == 0.0f && out[7] == 0.0f,
1441 "The variable barray was not set correctly, out={%f, %f, %f, %f, %f, %f, %f, %f}, "
1442 "should be {%f, %f, %f, %f, %f, %f, %f, %f}\n",
1443 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1444 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
1445
1447}

Referenced by test_setting_constants().

◆ test_shader_semantics()

static void test_shader_semantics ( void  )
static

Definition at line 6415 of file shader.c.

6416{
6417 static const DWORD invalid_1[] =
6418 {
6419 0x00000200
6420 },
6421 invalid_2[] =
6422 {
6423 0xfffe0400
6424 },
6425 invalid_3[] =
6426 {
6427 0xfffe0000
6428 },
6429 vs_1_1[] =
6430 {
6431 0xfffe0101, /* vs_1_1 */
6432 0x0000001f, 0x80000000, 0x900f0000, /* dcl_position v0 */
6433 0x0000001f, 0x80000003, 0x900f0001, /* dcl_normal v1 */
6434 0x0000001f, 0x8001000a, 0x900f0002, /* dcl_color1 v2 */
6435 0x0000001f, 0x80000005, 0x900f0003, /* dcl_texcoord0 v3 */
6436 0x00000001, 0xc00f0000, 0x90e40000, /* mov oPos, v0 */
6437 0x00000001, 0xd00f0001, 0x90e40002, /* mov oD1, v2 */
6438 0x00000001, 0xe0070000, 0x90e40001, /* mov oT0.xyz, v1 */
6439 0x00000001, 0xc00f0001, 0x90ff0002, /* mov oFog, v2.w */
6440 0x00000001, 0xc00f0002, 0x90ff0001, /* mov oPts, v1.w */
6441 0x0000ffff
6442 },
6443 vs_2_0[] =
6444 {
6445 0xfffe0200, /* vs_2_0 */
6446 0x0200001f, 0x80000000, 0x900f0000, /* dcl_position v0 */
6447 0x0200001f, 0x80000003, 0x900f0001, /* dcl_normal v1 */
6448 0x0200001f, 0x8001000a, 0x900f0002, /* dcl_color1 v2 */
6449 0x0200001f, 0x80000005, 0x900f0003, /* dcl_texcoord0 v3 */
6450 0x02000001, 0xc00f0000, 0x90e40000, /* mov oPos, v0 */
6451 0x02000001, 0xd00f0001, 0x90e40002, /* mov oD1, v2 */
6452 0x02000001, 0xe0070000, 0x90e40003, /* mov oT0.xyz, v3 */
6453 0x02000001, 0xc00f0001, 0x90ff0002, /* mov oFog, v2.w */
6454 0x02000001, 0xc00f0002, 0x90ff0001, /* mov oPts, v1.w */
6455 0x0000ffff
6456 },
6457 vs_3_0[] =
6458 {
6459 0xfffe0300, /* vs_3_0 */
6460 0x0002fffe, 0x0200000f, 0x00000000, /* comment */
6461 0x0200001f, 0x80000000, 0x900f0000, /* dcl_position v0 */
6462 0x0200001f, 0x80000003, 0x900f0001, /* dcl_normal v1 */
6463 0x0200001f, 0x8001000a, 0x900f0002, /* dcl_color1 v2 */
6464 0x0200001f, 0x80000005, 0x900f0003, /* dcl_texcoord0 v3 */
6465 0x0200001f, 0x80000000, 0xe00f0000, /* dcl_position o0 */
6466 0x0200001f, 0x8001000a, 0xe00f0001, /* dcl_color1 o1 */
6467 0x0200001f, 0x80000005, 0xe00f0002, /* dcl_texcoord0 o2 */
6468 0x0200001f, 0x8000000b, 0xe00f0003, /* dcl_fog o3 */
6469 0x0200001f, 0x80000004, 0xe00f0004, /* dcl_psize o4 */
6470 0x02000001, 0xe00f0000, 0x90e40000, /* mov o0, v0 */
6471 0x02000001, 0xe00f0001, 0x90e40002, /* mov o1, v2 */
6472 0x02000001, 0xe0070002, 0x90e40003, /* mov o2.xyz, v3 */
6473 0x02000001, 0xe00f0003, 0x90ff0002, /* mov o3, v2.w */
6474 0x02000001, 0xe00f0004, 0x90ff0001, /* mov o4, v1.w */
6475 0x0000ffff
6476 },
6477 ps_1_1[] =
6478 {
6479 0xffff0101, /* ps_1_1 */
6480 0x00000042, 0xb00f0000, /* tex t0 */
6481 0x00000002, 0x800f0000, 0x90e40000, 0xb0e40000, /* add r0, v0, t0 */
6482 0x0000ffff
6483 },
6484 ps_2_0[] =
6485 {
6486 0xffff0200, /* ps_2_0 */
6487 0x0200001f, 0x80000000, 0x900f0000, /* dcl v0 */
6488 0x0200001f, 0x80000000, 0xb00f0000, /* dcl t0 */
6489 0x02000001, 0x800f0800, 0x90e40000, /* mov oC0, v0 */
6490 0x0000ffff
6491 },
6492 ps_3_0[] =
6493 {
6494 0xffff0300, /* ps_3_0 */
6495 0x0200001f, 0x8001000a, 0x900f0000, /* dcl_color1 v0 */
6496 0x0200001f, 0x80000003, 0x900f0001, /* dcl_normal v1 */
6497 0x0200001f, 0x80000005, 0x900f0002, /* dcl_texcoord0 v2 */
6498 0x0200001f, 0x8000000b, 0x900f0003, /* dcl_fog v3 */
6499 0x0200001f, 0x80000000, 0x90031000, /* dcl vPos.xy */
6500 0x0200001f, 0x80000000, 0x900f1001, /* dcl vFace */
6501 0x05000051, 0xa00f0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* def c0, 0.0, 0.0, 0.0, 0.0 */
6502 0x02000001, 0x800f0000, 0x90e40000, /* mov r0, v0 */
6503 0x03000002, 0x800f0800, 0x80e40000, 0x90e40003, /* add oC0, r0, v3 */
6504 0x02000001, 0x800f0001, 0x90e40001, /* mov r1, v1 */
6505 0x03000005, 0x800f0801, 0x80e40001, 0x90e40002, /* mul oC1, r1, v2 */
6506 0x02000001, 0x800f0802, 0x90441000, /* mov oC2, vPos.xyxy */
6507 0x04000058, 0x800f0803, 0x90e41001, 0x90e40000, 0xa0e40000, /* cmp oC3, vFace, v0, c0 */
6508 0x02000001, 0x900f0800, 0x90ff0001, /* mov oDepth, v1.w */
6509 0x0000ffff
6510 };
6511 static const struct
6512 {
6513 const DWORD *shader;
6514 D3DXSEMANTIC expected_input[MAXD3DDECLLENGTH];
6516 }
6517 tests[] =
6518 {
6519 {vs_1_1, {{0, 0}, {3, 0}, {10, 1}, {5, 0}, {~0, ~0}}, {{5, 0}, {10, 1}, {0, 0}, {11, 0}, {4, 0}, {~0, ~0}}},
6520 {vs_2_0, {{0, 0}, {3, 0}, {10, 1}, {5, 0}, {~0, ~0}}, {{5, 0}, {10, 1}, {0, 0}, {11, 0}, {4, 0}, {~0, ~0}}},
6521 {vs_3_0, {{0, 0}, {3, 0}, {10, 1}, {5, 0}, {~0, ~0}}, {{0, 0}, {10, 1}, {5, 0}, {11, 0}, {4, 0}, {~0, ~0}}},
6522 {ps_1_1, {{5, 0}, {10, 0}, {~0, ~0}}, {{10, 0}, {~0, ~0}}},
6523 {ps_2_0, {{10, 0}, {5, 0}, {~0, ~0}}, {{10, 0}, {~0, ~0}}},
6524 {ps_3_0, {{10, 1}, {3,0}, {5, 0}, {11, 0}, {~0, ~0}}, {{10, 0}, {10, 1}, {10, 2}, {10, 3}, {12, 0}, {~0, ~0}}},
6525 };
6526 D3DXSEMANTIC semantics[MAXD3DDECLLENGTH];
6527 unsigned int count, count2;
6528 unsigned int i, j;
6529 HRESULT hr;
6530
6531 hr = D3DXGetShaderInputSemantics(invalid_1, NULL, NULL);
6532 ok(hr == D3DXERR_INVALIDDATA, "Unexpected hr %#x.\n", hr);
6533 hr = D3DXGetShaderInputSemantics(invalid_2, NULL, NULL);
6534 ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr);
6535 hr = D3DXGetShaderInputSemantics(invalid_3, NULL, NULL);
6536 ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr);
6537
6539 ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr);
6540 hr = D3DXGetShaderInputSemantics(vs_1_1, semantics, NULL);
6541 ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr);
6542
6543 for (i = 0; i < ARRAY_SIZE(tests); ++i)
6544 {
6545 const DWORD *shader = tests[i].shader;
6546
6548 ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr);
6549 hr = D3DXGetShaderInputSemantics(shader, semantics, &count2);
6550 ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr);
6551 ok(count == count2, "Semantics count %u differs from previous count %u.\n", count2, count);
6552 for (j = 0; j < count; ++j)
6553 {
6554 ok(semantics[j].Usage == tests[i].expected_input[j].Usage
6555 && semantics[j].UsageIndex == tests[i].expected_input[j].UsageIndex,
6556 "Unexpected semantic %u, %u, test %u, idx %u.\n",
6557 semantics[j].Usage, semantics[j].UsageIndex, i, j);
6558 }
6559 ok(tests[i].expected_input[j].Usage == ~0 && tests[i].expected_input[j].UsageIndex == ~0,
6560 "Unexpected semantics count %u.\n", count);
6562 ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr);
6563 hr = D3DXGetShaderOutputSemantics(shader, semantics, &count2);
6564 ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr);
6565 ok(count == count2, "Semantics count %u differs from previous count %u.\n", count2, count);
6566 for (j = 0; j < count; ++j)
6567 {
6568 ok(semantics[j].Usage == tests[i].expected_output[j].Usage
6569 && semantics[j].UsageIndex == tests[i].expected_output[j].UsageIndex,
6570 "Unexpected semantic %u, %u, test %u, idx %u.\n",
6571 semantics[j].Usage, semantics[j].UsageIndex, i, j);
6572 }
6573 ok(tests[i].expected_output[j].Usage == ~0 && tests[i].expected_output[j].UsageIndex == ~0,
6574 "Unexpected semantics count %u.\n", count);
6575 }
6576}
#define MAXD3DDECLLENGTH
Definition: d3d9types.h:186
HRESULT WINAPI D3DXGetShaderOutputSemantics(const DWORD *byte_code, D3DXSEMANTIC *semantics, UINT *count)
Definition: shader.c:3218
HRESULT WINAPI D3DXGetShaderInputSemantics(const DWORD *byte_code, D3DXSEMANTIC *semantics, UINT *count)
Definition: shader.c:3211
GLuint shader
Definition: glext.h:6030
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE Usage
Definition: hidpi.h:384
const struct registerset_test * tests
Definition: shader.c:5670
static const struct stream_output expected_output[]
Definition: msacm.c:1056

Referenced by START_TEST().

Variable Documentation

◆ arr_default_value

const float arr_default_value[] = {100, 0, 0, 0, 200, 0, 0, 0, 300, 0, 0, 0}
static

Definition at line 249 of file shader.c.

Referenced by test_SetDefaults().

◆ blob

Definition at line 5669 of file shader.c.

◆ bool_count

unsigned int bool_count

Definition at line 6190 of file shader.c.

Referenced by test_registerset_defaults().

◆ bools

const DWORD bools[16]

Definition at line 6193 of file shader.c.

Referenced by get_bool_const(), and test_registerset_defaults().

◆ constant_count

UINT constant_count

Definition at line 5673 of file shader.c.

Referenced by constant_heap_init().

◆ constants

Definition at line 5672 of file shader.c.

◆ ctab_arrays

const DWORD ctab_arrays[]
static
Initial value:
= {
0xfffe0300,
0x0052fffe, FCC_CTAB,
0x0000001c, 0x0000013c, 0xfffe0300, 0x00000006, 0x0000001c, 0x20008100,
0x00000134,
0x00000094, 0x000E0002, 0x00000002, 0x0000009c, 0x00000000,
0x000000ac, 0x00100002, 0x00000002, 0x000000b8, 0x00000000,
0x000000c8, 0x00080002, 0x00000004, 0x000000d0, 0x00000000,
0x000000e0, 0x00000002, 0x00000008, 0x000000ec, 0x00000000,
0x000000fc, 0x000C0002, 0x00000002, 0x00000108, 0x00000000,
0x00000118, 0x00120002, 0x00000001, 0x00000124, 0x00000000,
0x72726162, 0xab007961,
0x00010000, 0x00010001, 0x00000002, 0x00000000,
0x63657662, 0x61727261, 0xabab0079,
0x00010001, 0x00030001, 0x00000003, 0x00000000,
0x72726166, 0xab007961,
0x00030000, 0x00010001, 0x00000004, 0x00000000,
0x78746d66, 0x61727261, 0xabab0079,
0x00030002, 0x00040004, 0x00000002, 0x00000000,
0x63657666, 0x61727261, 0xabab0079,
0x00030001, 0x00040001, 0x00000002, 0x00000000,
0x63657669, 0x61727261, 0xabab0079,
0x00020001, 0x00040001, 0x00000001, 0x00000000,
0x335f7376, 0xab00305f,
0x656e6957, 0x6f727020, 0x7463656a, 0xababab00,
0x0000ffff}
#define FCC_CTAB
Definition: shader.c:24

Definition at line 174 of file shader.c.

Referenced by test_constant_tables(), test_setting_arrays_table(), and test_SetValue().

◆ ctab_arrays_expected

const D3DXCONSTANT_DESC ctab_arrays_expected[]
static
Initial value:
= {
{"fmtxarray", D3DXRS_FLOAT4, 0, 8, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 4, 4, 2, 0, 128, NULL},
{"farray", D3DXRS_FLOAT4, 8, 4, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 4, 0, 16, NULL},
{"fvecarray", D3DXRS_FLOAT4, 12, 2, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 4, 2, 0, 32, NULL},
{"barray", D3DXRS_FLOAT4, 14, 2, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 2, 0, 8, NULL},
{"bvecarray", D3DXRS_FLOAT4, 16, 2, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 3, 0, 36, NULL},
{"ivecarray", D3DXRS_FLOAT4, 18, 1, D3DXPC_VECTOR, D3DXPT_INT, 1, 4, 1, 0, 16, NULL}}
@ D3DXPC_SCALAR
Definition: d3dx9shader.h:62
@ D3DXPC_MATRIX_ROWS
Definition: d3dx9shader.h:64
@ D3DXPT_BOOL
Definition: d3dx9shader.h:74
@ D3DXPT_INT
Definition: d3dx9shader.h:75

Definition at line 201 of file shader.c.

Referenced by test_constant_tables().

◆ ctab_basic

const DWORD ctab_basic[]
static
Initial value:
= {
0xfffe0300,
0x0040fffe, FCC_CTAB,
0x0000001c, 0x000000ec, 0xfffe0300, 0x00000005, 0x0000001c, 0x20008100,
0x000000e4,
0x00000080, 0x00060002, 0x00000001, 0x00000084, 0x00000000,
0x00000094, 0x00070002, 0x00000001, 0x00000098, 0x00000000,
0x000000A8, 0x00040002, 0x00000001, 0x000000AC, 0x00000000,
0x000000BC, 0x00050002, 0x00000001, 0x000000C0, 0x00000000,
0x000000D0, 0x00000002, 0x00000004, 0x000000D4, 0x00000000,
0xabab0066, 0x00030000, 0x00010001, 0x00000001, 0x00000000,
0xab003466, 0x00030001, 0x00040001, 0x00000001, 0x00000000,
0xabab0069, 0x00020000, 0x00010001, 0x00000001, 0x00000000,
0xab003469, 0x00020001, 0x00040001, 0x00000001, 0x00000000,
0x0070766d, 0x00030003, 0x00040004, 0x00000001, 0x00000000,
0x335f7376, 0xab00305f,
0x656e6957, 0x6f727020, 0x7463656a, 0xababab00,
0x0000ffff}

Definition at line 90 of file shader.c.

Referenced by test_constant_tables(), test_SetDefaults(), test_setting_basic_table(), and test_SetValue().

◆ ctab_basic_expected

const D3DXCONSTANT_DESC ctab_basic_expected[]
static
Initial value:
= {
{"mvp", D3DXRS_FLOAT4, 0, 4, D3DXPC_MATRIX_COLUMNS, D3DXPT_FLOAT, 4, 4, 1, 0, 64, NULL},
{"i", D3DXRS_FLOAT4, 4, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL},
{"i4", D3DXRS_FLOAT4, 5, 1, D3DXPC_VECTOR, D3DXPT_INT, 1, 4, 1, 0, 16, NULL},
{"f", D3DXRS_FLOAT4, 6, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, NULL},
{"f4", D3DXRS_FLOAT4, 7, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 4, 1, 0, 16, NULL}}

Definition at line 109 of file shader.c.

Referenced by test_constant_tables().

◆ ctab_matrices

const DWORD ctab_matrices[]
static
Initial value:
= {
0xfffe0300,
0x0032fffe, FCC_CTAB,
0x0000001c, 0x000000b4, 0xfffe0300, 0x00000003, 0x0000001c, 0x20008100,
0x000000ac,
0x00000058, 0x00070002, 0x00000001, 0x00000064, 0x00000000,
0x00000074, 0x00000002, 0x00000004, 0x00000080, 0x00000000,
0x00000090, 0x00040002, 0x00000002, 0x0000009c, 0x00000000,
0x74616D66, 0x33786972, 0xab003178,
0x00030003, 0x00010003, 0x00000001, 0x00000000,
0x74616D66, 0x34786972, 0xab003478,
0x00030003, 0x00040004, 0x00000001, 0x00000000,
0x74616D69, 0x32786972, 0xab003378,
0x00020002, 0x00030002, 0x00000001, 0x00000000,
0x335f7376, 0xab00305f,
0x656e6957, 0x6f727020, 0x7463656a, 0xababab00,
0x0000ffff}

Definition at line 116 of file shader.c.

Referenced by test_constant_tables(), test_setting_matrices_table(), and test_SetValue().

◆ ctab_matrices2

const DWORD ctab_matrices2[]
static
Initial value:
= {
0xfffe0200,
0x0058fffe, FCC_CTAB,
0x0000001c, 0x0000012b, 0xfffe0200, 0x00000006, 0x0000001c, 0x00000100,
0x00000124,
0x00000094, 0x00070002, 0x00000003, 0x0000009c, 0x00000000,
0x000000ac, 0x000d0002, 0x00000002, 0x000000b4, 0x00000000,
0x000000c4, 0x000a0002, 0x00000003, 0x000000cc, 0x00000000,
0x000000dc, 0x000f0002, 0x00000002, 0x000000e4, 0x00000000,
0x000000f4, 0x00040002, 0x00000003, 0x000000fc, 0x00000000,
0x0000010c, 0x00000002, 0x00000004, 0x00000114, 0x00000000,
0x33783263, 0xababab00,
0x00030003, 0x00030002, 0x00000001, 0x00000000,
0x32783363, 0xababab00,
0x00030003, 0x00020003, 0x00000001, 0x00000000,
0x33783363, 0xababab00,
0x00030003, 0x00030003, 0x00000001, 0x00000000,
0x33783272, 0xababab00,
0x00030002, 0x00030002, 0x00000001, 0x00000000,
0x32783372, 0xababab00,
0x00030002, 0x00020003, 0x00000001, 0x00000000,
0x34783472, 0xababab00,
0x00030002, 0x00040004, 0x00000001, 0x00000000,
0x325f7376, 0x4100305f, 0x41414141, 0x00414141,
0x0000ffff}

Definition at line 140 of file shader.c.

Referenced by test_constant_tables(), and test_setting_matrices_table().

◆ ctab_matrices2_expected

const D3DXCONSTANT_DESC ctab_matrices2_expected[]
static
Initial value:
= {
{"c2x3", D3DXRS_FLOAT4, 7, 3, D3DXPC_MATRIX_COLUMNS, D3DXPT_FLOAT, 2, 3, 1, 0, 24, NULL},
{"c3x2", D3DXRS_FLOAT4, 13, 2, D3DXPC_MATRIX_COLUMNS, D3DXPT_FLOAT, 3, 2, 1, 0, 24, NULL},
{"c3x3", D3DXRS_FLOAT4, 10, 3, D3DXPC_MATRIX_COLUMNS, D3DXPT_FLOAT, 3, 3, 1, 0, 36, NULL},
{"r2x3", D3DXRS_FLOAT4, 15, 2, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 2, 3, 1, 0, 24, NULL},
{"r3x2", D3DXRS_FLOAT4, 4, 3, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 3, 2, 1, 0, 24, NULL},
{"r4x4", D3DXRS_FLOAT4, 0, 4, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 4, 4, 1, 0, 64, NULL}}

Definition at line 166 of file shader.c.

Referenced by test_constant_tables().

◆ ctab_matrices_expected

const D3DXCONSTANT_DESC ctab_matrices_expected[]
static
Initial value:
= {
{"fmatrix4x4", D3DXRS_FLOAT4, 0, 4, D3DXPC_MATRIX_COLUMNS, D3DXPT_FLOAT, 4, 4, 1, 0, 64, NULL},
{"imatrix2x3", D3DXRS_FLOAT4, 4, 2, D3DXPC_MATRIX_ROWS, D3DXPT_INT, 2, 3, 1, 0, 24, NULL},
{"fmatrix3x1", D3DXRS_FLOAT4, 7, 1, D3DXPC_MATRIX_COLUMNS, D3DXPT_FLOAT, 3, 1, 1, 0, 12, NULL},
}

Definition at line 134 of file shader.c.

Referenced by test_constant_tables().

◆ ctab_samplers

const DWORD ctab_samplers[]
static
Initial value:
= {
0xfffe0300,
0x0032fffe, FCC_CTAB,
0x0000001c, 0x000000b4, 0xfffe0300, 0x00000003, 0x0000001c, 0x20008100,
0x000000ac,
0x00000058, 0x00020002, 0x00000001, 0x00000064, 0x00000000,
0x00000074, 0x00000003, 0x00000001, 0x00000080, 0x00000000,
0x00000090, 0x00030003, 0x00000001, 0x0000009c, 0x00000000,
0x73746f6e, 0x6c706d61, 0xab007265,
0x00030001, 0x00040001, 0x00000001, 0x00000000,
0x706d6173, 0x3172656c, 0xababab00,
0x000c0004, 0x00010001, 0x00000001, 0x00000000,
0x706d6173, 0x3272656c, 0xababab00,
0x000d0004, 0x00010001, 0x00000001, 0x00000000,
0x335f7376, 0xab00305f,
0x656e6957, 0x6f727020, 0x7463656a, 0xababab00,
0x0000ffff}

Definition at line 260 of file shader.c.

Referenced by test_constant_tables(), and test_get_sampler_index().

◆ ctab_samplers_expected

const D3DXCONSTANT_DESC ctab_samplers_expected[]
static
Initial value:
= {
{"sampler1", D3DXRS_SAMPLER, 0, 1, D3DXPC_OBJECT, D3DXPT_SAMPLER2D, 1, 1, 1, 0, 4, NULL},
{"sampler2", D3DXRS_SAMPLER, 3, 1, D3DXPC_OBJECT, D3DXPT_SAMPLER3D, 1, 1, 1, 0, 4, NULL},
{"notsampler", D3DXRS_FLOAT4, 2, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 4, 1, 0, 16, NULL}}
@ D3DXPC_OBJECT
Definition: d3dx9shader.h:66
@ D3DXRS_SAMPLER
Definition: d3dx9shader.h:56
@ D3DXPT_SAMPLER3D
Definition: d3dx9shader.h:86
@ D3DXPT_SAMPLER2D
Definition: d3dx9shader.h:85

Definition at line 278 of file shader.c.

Referenced by test_constant_tables().

◆ ctab_with_default_values

const DWORD ctab_with_default_values[]
static

Definition at line 209 of file shader.c.

Referenced by test_constant_tables(), test_SetDefaults(), and test_SetValue().

◆ ctab_with_default_values_expected

const D3DXCONSTANT_DESC ctab_with_default_values_expected[]
static
Initial value:
= {
{"arr", D3DXRS_FLOAT4, 8, 3, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 3, 0, 12, arr_default_value},
{"vec4", D3DXRS_FLOAT4, 11, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 4, 1, 0, 16, vec4_default_value},
{"flt", D3DXRS_FLOAT4, 12, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, flt_default_value}}

Definition at line 253 of file shader.c.

Referenced by test_constant_tables().

◆ ctaboffset

UINT ctaboffset

Definition at line 1768 of file shader.c.

Referenced by test_get_shader_constant_variables(), and test_registerset().

◆ desc

Definition at line 1767 of file shader.c.

◆ float_count

unsigned int float_count

Definition at line 6188 of file shader.c.

Referenced by test_registerset_defaults().

◆ floats

const DWORD floats[1024]

Definition at line 6191 of file shader.c.

Referenced by test_registerset_defaults().

◆ flt_default_value

const float flt_default_value[] = {9.99, 0, 0, 0}
static

Definition at line 251 of file shader.c.

Referenced by test_SetDefaults().

◆ fullname

◆ fx_shader_with_ctab

const DWORD fx_shader_with_ctab[]
static
Initial value:
=
{
0x46580200,
0x002efffe, FCC_CTAB,
0x0000001c, 0x000000a4, 0xfffe0300, 0x00000003, 0x0000001c, 0x20008100,
0x0000009c,
0x00000058, 0x00070002, 0x00000001, 0x00000064, 0x00000000,
0x00000074, 0x00000002, 0x00000004, 0x00000080, 0x00000000,
0x00000090, 0x00040002, 0x00000003, 0x00000080, 0x00000000,
0x736e6f43, 0x746e6174, 0xabab0031,
0x00030001, 0x00040001, 0x00000001, 0x00000000,
0x736e6f43, 0x746e6174, 0xabab0032,
0x00030003, 0x00040004, 0x00000001, 0x00000000,
0x736e6f43, 0x746e6174, 0xabab0033,
0x335f7376, 0xab00305f,
0x656e6957, 0x6f727020, 0x7463656a, 0xababab00,
0x0000ffff
}

Definition at line 283 of file shader.c.

Referenced by test_get_shader_constant_table_ex().

◆ get_shader_samplers_blob

const DWORD get_shader_samplers_blob[]
static

Definition at line 1551 of file shader.c.

Referenced by test_get_shader_samplers().

◆ int_count

unsigned int int_count

Definition at line 6189 of file shader.c.

Referenced by test_registerset_defaults().

◆ ints

const DWORD ints[256]

Definition at line 6192 of file shader.c.

Referenced by test_registerset_defaults().

◆ mat3_default_value

const float mat3_default_value[] = {11, 55, 99, 1313, 22, 66, 1010, 1414, 33, 77, 1111, 1515, 44, 88, 1212, 1616}
static

Definition at line 248 of file shader.c.

Referenced by test_SetDefaults().

◆ mat4_default_value

const float mat4_default_value[] = {1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15, 4, 8, 12, 16}
static

Definition at line 247 of file shader.c.

Referenced by test_SetDefaults().

◆ name

Definition at line 5665 of file shader.c.

◆ ps_sincos_2_0

const DWORD ps_sincos_2_0[]
static
Initial value:
= {
0xffff0200,
0x00000025, 0xb00f0000, 0xa0e40000, 0xa0e40001, 0xa0e40002,
0x00000000,
0x0000ffff}

Definition at line 6656 of file shader.c.

Referenced by test_disassemble_shader().

◆ ps_sincos_3_0

const DWORD ps_sincos_3_0[]
static
Initial value:
= {
0xffff0300,
0x00000025, 0xb00f0000, 0xa0e40000,
0x00000000,
0x0000ffff}

Definition at line 6662 of file shader.c.

Referenced by test_disassemble_shader().

◆ ps_tex

const DWORD ps_tex[]
static
Initial value:
= {
0xffff0103,
0x00000042, 0xb00f0000,
0x00000000,
0x0000ffff}

Definition at line 6626 of file shader.c.

Referenced by test_disassemble_shader().

◆ ps_texcoord

const DWORD ps_texcoord[]
static
Initial value:
= {
0xffff0103,
0x00000040, 0xb00f0000,
0x00000000,
0x0000ffff}

Definition at line 6644 of file shader.c.

Referenced by test_disassemble_shader().

◆ ps_texcrd

const DWORD ps_texcrd[]
static
Initial value:
= {
0xffff0104,
0x00000040, 0xb00f0000, 0xa0e40000,
0x00000000,
0x0000ffff}

Definition at line 6650 of file shader.c.

Referenced by test_disassemble_shader().

◆ ps_texld_1_4

const DWORD ps_texld_1_4[]
static
Initial value:
= {
0xffff0104,
0x00000042, 0xb00f0000, 0xa0e40000,
0x00000000,
0x0000ffff}

Definition at line 6632 of file shader.c.

Referenced by test_disassemble_shader().

◆ ps_texld_2_0

const DWORD ps_texld_2_0[]
static
Initial value:
= {
0xffff0200,
0x00000042, 0xb00f0000, 0xa0e40000, 0xa0e40001,
0x00000000,
0x0000ffff}

Definition at line 6638 of file shader.c.

Referenced by test_disassemble_shader().

◆ registerset_blob_bigvec

const DWORD registerset_blob_bigvec[]
static
Initial value:
=
{
0xfffe0300, 0x0020fffe, 0x42415443, 0x0000001c, 0x0000004b, 0xfffe0300, 0x00000001, 0x0000001c,
0x00000100, 0x00000044, 0x00000030, 0x00000002, 0x00000009, 0x00000034, 0x00000000, 0x00666176,
0x00030001, 0x00030001, 0x0000000a, 0x00000000, 0x335f7376, 0x4d00305f, 0x6f726369, 0x74666f73,
0x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932,
0x332e3235, 0x00313131, 0x05000051, 0xa00f0009, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x0200001f, 0x80000000, 0x900f0000, 0x0200001f, 0x80000000, 0xe00f0000, 0x03000002, 0xe0020000,
0xa0000008, 0x90550000, 0x02000001, 0xe00d0000, 0xa0000009, 0x0000ffff,
}

Definition at line 5526 of file shader.c.

◆ registerset_blob_column

const DWORD registerset_blob_column[]
static
Initial value:
=
{
0xfffe0300, 0x0066fffe, 0x42415443, 0x0000001c, 0x00000163, 0xfffe0300, 0x00000005, 0x0000001c,
0x00000100, 0x0000015c, 0x00000080, 0x00000000, 0x00000006, 0x00000084, 0x00000094, 0x000000ac,
0x00020002, 0x00000002, 0x00000084, 0x000000b0, 0x000000d0, 0x00000002, 0x00000002, 0x000000d4,
0x000000e4, 0x00000104, 0x00000001, 0x00000006, 0x00000108, 0x00000118, 0x00000138, 0x00040002,
0x00000002, 0x00000108, 0x0000013c, 0xab006263, 0x00010003, 0x00020003, 0x00000001, 0x00000000,
0xffffffff, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000, 0xffffffff, 0x00666263, 0x3f800000,
0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0xab006663,
0x00030003, 0x00020003, 0x00000001, 0x00000000, 0x4171999a, 0x4174cccd, 0x41780000, 0x00000000,
0x41733333, 0x41766666, 0x4179999a, 0x00000000, 0xab006e63, 0x00020003, 0x00020003, 0x00000001,
0x00000000, 0x00000004, 0x00000006, 0x00000008, 0x00000000, 0x00000005, 0x00000007, 0x00000009,
0x00000000, 0x00666e63, 0x41f00000, 0x42040000, 0x42080000, 0x00000000, 0x41f80000, 0x42000000,
0x42100000, 0x00000000, 0x335f7376, 0x4d00305f, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820,
0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235, 0x00313131,
0x05000051, 0xa00f0006, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0200001f, 0x80000000,
0x900f0000, 0x0200001f, 0x80000000, 0xe00f0000, 0x01000028, 0xe0e40805, 0x03000005, 0x80010000,
0xa0aa0000, 0x90aa0000, 0x02000001, 0x80010001, 0xa0000006, 0x01000026, 0xf0e40004, 0x04000004,
0x80010001, 0x80000000, 0xa0aa0003, 0x80000001, 0x00000027, 0x02000001, 0x80020001, 0xa0000006,
0x0000002a, 0x03000005, 0x80010000, 0xa0aa0001, 0x90550000, 0x02000001, 0x80020001, 0xa0000006,
0x01000026, 0xf0e40005, 0x04000004, 0x80020001, 0x80000000, 0xa0aa0005, 0x80550001, 0x00000027,
0x02000001, 0x80010001, 0xa0000006, 0x0000002b, 0x02000001, 0xe0030000, 0x80e40001, 0x02000001,
0xe00c0000, 0xa0000006, 0x0000ffff,
}

Definition at line 3045 of file shader.c.

◆ registerset_blob_column_array

const DWORD registerset_blob_column_array[]
static
Initial value:
=
{
0xfffe0300, 0x0096fffe, 0x42415443, 0x0000001c, 0x00000223, 0xfffe0300, 0x00000005, 0x0000001c,
0x00000100, 0x0000021c, 0x00000080, 0x00000000, 0x0000000c, 0x00000084, 0x00000094, 0x000000c4,
0x00040002, 0x00000004, 0x000000cc, 0x000000dc, 0x0000011c, 0x00000002, 0x00000004, 0x00000120,
0x00000130, 0x00000170, 0x00000001, 0x0000000c, 0x00000174, 0x00000184, 0x000001c4, 0x00080002,
0x00000004, 0x000001cc, 0x000001dc, 0x00626163, 0x00010003, 0x00020003, 0x00000002, 0x00000000,
0xffffffff, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000,
0xffffffff, 0xffffffff, 0x00000000, 0xffffffff, 0x66626163, 0xababab00, 0x00010003, 0x00020003,
0x00000002, 0x00000000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000,
0x3f800000, 0x00000000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000,
0x3f800000, 0x00000000, 0x00666163, 0x00030003, 0x00020003, 0x00000002, 0x00000000, 0x3f8ccccd,
0x40533333, 0x40b00000, 0x00000000, 0x400ccccd, 0x408ccccd, 0x40d33333, 0x00000000, 0x40f66666,
0x411e6666, 0x3fa66666, 0x00000000, 0x410ccccd, 0x3f99999a, 0x3fb33333, 0x00000000, 0x006e6163,
0x00020003, 0x00020003, 0x00000002, 0x00000000, 0x0000000e, 0x00000010, 0x00000012, 0x00000000,
0x0000000f, 0x00000047, 0x00000013, 0x00000000, 0x00000037, 0x00000060, 0x00000061, 0x00000000,
0x0000003f, 0x00000060, 0x0000000d, 0x00000000, 0x666e6163, 0xababab00, 0x00020003, 0x00020003,
0x00000002, 0x00000000, 0x43960000, 0x43978000, 0x43980000, 0x00000000, 0x43968000, 0x43970000,
0x43990000, 0x00000000, 0x43af0000, 0x44238000, 0x43a30000, 0x00000000, 0x43b68000, 0x44190000,
0x4479c000, 0x00000000, 0x335f7376, 0x4d00305f, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820,
0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235, 0x00313131,
0x05000051, 0xa00f000c, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0200001f, 0x80000000,
0x900f0000, 0x0200001f, 0x80000000, 0xe00f0000, 0x01000028, 0xe0e4080b, 0x03000005, 0x80010000,
0xa0aa0002, 0x90aa0000, 0x02000001, 0x80010001, 0xa000000c, 0x01000026, 0xf0e4000a, 0x04000004,
0x80010001, 0x80000000, 0xa0aa0007, 0x80000001, 0x00000027, 0x02000001, 0x80020001, 0xa000000c,
0x0000002a, 0x03000005, 0x80010000, 0xa0aa0003, 0x90550000, 0x02000001, 0x80020001, 0xa000000c,
0x01000026, 0xf0e4000b, 0x04000004, 0x80020001, 0x80000000, 0xa0aa000b, 0x80550001, 0x00000027,
0x02000001, 0x80010001, 0xa000000c, 0x0000002b, 0x02000001, 0xe0030000, 0x80e40001, 0x02000001,
0xe00c0000, 0xa000000c, 0x0000ffff,
}

Definition at line 3309 of file shader.c.

◆ registerset_blob_matrix_column_clamp

const DWORD registerset_blob_matrix_column_clamp[]
static
Initial value:
=
{
0xfffe0300, 0x003efffe, 0x42415443, 0x0000001c, 0x000000c3, 0xfffe0300, 0x00000002, 0x0000001c,
0x00000100, 0x000000bc, 0x00000044, 0x00000002, 0x00000002, 0x00000048, 0x00000058, 0x00000098,
0x00020002, 0x00000001, 0x0000009c, 0x000000ac, 0xab006663, 0x00030003, 0x00040004, 0x00000001,
0x00000000, 0x3f8ccccd, 0x40b00000, 0x411e6666, 0x3fc00000, 0x400ccccd, 0x40d33333, 0x3f99999a,
0x3fcccccd, 0x40533333, 0x40f66666, 0x3fa66666, 0x3fd9999a, 0x408ccccd, 0x410ccccd, 0x3fb33333,
0x3fe66666, 0xabab0066, 0x00030000, 0x00010001, 0x00000001, 0x00000000, 0x420551ec, 0x00000000,
0x00000000, 0x00000000, 0x335f7376, 0x4d00305f, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820,
0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235, 0x00313131,
0x05000051, 0xa00f0003, 0x00000000, 0x3f800000, 0x00000000, 0x00000000, 0x0200001f, 0x80000000,
0xe00f0000, 0x02000001, 0x80020000, 0xa0550001, 0x03000005, 0xe00b0000, 0x80550000, 0xa0240003,
0x02000001, 0xe0040000, 0xa0000002, 0x0000ffff,
}

Definition at line 5636 of file shader.c.

◆ registerset_blob_row

const DWORD registerset_blob_row[]
static
Initial value:
=
{
0xfffe0300, 0x0076fffe, 0x42415443, 0x0000001c, 0x000001a3, 0xfffe0300, 0x00000005, 0x0000001c,
0x00000100, 0x0000019c, 0x00000080, 0x00000000, 0x00000006, 0x00000084, 0x00000094, 0x000000ac,
0x00030002, 0x00000003, 0x00000084, 0x000000b0, 0x000000e0, 0x00000002, 0x00000003, 0x000000e4,
0x000000f4, 0x00000124, 0x00000001, 0x00000006, 0x00000128, 0x00000138, 0x00000168, 0x00060002,
0x00000003, 0x00000128, 0x0000016c, 0xab006272, 0x00010002, 0x00020003, 0x00000001, 0x00000000,
0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0x00666272, 0x3f800000,
0x3f800000, 0x00000000, 0x00000000, 0x3f800000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000,
0x3f800000, 0x00000000, 0x00000000, 0xab006672, 0x00030002, 0x00020003, 0x00000001, 0x00000000,
0x42be3333, 0x42be6666, 0x00000000, 0x00000000, 0x42be999a, 0x42becccd, 0x00000000, 0x00000000,
0x42bf0000, 0x42bf3333, 0x00000000, 0x00000000, 0xab006e72, 0x00020002, 0x00020003, 0x00000001,
0x00000000, 0x00000050, 0x00000051, 0x00000001, 0x00000000, 0x00000052, 0x00000053, 0x00000001,
0x00000000, 0x00000054, 0x00000055, 0x00000001, 0x00000000, 0x00666e72, 0x42140000, 0x41500000,
0x00000000, 0x00000000, 0x42c40000, 0x42580000, 0x00000000, 0x00000000, 0x429a0000, 0x42100000,
0x00000000, 0x00000000, 0x335f7376, 0x4d00305f, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820,
0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235, 0x00313131,
0x05000051, 0xa00f0009, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0200001f, 0x80000000,
0x900f0000, 0x0200001f, 0x80000000, 0xe00f0000, 0x01000028, 0xe0e40805, 0x03000005, 0x80010000,
0xa0000002, 0x90aa0000, 0x02000001, 0x80010001, 0xa0000009, 0x01000026, 0xf0e40004, 0x04000004,
0x80010001, 0x80000000, 0xa0550005, 0x80000001, 0x00000027, 0x02000001, 0x80020001, 0xa0000009,
0x0000002a, 0x03000005, 0x80010000, 0xa0550002, 0x90550000, 0x02000001, 0x80020001, 0xa0000009,
0x01000026, 0xf0e40005, 0x04000004, 0x80020001, 0x80000000, 0xa0550008, 0x80550001, 0x00000027,
0x02000001, 0x80010001, 0xa0000009, 0x0000002b, 0x02000001, 0xe0030000, 0x80e40001, 0x02000001,
0xe00c0000, 0xa0000009, 0x0000ffff,
}

Definition at line 3723 of file shader.c.

◆ registerset_blob_row_array

const DWORD registerset_blob_row_array[]
static

Definition at line 4032 of file shader.c.

◆ registerset_blob_scalar

const DWORD registerset_blob_scalar[]
static
Initial value:
=
{
0xfffe0300, 0x0051fffe, 0x42415443, 0x0000001c, 0x0000010f, 0xfffe0300, 0x00000005, 0x0000001c,
0x00000100, 0x00000108, 0x00000080, 0x00000000, 0x00000001, 0x00000084, 0x00000094, 0x00000098,
0x00020002, 0x00000001, 0x00000084, 0x0000009c, 0x000000ac, 0x00000002, 0x00000001, 0x000000b0,
0x000000c0, 0x000000d0, 0x00000001, 0x00000001, 0x000000d4, 0x000000e4, 0x000000f4, 0x00010002,
0x00000001, 0x000000d4, 0x000000f8, 0xabab0062, 0x00010000, 0x00010001, 0x00000001, 0x00000000,
0xffffffff, 0xab006662, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0xabab0066, 0x00030000,
0x00010001, 0x00000001, 0x00000000, 0x40a33333, 0x00000000, 0x00000000, 0x00000000, 0xabab006e,
0x00020000, 0x00010001, 0x00000001, 0x00000000, 0x00000008, 0x00000000, 0x00000001, 0x00000000,
0xab00666e, 0x41300000, 0x00000000, 0x00000000, 0x00000000, 0x335f7376, 0x4d00305f, 0x6f726369,
0x74666f73, 0x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072,
0x392e3932, 0x332e3235, 0x00313131, 0x05000051, 0xa00f0003, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x0200001f, 0x80000000, 0x900f0000, 0x0200001f, 0x80000000, 0xe00f0000, 0x01000028,
0xe0e40800, 0x03000005, 0x80010000, 0xa0000000, 0x90aa0000, 0x02000001, 0x80010001, 0xa0000003,
0x01000026, 0xf0e40000, 0x04000004, 0x80010001, 0x80000000, 0xa0000001, 0x80000001, 0x00000027,
0x02000001, 0x80020001, 0xa0000003, 0x0000002a, 0x03000005, 0x80010000, 0xa0000000, 0x90550000,
0x02000001, 0x80020001, 0xa0000003, 0x01000026, 0xf0e40000, 0x04000004, 0x80020001, 0x80000000,
0xa0000002, 0x80550001, 0x00000027, 0x02000001, 0x80010001, 0xa0000003, 0x0000002b, 0x02000001,
0xe0030000, 0x80e40001, 0x02000001, 0xe00c0000, 0xa0000003, 0x0000ffff,
}

Definition at line 2035 of file shader.c.

◆ registerset_blob_scalar_array

const DWORD registerset_blob_scalar_array[]
static
Initial value:
=
{
0xfffe0300, 0x006afffe, 0x42415443, 0x0000001c, 0x00000173, 0xfffe0300, 0x00000005, 0x0000001c,
0x00000100, 0x0000016c, 0x00000080, 0x00000000, 0x00000002, 0x00000084, 0x00000094, 0x0000009c,
0x00040002, 0x00000002, 0x000000a0, 0x000000b0, 0x000000d0, 0x00000002, 0x00000002, 0x000000d4,
0x000000e4, 0x00000104, 0x00000001, 0x00000002, 0x00000108, 0x00000118, 0x00000138, 0x00020002,
0x00000002, 0x0000013c, 0x0000014c, 0xab006261, 0x00010000, 0x00010001, 0x00000002, 0x00000000,
0xffffffff, 0x00000000, 0x00666261, 0x00010000, 0x00010001, 0x00000002, 0x00000000, 0x3f800000,
0x00000000, 0x00000000, 0x00000000, 0x3f800000, 0x00000000, 0x00000000, 0x00000000, 0xab006661,
0x00030000, 0x00010001, 0x00000002, 0x00000000, 0x40466666, 0x00000000, 0x00000000, 0x00000000,
0x404ccccd, 0x00000000, 0x00000000, 0x00000000, 0xab006e61, 0x00020000, 0x00010001, 0x00000002,
0x00000000, 0x00000020, 0x00000000, 0x00000001, 0x00000000, 0x00000021, 0x00000000, 0x00000001,
0x00000000, 0x00666e61, 0x00020000, 0x00010001, 0x00000002, 0x00000000, 0x41600000, 0x00000000,
0x00000000, 0x00000000, 0x41700000, 0x00000000, 0x00000000, 0x00000000, 0x335f7376, 0x4d00305f,
0x6f726369, 0x74666f73, 0x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970,
0x2e392072, 0x392e3932, 0x332e3235, 0x00313131, 0x05000051, 0xa00f0006, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x0200001f, 0x80000000, 0x900f0000, 0x0200001f, 0x80000000, 0xe00f0000,
0x01000028, 0xe0e40801, 0x03000005, 0x80010000, 0xa0000000, 0x90aa0000, 0x02000001, 0x80010001,
0xa0000006, 0x01000026, 0xf0e40001, 0x04000004, 0x80010001, 0x80000000, 0xa0000003, 0x80000001,
0x00000027, 0x02000001, 0x80020001, 0xa0000006, 0x0000002a, 0x03000005, 0x80010000, 0xa0000001,
0x90550000, 0x02000001, 0x80020001, 0xa0000006, 0x01000026, 0xf0e40000, 0x04000004, 0x80020001,
0x80000000, 0xa0000005, 0x80550001, 0x00000027, 0x02000001, 0x80010001, 0xa0000006, 0x0000002b,
0x02000001, 0xe0030000, 0x80e40001, 0x02000001, 0xe00c0000, 0xa0000006, 0x0000ffff,
}

Definition at line 2255 of file shader.c.

◆ registerset_blob_special_int

const DWORD registerset_blob_special_int[]
static
Initial value:
=
{
0xfffe0300, 0x0038fffe, 0x42415443, 0x0000001c, 0x000000ab, 0xfffe0300, 0x00000001, 0x0000001c,
0x00000100, 0x000000a4, 0x00000030, 0x00000001, 0x00000009, 0x00000034, 0x00000044, 0x006e6172,
0x00020002, 0x00020003, 0x00000002, 0x00000000, 0x00000004, 0x00000005, 0x00000001, 0x00000000,
0x00000006, 0x00000001, 0x00000001, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000000,
0x00000002, 0x00000003, 0x00000001, 0x00000000, 0x00000004, 0x00000007, 0x00000001, 0x00000000,
0x00000009, 0x00000001, 0x00000001, 0x00000000, 0x335f7376, 0x4d00305f, 0x6f726369, 0x74666f73,
0x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932,
0x332e3235, 0x00313131, 0x05000051, 0xa00f0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x0200001f, 0x80000000, 0x900f0000, 0x0200001f, 0x80000000, 0xe00f0000, 0x02000001, 0x80010000,
0xa0000000, 0x01000026, 0xf0e40008, 0x03000002, 0x80010000, 0x80000000, 0x90550000, 0x00000027,
0x02000001, 0xe0020000, 0x80000000, 0x02000001, 0xe00d0000, 0xa0000000, 0x0000ffff,
}

Definition at line 5492 of file shader.c.

◆ registerset_blob_struct

const DWORD registerset_blob_struct[]
static

Definition at line 4530 of file shader.c.

◆ registerset_blob_struct_array

const DWORD registerset_blob_struct_array[]
static

Definition at line 4815 of file shader.c.

◆ registerset_blob_struct_struct

const DWORD registerset_blob_struct_struct[]
static

Definition at line 5169 of file shader.c.

◆ registerset_blob_vector

const DWORD registerset_blob_vector[]
static
Initial value:
=
{
0xfffe0300, 0x0053fffe, 0x42415443, 0x0000001c, 0x00000117, 0xfffe0300, 0x00000005, 0x0000001c,
0x00000100, 0x00000110, 0x00000080, 0x00000000, 0x00000003, 0x00000084, 0x00000094, 0x000000a0,
0x00020002, 0x00000001, 0x00000084, 0x000000a4, 0x000000b4, 0x00000002, 0x00000001, 0x000000b8,
0x000000c8, 0x000000d8, 0x00000001, 0x00000003, 0x000000dc, 0x000000ec, 0x000000fc, 0x00010002,
0x00000001, 0x000000dc, 0x00000100, 0xab006276, 0x00010001, 0x00030001, 0x00000001, 0x00000000,
0xffffffff, 0x00000000, 0xffffffff, 0x00666276, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000,
0xab006676, 0x00030001, 0x00030001, 0x00000001, 0x00000000, 0x40a33333, 0x40a66666, 0x40a9999a,
0x00000000, 0xab006e76, 0x00020001, 0x00030001, 0x00000001, 0x00000000, 0x00000007, 0x00000008,
0x00000009, 0x00000000, 0x00666e76, 0x41300000, 0x42aa0000, 0x42780000, 0x00000000, 0x335f7376,
0x4d00305f, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320,
0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235, 0x00313131, 0x05000051, 0xa00f0003, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x0200001f, 0x80000000, 0x900f0000, 0x0200001f, 0x80000000,
0xe00f0000, 0x01000028, 0xe0e40802, 0x03000005, 0x80010000, 0xa0aa0000, 0x90aa0000, 0x02000001,
0x80010001, 0xa0000003, 0x01000026, 0xf0e40002, 0x04000004, 0x80010001, 0x80000000, 0xa0aa0001,
0x80000001, 0x00000027, 0x02000001, 0x80020001, 0xa0000003, 0x0000002a, 0x03000005, 0x80010000,
0xa0550000, 0x90550000, 0x02000001, 0x80020001, 0xa0000003, 0x01000026, 0xf0e40001, 0x04000004,
0x80020001, 0x80000000, 0xa0aa0002, 0x80550001, 0x00000027, 0x02000001, 0x80010001, 0xa0000003,
0x0000002b, 0x02000001, 0xe0030000, 0x80e40001, 0x02000001, 0xe00c0000, 0xa0000003, 0x0000ffff,
}

Definition at line 2541 of file shader.c.

◆ registerset_blob_vector_array

const DWORD registerset_blob_vector_array[]
static
Initial value:
=
{
0xfffe0300, 0x0070fffe, 0x42415443, 0x0000001c, 0x0000018b, 0xfffe0300, 0x00000005, 0x0000001c,
0x00000100, 0x00000184, 0x00000080, 0x00000000, 0x00000006, 0x00000084, 0x00000094, 0x000000ac,
0x00040002, 0x00000002, 0x000000b4, 0x000000c4, 0x000000e4, 0x00000002, 0x00000002, 0x000000e8,
0x000000f8, 0x00000118, 0x00000001, 0x00000006, 0x0000011c, 0x0000012c, 0x0000014c, 0x00020002,
0x00000002, 0x00000154, 0x00000164, 0x00626176, 0x00010001, 0x00030001, 0x00000002, 0x00000000,
0xffffffff, 0x00000000, 0xffffffff, 0xffffffff, 0x00000000, 0xffffffff, 0x66626176, 0xababab00,
0x00010001, 0x00030001, 0x00000002, 0x00000000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000000,
0x3f800000, 0x3f800000, 0x3f800000, 0x00000000, 0x00666176, 0x00030001, 0x00030001, 0x00000002,
0x00000000, 0x425c6666, 0x425ccccd, 0x425d3333, 0x00000000, 0x425d999a, 0x425e0000, 0x425e6666,
0x00000000, 0x006e6176, 0x00020001, 0x00030001, 0x00000002, 0x00000000, 0x00000046, 0x00000050,
0x0000005a, 0x00000000, 0x00000064, 0x0000006e, 0x00000078, 0x00000000, 0x666e6176, 0xababab00,
0x00020001, 0x00030001, 0x00000002, 0x00000000, 0x43020000, 0x430c0000, 0x43160000, 0x00000000,
0x43200000, 0x432a0000, 0x43340000, 0x00000000, 0x335f7376, 0x4d00305f, 0x6f726369, 0x74666f73,
0x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932,
0x332e3235, 0x00313131, 0x05000051, 0xa00f0006, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x0200001f, 0x80000000, 0x900f0000, 0x0200001f, 0x80000000, 0xe00f0000, 0x01000028, 0xe0e40805,
0x03000005, 0x80010000, 0xa0aa0001, 0x90aa0000, 0x02000001, 0x80010001, 0xa0000006, 0x01000026,
0xf0e40005, 0x04000004, 0x80010001, 0x80000000, 0xa0aa0003, 0x80000001, 0x00000027, 0x02000001,
0x80020001, 0xa0000006, 0x0000002a, 0x03000005, 0x80010000, 0xa0550000, 0x90550000, 0x02000001,
0x80020001, 0xa0000006, 0x01000026, 0xf0e40004, 0x04000004, 0x80020001, 0x80000000, 0xa0aa0005,
0x80550001, 0x00000027, 0x02000001, 0x80010001, 0xa0000006, 0x0000002b, 0x02000001, 0xe0030000,
0x80e40001, 0x02000001, 0xe00c0000, 0xa0000006, 0x0000ffff,
}

Definition at line 2746 of file shader.c.

◆ registerset_constants_bigvec_float

const struct registerset_constants registerset_constants_bigvec_float[]
static
Initial value:
=
{
{"vaf", {"vaf", D3DXRS_FLOAT4, 0, 9, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 10, 0, 120, NULL}, 0},
{"vaf[0]", {"vaf", D3DXRS_FLOAT4, 0, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 0},
{"vaf[1]", {"vaf", D3DXRS_FLOAT4, 1, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 0},
{"vaf[2]", {"vaf", D3DXRS_FLOAT4, 2, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 0},
{"vaf[3]", {"vaf", D3DXRS_FLOAT4, 3, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 0},
{"vaf[4]", {"vaf", D3DXRS_FLOAT4, 4, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 0},
{"vaf[5]", {"vaf", D3DXRS_FLOAT4, 5, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 0},
{"vaf[6]", {"vaf", D3DXRS_FLOAT4, 6, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 0},
{"vaf[7]", {"vaf", D3DXRS_FLOAT4, 7, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 0},
{"vaf[8]", {"vaf", D3DXRS_FLOAT4, 8, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 0},
{"vaf[9]", {"vaf", D3DXRS_FLOAT4, 9, 0, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 0},
}

Definition at line 5537 of file shader.c.

◆ registerset_constants_column_array_bool

const struct registerset_constants registerset_constants_column_array_bool[]
static
Initial value:
=
{
{"cab", {"cab", D3DXRS_BOOL, 0, 12, D3DXPC_MATRIX_COLUMNS, D3DXPT_BOOL, 3, 2, 2, 0, 48, NULL}, 37},
{"cab[0]", {"cab", D3DXRS_BOOL, 0, 6, D3DXPC_MATRIX_COLUMNS, D3DXPT_BOOL, 3, 2, 1, 0, 24, NULL}, 37},
{"cab[1]", {"cab", D3DXRS_BOOL, 6, 6, D3DXPC_MATRIX_COLUMNS, D3DXPT_BOOL, 3, 2, 1, 0, 24, NULL}, 43},
}

Definition at line 3486 of file shader.c.

◆ registerset_constants_column_array_bool_float

const struct registerset_constants registerset_constants_column_array_bool_float[]
static
Initial value:
=
{
{"cabf", {"cabf", D3DXRS_FLOAT4, 4, 4, D3DXPC_MATRIX_COLUMNS, D3DXPT_BOOL, 3, 2, 2, 0, 48, NULL}, 55},
{"cabf[0]", {"cabf", D3DXRS_FLOAT4, 4, 2, D3DXPC_MATRIX_COLUMNS, D3DXPT_BOOL, 3, 2, 1, 0, 24, NULL}, 55},
{"cabf[1]", {"cabf", D3DXRS_FLOAT4, 6, 2, D3DXPC_MATRIX_COLUMNS, D3DXPT_BOOL, 3, 2, 1, 0, 24, NULL}, 63},
}

Definition at line 3632 of file shader.c.

◆ registerset_constants_column_array_float

const struct registerset_constants registerset_constants_column_array_float[]
static
Initial value:
=
{
{"caf", {"caf", D3DXRS_FLOAT4, 0, 4, D3DXPC_MATRIX_COLUMNS, D3DXPT_FLOAT, 3, 2, 2, 0, 48, NULL}, 76},
{"caf[0]", {"caf", D3DXRS_FLOAT4, 0, 2, D3DXPC_MATRIX_COLUMNS, D3DXPT_FLOAT, 3, 2, 1, 0, 24, NULL}, 76},
{"caf[1]", {"caf", D3DXRS_FLOAT4, 2, 2, D3DXPC_MATRIX_COLUMNS, D3DXPT_FLOAT, 3, 2, 1, 0, 24, NULL}, 84},
}

Definition at line 3340 of file shader.c.

◆ registerset_constants_column_array_int

const struct registerset_constants registerset_constants_column_array_int[]
static
Initial value:
=
{
{"can", {"can", D3DXRS_INT4, 0, 12, D3DXPC_MATRIX_COLUMNS, D3DXPT_INT, 3, 2, 2, 0, 48, NULL}, 97},
{"can[0]", {"can", D3DXRS_INT4, 0, 2, D3DXPC_MATRIX_COLUMNS, D3DXPT_INT, 3, 2, 1, 0, 24, NULL}, 97},
{"can[1]", {"can", D3DXRS_INT4, 2, 2, D3DXPC_MATRIX_COLUMNS, D3DXPT_INT, 3, 2, 1, 0, 24, NULL}, 105},
}

Definition at line 3413 of file shader.c.

◆ registerset_constants_column_array_int_float

const struct registerset_constants registerset_constants_column_array_int_float[]
static
Initial value:
=
{
{"canf", {"canf", D3DXRS_FLOAT4, 8, 4, D3DXPC_MATRIX_COLUMNS, D3DXPT_INT, 3, 2, 2, 0, 48, NULL}, 119},
{"canf[0]", {"canf", D3DXRS_FLOAT4, 8, 2, D3DXPC_MATRIX_COLUMNS, D3DXPT_INT, 3, 2, 1, 0, 24, NULL}, 119},
{"canf[1]", {"canf", D3DXRS_FLOAT4, 10, 2, D3DXPC_MATRIX_COLUMNS, D3DXPT_INT, 3, 2, 1, 0, 24, NULL}, 127},
}

Definition at line 3559 of file shader.c.

◆ registerset_constants_column_bool

const struct registerset_constants registerset_constants_column_bool[]
static
Initial value:
=
{
{"cb", {"cb", D3DXRS_BOOL, 0, 6, D3DXPC_MATRIX_COLUMNS, D3DXPT_BOOL, 3, 2, 1, 0, 24, NULL}, 37},
}

Definition at line 3158 of file shader.c.

◆ registerset_constants_column_bool_float

const struct registerset_constants registerset_constants_column_bool_float[]
static
Initial value:
=
{
{"cbf", {"cbf", D3DXRS_FLOAT4, 2, 2, D3DXPC_MATRIX_COLUMNS, D3DXPT_BOOL, 3, 2, 1, 0, 24, NULL}, 44},
}

Definition at line 3247 of file shader.c.

◆ registerset_constants_column_float

const struct registerset_constants registerset_constants_column_float[]
static
Initial value:
=
{
{"cf", {"cf", D3DXRS_FLOAT4, 0, 2, D3DXPC_MATRIX_COLUMNS, D3DXPT_FLOAT, 3, 2, 1, 0, 24, NULL}, 57},
}

Definition at line 3070 of file shader.c.

◆ registerset_constants_column_int

const struct registerset_constants registerset_constants_column_int[]
static
Initial value:
=
{
{"cn", {"cn", D3DXRS_INT4, 0, 6, D3DXPC_MATRIX_COLUMNS, D3DXPT_INT, 3, 2, 1, 0, 24, NULL}, 70},
}

Definition at line 3114 of file shader.c.

◆ registerset_constants_column_int_float

const struct registerset_constants registerset_constants_column_int_float[]
static
Initial value:
=
{
{"cnf", {"cnf", D3DXRS_FLOAT4, 4, 2, D3DXPC_MATRIX_COLUMNS, D3DXPT_INT, 3, 2, 1, 0, 24, NULL}, 79},
}

Definition at line 3202 of file shader.c.

◆ registerset_constants_matrix_column_clamp

const struct registerset_constants registerset_constants_matrix_column_clamp[]
static
Initial value:
=
{
{"cf", {"cf", D3DXRS_FLOAT4, 0, 2, D3DXPC_MATRIX_COLUMNS, D3DXPT_FLOAT, 4, 4, 1, 0, 64, NULL}, 0},
{"f", {"f", D3DXRS_FLOAT4, 2, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, NULL}, 0},
}

Definition at line 5651 of file shader.c.

◆ registerset_constants_row_array_bool

const struct registerset_constants registerset_constants_row_array_bool[]
static
Initial value:
=
{
{"rab", {"rab", D3DXRS_BOOL, 0, 12, D3DXPC_MATRIX_ROWS, D3DXPT_BOOL, 3, 2, 2, 0, 48, NULL}, 37},
{"rab[0]", {"rab", D3DXRS_BOOL, 0, 6, D3DXPC_MATRIX_ROWS, D3DXPT_BOOL, 3, 2, 1, 0, 24, NULL}, 37},
{"rab[1]", {"rab", D3DXRS_BOOL, 6, 6, D3DXPC_MATRIX_ROWS, D3DXPT_BOOL, 3, 2, 1, 0, 24, NULL}, 43},
}

Definition at line 4253 of file shader.c.

◆ registerset_constants_row_array_bool_float

const struct registerset_constants registerset_constants_row_array_bool_float[]
static
Initial value:
=
{
{"rabf", {"rabf", D3DXRS_FLOAT4, 6, 6, D3DXPC_MATRIX_ROWS, D3DXPT_BOOL, 3, 2, 2, 0, 48, NULL}, 55},
{"rabf[0]", {"rabf", D3DXRS_FLOAT4, 6, 3, D3DXPC_MATRIX_ROWS, D3DXPT_BOOL, 3, 2, 1, 0, 24, NULL}, 55},
{"rabf[1]", {"rabf", D3DXRS_FLOAT4, 9, 3, D3DXPC_MATRIX_ROWS, D3DXPT_BOOL, 3, 2, 1, 0, 24, NULL}, 67},
}

Definition at line 4419 of file shader.c.

◆ registerset_constants_row_array_float

const struct registerset_constants registerset_constants_row_array_float[]
static
Initial value:
=
{
{"raf", {"raf", D3DXRS_FLOAT4, 0, 6, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 3, 2, 2, 0, 48, NULL}, 84},
{"raf[0]", {"raf", D3DXRS_FLOAT4, 0, 3, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 3, 2, 1, 0, 24, NULL}, 84},
{"raf[1]", {"raf", D3DXRS_FLOAT4, 3, 3, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 3, 2, 1, 0, 24, NULL}, 96},
}

Definition at line 4067 of file shader.c.

◆ registerset_constants_row_array_int

const struct registerset_constants registerset_constants_row_array_int[]
static
Initial value:
=
{
{"ran", {"ran", D3DXRS_INT4, 0, 12, D3DXPC_MATRIX_ROWS, D3DXPT_INT, 3, 2, 2, 0, 48, NULL}, 113},
{"ran[0]", {"ran", D3DXRS_INT4, 0, 3, D3DXPC_MATRIX_ROWS, D3DXPT_INT, 3, 2, 1, 0, 24, NULL}, 113},
{"ran[1]", {"ran", D3DXRS_INT4, 3, 3, D3DXPC_MATRIX_ROWS, D3DXPT_INT, 3, 2, 1, 0, 24, NULL}, 125},
}

Definition at line 4160 of file shader.c.

◆ registerset_constants_row_array_int_float

const struct registerset_constants registerset_constants_row_array_int_float[]
static
Initial value:
=
{
{"ranf", {"ranf", D3DXRS_FLOAT4, 12, 6, D3DXPC_MATRIX_ROWS, D3DXPT_INT, 3, 2, 2, 0, 48, NULL}, 143},
{"ranf[0]", {"ranf", D3DXRS_FLOAT4, 12, 3, D3DXPC_MATRIX_ROWS, D3DXPT_INT, 3, 2, 1, 0, 24, NULL}, 143},
{"ranf[1]", {"ranf", D3DXRS_FLOAT4, 15, 3, D3DXPC_MATRIX_ROWS, D3DXPT_INT, 3, 2, 1, 0, 24, NULL}, 155},
}

Definition at line 4326 of file shader.c.

◆ registerset_constants_row_bool

const struct registerset_constants registerset_constants_row_bool[]
static
Initial value:
=
{
{"rb", {"rb", D3DXRS_BOOL, 0, 6, D3DXPC_MATRIX_ROWS, D3DXPT_BOOL, 3, 2, 1, 0, 24, NULL}, 37},
}

Definition at line 3860 of file shader.c.

◆ registerset_constants_row_bool_float

const struct registerset_constants registerset_constants_row_bool_float[]
static
Initial value:
=
{
{"rbf", {"rbf", D3DXRS_FLOAT4, 3, 3, D3DXPC_MATRIX_ROWS, D3DXPT_BOOL, 3, 2, 1, 0, 24, NULL}, 44},
}

Definition at line 3959 of file shader.c.

◆ registerset_constants_row_float

const struct registerset_constants registerset_constants_row_float[]
static
Initial value:
=
{
{"rf", {"rf", D3DXRS_FLOAT4, 0, 3, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 3, 2, 1, 0, 24, NULL}, 61},
}

Definition at line 3750 of file shader.c.

◆ registerset_constants_row_int

const struct registerset_constants registerset_constants_row_int[]
static
Initial value:
=
{
{"rn", {"rn", D3DXRS_INT4, 0, 6, D3DXPC_MATRIX_ROWS, D3DXPT_INT, 3, 2, 1, 0, 24, NULL}, 78},
}

Definition at line 3805 of file shader.c.

◆ registerset_constants_row_int_float

const struct registerset_constants registerset_constants_row_int_float[]
static
Initial value:
=
{
{"rnf", {"rnf", D3DXRS_FLOAT4, 6, 3, D3DXPC_MATRIX_ROWS, D3DXPT_INT, 3, 2, 1, 0, 24, NULL}, 91},
}

Definition at line 3904 of file shader.c.

◆ registerset_constants_scalar_array_bool

const struct registerset_constants registerset_constants_scalar_array_bool[]
static
Initial value:
=
{
{"ab", {"ab", D3DXRS_BOOL, 0, 2, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 2, 0, 8, NULL}, 37},
{"ab[0]", {"ab", D3DXRS_BOOL, 0, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 37},
{"ab[1]", {"ab", D3DXRS_BOOL, 1, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 38},
}

Definition at line 2382 of file shader.c.

◆ registerset_constants_scalar_array_bool_float

const struct registerset_constants registerset_constants_scalar_array_bool_float[]
static
Initial value:
=
{
{"abf", {"abf", D3DXRS_FLOAT4, 4, 2, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 2, 0, 8, NULL}, 44},
{"abf[0]", {"abf", D3DXRS_FLOAT4, 4, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 44},
{"abf[1]", {"abf", D3DXRS_FLOAT4, 5, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 48},
}

Definition at line 2421 of file shader.c.

◆ registerset_constants_scalar_array_float

const struct registerset_constants registerset_constants_scalar_array_float[]
static
Initial value:
=
{
{"af", {"af", D3DXRS_FLOAT4, 0, 2, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 2, 0, 8, NULL}, 57},
{"af[0]", {"af", D3DXRS_FLOAT4, 0, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, NULL}, 57},
{"af[1]", {"af", D3DXRS_FLOAT4, 1, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, NULL}, 61},
}

Definition at line 2280 of file shader.c.

◆ registerset_constants_scalar_array_int

const struct registerset_constants registerset_constants_scalar_array_int[]
static
Initial value:
=
{
{"an", {"an", D3DXRS_INT4, 0, 2, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 2, 0, 8, NULL}, 70},
{"an[0]", {"an", D3DXRS_INT4, 0, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 70},
{"an[1]", {"an", D3DXRS_INT4, 1, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 74},
}

Definition at line 2331 of file shader.c.

◆ registerset_constants_scalar_array_int_float

const struct registerset_constants registerset_constants_scalar_array_int_float[]
static
Initial value:
=
{
{"anf", {"anf", D3DXRS_FLOAT4, 2, 2, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 2, 0, 8, NULL}, 83},
{"anf[0]", {"anf", D3DXRS_FLOAT4, 2, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 83},
{"anf[1]", {"anf", D3DXRS_FLOAT4, 3, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 87},
}

Definition at line 2472 of file shader.c.

◆ registerset_constants_scalar_bool

const struct registerset_constants registerset_constants_scalar_bool[]
static
Initial value:
=
{
{"b", {"b", D3DXRS_BOOL, 0, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 37},
}

Definition at line 2204 of file shader.c.

◆ registerset_constants_scalar_bool_float

const struct registerset_constants registerset_constants_scalar_bool_float[]
static
Initial value:
=
{
{"bf", {"bf", D3DXRS_FLOAT4, 2, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 39},
}

Definition at line 2171 of file shader.c.

◆ registerset_constants_scalar_float

const struct registerset_constants registerset_constants_scalar_float[]
static
Initial value:
=
{
{"f", {"f", D3DXRS_FLOAT4, 0, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, NULL}, 48},
}

Definition at line 2057 of file shader.c.

◆ registerset_constants_scalar_int

const struct registerset_constants registerset_constants_scalar_int[]
static
Initial value:
=
{
{"n", {"n", D3DXRS_INT4, 0, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 57},
}

Definition at line 2090 of file shader.c.

◆ registerset_constants_scalar_int_float

const struct registerset_constants registerset_constants_scalar_int_float[]
static
Initial value:
=
{
{"nf", {"nf", D3DXRS_FLOAT4, 1, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 62},
}

Definition at line 2138 of file shader.c.

◆ registerset_constants_special_int

const struct registerset_constants registerset_constants_special_int[]
static
Initial value:
=
{
{"ran", {"ran", D3DXRS_INT4, 0, 9, D3DXPC_MATRIX_ROWS, D3DXPT_INT, 3, 2, 2, 0, 48, NULL}, 17},
{"ran[0]", {"ran", D3DXRS_INT4, 0, 3, D3DXPC_MATRIX_ROWS, D3DXPT_INT, 3, 2, 1, 0, 24, NULL}, 17},
{"ran[1]", {"ran", D3DXRS_INT4, 3, 3, D3DXPC_MATRIX_ROWS, D3DXPT_INT, 3, 2, 1, 0, 24, NULL}, 29},
}

Definition at line 5507 of file shader.c.

◆ registerset_constants_struct_array_bool

const struct registerset_constants registerset_constants_struct_array_bool[]
static
Initial value:
=
{
{"sab", {"sab", D3DXRS_BOOL, 0, 8, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 2, 2, 32, NULL}, 51},
{"sab[0]", {"sab", D3DXRS_BOOL, 0, 4, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 51},
{"sab[0].b", {"b", D3DXRS_BOOL, 0, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 51},
{"sab[0].vb", {"vb", D3DXRS_BOOL, 1, 3, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 1, 0, 12, NULL}, 52},
{"sab[1]", {"sab", D3DXRS_BOOL, 4, 4, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 55},
{"sab[1].b", {"b", D3DXRS_BOOL, 4, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 55},
{"sab[1].vb", {"vb", D3DXRS_BOOL, 5, 3, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 1, 0, 12, NULL}, 56},
}
@ D3DXPC_STRUCT
Definition: d3dx9shader.h:67
@ D3DXPT_VOID
Definition: d3dx9shader.h:73

Definition at line 4972 of file shader.c.

◆ registerset_constants_struct_array_bool_float

const struct registerset_constants registerset_constants_struct_array_bool_float[]
static
Initial value:
=
{
{"sabf", {"sabf", D3DXRS_FLOAT4, 8, 4, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 2, 2, 32, NULL}, 70},
{"sabf[0]", {"sabf", D3DXRS_FLOAT4, 8, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 70},
{"sabf[0].bf", {"bf", D3DXRS_FLOAT4, 8, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 70},
{"sabf[0].vbf", {"vbf", D3DXRS_FLOAT4, 9, 1, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 1, 0, 12, NULL}, 74},
{"sabf[1]", {"sabf", D3DXRS_FLOAT4, 10, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 78},
{"sabf[1].bf", {"bf", D3DXRS_FLOAT4, 10, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 78},
{"sabf[1].vbf", {"vbf", D3DXRS_FLOAT4, 11, 1, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 1, 0, 12, NULL}, 82},
}

Definition at line 5092 of file shader.c.

◆ registerset_constants_struct_array_float

const struct registerset_constants registerset_constants_struct_array_float[]
static
Initial value:
=
{
{"saf", {"saf", D3DXRS_FLOAT4, 0, 4, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 2, 2, 32, NULL}, 105},
{"saf[0]", {"saf", D3DXRS_FLOAT4, 0, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 105},
{"saf[0].f", {"f", D3DXRS_FLOAT4, 0, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, NULL}, 105},
{"saf[0].vf", {"vf", D3DXRS_FLOAT4, 1, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 109},
{"saf[1]", {"saf", D3DXRS_FLOAT4, 2, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 113},
{"saf[1].f", {"f", D3DXRS_FLOAT4, 2, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, NULL}, 113},
{"saf[1].vf", {"vf", D3DXRS_FLOAT4, 3, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 117},
}

Definition at line 4852 of file shader.c.

◆ registerset_constants_struct_array_int

const struct registerset_constants registerset_constants_struct_array_int[]
static
Initial value:
=
{
{"san", {"san", D3DXRS_INT4, 0, 8, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 2, 2, 32, NULL}, 140},
{"san[0]", {"san", D3DXRS_INT4, 0, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 140},
{"san[0].n", {"n", D3DXRS_INT4, 0, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 140},
{"san[0].vn", {"vn", D3DXRS_INT4, 1, 1, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 1, 0, 12, NULL}, 144},
{"san[1]", {"san", D3DXRS_INT4, 2, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 148},
{"san[1].n", {"n", D3DXRS_INT4, 2, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 148},
{"san[1].vn", {"vn", D3DXRS_INT4, 3, 1, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 1, 0, 12, NULL}, 152},
}

Definition at line 4911 of file shader.c.

◆ registerset_constants_struct_array_int_float

const struct registerset_constants registerset_constants_struct_array_int_float[]
static
Initial value:
=
{
{"sanf", {"sanf", D3DXRS_FLOAT4, 4, 4, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 2, 2, 32, NULL}, 167},
{"sanf[0]", {"sanf", D3DXRS_FLOAT4, 4, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 167},
{"sanf[0].nf", {"nf", D3DXRS_FLOAT4, 4, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 167},
{"sanf[0].vnf", {"vnf", D3DXRS_FLOAT4, 5, 1, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 1, 0, 12, NULL}, 171},
{"sanf[1]", {"sanf", D3DXRS_FLOAT4, 6, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 175},
{"sanf[1].nf", {"nf", D3DXRS_FLOAT4, 6, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 175},
{"sanf[1].vnf", {"vnf", D3DXRS_FLOAT4, 7, 1, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 1, 0, 12, NULL}, 179},
}

Definition at line 5033 of file shader.c.

◆ registerset_constants_struct_bool

const struct registerset_constants registerset_constants_struct_bool[]
static
Initial value:
=
{
{"sb", {"sb", D3DXRS_BOOL, 0, 4, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 51},
{"sb.b", {"b", D3DXRS_BOOL, 0, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 51},
{"sb.vb", {"vb", D3DXRS_BOOL, 1, 3, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 1, 0, 12, NULL}, 52},
}

Definition at line 4656 of file shader.c.

◆ registerset_constants_struct_bool_float

const struct registerset_constants registerset_constants_struct_bool_float[]
static
Initial value:
=
{
{"sbf", {"sbf", D3DXRS_FLOAT4, 4, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 66},
{"sbf.bf", {"bf", D3DXRS_FLOAT4, 4, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 66},
{"sbf.vbf", {"vbf", D3DXRS_FLOAT4, 5, 1, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 1, 0, 12, NULL}, 70},
}

Definition at line 4750 of file shader.c.

◆ registerset_constants_struct_float

const struct registerset_constants registerset_constants_struct_float[]
static
Initial value:
=
{
{"sf", {"sf", D3DXRS_FLOAT4, 0, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 93},
{"sf.f", {"f", D3DXRS_FLOAT4, 0, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, NULL}, 93},
{"sf.vf", {"vf", D3DXRS_FLOAT4, 1, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 97},
}

Definition at line 4562 of file shader.c.

◆ registerset_constants_struct_int

const struct registerset_constants registerset_constants_struct_int[]
static
Initial value:
=
{
{"sn", {"sn", D3DXRS_INT4, 0, 4, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 120},
{"sn.n", {"n", D3DXRS_INT4, 0, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 120},
{"sn.vn", {"vn", D3DXRS_INT4, 1, 1, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 1, 0, 12, NULL}, 124},
}

Definition at line 4609 of file shader.c.

◆ registerset_constants_struct_int_float

const struct registerset_constants registerset_constants_struct_int_float[]
static
Initial value:
=
{
{"snf", {"snf", D3DXRS_FLOAT4, 2, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 139},
{"snf.nf", {"nf", D3DXRS_FLOAT4, 2, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 139},
{"snf.vnf", {"vnf", D3DXRS_FLOAT4, 3, 1, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 1, 0, 12, NULL}, 143},
}

Definition at line 4703 of file shader.c.

◆ registerset_constants_struct_struct_bool

const struct registerset_constants registerset_constants_struct_struct_bool[]
static
Initial value:
=
{
{"ssb", {"ssb", D3DXRS_BOOL, 0, 6, D3DXPC_STRUCT, D3DXPT_VOID, 1, 6, 1, 3, 24, NULL}, 63},
{"ssb.b", {"b", D3DXRS_BOOL, 0, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 63},
{"ssb.s", {"s", D3DXRS_BOOL, 1, 4, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 64},
{"ssb.s.b", {"b", D3DXRS_BOOL, 1, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 64},
{"ssb.s.vb", {"vb", D3DXRS_BOOL, 2, 3, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 1, 0, 12, NULL}, 65},
{"ssb.b1", {"b1", D3DXRS_BOOL, 5, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 68},
}

Definition at line 5325 of file shader.c.

◆ registerset_constants_struct_struct_bool_float

const struct registerset_constants registerset_constants_struct_struct_bool_float[]
static
Initial value:
=
{
{"ssbf", {"ssbf", D3DXRS_FLOAT4, 8, 4, D3DXPC_STRUCT, D3DXPT_VOID, 1, 6, 1, 3, 24, NULL}, 91},
{"ssbf.bf", {"bf", D3DXRS_FLOAT4, 8, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 91},
{"ssbf.s", {"s", D3DXRS_FLOAT4, 9, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 95},
{"ssbf.s.bf", {"bf", D3DXRS_FLOAT4, 9, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 95},
{"ssbf.s.vbf", {"vbf", D3DXRS_FLOAT4, 10, 1, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 1, 0, 12, NULL}, 99},
{"ssbf.bf1", {"bf1", D3DXRS_FLOAT4, 11, 1, D3DXPC_SCALAR, D3DXPT_BOOL, 1, 1, 1, 0, 4, NULL}, 103},
}

Definition at line 5426 of file shader.c.

◆ registerset_constants_struct_struct_float

const struct registerset_constants registerset_constants_struct_struct_float[]
static
Initial value:
=
{
{"ssf", {"ssf", D3DXRS_FLOAT4, 0, 4, D3DXPC_STRUCT, D3DXPT_VOID, 1, 6, 1, 3, 24, NULL}, 137},
{"ssf.f", {"f", D3DXRS_FLOAT4, 0, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, NULL}, 137},
{"ssf.s", {"s", D3DXRS_FLOAT4, 1, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 141},
{"ssf.s.f", {"f", D3DXRS_FLOAT4, 1, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, NULL}, 141},
{"ssf.s.vf", {"vf", D3DXRS_FLOAT4, 2, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 145},
{"ssf.f1", {"f1", D3DXRS_FLOAT4, 3, 1, D3DXPC_SCALAR, D3DXPT_FLOAT, 1, 1, 1, 0, 4, NULL}, 149},
}

Definition at line 5213 of file shader.c.

◆ registerset_constants_struct_struct_int

const struct registerset_constants registerset_constants_struct_struct_int[]
static
Initial value:
=
{
{"ssn", {"ssn", D3DXRS_INT4, 0, 6, D3DXPC_STRUCT, D3DXPT_VOID, 1, 6, 1, 3, 24, NULL}, 183},
{"ssn.n", {"n", D3DXRS_INT4, 0, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 183},
{"ssn.s", {"s", D3DXRS_INT4, 1, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 187},
{"ssn.s.n", {"n", D3DXRS_INT4, 1, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 187},
{"ssn.s.vn", {"vn", D3DXRS_INT4, 2, 1, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 1, 0, 12, NULL}, 191},
{"ssn.n1", {"n1", D3DXRS_INT4, 3, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 195},
}

Definition at line 5265 of file shader.c.

◆ registerset_constants_struct_struct_int_float

const struct registerset_constants registerset_constants_struct_struct_int_float[]
static
Initial value:
=
{
{"ssnf", {"ssnf", D3DXRS_FLOAT4, 4, 4, D3DXPC_STRUCT, D3DXPT_VOID, 1, 6, 1, 3, 24, NULL}, 221},
{"ssnf.nf", {"nf", D3DXRS_FLOAT4, 4, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 221},
{"ssnf.s", {"s", D3DXRS_FLOAT4, 5, 2, D3DXPC_STRUCT, D3DXPT_VOID, 1, 4, 1, 2, 16, NULL}, 225},
{"ssnf.s.nf", {"nf", D3DXRS_FLOAT4, 5, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 225},
{"ssnf.s.vnf", {"vnf", D3DXRS_FLOAT4, 6, 1, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 1, 0, 12, NULL}, 229},
{"ssnf.nf1", {"nf1", D3DXRS_FLOAT4, 7, 1, D3DXPC_SCALAR, D3DXPT_INT, 1, 1, 1, 0, 4, NULL}, 233},
}

Definition at line 5374 of file shader.c.

◆ registerset_constants_vector_array_bool

const struct registerset_constants registerset_constants_vector_array_bool[]
static
Initial value:
=
{
{"vab", {"vab", D3DXRS_BOOL, 0, 6, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 2, 0, 24, NULL}, 37},
{"vab[0]", {"vab", D3DXRS_BOOL, 0, 3, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 1, 0, 12, NULL}, 37},
{"vab[1]", {"vab", D3DXRS_BOOL, 3, 3, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 1, 0, 12, NULL}, 40},
}

Definition at line 2874 of file shader.c.

◆ registerset_constants_vector_array_bool_float

const struct registerset_constants registerset_constants_vector_array_bool_float[]
static
Initial value:
=
{
{"vabf", {"vabf", D3DXRS_FLOAT4, 4, 2, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 2, 0, 24, NULL}, 49},
{"vabf[0]", {"vabf", D3DXRS_FLOAT4, 4, 1, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 1, 0, 12, NULL}, 49},
{"vabf[1]", {"vabf", D3DXRS_FLOAT4, 5, 1, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 1, 0, 12, NULL}, 53},
}

Definition at line 2925 of file shader.c.

◆ registerset_constants_vector_array_float

const struct registerset_constants registerset_constants_vector_array_float[]
static
Initial value:
=
{
{"vaf", {"vaf", D3DXRS_FLOAT4, 0, 2, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 2, 0, 24, NULL}, 62},
{"vaf[0]", {"vaf", D3DXRS_FLOAT4, 0, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 62},
{"vaf[1]", {"vaf", D3DXRS_FLOAT4, 1, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 66},
}

Definition at line 2772 of file shader.c.

◆ registerset_constants_vector_array_int

const struct registerset_constants registerset_constants_vector_array_int[]
static
Initial value:
=
{
{"van", {"van", D3DXRS_INT4, 0, 6, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 2, 0, 24, NULL}, 75},
{"van[0]", {"van", D3DXRS_INT4, 0, 1, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 1, 0, 12, NULL}, 75},
{"van[1]", {"van", D3DXRS_INT4, 1, 1, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 1, 0, 12, NULL}, 79},
}

Definition at line 2823 of file shader.c.

◆ registerset_constants_vector_array_int_float

const struct registerset_constants registerset_constants_vector_array_int_float[]
static
Initial value:
=
{
{"vanf", {"vanf", D3DXRS_FLOAT4, 2, 2, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 2, 0, 24, NULL}, 89},
{"vanf[0]", {"vanf", D3DXRS_FLOAT4, 2, 1, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 1, 0, 12, NULL}, 89},
{"vanf[1]", {"vanf", D3DXRS_FLOAT4, 3, 1, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 1, 0, 12, NULL}, 93},
}

Definition at line 2976 of file shader.c.

◆ registerset_constants_vector_bool

const struct registerset_constants registerset_constants_vector_bool[]
static
Initial value:
=
{
{"vb", {"vb", D3DXRS_BOOL, 0, 3, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 1, 0, 12, NULL}, 37},
}

Definition at line 2629 of file shader.c.

◆ registerset_constants_vector_bool_float

const struct registerset_constants registerset_constants_vector_bool_float[]
static
Initial value:
=
{
{"vbf", {"vbf", D3DXRS_FLOAT4, 2, 1, D3DXPC_VECTOR, D3DXPT_BOOL, 1, 3, 1, 0, 12, NULL}, 41},
}

Definition at line 2662 of file shader.c.

◆ registerset_constants_vector_float

const struct registerset_constants registerset_constants_vector_float[]
static
Initial value:
=
{
{"vf", {"vf", D3DXRS_FLOAT4, 0, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 1, 0, 12, NULL}, 50},
}

Definition at line 2563 of file shader.c.

◆ registerset_constants_vector_int

const struct registerset_constants registerset_constants_vector_int[]
static
Initial value:
=
{
{"vn", {"vn", D3DXRS_INT4, 0, 3, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 1, 0, 12, NULL}, 59},
}

Definition at line 2596 of file shader.c.

◆ registerset_constants_vector_int_float

const struct registerset_constants registerset_constants_vector_int_float[]
static
Initial value:
=
{
{"vnf", {"vnf", D3DXRS_FLOAT4, 1, 1, D3DXPC_VECTOR, D3DXPT_INT, 1, 3, 1, 0, 12, NULL}, 64},
}

Definition at line 2695 of file shader.c.

◆ 

const struct { ... } registerset_data[]

Referenced by test_registerset().

◆ 

const struct { ... } registerset_defaults_data[]

◆ registerset_test_bigvec_float

const struct registerset_test registerset_test_bigvec_float[]
static

Definition at line 5552 of file shader.c.

◆ registerset_test_column_array_bool

const struct registerset_test registerset_test_column_array_bool[]
static

Definition at line 3493 of file shader.c.

◆ registerset_test_column_array_bool_float

const struct registerset_test registerset_test_column_array_bool_float[]
static

Definition at line 3639 of file shader.c.

◆ registerset_test_column_array_float

const struct registerset_test registerset_test_column_array_float[]
static

Definition at line 3347 of file shader.c.

◆ registerset_test_column_array_int

const struct registerset_test registerset_test_column_array_int[]
static

Definition at line 3420 of file shader.c.

◆ registerset_test_column_array_int_float

const struct registerset_test registerset_test_column_array_int_float[]
static

Definition at line 3566 of file shader.c.

◆ registerset_test_column_bool

const struct registerset_test registerset_test_column_bool[]
static

Definition at line 3163 of file shader.c.

◆ registerset_test_column_bool_float

const struct registerset_test registerset_test_column_bool_float[]
static

Definition at line 3252 of file shader.c.

◆ registerset_test_column_float

const struct registerset_test registerset_test_column_float[]
static

Definition at line 3075 of file shader.c.

◆ registerset_test_column_int

const struct registerset_test registerset_test_column_int[]
static

Definition at line 3119 of file shader.c.

◆ registerset_test_column_int_float

const struct registerset_test registerset_test_column_int_float[]
static

Definition at line 3207 of file shader.c.

◆ registerset_test_input

const DWORD registerset_test_input[][REGISTER_OUTPUT_SIZE]
static
Initial value:
=
{
{0x40000123, 0x00000000, 0x40800123, 0x40a00123,
0x40c00123, 0x40e00123, 0x41000123, 0x41100123,
0x41200123, 0x41300123, 0x41400123, 0x41500123,
0x41600123, 0x41700123, 0x41800123, 0x41900123,
0x41a00123, 0x41b00123, 0x41c00123, 0x41d00123,
0x00000000, 0x41f00123, 0x42000123, 0x42100123,
0x00000000, 0x42300123, 0x42400123, 0x42500123,
0x42600123, 0x42700123, 0x42800123, 0x42900123,
0x43000123, 0x43100123, 0x43200123, 0x43300123,
0x43400123, 0x43500123, 0x43600123, 0x43700123,
0x43800123, 0x43900123, 0x43a00123, 0x43b00123,
0x43c00123, 0x43d00123, 0x43e00123, 0x43f00123},
{0x00000002, 0x00000003, 0x00000004, 0x00000005,
0x00000000, 0x00000007, 0x00000008, 0x00000009,
0x0000000a, 0x0000000b, 0x0000000c, 0x0000000d,
0x0000000e, 0x0000000f, 0x00000010, 0x00000011,
0x00000012, 0x00000000, 0x00000000, 0x00000015,
0x00000016, 0x00000017, 0x00000018, 0x00000019,
0x0000001a, 0x0000001b, 0x0000001c, 0x0000001d,
0x0000001e, 0x0000001f, 0x00000020, 0x00000021,
0x00000022, 0x00000023, 0x00000024, 0x00000025,
0x00000026, 0x00000027, 0x00000028, 0x00000029,
0x0000002a, 0x0000002b, 0x0000002c, 0x0000002d,
0x0000002e, 0x0000002f, 0x00000030, 0x00000031},
}

Definition at line 1987 of file shader.c.

Referenced by registerset_apply().

◆ registerset_test_matrix_column_clamp

const struct registerset_test registerset_test_matrix_column_clamp[]
static
Initial value:
=
{
{SetMatrix, 0, 0, 0, 8,
{0x40000123, 0x40c00123, 0x41200123, 0x41600123, 0x00000000, 0x40e00123, 0x41300123, 0x41700123}},
}

Definition at line 5657 of file shader.c.

◆ registerset_test_row_array_bool

const struct registerset_test registerset_test_row_array_bool[]
static

Definition at line 4260 of file shader.c.

◆ registerset_test_row_array_bool_float

const struct registerset_test registerset_test_row_array_bool_float[]
static

Definition at line 4426 of file shader.c.

◆ registerset_test_row_array_float

const struct registerset_test registerset_test_row_array_float[]
static

Definition at line 4074 of file shader.c.

◆ registerset_test_row_array_int

const struct registerset_test registerset_test_row_array_int[]
static

Definition at line 4167 of file shader.c.

◆ registerset_test_row_array_int_float

const struct registerset_test registerset_test_row_array_int_float[]
static

Definition at line 4333 of file shader.c.

◆ registerset_test_row_bool

const struct registerset_test registerset_test_row_bool[]
static

Definition at line 3865 of file shader.c.

◆ registerset_test_row_bool_float

const struct registerset_test registerset_test_row_bool_float[]
static

Definition at line 3964 of file shader.c.

◆ registerset_test_row_float

const struct registerset_test registerset_test_row_float[]
static

Definition at line 3755 of file shader.c.

◆ registerset_test_row_int

const struct registerset_test registerset_test_row_int[]
static

Definition at line 3810 of file shader.c.

◆ registerset_test_row_int_float

const struct registerset_test registerset_test_row_int_float[]
static

Definition at line 3909 of file shader.c.

◆ registerset_test_scalar_array_bool

const struct registerset_test registerset_test_scalar_array_bool[]
static

Definition at line 2389 of file shader.c.

◆ registerset_test_scalar_array_bool_float

const struct registerset_test registerset_test_scalar_array_bool_float[]
static

Definition at line 2428 of file shader.c.

◆ registerset_test_scalar_array_float

const struct registerset_test registerset_test_scalar_array_float[]
static

Definition at line 2287 of file shader.c.

◆ registerset_test_scalar_array_int

const struct registerset_test registerset_test_scalar_array_int[]
static

Definition at line 2338 of file shader.c.

◆ registerset_test_scalar_array_int_float

const struct registerset_test registerset_test_scalar_array_int_float[]
static

Definition at line 2479 of file shader.c.

◆ registerset_test_scalar_bool

const struct registerset_test registerset_test_scalar_bool[]
static
Initial value:
=
{
{SetFloat, 0, 0, 0, 1, {0x00000001}},
{SetInt, 1, 0, 0, 1, {0x00000001}},
{SetBool, 1, 0, 0, 1, {0x00000002}},
{SetIntArray, 1, 1, REGISTER_OUTPUT_SIZE, 1, {0x00000001}},
{SetBoolArray, 1, 1, REGISTER_OUTPUT_SIZE, 1, {0x00000002}},
{SetFloatArray, 0, 1, REGISTER_OUTPUT_SIZE, 1, {0x00000001}},
{SetValue, 1, 0, 3},
{SetValue, 1, 4, REGISTER_OUTPUT_SIZE * 4, 1, {0x00000002}},
{SetVector, 0, 0, 0, 1, {0x00000001}},
{SetVectorArray, 0, 1, REGISTER_OUTPUT_SIZE / 4, 1, {0x00000001}},
{SetMatrix, 0, 0, 0, 1, {0x00000001}},
{SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 1, {0x00000001}},
{SetMatrixTranspose, 0, 0, 0, 1, {0x00000001}},
{SetMatrixTransposeArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 1, {0x00000001}},
{SetMatrixPointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 1, {0x00000001}},
{SetMatrixTransposePointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 1, {0x00000001}},
}

Definition at line 2209 of file shader.c.

◆ registerset_test_scalar_bool_float

const struct registerset_test registerset_test_scalar_bool_float[]
static
Initial value:
=
{
{SetFloat, 0, 0, 0, 4, {0x3f800000}},
{SetInt, 1, 0, 0, 4, {0x3f800000}},
{SetBool, 1, 0, 0, 4, {0x3f800000}},
{SetIntArray, 1, 1, REGISTER_OUTPUT_SIZE, 4, {0x3f800000}},
{SetBoolArray, 1, 1, REGISTER_OUTPUT_SIZE, 4, {0x3f800000}},
{SetFloatArray, 0, 1, REGISTER_OUTPUT_SIZE, 4, {0x3f800000}},
{SetValue, 1, 0, 3},
{SetValue, 1, 4, REGISTER_OUTPUT_SIZE * 4, 4, {0x3f800000}},
{SetVector, 0, 0, 0, 4, {0x3f800000}},
{SetVectorArray, 0, 1, REGISTER_OUTPUT_SIZE / 4, 4, {0x3f800000}},
{SetMatrix, 0, 0, 0, 4, {0x3f800000}},
{SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x3f800000}},
{SetMatrixTranspose, 0, 0, 0, 4, {0x3f800000}},
{SetMatrixTransposeArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x3f800000}},
{SetMatrixPointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x3f800000}},
{SetMatrixTransposePointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x3f800000}},
}

Definition at line 2176 of file shader.c.

◆ registerset_test_scalar_float

const struct registerset_test registerset_test_scalar_float[]
static
Initial value:
=
{
{SetFloat, 0, 0, 0, 4, {0x40000123}},
{SetInt, 1, 0, 0, 4, {0x40000000}},
{SetBool, 1, 0, 0, 4, {0x3f800000}},
{SetIntArray, 1, 1, REGISTER_OUTPUT_SIZE, 4, {0x40000000}},
{SetBoolArray, 1, 1, REGISTER_OUTPUT_SIZE, 4, {0x3f800000}},
{SetFloatArray, 0, 1, REGISTER_OUTPUT_SIZE, 4, {0x40000123}},
{SetValue, 0, 0, 3},
{SetValue, 0, 4, REGISTER_OUTPUT_SIZE * 4, 4, {0x40000123}},
{SetVector, 0, 0, 0, 4, {0x40000123}},
{SetVectorArray, 0, 1, REGISTER_OUTPUT_SIZE / 4, 4, {0x40000123}},
{SetMatrix, 0, 0, 0, 4, {0x40000123},},
{SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000123}},
{SetMatrixTranspose, 0, 0, 0, 4, {0x40000123},},
{SetMatrixTransposeArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000123}},
{SetMatrixPointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000123}},
{SetMatrixTransposePointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000123}},
}

Definition at line 2062 of file shader.c.

◆ registerset_test_scalar_int

const struct registerset_test registerset_test_scalar_int[]
static

Definition at line 2095 of file shader.c.

◆ registerset_test_scalar_int_float

const struct registerset_test registerset_test_scalar_int_float[]
static
Initial value:
=
{
{SetFloat, 0, 0, 0, 4, {0x40000000}},
{SetInt, 1, 0, 0, 4, {0x40000000}},
{SetBool, 1, 0, 0, 4, {0x3f800000}},
{SetIntArray, 1, 1, REGISTER_OUTPUT_SIZE, 4, {0x40000000}},
{SetBoolArray, 1, 1, REGISTER_OUTPUT_SIZE, 4, {0x3f800000}},
{SetFloatArray, 0, 1, REGISTER_OUTPUT_SIZE, 4, {0x40000000}},
{SetValue, 1, 0, 3},
{SetValue, 1, 4, REGISTER_OUTPUT_SIZE * 4, 4, {0x40000000}},
{SetVector, 0, 0, 0, 4, {0x40000000}},
{SetVectorArray, 0, 1, REGISTER_OUTPUT_SIZE / 4, 4, {0x40000000}},
{SetMatrix, 0, 0, 0, 4, {0x40000000}},
{SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000000}},
{SetMatrixTranspose, 0, 0, 0, 4, {0x40000000}},
{SetMatrixTransposeArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000000}},
{SetMatrixPointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000000}},
{SetMatrixTransposePointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000000}},
}

Definition at line 2143 of file shader.c.

◆ registerset_test_struct_array_bool

const struct registerset_test registerset_test_struct_array_bool[]
static

Definition at line 4983 of file shader.c.

◆ registerset_test_struct_array_bool_float

const struct registerset_test registerset_test_struct_array_bool_float[]
static

Definition at line 5103 of file shader.c.

◆ registerset_test_struct_array_float

const struct registerset_test registerset_test_struct_array_float[]
static

Definition at line 4863 of file shader.c.

◆ registerset_test_struct_array_int

const struct registerset_test registerset_test_struct_array_int[]
static

Definition at line 4922 of file shader.c.

◆ registerset_test_struct_array_int_float

const struct registerset_test registerset_test_struct_array_int_float[]
static

Definition at line 5044 of file shader.c.

◆ registerset_test_struct_bool

const struct registerset_test registerset_test_struct_bool[]
static

Definition at line 4663 of file shader.c.

◆ registerset_test_struct_bool_float

const struct registerset_test registerset_test_struct_bool_float[]
static

Definition at line 4757 of file shader.c.

◆ registerset_test_struct_float

const struct registerset_test registerset_test_struct_float[]
static

Definition at line 4569 of file shader.c.

◆ registerset_test_struct_int

const struct registerset_test registerset_test_struct_int[]
static

Definition at line 4616 of file shader.c.

◆ registerset_test_struct_int_float

const struct registerset_test registerset_test_struct_int_float[]
static

Definition at line 4710 of file shader.c.

◆ registerset_test_struct_struct_bool

const struct registerset_test registerset_test_struct_struct_bool[]
static

Definition at line 5335 of file shader.c.

◆ registerset_test_struct_struct_bool_float

const struct registerset_test registerset_test_struct_struct_bool_float[]
static

Definition at line 5436 of file shader.c.

◆ registerset_test_struct_struct_float

const struct registerset_test registerset_test_struct_struct_float[]
static

Definition at line 5223 of file shader.c.

◆ registerset_test_struct_struct_int

const struct registerset_test registerset_test_struct_struct_int[]
static

Definition at line 5275 of file shader.c.

◆ registerset_test_struct_struct_int_float

const struct registerset_test registerset_test_struct_struct_int_float[]
static

Definition at line 5384 of file shader.c.

◆ registerset_test_vector_array_bool

const struct registerset_test registerset_test_vector_array_bool[]
static

Definition at line 2881 of file shader.c.

◆ registerset_test_vector_array_bool_float

const struct registerset_test registerset_test_vector_array_bool_float[]
static

Definition at line 2932 of file shader.c.

◆ registerset_test_vector_array_float

const struct registerset_test registerset_test_vector_array_float[]
static

Definition at line 2779 of file shader.c.

◆ registerset_test_vector_array_int

const struct registerset_test registerset_test_vector_array_int[]
static

Definition at line 2830 of file shader.c.

◆ registerset_test_vector_array_int_float

const struct registerset_test registerset_test_vector_array_int_float[]
static

Definition at line 2983 of file shader.c.

◆ registerset_test_vector_bool

const struct registerset_test registerset_test_vector_bool[]
static
Initial value:
=
{
{SetInt},
{SetIntArray, 1, 0, 2},
{SetIntArray, 1, 3, REGISTER_OUTPUT_SIZE, 3, {0x00000001, 0x00000001, 0x00000001}},
{SetBoolArray, 1, 0, 2},
{SetBoolArray, 1, 3, REGISTER_OUTPUT_SIZE, 3, {0x00000002, 0x00000003, 0x00000004}},
{SetFloatArray, 0, 0, 2},
{SetFloatArray, 0, 3, REGISTER_OUTPUT_SIZE, 3, {0x00000001, 0x00000000, 0x00000001}},
{SetValue, 1, 0, 11},
{SetValue, 1, 12, REGISTER_OUTPUT_SIZE * 4, 3, {0x00000002, 0x00000003, 0x00000004}},
{SetVector, 0, 0, 0, 3, {0x00000001, 0x00000000, 0x00000001}},
{SetVectorArray, 0, 1, REGISTER_OUTPUT_SIZE / 4, 3, {0x00000001, 0x00000000, 0x00000001}},
{SetMatrix, 0, 0, 0, 3, {0x00000001, 0x00000000, 0x00000001}},
{SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 3, {0x00000001, 0x00000000, 0x00000001}},
{SetMatrixTranspose, 0, 0, 0, 3, {0x00000001, 0x00000001, 0x00000001}},
{SetMatrixTransposeArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 3, {0x00000001, 0x00000001, 0x00000001}},
{SetMatrixPointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 3, {0x00000001, 0x00000000, 0x00000001}},
{SetMatrixTransposePointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 3, {0x00000001, 0x00000001, 0x00000001}},
}

Definition at line 2634 of file shader.c.

◆ registerset_test_vector_bool_float

const struct registerset_test registerset_test_vector_bool_float[]
static
Initial value:
=
{
{SetInt},
{SetIntArray, 1, 0, 2},
{SetIntArray, 1, 3, REGISTER_OUTPUT_SIZE, 4, {0x3f800000, 0x3f800000, 0x3f800000}},
{SetBoolArray, 1, 0, 2},
{SetBoolArray, 1, 3, REGISTER_OUTPUT_SIZE, 4, {0x3f800000, 0x3f800000, 0x3f800000}},
{SetFloatArray, 0, 0, 2},
{SetFloatArray, 0, 3, REGISTER_OUTPUT_SIZE, 4, {0x3f800000, 0x00000000, 0x3f800000}},
{SetValue, 1, 0, 11},
{SetValue, 1, 12, REGISTER_OUTPUT_SIZE * 4, 4, {0x3f800000, 0x3f800000, 0x3f800000}},
{SetVector, 0, 0, 0, 4, {0x3f800000, 0x00000000, 0x3f800000}},
{SetVectorArray, 0, 1, REGISTER_OUTPUT_SIZE / 4, 4, {0x3f800000, 0x00000000, 0x3f800000}},
{SetMatrix, 0, 0, 0, 4, {0x3f800000, 0x00000000, 0x3f800000}},
{SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x3f800000, 0x00000000, 0x3f800000}},
{SetMatrixTranspose, 0, 0, 0, 4, {0x3f800000, 0x3f800000, 0x3f800000}},
{SetMatrixTransposeArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x3f800000, 0x3f800000, 0x3f800000}},
{SetMatrixPointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x3f800000, 0x00000000, 0x3f800000}},
{SetMatrixTransposePointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x3f800000, 0x3f800000, 0x3f800000}},
}

Definition at line 2667 of file shader.c.

◆ registerset_test_vector_float

const struct registerset_test registerset_test_vector_float[]
static
Initial value:
=
{
{SetInt},
{SetIntArray, 1, 0, 2},
{SetIntArray, 1, 3, REGISTER_OUTPUT_SIZE, 4, {0x40000000, 0x40400000, 0x40800000}},
{SetBoolArray, 1, 0, 2},
{SetBoolArray, 1, 3, REGISTER_OUTPUT_SIZE, 4, {0x3f800000, 0x3f800000, 0x3f800000}},
{SetFloatArray, 0, 0, 2},
{SetFloatArray, 0, 3, REGISTER_OUTPUT_SIZE, 4, {0x40000123, 0x00000000, 0x40800123}},
{SetValue, 0, 0, 11},
{SetValue, 0, 12, REGISTER_OUTPUT_SIZE * 4, 4, {0x40000123, 0x00000000, 0x40800123}},
{SetVector, 0, 0, 0, 4, {0x40000123, 0x00000000, 0x40800123}},
{SetVectorArray, 0, 1, REGISTER_OUTPUT_SIZE / 4, 4, {0x40000123, 0x00000000, 0x40800123}},
{SetMatrix, 0, 0, 0, 4, {0x40000123, 0x00000000, 0x40800123}},
{SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000123, 0x00000000, 0x40800123}},
{SetMatrixTranspose, 0, 0, 0, 4, {0x40000123, 0x40c00123, 0x41200123}},
{SetMatrixTransposeArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000123, 0x40c00123, 0x41200123}},
{SetMatrixPointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000123, 0x00000000, 0x40800123}},
{SetMatrixTransposePointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000123, 0x40c00123, 0x41200123}},
}

Definition at line 2568 of file shader.c.

◆ registerset_test_vector_int

const struct registerset_test registerset_test_vector_int[]
static
Initial value:
=
{
{SetInt},
{SetIntArray, 1, 0, 2},
{SetIntArray, 1, 3, REGISTER_OUTPUT_SIZE, 4, {0x00000002, 0x00000003, 0x00000004}},
{SetBoolArray, 1, 0, 2},
{SetBoolArray, 1, 3, REGISTER_OUTPUT_SIZE, 4, {0x00000001, 0x00000001, 0x00000001}},
{SetFloatArray, 0, 0, 2},
{SetFloatArray, 0, 3, REGISTER_OUTPUT_SIZE, 4, {0x00000002, 0x00000000, 0x00000004}},
{SetValue, 1, 0, 11},
{SetValue, 1, 12, REGISTER_OUTPUT_SIZE * 4, 4, {0x00000002, 0x00000003, 0x00000004}},
{SetVector, 0, 0, 0, 4, {0x00000002, 0x00000000, 0x00000004}},
{SetVectorArray, 0, 1, REGISTER_OUTPUT_SIZE / 4, 4, {0x00000002, 0x00000000, 0x00000004}},
{SetMatrix, 0, 0, 0, 4, {0x00000002, 0x00000000, 0x00000004}},
{SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x00000002, 0x00000000, 0x00000004}},
{SetMatrixTranspose, 0, 0, 0, 4, {0x00000002, 0x00000006, 0x0000000a}},
{SetMatrixTransposeArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x00000002, 0x00000006, 0x0000000a}},
{SetMatrixPointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x00000002, 0x00000000, 0x00000004}},
{SetMatrixTransposePointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x00000002, 0x00000006, 0x0000000a}},
}

Definition at line 2601 of file shader.c.

◆ registerset_test_vector_int_float

const struct registerset_test registerset_test_vector_int_float[]
static
Initial value:
=
{
{SetInt},
{SetIntArray, 1, 0, 2},
{SetIntArray, 1, 3, REGISTER_OUTPUT_SIZE, 4, {0x40000000, 0x40400000, 0x40800000}},
{SetBoolArray, 1, 0, 2},
{SetBoolArray, 1, 3, REGISTER_OUTPUT_SIZE, 4, {0x3f800000, 0x3f800000, 0x3f800000}},
{SetFloatArray, 0, 0, 2},
{SetFloatArray, 0, 3, REGISTER_OUTPUT_SIZE, 4, {0x40000000, 0x00000000, 0x40800000}},
{SetValue, 1, 0, 11},
{SetValue, 1, 12, REGISTER_OUTPUT_SIZE * 4, 4, {0x40000000, 0x40400000, 0x40800000}},
{SetVector, 0, 0, 0, 4, {0x40000000, 0x00000000, 0x40800000}},
{SetVectorArray, 0, 1, REGISTER_OUTPUT_SIZE / 4, 4, {0x40000000, 0x00000000, 0x40800000}},
{SetMatrix, 0, 0, 0, 4, {0x40000000, 0x00000000, 0x40800000}},
{SetMatrixArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000000, 0x00000000, 0x40800000}},
{SetMatrixTranspose, 0, 0, 0, 4, {0x40000000, 0x40c00000, 0x41200000}},
{SetMatrixTransposeArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000000, 0x40c00000, 0x41200000}},
{SetMatrixPointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000000, 0x00000000, 0x40800000}},
{SetMatrixTransposePointerArray, 0, 1, REGISTER_OUTPUT_SIZE / 16, 4, {0x40000000, 0x40c00000, 0x41200000}},
}

Definition at line 2700 of file shader.c.

◆ regset

◆ shader_empty

const DWORD shader_empty[] = {0xfffe0200, 0x0000ffff}
static

◆ shader_invalid

const DWORD shader_invalid[] = {0xeeee0100}
static

◆ shader_with_ctab

const DWORD shader_with_ctab[]
static
Initial value:
= {
0xfffe0300,
0x0002fffe, FCC_TEXT, 0x00000000,
0x0008fffe, FCC_CTAB, 0x0000001c, 0x00000010, 0xfffe0300, 0x00000000,
0x00000000, 0x00000000, 0x00000000,
0x0004fffe, FCC_TEXT, 0x00000000, 0x00000000, 0x00000000,
0x0000ffff}

Definition at line 58 of file shader.c.

Referenced by test_find_shader_comment(), and test_get_shader_constant_table_ex().

◆ shader_with_ctab_constants

const DWORD shader_with_ctab_constants[]
static
Initial value:
= {
0xfffe0300,
0x002efffe, FCC_CTAB,
0x0000001c, 0x000000a4, 0xfffe0300, 0x00000003, 0x0000001c, 0x20008100,
0x0000009c,
0x00000058, 0x00070002, 0x00000001, 0x00000064, 0x00000000,
0x00000074, 0x00000002, 0x00000004, 0x00000080, 0x00000000,
0x00000090, 0x00040002, 0x00000003, 0x00000080, 0x00000000,
0x736e6f43, 0x746e6174, 0xabab0031,
0x00030001, 0x00040001, 0x00000001, 0x00000000,
0x736e6f43, 0x746e6174, 0xabab0032,
0x00030003, 0x00040004, 0x00000001, 0x00000000,
0x736e6f43, 0x746e6174, 0xabab0033,
0x335f7376, 0xab00305f,
0x656e6957, 0x6f727020, 0x7463656a, 0xababab00,
0x0000ffff}

Definition at line 73 of file shader.c.

Referenced by test_get_shader_constant_table_ex().

◆ shader_with_invalid_ctab

const DWORD shader_with_invalid_ctab[]
static
Initial value:
= {
0xfffe0300,
0x0005fffe, FCC_CTAB,
0x0000001c, 0x000000a9, 0xfffe0300,
0x00000000, 0x00000000,
0x0000ffff}

Definition at line 66 of file shader.c.

Referenced by test_get_shader_constant_table_ex(), and test_get_shader_samplers().

◆ shader_zero

const DWORD shader_zero[] = {0x0}
static

◆ simple_7ffe

const DWORD simple_7ffe[] = {0x7ffe0000, 0x0002fffe, FCC_TEXT, 0x00000000, 0x0000ffff}
static

Definition at line 36 of file shader.c.

Referenced by test_find_shader_comment().

◆ simple_7fff

const DWORD simple_7fff[] = {0x7fff0000, 0x0002fffe, FCC_TEXT, 0x00000000, 0x0000ffff}
static

Definition at line 38 of file shader.c.

Referenced by test_find_shader_comment().

◆ simple_fx

const DWORD simple_fx[] = {0x46580000, 0x0002fffe, FCC_TEXT, 0x00000000, 0x0000ffff}
static

Definition at line 32 of file shader.c.

Referenced by test_find_shader_comment(), and test_get_shader_constant_table_ex().

◆ simple_ps

const DWORD simple_ps[]
static
Initial value:
= {
0xffff0101,
0x00000051, 0xa00f0001, 0x3f800000, 0x00000000, 0x00000000, 0x00000000,
0x00000042, 0xb00f0000,
0x00000008, 0x800f0000, 0xa0e40001, 0xa0e40000,
0x00000005, 0x800f0000, 0x90e40000, 0x80e40000,
0x00000005, 0x800f0000, 0xb0e40000, 0x80e40000,
0x0000ffff}

Definition at line 49 of file shader.c.

Referenced by test_disassemble_shader(), test_get_shader_constant_table_ex(), test_get_shader_size(), and test_get_shader_version().

◆ simple_tx

const DWORD simple_tx[] = {0x54580000, 0x0002fffe, FCC_TEXT, 0x00000000, 0x0000ffff}
static

Definition at line 34 of file shader.c.

Referenced by test_find_shader_comment(), and test_get_shader_constant_table_ex().

◆ simple_vs

const DWORD simple_vs[]
static
Initial value:
= {
0xfffe0101,
0x0000001f, 0x80000000, 0x900f0000,
0x00000009, 0xc0010000, 0x90e40000, 0xa0e40000,
0x00000009, 0xc0020000, 0x90e40000, 0xa0e40001,
0x00000009, 0xc0040000, 0x90e40000, 0xa0e40002,
0x00000009, 0xc0080000, 0x90e40000, 0xa0e40003,
0x0000ffff}

Definition at line 40 of file shader.c.

Referenced by test_disassemble_shader(), test_get_shader_samplers(), test_get_shader_size(), and test_get_shader_version().

◆ start

Definition at line 5667 of file shader.c.

◆ test_count

UINT test_count ( void  )

◆ test_get_shader_constant_variables_blob

const DWORD test_get_shader_constant_variables_blob[]
static

Definition at line 1700 of file shader.c.

Referenced by test_get_shader_constant_variables().

◆ 

const struct { ... } test_get_shader_constant_variables_data[]

◆ tests

Definition at line 5670 of file shader.c.

Referenced by test_shader_semantics().

◆ var

const char* var

Definition at line 5666 of file shader.c.

Referenced by _check_default_props(), _check_set_props(), _set_props(), _test_clone(), _test_disp_value(), _test_node_get_value_str(), _test_node_insertbefore(), _test_node_put_value_str(), _test_readyState(), _test_tr_possess(), _tsearchenv(), _unset_props(), AccPropServices_SetHmenuProp(), AccPropServices_SetHwndProp(), AccPropServices_SetPropValue(), activate_window(), add_declaration(), add_dispinterface_typeinfo(), add_structure_typeinfo(), add_var_desc(), assign_stub_out_args(), call_docview_84(), call_explorer_69(), call_script(), cc_token(), cff_face_init(), check_script_collisions(), compile_script(), copy_from_variant(), create_xmlhttprequest(), debug_dump_ir_var(), debugstr_variant(), declare_stub_args(), DEVENUM_IMediaCatMoniker_BindToObject(), disp_propget(), disp_propput(), dispex_propput(), doc_write(), document_write(), drivecoll_enumvariant_Next(), encode_var(), enum_find_filter(), enumvar_Next(), CBaseBar::Exec(), exec_assoc_view(), exec_query(), filecoll_enumvariant_Next(), FilterGraph2_Connect(), FilterGraph2_Render(), FilterMapper3_EnumMatchingFilters(), FilterMapper3_RegisterFilter(), FilterMapper_EnumMatchingFilters(), FM2_WriteClsid(), FM2_WriteFriendlyName(), foldercoll_enumvariant_Next(), free_variable(), get_antecedent(), get_attribute_value(), get_doc_event(), get_doc_ready_state(), get_env(), get_event_handler(), get_explicit_generic_handle_type(), get_fixed_drive(), get_func_handle_var(), get_func_oi2_flags(), get_function_buffer_size(), get_node_event(), get_parameter_fc(), get_qualifier_value(), get_required_buffer_size(), get_stack_size(), get_variable(), get_window_event(), GetEnvVarOrSpecial(), GetSplitter(), handle_navigation_error(), has_out_arg_or_return(), HTMLElement2_put_accessKey(), HTMLElement3_get_disabled(), HTMLElement3_put_disabled(), HTMLElement_get_title(), HTMLElement_put_title(), HTMLStyle3_get_zoom(), HTMLStyle3_put_zoom(), ICreateTypeInfo2_fnAddVarDesc(), init_script_engine(), DWebBrowserEvents2Impl::Invoke(), IRecordInfoImpl_RecordClear(), is_const_decl(), is_full_pointer_function(), is_interpreted_func(), is_ptrchain_attr(), CFolderItems::Item(), CFolderItemVerbs::Item(), ITypeLib2_fnFindName(), jsval_variant(), le16_add_cpu(), le32_add_cpu(), le64_add_cpu(), load_manifest(), lookup_dynamic_vars(), lookup_script_identifier(), make_exprt(), new_var_deref(), objectset_ItemIndex(), OleCommandTarget_Exec(), OleObject_SetClientSite(), parse_config_file(), parse_elem_text(), PB_Read(), PPB_Load(), prepare_for_binding(), print_phase_basetype(), print_phase_function(), TConfig::print_value(), process_tfs_iface(), propertyset_Item(), PropertyStorage_WritePropertyToStream(), PropertyStorage_WriteToStream(), put_propval(), XMLStorage::read_option(), record_get_value(), record_set_value(), refresh_proc(), register_avicap_devices(), register_codec(), register_dsound_devices(), register_midiout_devices(), register_vfw_codecs(), register_wavein_devices(), register_waveout_devices(), RegisterDefaultAcceptHeaders(), release_dynamic_vars(), remove_attribute(), RtlQueryEnvironmentVariable_U(), RtlSetEnvironmentVariable(), ScriptDisp_GetDispID(), set_doc_event(), set_document_navigation(), set_download_state(), set_event_handler(), set_glsl_shader_program(), set_node_event(), TConfig::set_value(), set_window_event(), setup_edit_mode(), shader_glsl_generate_ffp_vertex_shader(), SHPropertyBag_ReadLONG(), test_async_xhr(), test_async_xhr_abort(), test_attr_collection_disp(), test_child_col_disp(), test_codec(), test_container_properties(), test_create(), test_create_attribute(), test_create_elems(), test_createNode(), test_default_properties(), test_devenum(), test_directshow_filter(), test_dmo(), test_domdoc(), test_domnode(), test_DriveCollection(), test_dsound(), test_exec_onunload(), test_FileCollection(), test_FolderCollection(), test_func(), test_get_attributes(), test_get_dataType(), test_get_nodeTypeString(), test_get_ownerDocument(), test_getAttribute(), test_GetProp(), test_global_id(), Test_ifuncs(), test_InitPropVariantFromBuffer(), test_InitPropVariantFromGUIDAsString(), test_Installer_Products(), test_isexpression(), test_items(), test_IXMLDOMDocument2(), test_legacy_filter(), test_locator(), test_midiout(), test_misc(), test_multi_encoder(), test_namespace(), test_namespaces_change(), test_nextdispid(), test_normalize_attribute_values(), test_OleLoadPicturePath(), test_ParseDisplayName(), test_PropVariantToGUID(), test_replacechild_elems(), test_saxreader(), test_script_run(), test_splitText(), test_SummaryInfo(), test_sync_xhr(), test_timeout(), test_TypeInfo(), test_VarFormatFromTokens(), test_vfw(), test_wavein(), test_waveout(), test_xmlelem_collection(), test_xmlhttprequest(), test_xmlTypes(), test_XPath(), testCodepage(), testPropsHelper(), testQuery(), testSetHelper(), TLB_SanitizeVariant(), TLB_set_custdata(), to_array(), to_bstr_array(), to_byte_array(), to_i4_array(), to_longlong(), tt_face_get_metrics(), type_buffer_alignment(), variant_func(), variant_to_jsval(), variant_to_nsastr(), variantstr(), VariantToIdlist(), anonymous_namespace{mstscax.cpp}::VariantToString(), Widget_VarArg_Ref_Run(), Widget_VarArg_Run(), wine_dbgstr_propvariant(), write_conf_or_var_desc(), write_filter_data(), write_function_stub(), write_new_procformatstring_type(), write_old_procformatstring_type(), write_parameter_conf_or_var_exprs(), write_parameters_init(), write_pointer_checks(), write_proc_func_header(), write_procformatstring_func(), write_remoting_arg(), write_remoting_arguments(), write_rpc_interface_start(), xslprocessor_addParameter(), xslprocessor_put_output(), and xslprocessor_set_parvalue().

◆ vec4_default_value

const float vec4_default_value[] = {10, 20, 30, 40}
static

Definition at line 250 of file shader.c.

Referenced by test_SetDefaults().

◆ vs_sincos_2_0

const DWORD vs_sincos_2_0[]
static
Initial value:
= {
0xfffe0200,
0x00000025, 0xb00f0000, 0xa0e40000, 0xa0e40001, 0xa0e40002,
0x00000000,
0x0000ffff}

Definition at line 6668 of file shader.c.

Referenced by test_disassemble_shader().

◆ vs_sincos_3_0

const DWORD vs_sincos_3_0[]
static
Initial value:
= {
0xfffe0300,
0x00000025, 0xb00f0000, 0xa0e40000,
0x00000000,
0x0000ffff}

Definition at line 6674 of file shader.c.

Referenced by test_disassemble_shader().