ReactOS 0.4.17-dev-970-gcf0f1a6
shader.c File Reference
#include <stdbool.h>
#include <stdint.h>
#include "wine/test.h"
#include "d3dx9.h"
Include dependency graph for shader.c:

Go to the source code of this file.

Classes

struct  d3d9_test_context
 
struct  vec3
 
struct  surface_readback
 
struct  registerset_test
 
struct  registerset_constants
 

Macros

#define COBJMACROS
 
#define FCC_TEXT   MAKEFOURCC('T','E','X','T')
 
#define FCC_CTAB   MAKEFOURCC('C','T','A','B')
 
#define release_test_context(a)   release_test_context_(__LINE__, a)
 
#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 HWND create_window (void)
 
static IDirect3DDevice9 * create_device (IDirect3D9 *d3d, HWND device_window, HWND focus_window, BOOL windowed)
 
static bool init_test_context (struct d3d9_test_context *context)
 
static void release_test_context_ (unsigned int line, struct d3d9_test_context *context)
 
static void draw_quad (struct d3d9_test_context *context)
 
static uint32_t get_readback_color (struct surface_readback *rb, uint32_t x, uint32_t y)
 
static void release_surface_readback (struct surface_readback *rb)
 
static void get_surface_readback (IDirect3DDevice9 *device, IDirect3DSurface9 *surface, struct surface_readback *rb)
 
static bool compare_uint (unsigned int x, unsigned int y, unsigned int max_diff)
 
static bool color_match (uint32_t c1, uint32_t c2, unsigned int max_diff)
 
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_hlsl_double (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 []
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 20 of file shader.c.

◆ FCC_CTAB

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

Definition at line 27 of file shader.c.

◆ FCC_TEXT

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

Definition at line 26 of file shader.c.

◆ REGISTER_OUTPUT_SIZE

#define REGISTER_OUTPUT_SIZE   48

Definition at line 2177 of file shader.c.

◆ release_test_context

#define release_test_context (   a)    release_test_context_(__LINE__, a)

Definition at line 369 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 2179 of file shader.c.

@ SetMatrixTransposePointerArray
Definition: shader.c:2181
@ SetMatrixArray
Definition: shader.c:2180
@ SetIntArray
Definition: shader.c:2179
@ SetVectorArray
Definition: shader.c:2180
@ SetMatrixPointerArray
Definition: shader.c:2181
@ SetBoolArray
Definition: shader.c:2179
@ SetBool
Definition: shader.c:2179
@ SetVector
Definition: shader.c:2180
@ SetMatrixTransposeArray
Definition: shader.c:2180
@ SetMatrix
Definition: shader.c:2179
@ SetValue
Definition: shader.c:2181
@ SetFloat
Definition: shader.c:2179
@ SetFloatArray
Definition: shader.c:2179
@ SetInt
Definition: shader.c:2179
@ SetMatrixTranspose
Definition: shader.c:2180

Function Documentation

◆ color_match()

static bool color_match ( uint32_t  c1,
uint32_t  c2,
unsigned int  max_diff 
)
static

Definition at line 486 of file shader.c.

487{
488 return compare_uint(c1 & 0xff, c2 & 0xff, max_diff)
489 && compare_uint((c1 >> 8) & 0xff, (c2 >> 8) & 0xff, max_diff)
490 && compare_uint((c1 >> 16) & 0xff, (c2 >> 16) & 0xff, max_diff)
491 && compare_uint((c1 >> 24) & 0xff, (c2 >> 24) & 0xff, max_diff);
492}
static bool compare_uint(unsigned int x, unsigned int y, unsigned int max_diff)
Definition: shader.c:479

Referenced by test_hlsl_double().

◆ compare_uint()

static bool compare_uint ( unsigned int  x,
unsigned int  y,
unsigned int  max_diff 
)
static

Definition at line 479 of file shader.c.

480{
481 unsigned int diff = x > y ? x - y : y - x;
482
483 return diff <= max_diff;
484}
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

Referenced by color_match().

◆ create_device()

static IDirect3DDevice9 * create_device ( IDirect3D9 *  d3d,
HWND  device_window,
HWND  focus_window,
BOOL  windowed 
)
static

Definition at line 325 of file shader.c.

326{
327 D3DPRESENT_PARAMETERS present_parameters = {0};
329
330 present_parameters.Windowed = windowed;
331 present_parameters.hDeviceWindow = device_window;
332 present_parameters.SwapEffect = D3DSWAPEFFECT_DISCARD;
333 present_parameters.BackBufferWidth = 640;
334 present_parameters.BackBufferHeight = 480;
335 present_parameters.BackBufferFormat = D3DFMT_A8R8G8B8;
336 present_parameters.EnableAutoDepthStencil = TRUE;
337 present_parameters.AutoDepthStencilFormat = D3DFMT_D24S8;
338
340 D3DCREATE_HARDWARE_VERTEXPROCESSING, &present_parameters, &device)))
341 return device;
342
343 return NULL;
344}
@ D3DFMT_A8R8G8B8
Definition: d3d8types.h:604
@ D3DFMT_D24S8
Definition: d3d8types.h:643
@ D3DSWAPEFFECT_DISCARD
Definition: d3d8types.h:851
@ D3DDEVTYPE_HAL
Definition: d3d8types.h:576
#define IDirect3D9_CreateDevice(p, a, b, c, d, e, f)
Definition: d3d9.h:224
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
DWORD IDirect3DDevice9
Definition: dxva2api.idl:22
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define D3DADAPTER_DEFAULT
Definition: d3d8.h:53
#define D3DCREATE_HARDWARE_VERTEXPROCESSING
Definition: d3d8.h:41
D3DSWAPEFFECT SwapEffect
Definition: d3d8types.h:1128
D3DFORMAT BackBufferFormat
Definition: d3d8types.h:1123
D3DFORMAT AutoDepthStencilFormat
Definition: d3d8types.h:1132
Definition: devices.h:37

◆ create_window()

static HWND create_window ( void  )
static

Definition at line 313 of file shader.c.

314{
315 HWND hwnd;
316 RECT rect;
317
318 SetRect(&rect, 0, 0, 640, 480);
320 hwnd = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
321 0, 0, rect.right - rect.left, rect.bottom - rect.top, 0, 0, 0, 0);
322 return hwnd;
323}
RECT rect
Definition: combotst.c:67
#define FALSE
Definition: types.h:117
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
#define WS_VISIBLE
Definition: pedump.c:620
BOOL WINAPI AdjustWindowRect(_Inout_ LPRECT, _In_ DWORD, _In_ BOOL)
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4469
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
Definition: dcommon.idl:28
long bottom
Definition: dcommon.idl:29
long right
Definition: dcommon.idl:29
long left
Definition: dcommon.idl:29
long top
Definition: dcommon.idl:29
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023

Referenced by init_test_context().

◆ draw_quad()

static void draw_quad ( struct d3d9_test_context *  context)
static

Definition at line 387 of file shader.c.

388{
390 HRESULT hr;
391
392 static const struct
393 {
394 struct vec3 position;
395 }
396 quad[] =
397 {
398 {{-1.0f, -1.0f, 0.0f}},
399 {{-1.0f, 1.0f, 0.0f}},
400 {{ 1.0f, -1.0f, 0.0f}},
401 {{ 1.0f, 1.0f, 0.0f}},
402 };
403
405 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
407 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
409 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
411 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
413 ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
414}
#define ok(value,...)
Definition: atltest.h:57
@ D3DRS_ZENABLE
Definition: d3d8types.h:729
#define D3DFVF_XYZ
Definition: d3d8types.h:113
@ D3DPT_TRIANGLESTRIP
Definition: d3d8types.h:722
#define IDirect3DDevice9_EndScene(p)
Definition: d3d9.h:1377
#define IDirect3DDevice9_BeginScene(p)
Definition: d3d9.h:1376
#define IDirect3DDevice9_SetFVF(p, a)
Definition: d3d9.h:1424
#define IDirect3DDevice9_DrawPrimitiveUP(p, a, b, c, d)
Definition: d3d9.h:1418
#define IDirect3DDevice9_SetRenderState(p, a, b)
Definition: d3d9.h:1392
HRESULT hr
Definition: delayimp.cpp:582
#define S_OK
Definition: intsafe.h:52
static void quad(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3, GLuint pv)
Definition: quads.c:63
Definition: http.c:7252
Definition: shader.c:383

◆ get_readback_color()

static uint32_t get_readback_color ( struct surface_readback *  rb,
uint32_t  x,
uint32_t  y 
)
static

Definition at line 422 of file shader.c.

423{
424 return rb->locked_rect.pBits
425 ? ((uint32_t *)rb->locked_rect.pBits)[y * rb->locked_rect.Pitch / sizeof(uint32_t) + x] : 0xdeadbeef;
426}
UINT32 uint32_t
Definition: types.h:75
#define uint32_t
Definition: nsiface.idl:61
D3DLOCKED_RECT locked_rect
Definition: shader.c:419

Referenced by test_hlsl_double().

◆ get_surface_readback()

static void get_surface_readback ( IDirect3DDevice9 *  device,
IDirect3DSurface9 *  surface,
struct surface_readback *  rb 
)
static

Definition at line 439 of file shader.c.

440{
442 HRESULT hr;
443
444 hr = IDirect3DSurface9_GetDesc(surface, &desc);
445 if (FAILED(hr))
446 {
447 trace("Failed to get surface description, hr %#lx.\n", hr);
448 goto exit;
449 }
450
452 &rb->surface, NULL);
453 if (FAILED(hr))
454 {
455 trace("Can't create the readback surface, hr %#lx.\n", hr);
456 goto exit;
457 }
458
460 if (FAILED(hr))
461 {
462 trace("Can't load the readback surface, hr %#lx.\n", hr);
463 goto exit;
464 }
465
467 if (FAILED(hr))
468 trace("Can't lock the readback surface, hr %#lx.\n", hr);
469
470exit:
471 if (FAILED(hr))
472 {
473 if (rb->surface)
475 rb->surface = NULL;
476 }
477}
#define trace
Definition: atltest.h:70
@ D3DPOOL_SYSTEMMEM
Definition: d3d8types.h:711
#define D3DLOCK_READONLY
Definition: d3d8types.h:69
#define IDirect3DSurface9_LockRect(p, a, b, c)
Definition: d3d9.h:463
#define IDirect3DSurface9_GetDesc(p, a)
Definition: d3d9.h:462
#define IDirect3DSurface9_Release(p)
Definition: d3d9.h:450
#define IDirect3DDevice9_CreateOffscreenPlainSurface(p, a, b, c, d, e, f)
Definition: d3d9.h:1371
HRESULT WINAPI D3DXLoadSurfaceFromSurface(IDirect3DSurface9 *dst_surface, const PALETTEENTRY *dst_palette, const RECT *dst_rect, IDirect3DSurface9 *src_surface, const PALETTEENTRY *src_palette, const RECT *src_rect, DWORD filter, D3DCOLOR color_key)
Definition: surface.c:2765
#define D3DX_FILTER_NONE
Definition: d3dx9tex.h:27
#define FAILED(hr)
Definition: intsafe.h:51
D3D11_SHADER_VARIABLE_DESC desc
Definition: reflection.c:1683
#define exit(n)
Definition: config.h:202
IDirect3DSurface9 * surface
Definition: shader.c:418

Referenced by test_hlsl_double().

◆ init_test_context()

static bool init_test_context ( struct d3d9_test_context *  context)
static

Definition at line 346 of file shader.c.

347{
348 HRESULT hr;
349
350 memset(context, 0, sizeof(*context));
351
352 context->window = create_window();
354 ok(!!context->d3d, "Failed to create a D3D object.\n");
355 if (!(context->device = create_device(context->d3d, context->window, context->window, TRUE)))
356 {
357 skip("Failed to create a D3D device.\n");
359 DestroyWindow(context->window);
360 return false;
361 }
362
363 hr = IDirect3DDevice9_GetRenderTarget(context->device, 0, &context->backbuffer);
364 ok(hr == S_OK, "Failed to get backbuffer, hr %#lx.\n", hr);
365
366 return true;
367}
#define skip(...)
Definition: atltest.h:64
IDirect3D9 *WINAPI Direct3DCreate9(UINT SDKVersion)
Definition: d3d9.c:57
#define IDirect3D9_Release(p)
Definition: d3d9.h:209
#define IDirect3DDevice9_GetRenderTarget(p, a, b)
Definition: d3d9.h:1373
static ID3D11Device * create_device(void)
Definition: hlsl_d3d11.c:102
static HWND create_window(void)
Definition: shader.c:313
BOOL WINAPI DestroyWindow(_In_ HWND)
#define D3D_SDK_VERSION
Definition: d3d8.h:52
#define memset(x, y, z)
Definition: compat.h:39

◆ registerset_apply()

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

Definition at line 6177 of file shader.c.

6179{
6181 const D3DXMATRIX *inp[REGISTER_OUTPUT_SIZE / 16];
6182 unsigned int i;
6183
6184 /* overlap, to see the difference between Array and PointerArray */
6185 for (i = 0; i < REGISTER_OUTPUT_SIZE / 16; i++)
6186 {
6187 inp[i] = (D3DXMATRIX *)&in[i * 15];
6188 }
6189
6190 switch (type)
6191 {
6192 case SetInt:
6194 case SetFloat:
6196 case SetBool:
6198 case SetIntArray:
6200 case SetBoolArray:
6202 case SetFloatArray:
6204 case SetMatrix:
6206 case SetMatrixTranspose:
6208 case SetMatrixArray:
6212 case SetVector:
6214 case SetVectorArray:
6216 case SetValue:
6222 }
6223
6224 ok(0, "This should not happen!\n");
6225 return D3D_OK;
6226}
#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 count
Definition: gl.h:1545
GLuint GLuint GLsizei GLenum type
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:2200
#define REGISTER_OUTPUT_SIZE
Definition: shader.c:2177
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 6077 of file shader.c.

6078{
6079 DWORD zero[1024];
6080 HRESULT hr;
6081
6082 memset(zero, 0xde, 4096);
6083
6085 ok(hr == D3D_OK, "Clear failed, got %08lx, expected %08lx\n", hr, D3D_OK);
6086
6088 ok(hr == D3D_OK, "Clear failed, got %08lx, expected %08lx\n", hr, D3D_OK);
6089
6091 ok(hr == D3D_OK, "Clear failed, got %08lx, expected %08lx\n", hr, D3D_OK);
6092
6094 ok(hr == D3D_OK, "Clear failed, got %08lx, expected %08lx\n", hr, D3D_OK);
6095
6097 ok(hr == D3D_OK, "Clear failed, got %08lx, expected %08lx\n", hr, D3D_OK);
6098
6100 ok(hr == D3D_OK, "Clear failed, got %08lx, expected %08lx\n", hr, D3D_OK);
6101}
#define IDirect3DDevice9_SetPixelShaderConstantI(p, a, b, c)
Definition: d3d9.h:1446
#define IDirect3DDevice9_SetVertexShaderConstantF(p, a, b, c)
Definition: d3d9.h:1429
#define IDirect3DDevice9_SetPixelShaderConstantF(p, a, b, c)
Definition: d3d9.h:1444
#define IDirect3DDevice9_SetVertexShaderConstantI(p, a, b, c)
Definition: d3d9.h:1431
#define IDirect3DDevice9_SetPixelShaderConstantB(p, a, b, c)
Definition: d3d9.h:1448
#define IDirect3DDevice9_SetVertexShaderConstantB(p, a, b, c)
Definition: d3d9.h:1433
int zero
Definition: sehframes.cpp:29

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 6103 of file shader.c.

6105{
6106 DWORD ret[1024] = {0};
6107 HRESULT hr;
6108 UINT count = 1024, i, err = 0;
6109
6110 memset(ret, 0xde, 4096);
6111
6112 /* get shader constants */
6113 switch (regset)
6114 {
6115 case D3DXRS_BOOL:
6116 count = 16;
6119 ok(hr == D3D_OK, "Get*ShaderConstantB failed, got %08lx\n", hr);
6120 break;
6121
6122 case D3DXRS_INT4:
6123 count = 256;
6126 ok(hr == D3D_OK, "Get*ShaderConstantI failed, got %08lx\n", hr);
6127 break;
6128
6129 case D3DXRS_FLOAT4:
6131 else
6132 {
6133 count = 896;
6135 }
6136 ok(hr == D3D_OK, "Get*ShaderConstantF failed, got %08lx\n", hr);
6137 break;
6138
6139 default:
6140 ok(0, "This should not happen!\n");
6141 break;
6142 }
6143
6144 /* compare shader constants */
6145 for (i = 0; i < count; ++i)
6146 {
6147 DWORD value = 0xdededede;
6148 if (i >= start && i < start + in_count) value = expected[i - start];
6149
6150 ok(ret[i] == value, "Get*ShaderConstant failed, %u got 0x%lx(%f) expected 0x%lx(%f)\n", i,
6151 ret[i], ((FLOAT *)ret)[i], value, *((FLOAT *)&value));
6152 if (ret[i] != value) err++;
6153 }
6154
6155 return err;
6156}
#define IDirect3DDevice9_GetPixelShaderConstantB(p, a, b, c)
Definition: d3d9.h:1449
#define IDirect3DDevice9_GetPixelShaderConstantI(p, a, b, c)
Definition: d3d9.h:1447
#define IDirect3DDevice9_GetVertexShaderConstantI(p, a, b, c)
Definition: d3d9.h:1432
#define IDirect3DDevice9_GetPixelShaderConstantF(p, a, b, c)
Definition: d3d9.h:1445
#define IDirect3DDevice9_GetVertexShaderConstantB(p, a, b, c)
Definition: d3d9.h:1434
#define IDirect3DDevice9_GetVertexShaderConstantF(p, a, b, c)
Definition: d3d9.h:1430
return ret
Definition: mutex.c:147
@ D3DXRS_FLOAT4
Definition: d3dx9shader.h:55
@ D3DXRS_BOOL
Definition: d3dx9shader.h:53
@ D3DXRS_INT4
Definition: d3dx9shader.h:54
GLuint start
Definition: gl.h:1545
unsigned int UINT
Definition: sysinfo.c:13
BOOL expected
Definition: store.c:2000
D3DXREGISTER_SET regset
Definition: shader.c:5881
#define err(...)
Definition: pdh_main.c:64

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 6158 of file shader.c.

6160{
6162 UINT err = 0, i;
6163
6164 for (i = 0; i < ARRAY_SIZE(regsets); i++)
6165 {
6166 if (regset == regsets[i])
6167 err += registerset_compare(device, is_vs, regset, start, in_count, expected);
6168 else
6169 err += registerset_compare(device, is_vs, regsets[i], 0, 0, NULL);
6170
6171 err += registerset_compare(device, !is_vs, regsets[i], 0, 0, NULL);
6172 }
6173
6174 return err;
6175}
#define ARRAY_SIZE(A)
Definition: main.h:20
enum _D3DXREGISTER_SET D3DXREGISTER_SET
static UINT registerset_compare(IDirect3DDevice9 *device, BOOL is_vs, D3DXREGISTER_SET regset, UINT start, UINT in_count, const DWORD *expected)
Definition: shader.c:6103

Referenced by test_registerset().

◆ release_surface_readback()

static void release_surface_readback ( struct surface_readback *  rb)
static

Definition at line 428 of file shader.c.

429{
430 HRESULT hr;
431
432 if (!rb->surface)
433 return;
435 trace("Can't unlock the readback surface, hr %#lx.\n", hr);
437}
#define IDirect3DSurface9_UnlockRect(p)
Definition: d3d9.h:464

Referenced by test_hlsl_double().

◆ release_test_context_()

static void release_test_context_ ( unsigned int  line,
struct d3d9_test_context *  context 
)
static

Definition at line 370 of file shader.c.

371{
372 ULONG refcount;
373
375 refcount = IDirect3DDevice9_Release(context->device);
376 ok(!refcount, "Device has %lu references left.\n", refcount);
377 refcount = IDirect3D9_Release(context->d3d);
378 ok(!refcount, "D3D object has %lu references left.\n", refcount);
379 DestroyWindow(context->window);
380}
#define IDirect3DDevice9_Release(p)
Definition: d3d9.h:1336
uint32_t ULONG
Definition: typedefs.h:59

◆ START_TEST()

START_TEST ( shader  )

Definition at line 6900 of file shader.c.

6901{
6914#if D3DX_SDK_VERSION <= 41
6916#endif
6918}
static void test_shader_semantics(void)
Definition: shader.c:6628
static void test_get_shader_size(void)
Definition: shader.c:494
static void test_get_sampler_index(void)
Definition: shader.c:1712
static void test_find_shader_comment(void)
Definition: shader.c:526
static void test_get_shader_samplers(void)
Definition: shader.c:1805
static void test_registerset_defaults(void)
Definition: shader.c:6533
static void test_registerset(void)
Definition: shader.c:6228
static void test_get_shader_constant_variables(void)
Definition: shader.c:2043
static void test_constant_tables(void)
Definition: shader.c:862
static void test_get_shader_version(void)
Definition: shader.c:510
static void test_setting_constants(void)
Definition: shader.c:1662
static void test_hlsl_double(void)
Definition: shader.c:6841
static void test_get_shader_constant_table_ex(void)
Definition: shader.c:596
static void test_fragment_linker(void)
Definition: shader.c:6792

◆ 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 784 of file shader.c.

786{
787 UINT i;
788 ID3DXConstantTable *ctable;
789
790 HRESULT res;
791
792 /* Get the constant table from the shader itself */
794 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed on %s: got %08lx\n", test_name, res);
795
796 for (i = 0; i < count; i++)
797 {
798 const D3DXCONSTANT_DESC *expected = &expecteds[i];
799 D3DXHANDLE const_handle;
800 D3DXCONSTANT_DESC actual;
801 UINT pCount = 1;
802
804
805 res = ID3DXConstantTable_GetConstantDesc(ctable, const_handle, &actual, &pCount);
806 ok(SUCCEEDED(res), "%s in %s: ID3DXConstantTable_GetConstantDesc returned %08lx\n", expected->Name,
807 test_name, res);
808 ok(pCount == 1, "%s in %s: Got more or less descriptions: %d\n", expected->Name, test_name, pCount);
809
810 ok(strcmp(actual.Name, expected->Name) == 0,
811 "%s in %s: Got different names: Got %s, expected %s\n", expected->Name,
812 test_name, actual.Name, expected->Name);
813 ok(actual.RegisterSet == expected->RegisterSet,
814 "%s in %s: Got different register sets: Got %d, expected %d\n",
815 expected->Name, test_name, actual.RegisterSet, expected->RegisterSet);
816 ok(actual.RegisterIndex == expected->RegisterIndex,
817 "%s in %s: Got different register indices: Got %d, expected %d\n",
818 expected->Name, test_name, actual.RegisterIndex, expected->RegisterIndex);
819 ok(actual.RegisterCount == expected->RegisterCount,
820 "%s in %s: Got different register counts: Got %d, expected %d\n",
821 expected->Name, test_name, actual.RegisterCount, expected->RegisterCount);
822 ok(actual.Class == expected->Class,
823 "%s in %s: Got different classes: Got %d, expected %d\n", expected->Name,
824 test_name, actual.Class, expected->Class);
825 ok(actual.Type == expected->Type,
826 "%s in %s: Got different types: Got %d, expected %d\n", expected->Name,
827 test_name, actual.Type, expected->Type);
828 ok(actual.Rows == expected->Rows && actual.Columns == expected->Columns,
829 "%s in %s: Got different dimensions: Got (%d, %d), expected (%d, %d)\n",
830 expected->Name, test_name, actual.Rows, actual.Columns, expected->Rows,
831 expected->Columns);
832 ok(actual.Elements == expected->Elements,
833 "%s in %s: Got different element count: Got %d, expected %d\n",
834 expected->Name, test_name, actual.Elements, expected->Elements);
835 ok(actual.StructMembers == expected->StructMembers,
836 "%s in %s: Got different struct member count: Got %d, expected %d\n",
837 expected->Name, test_name, actual.StructMembers, expected->StructMembers);
838 ok(actual.Bytes == expected->Bytes,
839 "%s in %s: Got different byte count: Got %d, expected %d\n",
840 expected->Name, test_name, actual.Bytes, expected->Bytes);
841
842 if (!expected->DefaultValue)
843 {
844 ok(actual.DefaultValue == NULL,
845 "%s in %s: Got different default value: expected NULL\n",
846 expected->Name, test_name);
847 }
848 else
849 {
850 ok(actual.DefaultValue != NULL,
851 "%s in %s: Got different default value: expected non-NULL\n",
852 expected->Name, test_name);
853 ok(memcmp(actual.DefaultValue, expected->DefaultValue, expected->Bytes) == 0,
854 "%s in %s: Got different default value\n", expected->Name, test_name);
855 }
856 }
857
858 /* Finally, release the constant table */
860}
HRESULT WINAPI D3DXGetShaderConstantTable(const DWORD *byte_code, ID3DXConstantTable **constant_table)
Definition: shader.c:2097
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
Definition: string.c:2807
_ACRTIMP int __cdecl strcmp(const char *, const char *)
Definition: string.c:3324
#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
GLuint res
Definition: glext.h:9613
static const char * test_name
Definition: run.c:194
const char * Name
Definition: d3dx9shader.h:105
D3DXPARAMETER_CLASS Class
Definition: d3dx9shader.h:109
D3DXREGISTER_SET RegisterSet
Definition: d3dx9shader.h:106
D3DXPARAMETER_TYPE Type
Definition: d3dx9shader.h:110
const void * DefaultValue
Definition: d3dx9shader.h:116

◆ test_constant_tables()

static void test_constant_tables ( void  )
static

Definition at line 862 of file shader.c.

863{
876}
static void test_constant_table(void)
Definition: hlsl_d3d9.c:1203
static const DWORD ctab_samplers[]
Definition: shader.c:263
static const D3DXCONSTANT_DESC ctab_samplers_expected[]
Definition: shader.c:281
static const DWORD ctab_matrices[]
Definition: shader.c:119
static const DWORD ctab_matrices2[]
Definition: shader.c:143
static const DWORD ctab_basic[]
Definition: shader.c:93
static const D3DXCONSTANT_DESC ctab_matrices_expected[]
Definition: shader.c:137
static const D3DXCONSTANT_DESC ctab_basic_expected[]
Definition: shader.c:112
static const D3DXCONSTANT_DESC ctab_with_default_values_expected[]
Definition: shader.c:256
static const DWORD ctab_arrays[]
Definition: shader.c:177
static const D3DXCONSTANT_DESC ctab_matrices2_expected[]
Definition: shader.c:169
static const D3DXCONSTANT_DESC ctab_arrays_expected[]
Definition: shader.c:204
static const DWORD ctab_with_default_values[]
Definition: shader.c:212

Referenced by START_TEST().

◆ test_find_shader_comment()

static void test_find_shader_comment ( void  )
static

Definition at line 526 of file shader.c.

527{
528 const void *data = (void *)0xdeadbeef;
529 HRESULT hr;
530 UINT size = 100;
531
532 hr = D3DXFindShaderComment(NULL, MAKEFOURCC('C','T','A','B'), &data, &size);
533 ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
534 ok(!data, "Got %p, expected NULL\n", data);
535 ok(!size, "Got %u, expected 0\n", size);
536
538 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
539 ok(size == 28, "Got %u, expected 28\n", size);
540
542 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
543 ok(data == shader_with_ctab + 6, "Got result %p, expected %p\n", data, shader_with_ctab + 6);
544
546 ok(hr == S_FALSE, "Got result %lx, expected 1 (S_FALSE)\n", hr);
547 ok(!data, "Got %p, expected NULL\n", data);
548 ok(!size, "Got %u, expected 0\n", size);
549
551 ok(hr == S_FALSE, "Got result %lx, expected 1 (S_FALSE)\n", hr);
552 ok(!data, "Got %p, expected NULL\n", data);
553 ok(!size, "Got %u, expected 0\n", size);
554
556 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
557 ok(data == shader_with_ctab + 6, "Got result %p, expected %p\n", data, shader_with_ctab + 6);
558 ok(size == 28, "Got result %u, expected 28\n", size);
559
560 hr = D3DXFindShaderComment(shader_zero, MAKEFOURCC('C','T','A','B'), &data, &size);
561 ok(hr == D3DXERR_INVALIDDATA, "Got result %lx, expected %x (D3DXERR_INVALIDDATA)\n", hr, D3DXERR_INVALIDDATA);
562 ok(!data, "Got %p, expected NULL\n", data);
563 ok(!size, "Got %u, expected 0\n", size);
564
566 ok(hr == D3DXERR_INVALIDDATA, "Got result %lx, expected %x (D3DXERR_INVALIDDATA)\n", hr, D3DXERR_INVALIDDATA);
567 ok(!data, "Got %p, expected NULL\n", data);
568 ok(!size, "Got %u, expected 0\n", size);
569
570 hr = D3DXFindShaderComment(shader_empty, MAKEFOURCC('C','T','A','B'), &data, &size);
571 ok(hr == S_FALSE, "Got result %lx, expected %lx (S_FALSE)\n", hr, S_FALSE);
572 ok(!data, "Got %p, expected NULL\n", data);
573 ok(!size, "Got %u, expected 0\n", size);
574
576 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
577 ok(data == simple_fx + 3, "Got result %p, expected %p\n", data, simple_fx + 3);
578 ok(size == 4, "Got result %u, expected 4\n", size);
579
581 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
582 ok(data == simple_tx + 3, "Got result %p, expected %p\n", data, simple_tx + 3);
583 ok(size == 4, "Got result %u, expected 4\n", size);
584
586 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
587 ok(data == simple_7ffe + 3, "Got result %p, expected %p\n", data, simple_7ffe + 3);
588 ok(size == 4, "Got result %u, expected 4\n", size);
589
591 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
592 ok(data == simple_7fff + 3, "Got result %p, expected %p\n", data, simple_7fff + 3);
593 ok(size == 4, "Got result %u, expected 4\n", size);
594}
#define D3DERR_INVALIDCALL
Definition: d3d10_private.h:42
#define D3DXERR_INVALIDDATA
Definition: compiler.c:53
HRESULT WINAPI D3DXFindShaderComment(const DWORD *byte_code, DWORD fourcc, const void **data, UINT *size)
Definition: shader.c:141
#define MAKEFOURCC(ch0, ch1, ch2, ch3)
Definition: ddsformat.c:45
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:31
static const DWORD simple_7ffe[]
Definition: shader.c:39
#define FCC_TEXT
Definition: shader.c:26
static const DWORD shader_empty[]
Definition: shader.c:33
static const DWORD shader_with_ctab[]
Definition: shader.c:61
static const DWORD simple_7fff[]
Definition: shader.c:41
static const DWORD simple_tx[]
Definition: shader.c:37
static const DWORD shader_zero[]
Definition: shader.c:29
static const DWORD simple_fx[]
Definition: shader.c:35
#define S_FALSE
Definition: winerror.h:3451

Referenced by START_TEST().

◆ test_fragment_linker()

static void test_fragment_linker ( void  )
static

Definition at line 6792 of file shader.c.

6793{
6794 ID3DXFragmentLinker *linker;
6797 IDirect3D9 *d3d;
6798 ULONG refcount;
6799 HWND window;
6800 HRESULT hr;
6801
6802 window = CreateWindowA("static", "d3dx9_test", WS_OVERLAPPEDWINDOW, 0, 0, 640, 480, NULL, NULL, NULL, NULL);
6803 if (!(d3d = Direct3DCreate9(D3D_SDK_VERSION)))
6804 {
6805 skip("Failed to create a D3D object.\n");
6807 return;
6808 }
6809
6810 ZeroMemory(&d3dpp, sizeof(d3dpp));
6811 d3dpp.Windowed = TRUE;
6815 if (FAILED(hr))
6816 {
6817 skip("Failed to create a D3D device, hr %#lx.\n", hr);
6818 IDirect3D9_Release(d3d);
6820 return;
6821 }
6822
6823 hr = D3DXCreateFragmentLinker(device, 1024, &linker);
6824 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6825 ok(!!linker, "Unexpected linker %p.\n", linker);
6826 linker->lpVtbl->Release(linker);
6827
6828 hr = D3DXCreateFragmentLinkerEx(device, 1024, 0, &linker);
6829 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6830 ok(!!linker, "Unexpected linker %p.\n", linker);
6831 linker->lpVtbl->Release(linker);
6832
6833 refcount = IDirect3DDevice9_Release(device);
6834 ok(!refcount, "Device has %lu references left.\n", refcount);
6835 refcount = IDirect3D9_Release(d3d);
6836 ok(!refcount, "The D3D object has %lu references left.\n", refcount);
6838}
HRESULT WINAPI D3DXCreateFragmentLinkerEx(IDirect3DDevice9 *device, UINT size, DWORD flags, ID3DXFragmentLinker **linker)
Definition: shader.c:2288
HRESULT WINAPI D3DXCreateFragmentLinker(IDirect3DDevice9 *device, UINT size, ID3DXFragmentLinker **linker)
Definition: shader.c:2311
#define ZeroMemory
Definition: minwinbase.h:31
static IHTMLWindow2 * window
Definition: events.c:77
#define D3DCREATE_MIXED_VERTEXPROCESSING
Definition: d3d8.h:42

Referenced by START_TEST().

◆ test_get_sampler_index()

static void test_get_sampler_index ( void  )
static

Definition at line 1712 of file shader.c.

1713{
1714 ID3DXConstantTable *ctable;
1715
1716 HRESULT res;
1717 UINT index;
1718
1719 ULONG refcnt;
1720
1722 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed on ctab_samplers: got %08lx\n", res);
1723
1725 ok(index == 0, "ID3DXConstantTable_GetSamplerIndex returned wrong index: Got %d, expected 0\n", index);
1726
1728 ok(index == 3, "ID3DXConstantTable_GetSamplerIndex returned wrong index: Got %d, expected 3\n", index);
1729
1731 ok(index == -1, "ID3DXConstantTable_GetSamplerIndex found nonexistent sampler: Got %d\n",
1732 index);
1733
1735 ok(index == -1, "ID3DXConstantTable_GetSamplerIndex succeeded on non-sampler constant: Got %d\n",
1736 index);
1737
1739 ok(refcnt == 0, "The ID3DXConstantTable reference count was %lu, should be 0\n", refcnt);
1740}
#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 596 of file shader.c.

597{
598 D3DXCONSTANT_DESC constant_desc_save;
599 ID3DXConstantTable *constant_table;
600 D3DXCONSTANT_DESC constant_desc;
603 HRESULT hr;
604 void *data;
605 DWORD size;
606 UINT nb;
607
608 constant_table = (ID3DXConstantTable *)0xdeadbeef;
610 ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
611 ok(constant_table == NULL, "D3DXGetShaderConstantTableEx() failed, got %p\n", constant_table);
612
613 constant_table = (ID3DXConstantTable *)0xdeadbeef;
615 ok(hr == D3D_OK, "Got result %lx, expected %lx (D3D_OK)\n", hr, D3D_OK);
616 ok(constant_table == NULL, "D3DXGetShaderConstantTableEx() failed, got %p\n", constant_table);
617
618 constant_table = (ID3DXConstantTable *)0xdeadbeef;
620 ok(hr == D3D_OK, "Got result %lx, expected %lx (D3D_OK)\n", hr, D3D_OK);
621 ok(constant_table == NULL, "D3DXGetShaderConstantTableEx() failed, got %p\n", constant_table);
622
623 constant_table = (ID3DXConstantTable *)0xdeadbeef;
625 ok(hr == D3DXERR_INVALIDDATA, "Got result %lx, expected %x (D3DXERR_INVALIDDATA)\n", hr, D3DXERR_INVALIDDATA);
626 ok(constant_table == NULL, "D3DXGetShaderConstantTableEx() failed, got %p\n", constant_table);
627
628 /* No CTAB data */
629 constant_table = (ID3DXConstantTable *)0xdeadbeef;
631 ok(hr == D3DXERR_INVALIDDATA, "Got result %lx, expected %x (D3DXERR_INVALIDDATA)\n", hr, D3DXERR_INVALIDDATA);
632 ok(constant_table == NULL, "D3DXGetShaderConstantTableEx() failed, got %p\n", constant_table);
633
634 /* With invalid CTAB data */
636 ok(hr == D3DXERR_INVALIDDATA || broken(hr == D3D_OK), /* winxp 64-bit, w2k3 64-bit */
637 "Got result %lx, expected %x (D3DXERR_INVALIDDATA)\n", hr, D3DXERR_INVALIDDATA);
639
641 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr);
642 ok(!constant_table, "D3DXGetShaderConstantTableEx() returned a non-NULL constant table.\n");
643
645 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr);
646 ok(!constant_table, "D3DXGetShaderConstantTableEx() returned a non-NULL constant table.\n");
647
649 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
650 ok(constant_table != NULL, "D3DXGetShaderConstantTableEx() failed, got NULL\n");
651
653 ok(size == 28, "Unexpected size %lu.\n", size);
654
656 ok(!memcmp(data, shader_with_ctab + 6, size), "Retrieved wrong CTAB data\n");
657
659 ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
660
662 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
663 ok(desc.Creator == (const char *)data + 0x10, "Got result %p, expected %p\n",
664 desc.Creator, (const char *)data + 0x10);
665 ok(desc.Version == D3DVS_VERSION(3, 0), "Got result %lx, expected %x\n", desc.Version, D3DVS_VERSION(3, 0));
666 ok(desc.Constants == 0, "Unexpected Constants %u.\n", desc.Constants);
667
669
671 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
672 ok(constant_table != NULL, "D3DXGetShaderConstantTableEx() failed, got NULL\n");
673
674 /* Test GetDesc */
676 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
677 ok(!strcmp(desc.Creator, "Wine project"), "Got result '%s', expected 'Wine project'\n", desc.Creator);
678 ok(desc.Version == D3DVS_VERSION(3, 0), "Got result %lx, expected %x\n", desc.Version, D3DVS_VERSION(3, 0));
679 ok(desc.Constants == 3, "Got result %x, expected 3\n", desc.Constants);
680
681 /* Test GetConstant */
683 ok(constant != NULL, "No constant found\n");
685 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
686 ok(!strcmp(constant_desc.Name, "Constant1"), "Got result '%s', expected 'Constant1'\n",
687 constant_desc.Name);
688 ok(constant_desc.Class == D3DXPC_VECTOR, "Got result %x, expected %u (D3DXPC_VECTOR)\n",
689 constant_desc.Class, D3DXPC_VECTOR);
690 ok(constant_desc.Type == D3DXPT_FLOAT, "Got result %x, expected %u (D3DXPT_FLOAT)\n",
691 constant_desc.Type, D3DXPT_FLOAT);
692 ok(constant_desc.Rows == 1, "Got result %x, expected 1\n", constant_desc.Rows);
693 ok(constant_desc.Columns == 4, "Got result %x, expected 4\n", constant_desc.Columns);
694
696 ok(constant != NULL, "No constant found\n");
698 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
699 ok(!strcmp(constant_desc.Name, "Constant2"), "Got result '%s', expected 'Constant2'\n",
700 constant_desc.Name);
701 ok(constant_desc.Class == D3DXPC_MATRIX_COLUMNS, "Got result %x, expected %u (D3DXPC_MATRIX_COLUMNS)\n",
702 constant_desc.Class, D3DXPC_MATRIX_COLUMNS);
703 ok(constant_desc.Type == D3DXPT_FLOAT, "Got result %x, expected %u (D3DXPT_FLOAT)\n",
704 constant_desc.Type, D3DXPT_FLOAT);
705 ok(constant_desc.Rows == 4, "Got result %x, expected 1\n", constant_desc.Rows);
706 ok(constant_desc.Columns == 4, "Got result %x, expected 4\n", constant_desc.Columns);
707
709 ok(constant != NULL, "No constant found\n");
711 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
712 ok(!strcmp(constant_desc.Name, "Constant3"), "Got result '%s', expected 'Constant3'\n",
713 constant_desc.Name);
714 ok(constant_desc.Class == D3DXPC_MATRIX_COLUMNS, "Got result %x, expected %u (D3DXPC_MATRIX_COLUMNS)\n",
715 constant_desc.Class, D3DXPC_MATRIX_COLUMNS);
716 ok(constant_desc.Type == D3DXPT_FLOAT, "Got result %x, expected %u (D3DXPT_FLOAT)\n",
717 constant_desc.Type, D3DXPT_FLOAT);
718 ok(constant_desc.Rows == 4, "Got result %x, expected 1\n", constant_desc.Rows);
719 ok(constant_desc.Columns == 4, "Got result %x, expected 4\n", constant_desc.Columns);
720 constant_desc_save = constant_desc; /* For GetConstantDesc test */
721
723 ok(constant == NULL, "Got result %p, expected NULL\n", constant);
724
725 /* Test GetConstantByName */
727 ok(constant == NULL, "Got result %p, expected NULL\n", constant);
729 ok(constant != NULL, "No constant found\n");
731 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
732 ok(!memcmp(&constant_desc, &constant_desc_save, sizeof(D3DXCONSTANT_DESC)), "Got different constant data\n");
733
734 /* Test GetConstantDesc */
736 ok(constant != NULL, "No constant found\n");
738 ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
740 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
742 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
743 hr = ID3DXConstantTable_GetConstantDesc(constant_table, "Constant unknown", &constant_desc, &nb);
744 ok(hr == D3DERR_INVALIDCALL, "Got result %lx, expected %lx (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
745 hr = ID3DXConstantTable_GetConstantDesc(constant_table, "Constant3", &constant_desc, &nb);
746 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
747 ok(!memcmp(&constant_desc, &constant_desc_save, sizeof(D3DXCONSTANT_DESC)), "Got different constant data\n");
748
750
752 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
753 ok(!!constant_table, "Unexpected constant table %p.\n", constant_table);
754
756 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
757 ok(!strcmp(desc.Creator, "Wine project"), "Unexpected Creator %s.\n", debugstr_a(desc.Creator));
758 ok(desc.Version == D3DVS_VERSION(3, 0), "Unexpected Version %#lx.\n", desc.Version);
759 ok(desc.Constants == 3, "Unexpected Constants %u.\n", desc.Constants);
760
762 ok(!!constant, "No constant found.\n");
764 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
765 ok(!strcmp(constant_desc.Name, "Constant1"), "Unexpected Name %s.\n", debugstr_a(constant_desc.Name));
766 ok(constant_desc.Class == D3DXPC_VECTOR, "Unexpected Class %u.\n", constant_desc.Class);
767 ok(constant_desc.Type == D3DXPT_FLOAT, "Unexpected Type %u.\n", constant_desc.Type);
768 ok(constant_desc.Rows == 1, "Unexpected Rows %u.\n", constant_desc.Rows);
769 ok(constant_desc.Columns == 4, "Unexpected Columns %u.\n", constant_desc.Columns);
770
771 if (0)
772 {
773 /* Native d3dx crashes with this. */
774 hr = ID3DXConstantTable_GetConstantDesc(constant_table, "Constant3", &constant_desc, &nb);
775 }
776
778
780 ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK).\n", hr);
781 ok(!constant_table, "D3DXGetShaderConstantTableEx() returned a non-NULL constant table.\n");
782}
#define broken(x)
Definition: atltest.h:178
#define D3DVS_VERSION(major, minor)
Definition: d3d8types.h:475
HRESULT WINAPI D3DXGetShaderConstantTableEx(const DWORD *byte_code, DWORD flags, ID3DXConstantTable **constant_table)
Definition: shader.c:1977
@ 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
#define D3DXCONSTTABLE_LARGEADDRESSAWARE
Definition: d3dx9shader.h:46
@ D3DXPT_FLOAT
Definition: d3dx9shader.h:76
#define ID3DXConstantTable_GetConstant(p, a, b)
Definition: d3dx9shader.h:185
static ID3DXConstantTable ** constant_table
Definition: hlsl_d3d9.c:32
#define debugstr_a
Definition: kernel32.h:31
static const DWORD shader_with_ctab_constants[]
Definition: shader.c:76
static const DWORD fx_shader_with_ctab[]
Definition: shader.c:286
static const DWORD simple_ps[]
Definition: shader.c:52
static const DWORD shader_with_invalid_ctab[]
Definition: shader.c:69

Referenced by START_TEST().

◆ test_get_shader_constant_variables()

static void test_get_shader_constant_variables ( void  )
static

Definition at line 2043 of file shader.c.

2044{
2045 ID3DXConstantTable *ctable;
2046 HRESULT hr;
2047 ULONG count;
2048 UINT i;
2049 UINT nr = 1;
2052 DWORD *ctab;
2053
2055 ok(hr == D3D_OK, "D3DXGetShaderConstantTable failed, got %08lx, expected %08lx\n", hr, D3D_OK);
2056
2058 ok(ctab[0] == test_get_shader_constant_variables_blob[3], "ID3DXConstantTable_GetBufferPointer failed\n");
2059
2061 {
2062 const char *fullname = test_get_shader_constant_variables_data[i].fullname;
2063 const D3DXCONSTANT_DESC *expected_desc = &test_get_shader_constant_variables_data[i].desc;
2065
2067 ok(constant != NULL, "GetConstantByName \"%s\" failed\n", fullname);
2068
2070 ok(hr == D3D_OK, "GetConstantDesc \"%s\" failed, got %08lx, expected %08lx\n", fullname, hr, D3D_OK);
2071
2072 ok(!strcmp(expected_desc->Name, desc.Name), "GetConstantDesc \"%s\" failed, got \"%s\", expected \"%s\"\n",
2073 fullname, desc.Name, expected_desc->Name);
2074 ok(expected_desc->RegisterSet == desc.RegisterSet, "GetConstantDesc \"%s\" failed, got %#x, expected %#x\n",
2075 fullname, desc.RegisterSet, expected_desc->RegisterSet);
2076 ok(expected_desc->RegisterIndex == desc.RegisterIndex, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
2077 fullname, desc.RegisterIndex, expected_desc->RegisterIndex);
2078 ok(expected_desc->RegisterCount == desc.RegisterCount, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
2079 fullname, desc.RegisterCount, expected_desc->RegisterCount);
2080 ok(expected_desc->Class == desc.Class, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
2081 fullname, desc.Class, expected_desc->Class);
2082 ok(expected_desc->Type == desc.Type, "GetConstantDesc \"%s\" failed, got %#x, expected %#x\n",
2083 fullname, desc.Type, expected_desc->Type);
2084 ok(expected_desc->Rows == desc.Rows, "GetConstantDesc \"%s\" failed, got %#x, expected %#x\n",
2085 fullname, desc.Rows, expected_desc->Rows);
2086 ok(expected_desc->Columns == desc.Columns, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
2087 fullname, desc.Columns, expected_desc->Columns);
2088 ok(expected_desc->Elements == desc.Elements, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
2089 fullname, desc.Elements, expected_desc->Elements);
2090 ok(expected_desc->StructMembers == desc.StructMembers, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
2091 fullname, desc.StructMembers, expected_desc->StructMembers);
2092 ok(expected_desc->Bytes == desc.Bytes, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
2093 fullname, desc.Bytes, expected_desc->Bytes);
2094 ok(ctaboffset == (DWORD *)desc.DefaultValue - ctab, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
2096 }
2097
2099 ok(element == NULL, "GetConstantElement failed\n");
2100
2102 ok(constant != NULL, "GetConstantByName failed\n");
2103
2105 ok(constant == element, "GetConstantByName failed, got %p, expected %p\n", element, constant);
2106
2108 ok(element == constant, "GetConstantElement failed, got %p, expected %p\n", element, constant);
2109
2111 ok(constant != NULL, "GetConstantByName failed\n");
2112
2114 ok(element == constant, "GetConstant failed, got %p, expected %p\n", element, constant);
2115
2117 ok(element == NULL, "GetConstant failed\n");
2118
2120 ok(element == NULL, "GetConstant failed\n");
2121
2123 ok(constant == element, "GetConstantByName failed, got %p, expected %p\n", element, constant);
2124
2126 ok(NULL == element, "GetConstantByName failed\n");
2127
2129 ok(constant == element, "GetConstantByName failed, got %p, expected %p\n", element, constant);
2130
2132 ok(element == NULL, "GetConstantByName failed\n");
2133
2135 ok(element == constant, "GetConstantElement failed, got %p, expected %p\n", element, constant);
2136
2138 ok(element == NULL, "GetConstantElement failed\n");
2139
2141 ok(constant != NULL, "GetConstantByName failed\n");
2142
2144 ok(element != constant, "GetConstantByName failed, got %p, expected %p\n", element, constant);
2145
2147 ok(element == constant, "GetConstantElement failed, got %p, expected %p\n", element, constant);
2148
2150 ok(constant != NULL, "GetConstantByName failed\n");
2151
2153 ok(element == constant, "GetConstantElement failed, got %p, expected %p\n", element, constant);
2154
2156 ok(constant != NULL, "GetConstantByName failed\n");
2157
2159 ok(element == constant, "GetConstant failed, got %p, expected %p\n", element, constant);
2160
2162 ok(element == constant, "GetConstantByName failed, got %p, expected %p\n", element, constant);
2163
2164 element = ID3DXConstantTable_GetConstantByName(ctable, "s_2[0]", "invalid");
2165 ok(element == NULL, "GetConstantByName failed\n");
2166
2168 ok(constant != NULL, "GetConstantByName failed\n");
2169
2171 ok(constant == element, "GetConstantByName failed, got %p, expected %p\n", element, constant);
2172
2174 ok(count == 0, "Release failed, got %lu, expected %u\n", count, 0);
2175}
#define ID3DXConstantTable_GetConstantElement(p, a, b)
Definition: d3dx9shader.h:187
ULONG nr
Definition: thread.c:7
static const DWORD test_get_shader_constant_variables_blob[]
Definition: shader.c:1913
const struct @1920 test_get_shader_constant_variables_data[]
UINT ctaboffset
Definition: shader.c:1981
const char * fullname
Definition: shader.c:1979

Referenced by START_TEST().

◆ test_get_shader_samplers()

static void test_get_shader_samplers ( void  )
static

Definition at line 1805 of file shader.c.

1806{
1807 const char *samplers[16] = {NULL}; /* maximum number of sampler registers v/ps 3.0 = 16 */
1808 const char *sampler_orig;
1809 UINT count = 2;
1810 HRESULT hr;
1811
1812if (0)
1813{
1814 /* crashes if bytecode is NULL */
1816 ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %lx, expected %lx\n", hr, D3D_OK);
1817}
1818
1820 ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %lx, expected %lx\n", hr, D3D_OK);
1821
1822 samplers[5] = "dummy";
1823
1825 ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %lx, expected %lx\n", hr, D3D_OK);
1826
1827 /* check that sampler points to shader blob */
1828 sampler_orig = (const char *)&get_shader_samplers_blob[0x2e];
1829 ok(sampler_orig == samplers[0], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[0], sampler_orig);
1830
1831 sampler_orig = (const char *)&get_shader_samplers_blob[0x33];
1832 ok(sampler_orig == samplers[1], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[1], sampler_orig);
1833
1834 sampler_orig = (const char *)&get_shader_samplers_blob[0x38];
1835 ok(sampler_orig == samplers[2], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[2], sampler_orig);
1836
1837 sampler_orig = (const char *)&get_shader_samplers_blob[0x3d];
1838 ok(sampler_orig == samplers[3], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[3], sampler_orig);
1839
1840 sampler_orig = (const char *)&get_shader_samplers_blob[0x42];
1841 ok(sampler_orig == samplers[4], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[4], sampler_orig);
1842
1843 ok(!strcmp(samplers[5], "dummy"), "D3DXGetShaderSamplers failed, got \"%s\", expected \"%s\"\n", samplers[5], "dummy");
1844
1845 /* reset samplers */
1846 memset(samplers, 0, sizeof(samplers));
1847 samplers[5] = "dummy";
1848
1850 ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %lx, expected %lx\n", hr, D3D_OK);
1851 ok(count == 5, "D3DXGetShaderSamplers failed, got %u, expected %u\n", count, 5);
1852
1854 ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %lx, expected %lx\n", hr, D3D_OK);
1855 ok(count == 5, "D3DXGetShaderSamplers failed, got %u, expected %u\n", count, 5);
1856
1857 /* check that sampler points to shader blob */
1858 sampler_orig = (const char *)&get_shader_samplers_blob[0x2e];
1859 ok(sampler_orig == samplers[0], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[0], sampler_orig);
1860
1861 sampler_orig = (const char *)&get_shader_samplers_blob[0x33];
1862 ok(sampler_orig == samplers[1], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[1], sampler_orig);
1863
1864 sampler_orig = (const char *)&get_shader_samplers_blob[0x38];
1865 ok(sampler_orig == samplers[2], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[2], sampler_orig);
1866
1867 sampler_orig = (const char *)&get_shader_samplers_blob[0x3d];
1868 ok(sampler_orig == samplers[3], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[3], sampler_orig);
1869
1870 sampler_orig = (const char *)&get_shader_samplers_blob[0x42];
1871 ok(sampler_orig == samplers[4], "D3DXGetShaderSamplers failed, got %p, expected %p\n", samplers[4], sampler_orig);
1872
1873 ok(!strcmp(samplers[5], "dummy"), "D3DXGetShaderSamplers failed, got \"%s\", expected \"%s\"\n", samplers[5], "dummy");
1874
1875 /* check without ctab */
1877 ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %lx, expected %lx\n", hr, D3D_OK);
1878 ok(count == 0, "D3DXGetShaderSamplers failed, got %u, expected %u\n", count, 0);
1879
1880 /* check invalid ctab */
1882 ok(hr == D3D_OK, "D3DXGetShaderSamplers failed, got %lx, expected %lx\n", hr, D3D_OK);
1883 ok(count == 0, "D3DXGetShaderSamplers failed, got %u, expected %u\n", count, 0);
1884}
HRESULT WINAPI D3DXGetShaderSamplers(const DWORD *byte_code, const char **samplers, UINT *count)
Definition: shader.c:2318
GLuint * samplers
Definition: glext.h:7280
static const DWORD simple_vs[]
Definition: shader.c:43
static const DWORD get_shader_samplers_blob[]
Definition: shader.c:1764

Referenced by START_TEST().

◆ test_get_shader_size()

static void test_get_shader_size ( void  )
static

Definition at line 494 of file shader.c.

495{
496 UINT shader_size, expected;
497
498 shader_size = D3DXGetShaderSize(simple_vs);
499 expected = sizeof(simple_vs);
500 ok(shader_size == expected, "Got shader size %u, expected %u\n", shader_size, expected);
501
502 shader_size = D3DXGetShaderSize(simple_ps);
503 expected = sizeof(simple_ps);
504 ok(shader_size == expected, "Got shader size %u, expected %u\n", shader_size, expected);
505
506 shader_size = D3DXGetShaderSize(NULL);
507 ok(shader_size == 0, "Got shader size %u, expected 0\n", shader_size);
508}
UINT WINAPI D3DXGetShaderSize(const DWORD *byte_code)
Definition: shader.c:82

Referenced by START_TEST().

◆ test_get_shader_version()

static void test_get_shader_version ( void  )
static

Definition at line 510 of file shader.c.

511{
512 DWORD shader_version;
513
514 shader_version = D3DXGetShaderVersion(simple_vs);
515 ok(shader_version == D3DVS_VERSION(1, 1), "Got shader version 0x%08lx, expected 0x%08x\n",
516 shader_version, D3DVS_VERSION(1, 1));
517
518 shader_version = D3DXGetShaderVersion(simple_ps);
519 ok(shader_version == D3DPS_VERSION(1, 1), "Got shader version 0x%08lx, expected 0x%08x\n",
520 shader_version, D3DPS_VERSION(1, 1));
521
522 shader_version = D3DXGetShaderVersion(NULL);
523 ok(shader_version == 0, "Got shader version 0x%08lx, expected 0\n", shader_version);
524}
#define D3DPS_VERSION(major, minor)
Definition: d3d8types.h:474
DWORD WINAPI D3DXGetShaderVersion(const DWORD *byte_code)
Definition: shader.c:105

Referenced by START_TEST().

◆ test_hlsl_double()

static void test_hlsl_double ( void  )
static

Definition at line 6841 of file shader.c.

6842{
6843 static const char vs_hlsl[] =
6844 "float4 main(in float4 pos : POSITION) : POSITION\n"
6845 "{\n"
6846 " return pos;\n"
6847 "}\n";
6848 static const char ps_hlsl[] =
6849 "float func(float x){return 0.1;}\n"
6850 "float func(half x){return 0.2;}\n"
6851 "float func(double x){return 0.3;}\n"
6852 "\n"
6853 "float4 main(uniform double u) : COLOR\n"
6854 "{\n"
6855 " return func(u);\n"
6856 "}\n";
6857 ID3DXBuffer *vs_bytecode, *ps_bytecode, *errors;
6859 struct surface_readback rb;
6860 IDirect3DVertexShader9 *vs;
6861 IDirect3DPixelShader9 *ps;
6863 HRESULT hr;
6864
6866 return;
6867
6868 hr = D3DXCompileShader(vs_hlsl, sizeof(vs_hlsl), NULL, NULL, "main", "vs_2_0", 0, &vs_bytecode, &errors, NULL);
6869 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6870
6871 hr = D3DXCompileShader(ps_hlsl, sizeof(ps_hlsl), NULL, NULL, "main", "ps_2_0", 0, &ps_bytecode, &errors, NULL);
6872 todo_wine ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6873 if (FAILED(hr))
6874 {
6875 if (errors)
6876 trace("%s", (char *)ID3DXBuffer_GetBufferPointer(errors));
6878 return;
6879 }
6880
6882 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6884 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6886 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6888 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6890
6891 get_surface_readback(context.device, context.backbuffer, &rb);
6892 color = get_readback_color(&rb, 320, 240);
6893 ok(color_match(color, 0x4c4c4c4c, 0), "Unexpected color %#x.\n", color);
6898}
#define init_test_context(ctx, d3d11)
Definition: d2d1.c:1288
#define IDirect3DDevice9_CreatePixelShader(p, a, b)
Definition: d3d9.h:1441
#define IDirect3DDevice9_SetPixelShader(p, a)
Definition: d3d9.h:1442
#define IDirect3DPixelShader9_Release(p)
Definition: d3d9.h:1089
#define IDirect3DVertexShader9_Release(p)
Definition: d3d9.h:1051
#define IDirect3DDevice9_SetVertexShader(p, a)
Definition: d3d9.h:1427
#define IDirect3DDevice9_CreateVertexShader(p, a, b)
Definition: d3d9.h:1426
struct ID3DXBuffer ID3DXBuffer
Definition: d3dx8core.h:51
HRESULT WINAPI D3DXCompileShader(const char *data, UINT length, const D3DXMACRO *defines, ID3DXInclude *include, const char *function, const char *profile, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_msgs, ID3DXConstantTable **constant_table)
Definition: shader.c:434
#define ID3DXBuffer_GetBufferPointer(p)
Definition: d3dx9core.h:85
GLuint color
Definition: glext.h:6243
#define draw_quad(context, ps_code)
Definition: hlsl_d3d11.c:263
#define todo_wine
Definition: minitest.h:80
static void release_surface_readback(struct surface_readback *rb)
Definition: shader.c:428
static uint32_t get_readback_color(struct surface_readback *rb, uint32_t x, uint32_t y)
Definition: shader.c:422
static bool color_match(uint32_t c1, uint32_t c2, unsigned int max_diff)
Definition: shader.c:486
#define release_test_context(a)
Definition: shader.c:369
static void get_surface_readback(IDirect3DDevice9 *device, IDirect3DSurface9 *surface, struct surface_readback *rb)
Definition: shader.c:439
static vector_t * vs
Definition: server.c:146

Referenced by START_TEST().

◆ test_registerset()

static void test_registerset ( void  )
static

Definition at line 6228 of file shader.c.

6229{
6230 UINT k;
6231 HWND wnd;
6232 IDirect3D9 *d3d;
6235 HRESULT hr;
6236 ULONG count;
6237 D3DCAPS9 caps;
6238
6239 if (!(wnd = CreateWindowA("static", "d3dx9_test", WS_OVERLAPPEDWINDOW, 0, 0,
6240 640, 480, NULL, NULL, NULL, NULL)))
6241 {
6242 skip("Couldn't create application window\n");
6243 return;
6244 }
6245 if (!(d3d = Direct3DCreate9(D3D_SDK_VERSION)))
6246 {
6247 skip("Couldn't create IDirect3D9 object\n");
6248 DestroyWindow(wnd);
6249 return;
6250 }
6251
6252 ZeroMemory(&d3dpp, sizeof(d3dpp));
6253 d3dpp.Windowed = TRUE;
6256 if (FAILED(hr))
6257 {
6258 skip("Failed to create IDirect3DDevice9 object %#lx\n", hr);
6259 IDirect3D9_Release(d3d);
6260 DestroyWindow(wnd);
6261 return;
6262 }
6263
6265 ok(SUCCEEDED(hr), "Failed to get device caps, hr %#lx.\n", hr);
6266 if (caps.VertexShaderVersion < D3DVS_VERSION(3, 0)
6267 || caps.PixelShaderVersion < D3DPS_VERSION(3, 0))
6268 {
6269 skip("Skipping: Test requires VS >= 3 and PS >= 3.\n");
6271 IDirect3D9_Release(d3d);
6272 DestroyWindow(wnd);
6273 return;
6274 }
6275
6276 for (k = 0; k < ARRAY_SIZE(registerset_data); ++k)
6277 {
6278 const char *tablename = registerset_data[k].name;
6279 const char *name = registerset_data[k].var;
6280 ID3DXConstantTable *ctable;
6283 UINT i;
6284 BOOL is_vs;
6285 DWORD *ctab;
6286
6288 ok(hr == D3D_OK, "D3DXGetShaderConstantTable \"%s\" failed, got %08lx, expected %08lx\n", tablename, hr, D3D_OK);
6289
6291 ok(hr == D3D_OK, "GetDesc \"%s\" failed, got %08lx, expected %08lx\n", tablename, hr, D3D_OK);
6292
6294 ok(ctab[0] == registerset_data[k].blob[3], "ID3DXConstantTable_GetBufferPointer failed\n");
6295
6296 is_vs = (tdesc.Version & 0xFFFF0000) == 0xFFFE0000;
6297
6298 for (i = 0; i < registerset_data[k].constant_count; ++i)
6299 {
6300 const char *fullname = registerset_data[k].constants[i].fullname;
6301 const D3DXCONSTANT_DESC *expected_desc = &registerset_data[k].constants[i].desc;
6303 UINT nr = 0;
6304 UINT ctaboffset = registerset_data[k].constants[i].ctaboffset;
6305
6307 ok(constant != NULL, "GetConstantByName \"%s\" failed\n", fullname);
6308
6310 ok(hr == D3D_OK, "GetConstantDesc \"%s\" failed, got %08lx, expected %08lx\n", fullname, hr, D3D_OK);
6311
6312 ok(!strcmp(expected_desc->Name, desc.Name), "GetConstantDesc \"%s\" failed, got \"%s\", expected \"%s\"\n",
6313 fullname, desc.Name, expected_desc->Name);
6314 ok(expected_desc->RegisterSet == desc.RegisterSet, "GetConstantDesc \"%s\" failed, got %#x, expected %#x\n",
6315 fullname, desc.RegisterSet, expected_desc->RegisterSet);
6316 ok(expected_desc->RegisterIndex == desc.RegisterIndex,
6317 "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
6318 fullname, desc.RegisterIndex, expected_desc->RegisterIndex);
6319 ok(expected_desc->RegisterCount == desc.RegisterCount,
6320 "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
6321 fullname, desc.RegisterCount, expected_desc->RegisterCount);
6322 ok(expected_desc->Class == desc.Class, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
6323 fullname, desc.Class, expected_desc->Class);
6324 ok(expected_desc->Type == desc.Type, "GetConstantDesc \"%s\" failed, got %#x, expected %#x\n",
6325 fullname, desc.Type, expected_desc->Type);
6326 ok(expected_desc->Rows == desc.Rows, "GetConstantDesc \"%s\" failed, got %#x, expected %#x\n",
6327 fullname, desc.Rows, expected_desc->Rows);
6328 ok(expected_desc->Columns == desc.Columns, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
6329 fullname, desc.Columns, expected_desc->Columns);
6330 ok(expected_desc->Elements == desc.Elements, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
6331 fullname, desc.Elements, expected_desc->Elements);
6332 ok(expected_desc->StructMembers == desc.StructMembers,
6333 "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
6334 fullname, desc.StructMembers, expected_desc->StructMembers);
6335 ok(expected_desc->Bytes == desc.Bytes, "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
6336 fullname, desc.Bytes, expected_desc->Bytes);
6337 if (ctaboffset)
6338 {
6339 ok(ctaboffset == (DWORD *)desc.DefaultValue - ctab,
6340 "GetConstantDesc \"%s\" failed, got %u, expected %u\n",
6342 }
6343 }
6344
6346 ok(constant != NULL, "GetConstantByName \"%s\" \"%s\" failed\n", tablename, name);
6347
6348 for (i = 0; i < registerset_data[k].test_count; ++i)
6349 {
6350 const struct registerset_test *test = &registerset_data[k].tests[i];
6351 UINT ret;
6352
6354
6355 hr = registerset_apply(ctable, device, constant, test->in_index, test->in_count_min, test->type);
6356 ok(hr == D3D_OK, "Set* \"%s\" index %u, count %u failed, got %lx, expected %lx\n", tablename, i,
6357 test->in_count_min, hr, D3D_OK);
6358
6360 registerset_data[k].start, test->out_count, test->out);
6361 ok(ret == 0, "Get*ShaderConstant \"%s\" index %u, count %u failed\n", tablename, i, test->in_count_min);
6362
6363 if (test->in_count_max > test->in_count_min)
6364 {
6366
6367 hr = registerset_apply(ctable, device, constant, test->in_index, test->in_count_max, test->type);
6368 ok(hr == D3D_OK, "Set* \"%s\" index %u, count %u failed, got %lx, expected %lx\n", tablename, i,
6369 test->in_count_max, hr, D3D_OK);
6370
6372 registerset_data[k].start, test->out_count, test->out);
6373 ok(ret == 0, "Get*ShaderConstant \"%s\" index %u, count %u failed\n", tablename, i, test->in_count_max);
6374 }
6375 }
6376
6378 ok(count == 0, "Release \"%s\" failed, got %lu, expected %u\n", tablename, count, 0);
6379 }
6380
6381 /* Release resources */
6383 ok(count == 0, "The Direct3D device reference count was %lu, should be 0\n", count);
6384
6386 ok(count == 0, "The Direct3D object reference count was %lu, should be 0\n", count);
6387
6388 if (wnd) DestroyWindow(wnd);
6389}
#define IDirect3DDevice9_GetDeviceCaps(p, a)
Definition: d3d9.h:1342
static void registerset_clear(IDirect3DDevice9 *device)
Definition: shader.c:6077
static UINT registerset_compare_all(IDirect3DDevice9 *device, BOOL is_vs, D3DXREGISTER_SET regset, UINT start, UINT in_count, const DWORD *expected)
Definition: shader.c:6158
static const struct @1921 registerset_data[]
static HRESULT registerset_apply(ID3DXConstantTable *ctable, IDirect3DDevice9 *device, D3DXHANDLE constant, UINT index, DWORD count, enum Type type)
Definition: shader.c:6177
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:229
Definition: name.c:39

Referenced by START_TEST().

◆ test_registerset_defaults()

static void test_registerset_defaults ( void  )
static

Definition at line 6533 of file shader.c.

6534{
6535 UINT k;
6536 HWND wnd;
6537 IDirect3D9 *d3d;
6540 HRESULT hr;
6541 ULONG count;
6542 D3DCAPS9 caps;
6543
6544 if (!(wnd = CreateWindowA("static", "d3dx9_test", WS_OVERLAPPEDWINDOW, 0, 0,
6545 640, 480, NULL, NULL, NULL, NULL)))
6546 {
6547 skip("Couldn't create application window\n");
6548 return;
6549 }
6550 if (!(d3d = Direct3DCreate9(D3D_SDK_VERSION)))
6551 {
6552 skip("Couldn't create IDirect3D9 object\n");
6553 DestroyWindow(wnd);
6554 return;
6555 }
6556
6557 ZeroMemory(&d3dpp, sizeof(d3dpp));
6558 d3dpp.Windowed = TRUE;
6561 if (FAILED(hr))
6562 {
6563 skip("Failed to create IDirect3DDevice9 object %#lx\n", hr);
6564 IDirect3D9_Release(d3d);
6565 DestroyWindow(wnd);
6566 return;
6567 }
6568
6570 ok(SUCCEEDED(hr), "Failed to get device caps, hr %#lx.\n", hr);
6571 if (caps.VertexShaderVersion < D3DVS_VERSION(3, 0)
6572 || caps.PixelShaderVersion < D3DPS_VERSION(3, 0))
6573 {
6574 skip("Skipping: Test requires VS >= 3 and PS >= 3.\n");
6576 IDirect3D9_Release(d3d);
6577 DestroyWindow(wnd);
6578 return;
6579 }
6580
6581 for (k = 0; k < ARRAY_SIZE(registerset_defaults_data); ++k)
6582 {
6583 const char *tablename = registerset_defaults_data[k].name;
6584 ID3DXConstantTable *ctable;
6586 BOOL is_vs;
6587 UINT ret;
6588
6590 ok(hr == D3D_OK, "D3DXGetShaderConstantTable \"%s\" failed, got %08lx, expected %08lx\n", tablename, hr, D3D_OK);
6591
6593 ok(hr == D3D_OK, "GetDesc \"%s\" failed, got %08lx, expected %08lx\n", tablename, hr, D3D_OK);
6594
6595 is_vs = (tdesc.Version & 0xFFFF0000) == 0xFFFE0000;
6596
6598
6600 ok(hr == D3D_OK, "SetDefaults \"%s\" failed, got %08lx, expected %08lx\n", tablename, hr, D3D_OK);
6601
6604 ok(ret == 0, "Get*ShaderConstantF \"%s\" failed\n", tablename);
6605
6608 ok(ret == 0, "Get*ShaderConstantI \"%s\" failed\n", tablename);
6609
6612 ok(ret == 0, "Get*ShaderConstantB \"%s\" failed\n", tablename);
6613
6615 ok(count == 0, "Release \"%s\" failed, got %lu, expected %u\n", tablename, count, 0);
6616 }
6617
6618 /* Release resources */
6620 ok(count == 0, "The Direct3D device reference count was %lu, should be 0\n", count);
6621
6623 ok(count == 0, "The Direct3D object reference count was %lu, should be 0\n", count);
6624
6625 if (wnd) DestroyWindow(wnd);
6626}
#define ID3DXConstantTable_SetDefaults(p, a)
Definition: d3dx9shader.h:188
const DWORD floats[1024]
Definition: shader.c:6404
unsigned int float_count
Definition: shader.c:6401
static const struct @1922 registerset_defaults_data[]
unsigned int bool_count
Definition: shader.c:6403
const DWORD bools[16]
Definition: shader.c:6406
unsigned int int_count
Definition: shader.c:6402
const DWORD ints[256]
Definition: shader.c:6405

Referenced by START_TEST().

◆ test_SetDefaults()

static void test_SetDefaults ( IDirect3DDevice9 *  device)
static

Definition at line 1411 of file shader.c.

1412{
1413 static const D3DXMATRIX mvp = {{{
1414 0.51f, 0.62f, 0.80f, 0.78f,
1415 0.23f, 0.95f, 0.37f, 0.48f,
1416 0.10f, 0.58f, 0.90f, 0.25f,
1417 0.89f, 0.41f, 0.93f, 0.27f}}};
1418 static const D3DXVECTOR4 f4 = {0.2f, 0.4f, 0.8f, 1.2f};
1419
1420 float out[16];
1421
1422 HRESULT res;
1423 ID3DXConstantTable *ctable;
1424
1426 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %08lx\n", res);
1427
1429 ok(res == D3D_OK, "ID3DXConstantTable_SetVector failed: got %08lx\n", res);
1430
1432 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed: got %08lx\n", res);
1433
1435 ok(res == D3D_OK, "ID3dXConstantTable_SetDefaults failed: got %08lx\n", res);
1436
1437 /* SetDefaults doesn't change constants without default values */
1439 ok(out[0] == mvp._11 && out[4] == mvp._12 && out[8] == mvp._13 && out[12] == mvp._14,
1440 "The first row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1441 out[0], out[4], out[8], out[12], mvp._11, mvp._12, mvp._13, mvp._14);
1442 ok(out[1] == mvp._21 && out[5] == mvp._22 && out[9] == mvp._23 && out[13] == mvp._24,
1443 "The second row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1444 out[1], out[5], out[9], out[13], mvp._21, mvp._22, mvp._23, mvp._24);
1445 ok(out[2] == mvp._31 && out[6] == mvp._32 && out[10] == mvp._33 && out[14] == mvp._34,
1446 "The third row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1447 out[2], out[6], out[10], out[14], mvp._31, mvp._32, mvp._33, mvp._34);
1448 ok(out[3] == mvp._41 && out[7] == mvp._42 && out[11] == mvp._43 && out[15] == mvp._44,
1449 "The fourth row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1450 out[3], out[7], out[11], out[15], mvp._41, mvp._42, mvp._43, mvp._44);
1451
1453 ok(memcmp(out, &f4, sizeof(f4)) == 0,
1454 "The variable f4 was not set correctly, out={%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1455 out[0], out[1], out[2], out[3], f4.x, f4.y, f4.z, f4.w);
1456
1458
1460 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %08lx\n", res);
1461
1463 ok(res == D3D_OK, "ID3DXConstantTable_SetDefaults failed: got %08lx\n", res);
1464
1467 "The variable mat4 was not set correctly to default value\n");
1468
1471 "The variable mat3 was not set correctly to default value\n");
1472
1475 "The variable array was not set correctly to default value\n");
1476
1479 "The variable vec4 was not set correctly to default value\n");
1480
1483 "The variable flt was not set correctly to default value\n");
1484
1486}
static const float mat3_default_value[]
Definition: shader.c:251
static const float flt_default_value[]
Definition: shader.c:254
static const float vec4_default_value[]
Definition: shader.c:253
static const float arr_default_value[]
Definition: shader.c:252
static const float mat4_default_value[]
Definition: shader.c:250
#define f4(x, y, z)
Definition: sha1.c:33
float _32
Definition: d3d8types.h:1113
float _42
Definition: d3d8types.h:1114
float _13
Definition: d3d8types.h:1111
float _44
Definition: d3d8types.h:1114
float _14
Definition: d3d8types.h:1111
float _11
Definition: d3d8types.h:1111
float _33
Definition: d3d8types.h:1113
float _24
Definition: d3d8types.h:1112
float _31
Definition: d3d8types.h:1113
float _34
Definition: d3d8types.h:1113
float _12
Definition: d3d8types.h:1111
float _21
Definition: d3d8types.h:1112
float _41
Definition: d3d8types.h:1114
float _23
Definition: d3d8types.h:1112
float _43
Definition: d3d8types.h:1114
float _22
Definition: d3d8types.h:1112
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383

Referenced by test_setting_constants().

◆ test_setting_arrays_table()

static void test_setting_arrays_table ( IDirect3DDevice9 *  device)
static

Definition at line 1299 of file shader.c.

1300{
1301 static const float farray[8] = {
1302 0.005f, 0.745f, 0.973f, 0.264f,
1303 0.010f, 0.020f, 0.030f, 0.040f};
1304 static const D3DXMATRIX fmtxarray[2] = {
1305 {{{0.001f, 0.002f, 0.003f, 0.004f,
1306 0.005f, 0.006f, 0.007f, 0.008f,
1307 0.009f, 0.010f, 0.011f, 0.012f,
1308 0.013f, 0.014f, 0.015f, 0.016f}}},
1309 {{{0.010f, 0.020f, 0.030f, 0.040f,
1310 0.050f, 0.060f, 0.070f, 0.080f,
1311 0.090f, 0.100f, 0.110f, 0.120f,
1312 0.130f, 0.140f, 0.150f, 0.160f}}}};
1313 static const int iarray[4] = {1, 2, 3, 4};
1314 static const D3DXVECTOR4 fvecarray[2] = {
1315 {0.745f, 0.997f, 0.353f, 0.237f},
1316 {0.060f, 0.455f, 0.333f, 0.983f}};
1317 static BOOL barray[4] = {FALSE, 100, TRUE, TRUE};
1318
1319 ID3DXConstantTable *ctable;
1320
1321 HRESULT res;
1322 float out[32];
1323 ULONG refcnt;
1324
1325 /* Clear registers */
1326 memset(out, 0, sizeof(out));
1329
1330 /* Get the constant table from the shader */
1332 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got 0x%08lx\n", res);
1333
1334 /* Set constants */
1335
1336 /* Make sure that we cannot set registers that do not belong to this constant */
1337 res = ID3DXConstantTable_SetFloatArray(ctable, device, "farray", farray, 8);
1338 ok(res == D3D_OK, "ID3DXConstantTable_SetFloatArray failed: got 0x%08lx\n", res);
1339
1341 ok(out[0] == farray[0] && out[4] == farray[1] && out[8] == farray[2] && out[12] == farray[3],
1342 "The in-bounds elements of the array were not set, out={%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1343 out[0], out[4], out[8], out[12], farray[0], farray[1], farray[2], farray[3]);
1344 ok(out[16] == 0.0f && out[20] == 0.0f && out[24] == 0.0f && out[28] == 0.0f,
1345 "The excess elements of the array were set, out={%f, %f, %f, %f}, should be all 0.0f\n",
1346 out[16], out[20], out[24], out[28]);
1347
1348 /* ivecarray takes up only 1 register, but a matrix takes up 4, so no elements should be set */
1349 res = ID3DXConstantTable_SetMatrix(ctable, device, "ivecarray", &fmtxarray[0]);
1350 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed: got 0x%08lx\n", res);
1351
1353 ok(out[0] == 0.0f && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f,
1354 "The array was set, out={%f, %f, %f, %f}, should be all 0.0f\n", out[0], out[1], out[2], out[3]);
1355
1356 /* Try setting an integer array to an array declared as a float array */
1357 res = ID3DXConstantTable_SetIntArray(ctable, device, "farray", iarray, 4);
1358 ok(res == D3D_OK, "ID3DXConstantTable_SetIntArray failed: got 0x%08lx\n", res);
1359
1361 ok(out[0] == iarray[0] && out[4] == iarray[1] && out[8] == iarray[2] && out[12] == iarray[3],
1362 "SetIntArray did not properly set a float array: out={%f, %f, %f, %f}, should be {%d, %d, %d, %d}\n",
1363 out[0], out[4], out[8], out[12], iarray[0], iarray[1], iarray[2], iarray[3]);
1364
1365 res = ID3DXConstantTable_SetFloatArray(ctable, device, "farray", farray, 4);
1366 ok(res == D3D_OK, "ID3DXConstantTable_SetFloatArray failed: got x0%08lx\n", res);
1367
1368 res = ID3DXConstantTable_SetVectorArray(ctable, device, "fvecarray", fvecarray, 2);
1369 ok(res == D3D_OK, "ID3DXConstantTable_SetVectorArray failed: got 0x%08lx\n", res);
1370
1371 res = ID3DXConstantTable_SetMatrixArray(ctable, device, "fmtxarray", fmtxarray, 2);
1372 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixArray failed: got 0x%08lx\n", res);
1373
1374 res = ID3DXConstantTable_SetBoolArray(ctable, device, "barray", barray, 2);
1375 ok(res == D3D_OK, "ID3DXConstantTable_SetBoolArray failed: got 0x%08lx\n", res);
1376
1377 /* Read back constants */
1379 ok(out[0] == farray[0] && out[4] == farray[1] && out[8] == farray[2] && out[12] == farray[3],
1380 "The variable farray was not set correctly, out={%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1381 out[0], out[4], out[8], out[12], farray[0], farray[1], farray[2], farray[3]);
1382
1384 ok(out[0] == fvecarray[0].x && out[1] == fvecarray[0].y && out[2] == fvecarray[0].z && out[3] == fvecarray[0].w &&
1385 out[4] == fvecarray[1].x && out[5] == fvecarray[1].y && out[6] == fvecarray[1].z && out[7] == fvecarray[1].w,
1386 "The variable fvecarray was not set correctly, out={{%f, %f, %f, %f}, {%f, %f, %f, %f}}, should be "
1387 "{{%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],
1388 fvecarray[0].x, fvecarray[0].y, fvecarray[0].z, fvecarray[0].w, fvecarray[1].x, fvecarray[1].y,
1389 fvecarray[1].z, fvecarray[1].w);
1390
1392 ok(out[0] == 0.0f && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f
1393 && out[4] == 1.0f && out[5] == 0.0f && out[6] == 0.0f && out[7] == 0.0f,
1394 "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",
1395 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1396 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f);
1397
1399 /* Just check a few elements in each matrix to make sure fmtxarray was set row-major */
1400 ok(out[0] == fmtxarray[0]._11 && out[1] == fmtxarray[0]._12 && out[2] == fmtxarray[0]._13 && out[3] == fmtxarray[0]._14,
1401 "The variable fmtxarray was not set row-major, out={%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1402 out[0], out[1], out[2], out[3], fmtxarray[0]._11, fmtxarray[0]._12, fmtxarray[0]._13, fmtxarray[0]._14);
1403 ok(out[16] == fmtxarray[1]._11 && out[17] == fmtxarray[1]._12 && out[18] == fmtxarray[1]._13 && out[19] == fmtxarray[1]._14,
1404 "The variable fmtxarray was not set row-major, out={%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1405 out[16], out[17], out[18], out[19], fmtxarray[1]._11, fmtxarray[1]._12, fmtxarray[1]._13, fmtxarray[1]._14);
1406
1408 ok(refcnt == 0, "The constant table reference count was %lu, should be 0\n", refcnt);
1409}
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
GLdouble GLdouble z
Definition: glext.h:5874
#define _11
Definition: ke_i.h:85

Referenced by test_setting_constants().

◆ test_setting_basic_table()

static void test_setting_basic_table ( IDirect3DDevice9 *  device)
static

Definition at line 878 of file shader.c.

879{
880 static const D3DXMATRIX mvp = {{{
881 0.514f, 0.626f, 0.804f, 0.786f,
882 0.238f, 0.956f, 0.374f, 0.483f,
883 0.109f, 0.586f, 0.900f, 0.255f,
884 0.898f, 0.411f, 0.932f, 0.275f}}};
885 static const D3DXVECTOR4 f4 = {0.350f, 0.526f, 0.925f, 0.021f};
886 static const float f = 0.12543f;
887 static const int i = 321;
888 static const D3DXMATRIX *matrix_pointer[] = {&mvp};
889
890 ID3DXConstantTable *ctable;
891
892 HRESULT res;
893 float out[16];
894 ULONG refcnt;
895
896 /* Get the constant table from the shader itself */
898 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got 0x%08lx\n", res);
899
900 /* Set constants */
902 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable mvp: got 0x%08lx\n", res);
903
905 ok(res == D3D_OK, "ID3DXConstantTable_SetInt failed on variable i: got 0x%08lx\n", res);
906
907 /* Check that setting i again will overwrite the previous value */
909 ok(res == D3D_OK, "ID3DXConstantTable_SetInt failed on variable i: got 0x%08lx\n", res);
910
912 ok(res == D3D_OK, "ID3DXConstantTable_SetFloat failed on variable f: got 0x%08lx\n", res);
913
915 ok(res == D3D_OK, "ID3DXConstantTable_SetVector failed on variable f4: got 0x%08lx\n", res);
916
917 /* Get constants back and validate */
919 ok(out[0] == mvp._11 && out[4] == mvp._12 && out[8] == mvp._13 && out[12] == mvp._14,
920 "The first row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
921 out[0], out[4], out[8], out[12], mvp._11, mvp._12, mvp._13, mvp._14);
922 ok(out[1] == mvp._21 && out[5] == mvp._22 && out[9] == mvp._23 && out[13] == mvp._24,
923 "The second row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
924 out[1], out[5], out[9], out[13], mvp._21, mvp._22, mvp._23, mvp._24);
925 ok(out[2] == mvp._31 && out[6] == mvp._32 && out[10] == mvp._33 && out[14] == mvp._34,
926 "The third row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
927 out[2], out[6], out[10], out[14], mvp._31, mvp._32, mvp._33, mvp._34);
928 ok(out[3] == mvp._41 && out[7] == mvp._42 && out[11] == mvp._43 && out[15] == mvp._44,
929 "The fourth row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
930 out[3], out[7], out[11], out[15], mvp._41, mvp._42, mvp._43, mvp._44);
931
933 ok(out[0] == (float)i && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f,
934 "The variable i was not set correctly, out={%f, %f, %f, %f}, should be {%d, 0.0, 0.0, 0.0}\n",
935 out[0], out[1], out[2], out[3], i);
936
938 ok(out[0] == f && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f,
939 "The variable f was not set correctly, out={%f, %f, %f, %f}, should be {%f, 0.0, 0.0, 0.0}\n",
940 out[0], out[1], out[2], out[3], f);
941
943 ok(memcmp(out, &f4, sizeof(f4)) == 0,
944 "The variable f4 was not set correctly, out={%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
945 out[0], out[1], out[2], out[3], f4.x, f4.y, f4.z, f4.w);
946
947 /* Finally test using a set* function for one type to set a variable of another type (should succeed) */
949 ok(res == D3D_OK, "ID3DXConstantTable_SetVector failed on variable f: 0x%08lx\n", res);
950
952 ok(out[0] == f4.x && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f,
953 "The variable f was not set correctly by ID3DXConstantTable_SetVector, got %f, should be %f\n",
954 out[0], f4.x);
955
956 memset(out, 0, sizeof(out));
959 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable f: 0x%08lx\n", res);
960
962 ok(out[0] == mvp._11 && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f,
963 "The variable f was not set correctly by ID3DXConstantTable_SetMatrix, got %f, should be %f\n",
964 out[0], mvp._11);
965
966 /* Clear registers */
967 memset(out, 0, sizeof(out));
971
972 /* SetVector shouldn't change the value of a matrix constant */
974 ok(res == D3D_OK, "ID3DXConstantTable_SetVector failed on variable f: 0x%08lx\n", res);
975
977 ok(out[0] == 0.0f && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f
978 && out[4] == 0.0f && out[5] == 0.0f && out[6] == 0.0f && out[7] == 0.0f
979 && out[8] == 0.0f && out[9] == 0.0f && out[10] == 0.0f && out[11] == 0.0f
980 && out[12] == 0.0f && out[13] == 0.0f && out[14] == 0.0f && out[15] == 0.0f,
981 "The variable mvp was not set correctly by ID3DXConstantTable_SetVector, "
982 "got {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f %f; %f, %f, %f, %f}, "
983 "should be all 0.0f\n",
984 out[0], out[1], out[2], out[3],
985 out[4], out[5], out[6], out[7],
986 out[8], out[9], out[10], out[11],
987 out[12], out[13], out[14], out[15]);
988
990 ok(res == D3D_OK, "ID3DXConstantTable_SetFloat failed on variable mvp: 0x%08lx\n", res);
991
993 ok(out[0] == 0.0f && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f
994 && out[4] == 0.0f && out[5] == 0.0f && out[6] == 0.0f && out[7] == 0.0f
995 && out[8] == 0.0f && out[9] == 0.0f && out[10] == 0.0f && out[11] == 0.0f
996 && out[12] == 0.0f && out[13] == 0.0f && out[14] == 0.0f && out[15] == 0.0f,
997 "The variable mvp was not set correctly by ID3DXConstantTable_SetFloat, "
998 "got {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f %f; %f, %f, %f, %f}, "
999 "should be all 0.0f\n",
1000 out[0], out[1], out[2], out[3],
1001 out[4], out[5], out[6], out[7],
1002 out[8], out[9], out[10], out[11],
1003 out[12], out[13], out[14], out[15]);
1004
1006 ok(res == D3D_OK, "ID3DXConstantTable_SetFloat failed on variable f4: 0x%08lx\n", res);
1007
1009 ok(out[0] == 0.0f && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f,
1010 "The variable f4 was not set correctly by ID3DXConstantTable_SetFloat, "
1011 "got {%f, %f, %f, %f}, should be all 0.0f\n",
1012 out[0], out[1], out[2], out[3]);
1013
1015 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTranspose failed on variable f: 0x%08lx\n", res);
1016
1018 ok(out[0] == mvp._11 && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f,
1019 "The variable f was not set correctly by ID3DXConstantTable_SetMatrixTranspose, got %f, should be %f\n",
1020 out[0], mvp._11);
1021
1023 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTranspose failed on variable f4: 0x%08lx\n", res);
1024
1026 ok(out[0] == mvp._11 && out[1] == mvp._21 && out[2] == mvp._31 && out[3] == mvp._41,
1027 "The variable f4 was not set correctly by ID3DXConstantTable_SetMatrixTranspose, "
1028 "got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1029 out[0], out[1], out[2], out[3],
1030 mvp._11, mvp._21, mvp._31, mvp._41);
1031
1032 memset(out, 0, sizeof(out));
1034 res = ID3DXConstantTable_SetMatrixPointerArray(ctable, device, "f", matrix_pointer, 1);
1035 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixPointerArray failed on variable f: got %#lx\n", res);
1036
1038 ok(out[0] == mvp._11 && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f,
1039 "The variable f was not set correctly by ID3DXConstantTable_SetMatrixPointerArray, "
1040 "got %f, should be %f\n",
1041 out[0], mvp._11);
1042
1043 res = ID3DXConstantTable_SetMatrixPointerArray(ctable, device, "f4", matrix_pointer, 1);
1044 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixPointerArray failed on variable f4: got %#lx\n", res);
1045
1047 ok(out[0] == mvp._11 && out[1] == mvp._12 && out[2] == mvp._13 && out[3] == mvp._14,
1048 "The variable f4 was not set correctly by ID3DXConstantTable_SetMatrixPointerArray, "
1049 "got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1050 out[0], out[1], out[2], out[3],
1051 mvp._11, mvp._12, mvp._13, mvp._14);
1052
1053 memset(out, 0, sizeof(out));
1056 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTransposePointerArray failed on variable f: got %#lx\n", res);
1057
1059 ok(out[0] == mvp._11 && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f,
1060 "The variable f was not set correctly by ID3DXConstantTable_SetMatrixTransposePointerArray, "
1061 "got %f, should be %f\n",
1062 out[0], mvp._11);
1063
1065 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTransposePointerArray failed on variable f4: got %#lx\n", res);
1066
1068 ok(out[0] == mvp._11 && out[1] == mvp._21 && out[2] == mvp._31 && out[3] == mvp._41,
1069 "The variable f4 was not set correctly by ID3DXConstantTable_SetMatrixTransposePointerArray, "
1070 "got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1071 out[0], out[1], out[2], out[3],
1072 mvp._11, mvp._21, mvp._31, mvp._41);
1073
1075 ok(refcnt == 0, "The constant table reference count was %lu, should be 0\n", refcnt);
1076}
GLfloat f
Definition: glext.h:7540

Referenced by test_setting_constants().

◆ test_setting_constants()

static void test_setting_constants ( void  )
static

Definition at line 1662 of file shader.c.

1663{
1664 HWND wnd;
1665 IDirect3D9 *d3d;
1668 HRESULT hr;
1669 ULONG refcnt;
1670
1671 if (!(wnd = CreateWindowA("static", "d3dx9_test", WS_OVERLAPPEDWINDOW, 0, 0,
1672 640, 480, NULL, NULL, NULL, NULL)))
1673 {
1674 skip("Couldn't create application window\n");
1675 return;
1676 }
1677 if (!(d3d = Direct3DCreate9(D3D_SDK_VERSION)))
1678 {
1679 skip("Couldn't create IDirect3D9 object\n");
1680 DestroyWindow(wnd);
1681 return;
1682 }
1683
1684 ZeroMemory(&d3dpp, sizeof(d3dpp));
1685 d3dpp.Windowed = TRUE;
1688 if (FAILED(hr))
1689 {
1690 skip("Failed to create IDirect3DDevice9 object %#lx\n", hr);
1691 IDirect3D9_Release(d3d);
1692 DestroyWindow(wnd);
1693 return;
1694 }
1695
1701
1702 /* Release resources */
1704 ok(refcnt == 0, "The Direct3D device reference count was %lu, should be 0\n", refcnt);
1705
1706 refcnt = IDirect3D9_Release(d3d);
1707 ok(refcnt == 0, "The Direct3D object reference count was %lu, should be 0\n", refcnt);
1708
1709 if (wnd) DestroyWindow(wnd);
1710}
static void test_SetValue(IDirect3DDevice9 *device)
Definition: shader.c:1488
static void test_setting_matrices_table(IDirect3DDevice9 *device)
Definition: shader.c:1078
static void test_setting_basic_table(IDirect3DDevice9 *device)
Definition: shader.c:878
static void test_setting_arrays_table(IDirect3DDevice9 *device)
Definition: shader.c:1299
static void test_SetDefaults(IDirect3DDevice9 *device)
Definition: shader.c:1411
#define D3DCREATE_SOFTWARE_VERTEXPROCESSING
Definition: d3d8.h:40

Referenced by START_TEST().

◆ test_setting_matrices_table()

static void test_setting_matrices_table ( IDirect3DDevice9 *  device)
static

Definition at line 1078 of file shader.c.

1079{
1080 static const D3DXMATRIX fmatrix =
1081 {{{2.001f, 1.502f, 9.003f, 1.004f,
1082 5.005f, 3.006f, 3.007f, 6.008f,
1083 9.009f, 5.010f, 7.011f, 1.012f,
1084 5.013f, 5.014f, 5.015f, 9.016f}}};
1085 static const D3DXMATRIX *matrix_pointer[] = {&fmatrix};
1086
1087 ID3DXConstantTable *ctable;
1088
1089 HRESULT res;
1090 float out[32];
1091
1093 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %#lx\n", res);
1094
1095 res = ID3DXConstantTable_SetMatrix(ctable, device, "imatrix2x3", &fmatrix);
1096 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable imatrix2x3: got %#lx\n", res);
1097
1098 res = ID3DXConstantTable_SetMatrix(ctable, device, "fmatrix3x1", &fmatrix);
1099 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable fmatrix3x1: got %#lx\n", res);
1100
1102 ok(out[0] == (int)fmatrix._11 && out[1] == (int)fmatrix._12 && out[2] == (int)fmatrix._13
1103 && out[3] == 0
1104 && out[4] == (int)fmatrix._21 && out[5] == (int)fmatrix._22 && out[6] == (int)fmatrix._23
1105 && out[7] == 0,
1106 "The variable imatrix2x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f}, "
1107 "should be {%d, %d, %d, %d; %d, %d, %d, %d}\n",
1108 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1109 (int)fmatrix._11, (int)fmatrix._12, (int)fmatrix._13, 0,
1110 (int)fmatrix._21, (int)fmatrix._22, (int)fmatrix._23, 0);
1111
1113 ok(out[0] == fmatrix._11 && out[1] == fmatrix._21 && out[2] == fmatrix._31 && out[3] == 0.0f,
1114 "The variable fmatrix3x1 was not set correctly, out={%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1115 out[0], out[1], out[2], out[3],
1116 fmatrix._11, fmatrix._21, fmatrix._31, 0.0f);
1117
1119
1121 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %#lx\n", res);
1122
1123 /* SetMatrix */
1124 res = ID3DXConstantTable_SetMatrix(ctable, device, "c2x3", &fmatrix);
1125 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable c2x3: got %#lx\n", res);
1126
1127 res = ID3DXConstantTable_SetMatrix(ctable, device, "r2x3", &fmatrix);
1128 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable r2x3: got %#lx\n", res);
1129
1130 res = ID3DXConstantTable_SetMatrix(ctable, device, "c3x2", &fmatrix);
1131 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable c3x2: got %#lx\n", res);
1132
1133 res = ID3DXConstantTable_SetMatrix(ctable, device, "r3x2", &fmatrix);
1134 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable r3x2: got %#lx\n", res);
1135
1136 res = ID3DXConstantTable_SetMatrix(ctable, device, "c3x3", &fmatrix);
1137 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable c3x3: got %#lx\n", res);
1138
1140 ok(out[0] == fmatrix._11 && out[1] == fmatrix._21 && out[2] == 0.0f && out[3] == 0.0f
1141 && out[4] == fmatrix._12 && out[5] == fmatrix._22 && out[6] == 0.0f && out[7] == 0.0f
1142 && out[8] == fmatrix._13 && out[9] == fmatrix._23 && out[10] == 0.0f && out[11] == 0.0f,
1143 "The variable c2x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}, "
1144 "should be {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}\n",
1145 out[0], out[1], out[2], out[3],
1146 out[4], out[5], out[6], out[7],
1147 out[8], out[9], out[10], out[11],
1148 fmatrix._11, fmatrix._21, 0.0f, 0.0f,
1149 fmatrix._12, fmatrix._22, 0.0f, 0.0f,
1150 fmatrix._13, fmatrix._23, 0.0f, 0.0f);
1151
1152 res = ID3DXConstantTable_SetMatrix(ctable, device, "r4x4", &fmatrix);
1153 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrix failed on variable r4x4: got %#lx\n", res);
1154
1156 ok(out[0] == fmatrix._11 && out[1] == fmatrix._12 && out[2] == fmatrix._13 && out[3] == 0.0f
1157 && out[4] == fmatrix._21 && out[5] == fmatrix._22 && out[6] == fmatrix._23 && out[7] == 0.0f,
1158 "The variable r2x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f}, "
1159 "should be {%f, %f, %f, %f; %f, %f, %f, %f}\n",
1160 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1161 fmatrix._11, fmatrix._12, fmatrix._13, 0.0f,
1162 fmatrix._21, fmatrix._22, fmatrix._23, 0.0f);
1163
1165 ok(out[0] == fmatrix._11 && out[1] == fmatrix._21 && out[2] == fmatrix._31 && out[3] == 0.0f
1166 && out[4] == fmatrix._12 && out[5] == fmatrix._22 && out[6] == fmatrix._32 && out[7] == 0.0f,
1167 "The variable c3x2 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f}, "
1168 "should be {%f, %f, %f, %f; %f, %f, %f, %f}\n",
1169 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1170 fmatrix._11, fmatrix._21, fmatrix._31, 0.0f,
1171 fmatrix._12, fmatrix._22, fmatrix._32, 0.0f);
1172
1174 ok(out[0] == fmatrix._11 && out[1] == fmatrix._12 && out[2] == 0.0f && out[3] == 0.0f
1175 && out[4] == fmatrix._21 && out[5] == fmatrix._22 && out[6] == 0.0f && out[7] == 0.0f
1176 && out[8] == fmatrix._31 && out[9] == fmatrix._32 && out[10] == 0.0f && out[11] == 0.0f,
1177 "The variable r3x2 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}, "
1178 "should be {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}\n",
1179 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7], out[8], out[9], out[10], out[11],
1180 fmatrix._11, fmatrix._12, 0.0f, 0.0f,
1181 fmatrix._21, fmatrix._22, 0.0f, 0.0f,
1182 fmatrix._31, fmatrix._32, 0.0f, 0.0f);
1183
1185 ok(out[0] == fmatrix._11 && out[1] == fmatrix._21 && out[2] == fmatrix._31 && out[3] == 0.0f
1186 && out[4] == fmatrix._12 && out[5] == fmatrix._22 && out[6] == fmatrix._32 && out[7] == 0.0f
1187 && out[8] == fmatrix._13 && out[9] == fmatrix._23 && out[10] == fmatrix._33 && out[11] == 0.0f,
1188 "The variable c3x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}, "
1189 "should be {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}\n",
1190 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7], out[8], out[9], out[10], out[11],
1191 fmatrix._11, fmatrix._21, fmatrix._31, 0.0f,
1192 fmatrix._12, fmatrix._22, fmatrix._32, 0.0f,
1193 fmatrix._13, fmatrix._23, fmatrix._33, 0.0f);
1194
1196 ok(out[0] == fmatrix._11 && out[1] == fmatrix._12 && out[2] == fmatrix._13 && out[3] == fmatrix._14
1197 && out[4] == fmatrix._21 && out[5] == fmatrix._22 && out[6] == fmatrix._23 && out[7] == fmatrix._24
1198 && out[8] == fmatrix._31 && out[9] == fmatrix._32 && out[10] == fmatrix._33 && out[11] == fmatrix._34
1199 && out[12] == fmatrix._41 && out[13] == fmatrix._42 && out[14] == fmatrix._43 && out[15] == fmatrix._44,
1200 "The variable r4x4 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}, "
1201 "should be {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}\n",
1202 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1203 out[8], out[9], out[10], out[11], out[12], out[13], out[14], out[15],
1204 fmatrix._11, fmatrix._12, fmatrix._13, fmatrix._14,
1205 fmatrix._21, fmatrix._22, fmatrix._23, fmatrix._24,
1206 fmatrix._31, fmatrix._32, fmatrix._33, fmatrix._34,
1207 fmatrix._41, fmatrix._42, fmatrix._43, fmatrix._44);
1208
1209 /* SetMatrixTranspose */
1211 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTranspose failed on variable c2x3: got %#lx\n", res);
1212
1214 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTranspose failed on variable r2x3: got %#lx\n", res);
1215
1217 ok(out[0] == fmatrix._11 && out[1] == fmatrix._12 && out[2] == 0.0f && out[3] == 0.0f
1218 && out[4] == fmatrix._21 && out[5] == fmatrix._22 && out[6] == 0.0f && out[7] == 0.0f
1219 && out[8] == fmatrix._31 && out[9] == fmatrix._32 && out[10] == 0.0f && out[11] == 0.0f,
1220 "The variable c2x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}, "
1221 "should be {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}\n",
1222 out[0], out[1], out[2], out[3],
1223 out[4], out[5], out[6], out[7],
1224 out[8], out[9], out[10], out[11],
1225 fmatrix._11, fmatrix._12, 0.0f, 0.0f,
1226 fmatrix._21, fmatrix._22, 0.0f, 0.0f,
1227 fmatrix._31, fmatrix._32, 0.0f, 0.0f);
1228
1230 ok(out[0] == fmatrix._11 && out[1] == fmatrix._21 && out[2] == fmatrix._31 && out[3] == 0.0f
1231 && out[4] == fmatrix._12 && out[5] == fmatrix._22 && out[6] == fmatrix._32 && out[7] == 0.0f,
1232 "The variable r2x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f}, "
1233 "should be {%f, %f, %f, %f; %f, %f, %f, %f}\n",
1234 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1235 fmatrix._11, fmatrix._21, fmatrix._31, 0.0f,
1236 fmatrix._12, fmatrix._22, fmatrix._32, 0.0f);
1237
1238 /* SetMatrixPointerArray */
1239 res = ID3DXConstantTable_SetMatrixPointerArray(ctable, device, "c2x3", matrix_pointer, 1);
1240 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixPointerArray failed on variable c2x3: got %#lx\n", res);
1241
1242 res = ID3DXConstantTable_SetMatrixPointerArray(ctable, device, "r2x3", matrix_pointer, 1);
1243 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixPointerArray failed on variable r2x3: got %#lx\n", res);
1244
1246 ok(out[0] == fmatrix._11 && out[1] == fmatrix._21 && out[2] == 0.0f && out[3] == 0.0f
1247 && out[4] == fmatrix._12 && out[5] == fmatrix._22 && out[6] == 0.0f && out[7] == 0.0f
1248 && out[8] == fmatrix._13 && out[9] == fmatrix._23 && out[10] == 0.0f && out[11] == 0.0f,
1249 "The variable c2x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}, "
1250 "should be {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}\n",
1251 out[0], out[1], out[2], out[3],
1252 out[4], out[5], out[6], out[7],
1253 out[8], out[9], out[10], out[11],
1254 fmatrix._11, fmatrix._21, 0.0f, 0.0f,
1255 fmatrix._12, fmatrix._22, 0.0f, 0.0f,
1256 fmatrix._13, fmatrix._23, 0.0f, 0.0f);
1257
1259 ok(out[0] == fmatrix._11 && out[1] == fmatrix._12 && out[2] == fmatrix._13 && out[3] == 0.0f
1260 && out[4] == fmatrix._21 && out[5] == fmatrix._22 && out[6] == fmatrix._23 && out[7] == 0.0f,
1261 "The variable r2x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f}, "
1262 "should be {%f, %f, %f, %f; %f, %f, %f, %f}\n",
1263 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1264 fmatrix._11, fmatrix._12, fmatrix._13, 0.0f,
1265 fmatrix._21, fmatrix._22, fmatrix._23, 0.0f);
1266
1267 /* SetMatrixTransposePointerArray */
1269 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTransposePointerArray failed on variable c2x3: got %#lx\n", res);
1270
1272 ok(res == D3D_OK, "ID3DXConstantTable_SetMatrixTransposePointerArray failed on variable r2x3: got %#lx\n", res);
1273
1275 ok(out[0] == fmatrix._11 && out[1] == fmatrix._12 && out[2] == 0.0f && out[3] == 0.0f
1276 && out[4] == fmatrix._21 && out[5] == fmatrix._22 && out[6] == 0.0f && out[7] == 0.0f
1277 && out[8] == fmatrix._31 && out[9] == fmatrix._32 && out[10] == 0.0f && out[11] == 0.0f,
1278 "The variable c2x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}, "
1279 "should be {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}\n",
1280 out[0], out[1], out[2], out[3],
1281 out[4], out[5], out[6], out[7],
1282 out[8], out[9], out[10], out[11],
1283 fmatrix._11, fmatrix._12, 0.0f, 0.0f,
1284 fmatrix._21, fmatrix._22, 0.0f, 0.0f,
1285 fmatrix._31, fmatrix._32, 0.0f, 0.0f);
1286
1288 ok(out[0] == fmatrix._11 && out[1] == fmatrix._21 && out[2] == fmatrix._31 && out[3] == 0.0f
1289 && out[4] == fmatrix._12 && out[5] == fmatrix._22 && out[6] == fmatrix._32 && out[7] == 0.0f,
1290 "The variable r2x3 was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f}, "
1291 "should be {%f, %f, %f, %f; %f, %f, %f, %f}\n",
1292 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1293 fmatrix._11, fmatrix._21, fmatrix._31, 0.0f,
1294 fmatrix._12, fmatrix._22, fmatrix._32, 0.0f);
1295
1297}

Referenced by test_setting_constants().

◆ test_SetValue()

static void test_SetValue ( IDirect3DDevice9 *  device)
static

Definition at line 1488 of file shader.c.

1489{
1490 static const D3DXMATRIX mvp = {{{
1491 0.51f, 0.62f, 0.80f, 0.78f,
1492 0.23f, 0.95f, 0.37f, 0.48f,
1493 0.10f, 0.58f, 0.90f, 0.25f,
1494 0.89f, 0.41f, 0.93f, 0.27f}}};
1495 static const D3DXVECTOR4 f4 = {0.2f, 0.4f, 0.8f, 1.2f};
1496 static const FLOAT arr[] = {0.33f, 0.55f, 0.96f, 1.00f,
1497 1.00f, 1.00f, 1.00f, 1.00f,
1498 1.00f, 1.00f, 1.00f, 1.00f};
1499 static int imatrix[] = {1, 2, 3, 4, 5, 6};
1500 static float fmatrix[] = {1.1f, 2.2f, 3.3f, 4.4f};
1501 static BOOL barray[] = {TRUE, FALSE};
1502 static float fvecarray[] = {9.1f, 9.2f, 9.3f, 9.4f, 9.5f, 9.6f, 9.7f, 9.8f};
1503 static float farray[] = {2.2f, 3.3f};
1504
1505 static const float def[16] = {5.5f, 5.5f, 5.5f, 5.5f,
1506 5.5f, 5.5f, 5.5f, 5.5f,
1507 5.5f, 5.5f, 5.5f, 5.5f,
1508 5.5f, 5.5f, 5.5f, 5.5f};
1509 float out[16];
1510
1511 HRESULT res;
1512 ID3DXConstantTable *ctable;
1513
1515 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %08lx\n", res);
1516
1518
1519 /* SetValue called with 0 bytes size doesn't change value */
1521 ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08lx\n", res);
1522
1524 ok(memcmp(out, def, sizeof(f4)) == 0,
1525 "The variable f4 was not set correctly, out={%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1526 out[0], out[1], out[2], out[3], def[0], def[1], def[2], def[3]);
1527
1528 res = ID3DXConstantTable_SetValue(ctable, device, "f4", &f4, sizeof(f4));
1529 ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08lx\n", res);
1530
1532 ok(memcmp(out, &f4, sizeof(f4)) == 0,
1533 "The variable f4 was not set correctly, out={%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1534 out[0], out[1], out[2], out[3], f4.x, f4.y, f4.z, f4.w);
1535
1537
1538 /* SetValue called with size smaller than constant size doesn't change value */
1539 res = ID3DXConstantTable_SetValue(ctable, device, "mvp", &mvp, sizeof(mvp) / 2);
1540 ok(res == D3D_OK, "ID3DXConstantTable_SetValue returned %08lx\n", res);
1541
1543 ok(memcmp(out, def, sizeof(def)) == 0,
1544 "The variable mvp was not set correctly, out={%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}, "
1545 "should be {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}\n",
1546 out[0], out[4], out[ 8], out[12],
1547 out[1], out[5], out[ 9], out[13],
1548 out[2], out[6], out[10], out[14],
1549 out[3], out[7], out[11], out[15],
1550 def[0], def[4], def[ 8], def[12],
1551 def[1], def[5], def[ 9], def[13],
1552 def[2], def[6], def[10], def[14],
1553 def[3], def[7], def[11], def[15]);
1554
1555 res = ID3DXConstantTable_SetValue(ctable, device, "mvp", &mvp, sizeof(mvp));
1556 ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08lx\n", res);
1557
1559 ok(out[0] == mvp._11 && out[4] == mvp._12 && out[8] == mvp._13 && out[12] == mvp._14,
1560 "The first row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1561 out[0], out[4], out[8], out[12], mvp._11, mvp._12, mvp._13, mvp._14);
1562 ok(out[1] == mvp._21 && out[5] == mvp._22 && out[9] == mvp._23 && out[13] == mvp._24,
1563 "The second row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1564 out[1], out[5], out[9], out[13], mvp._21, mvp._22, mvp._23, mvp._24);
1565 ok(out[2] == mvp._31 && out[6] == mvp._32 && out[10] == mvp._33 && out[14] == mvp._34,
1566 "The third row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1567 out[2], out[6], out[10], out[14], mvp._31, mvp._32, mvp._33, mvp._34);
1568 ok(out[3] == mvp._41 && out[7] == mvp._42 && out[11] == mvp._43 && out[15] == mvp._44,
1569 "The fourth row of mvp was not set correctly, got {%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1570 out[3], out[7], out[11], out[15], mvp._41, mvp._42, mvp._43, mvp._44);
1571
1573
1575 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %08lx\n", res);
1576
1577 res = ID3DXConstantTable_SetValue(ctable, device, "arr", arr, sizeof(arr));
1578 ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08lx\n", res);
1579
1581 ok(out[0] == arr[0] && out[4] == arr[1] && out[8] == arr[2]
1582 && out[1] == 0 && out[2] == 0 && out[3] == 0 && out[5] == 0 && out[6] == 0 && out[7] == 0
1583 && out[9] == 0 && out[10] == 0 && out[11] == 0,
1584 "The variable arr was not set correctly, out={%f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f}, "
1585 "should be {0.33, 0, 0, 0, 0.55, 0, 0, 0, 0.96, 0, 0, 0}\n",
1586 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7], out[8], out[9], out[10], out[11]);
1587
1589
1591 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %08lx\n", res);
1592
1593 res = ID3DXConstantTable_SetValue(ctable, device, "fmatrix3x1", fmatrix, sizeof(fmatrix));
1594 ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08lx\n", res);
1595
1596 res = ID3DXConstantTable_SetValue(ctable, device, "imatrix2x3", imatrix, sizeof(imatrix));
1597 ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08lx\n", res);
1598
1600 ok(out[0] == imatrix[0] && out[1] == imatrix[1] && out[2] == imatrix[2] && out[3] == 0.0f
1601 && out[4] == imatrix[3] && out[5] == imatrix[4] && out[6] == imatrix[5] && out[7] == 0.0f,
1602 "The variable imatrix2x3 was not set correctly, out={%f, %f, %f, %f, %f, %f, %f, %f}, "
1603 "should be {%d, %d, %d, 0, %d, %d, %d, 0}\n",
1604 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1605 imatrix[0], imatrix[1], imatrix[2], imatrix[3], imatrix[4], imatrix[5]);
1606
1608 ok(out[0] == fmatrix[0] && out[1] == fmatrix[1] && out[2] == fmatrix[2] && out[3] == 0.0f,
1609 "The variable fmatrix3x1 was not set correctly, out={%f, %f, %f, %f}, should be {%f, %f, %f, %f}\n",
1610 out[0], out[1] ,out[2], out[4],
1611 fmatrix[0], fmatrix[1], fmatrix[2], 0.0f);
1612
1614
1616 ok(res == D3D_OK, "D3DXGetShaderConstantTable failed: got %08lx\n", res);
1617
1618 res = ID3DXConstantTable_SetValue(ctable, device, "barray", barray, sizeof(barray));
1619 ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08lx\n", res);
1620
1621 res = ID3DXConstantTable_SetValue(ctable, device, "fvecarray", fvecarray, sizeof(fvecarray));
1622 ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08lx\n", res);
1623
1625 res = ID3DXConstantTable_SetValue(ctable, device, "farray", farray, sizeof(farray));
1626 ok(res == D3D_OK, "ID3DXConstantTable_SetValue failed: got %08lx\n", res);
1627
1628 /* 2 elements of farray were set */
1630 ok(out[0] == farray[0] && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f
1631 && out[4] == farray[1] && out[5] == 0.0f && out[6] == 0.0f && out[7] == 0.0f
1632 && out[8] == def[8] && out[9] == def[9] && out[10] == def[10] && out[11] == def[11]
1633 && out[12] == def[12] && out[13] == def[13] && out[14] == def[14] && out[15] == def[15],
1634 "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}, "
1635 "should be {%f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f; %f, %f, %f, %f}\n",
1636 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1637 out[8], out[9], out[10], out[11], out[12], out[13], out[14], out[15],
1638 farray[0], 0.0f, 0.0f, 0.0f,
1639 farray[1], 0.0f, 0.0f, 0.0f,
1640 def[8], def[9], def[10], def[11],
1641 def[12], def[13], def[14], def[15]);
1642
1644 ok(out[0] == fvecarray[0] && out[1] == fvecarray[1] && out[2] == fvecarray[2] && out[3] == fvecarray[3]
1645 && out[4] == fvecarray[4] && out[5] == fvecarray[5] && out[6] == fvecarray[6] && out[7] == fvecarray[7],
1646 "The variable fvecarray was not set correctly, out ={%f, %f, %f, %f, %f, %f, %f, %f}, "
1647 "should be {%f, %f, %f, %f, %f, %f, %f, %f}\n",
1648 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1649 fvecarray[0], fvecarray[1], fvecarray[2], fvecarray[3], fvecarray[4], fvecarray[5], fvecarray[6], fvecarray[7]);
1650
1652 ok(out[0] == 1.0f && out[1] == 0.0f && out[2] == 0.0f && out[3] == 0.0f
1653 && out[4] == 0.0f && out[5] == 0.0f && out[6] == 0.0f && out[7] == 0.0f,
1654 "The variable barray was not set correctly, out={%f, %f, %f, %f, %f, %f, %f, %f}, "
1655 "should be {%f, %f, %f, %f, %f, %f, %f, %f}\n",
1656 out[0], out[1], out[2], out[3], out[4], out[5], out[6], out[7],
1657 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
1658
1660}

Referenced by test_setting_constants().

◆ test_shader_semantics()

static void test_shader_semantics ( void  )
static

Definition at line 6628 of file shader.c.

6629{
6630 static const DWORD invalid_1[] =
6631 {
6632 0x00000200
6633 },
6634 invalid_2[] =
6635 {
6636 0xfffe0400
6637 },
6638 invalid_3[] =
6639 {
6640 0xfffe0000
6641 },
6642 vs_1_1[] =
6643 {
6644 0xfffe0101, /* vs_1_1 */
6645 0x0000001f, 0x80000000, 0x900f0000, /* dcl_position v0 */
6646 0x0000001f, 0x80000003, 0x900f0001, /* dcl_normal v1 */
6647 0x0000001f, 0x8001000a, 0x900f0002, /* dcl_color1 v2 */
6648 0x0000001f, 0x80000005, 0x900f0003, /* dcl_texcoord0 v3 */
6649 0x00000001, 0xc00f0000, 0x90e40000, /* mov oPos, v0 */
6650 0x00000001, 0xd00f0001, 0x90e40002, /* mov oD1, v2 */
6651 0x00000001, 0xe0070000, 0x90e40001, /* mov oT0.xyz, v1 */
6652 0x00000001, 0xc00f0001, 0x90ff0002, /* mov oFog, v2.w */
6653 0x00000001, 0xc00f0002, 0x90ff0001, /* mov oPts, v1.w */
6654 0x0000ffff
6655 },
6656 vs_2_0[] =
6657 {
6658 0xfffe0200, /* vs_2_0 */
6659 0x0200001f, 0x80000000, 0x900f0000, /* dcl_position v0 */
6660 0x0200001f, 0x80000003, 0x900f0001, /* dcl_normal v1 */
6661 0x0200001f, 0x8001000a, 0x900f0002, /* dcl_color1 v2 */
6662 0x0200001f, 0x80000005, 0x900f0003, /* dcl_texcoord0 v3 */
6663 0x02000001, 0xc00f0000, 0x90e40000, /* mov oPos, v0 */
6664 0x02000001, 0xd00f0001, 0x90e40002, /* mov oD1, v2 */
6665 0x02000001, 0xe0070000, 0x90e40003, /* mov oT0.xyz, v3 */
6666 0x02000001, 0xc00f0001, 0x90ff0002, /* mov oFog, v2.w */
6667 0x02000001, 0xc00f0002, 0x90ff0001, /* mov oPts, v1.w */
6668 0x0000ffff
6669 },
6670 vs_3_0[] =
6671 {
6672 0xfffe0300, /* vs_3_0 */
6673 0x0002fffe, 0x0200000f, 0x00000000, /* comment */
6674 0x0200001f, 0x80000000, 0x900f0000, /* dcl_position v0 */
6675 0x0200001f, 0x80000003, 0x900f0001, /* dcl_normal v1 */
6676 0x0200001f, 0x8001000a, 0x900f0002, /* dcl_color1 v2 */
6677 0x0200001f, 0x80000005, 0x900f0003, /* dcl_texcoord0 v3 */
6678 0x0200001f, 0x80000000, 0xe00f0000, /* dcl_position o0 */
6679 0x0200001f, 0x8001000a, 0xe00f0001, /* dcl_color1 o1 */
6680 0x0200001f, 0x80000005, 0xe00f0002, /* dcl_texcoord0 o2 */
6681 0x0200001f, 0x8000000b, 0xe00f0003, /* dcl_fog o3 */
6682 0x0200001f, 0x80000004, 0xe00f0004, /* dcl_psize o4 */
6683 0x02000001, 0xe00f0000, 0x90e40000, /* mov o0, v0 */
6684 0x02000001, 0xe00f0001, 0x90e40002, /* mov o1, v2 */
6685 0x02000001, 0xe0070002, 0x90e40003, /* mov o2.xyz, v3 */
6686 0x02000001, 0xe00f0003, 0x90ff0002, /* mov o3, v2.w */
6687 0x02000001, 0xe00f0004, 0x90ff0001, /* mov o4, v1.w */
6688 0x0000ffff
6689 },
6690 ps_1_1[] =
6691 {
6692 0xffff0101, /* ps_1_1 */
6693 0x00000042, 0xb00f0000, /* tex t0 */
6694 0x00000002, 0x800f0000, 0x90e40000, 0xb0e40000, /* add r0, v0, t0 */
6695 0x0000ffff
6696 },
6697 ps_2_0[] =
6698 {
6699 0xffff0200, /* ps_2_0 */
6700 0x0200001f, 0x80000000, 0x900f0000, /* dcl v0 */
6701 0x0200001f, 0x80000000, 0xb00f0000, /* dcl t0 */
6702 0x02000001, 0x800f0800, 0x90e40000, /* mov oC0, v0 */
6703 0x0000ffff
6704 },
6705 ps_3_0[] =
6706 {
6707 0xffff0300, /* ps_3_0 */
6708 0x0200001f, 0x8001000a, 0x900f0000, /* dcl_color1 v0 */
6709 0x0200001f, 0x80000003, 0x900f0001, /* dcl_normal v1 */
6710 0x0200001f, 0x80000005, 0x900f0002, /* dcl_texcoord0 v2 */
6711 0x0200001f, 0x8000000b, 0x900f0003, /* dcl_fog v3 */
6712 0x0200001f, 0x80000000, 0x90031000, /* dcl vPos.xy */
6713 0x0200001f, 0x80000000, 0x900f1001, /* dcl vFace */
6714 0x05000051, 0xa00f0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* def c0, 0.0, 0.0, 0.0, 0.0 */
6715 0x02000001, 0x800f0000, 0x90e40000, /* mov r0, v0 */
6716 0x03000002, 0x800f0800, 0x80e40000, 0x90e40003, /* add oC0, r0, v3 */
6717 0x02000001, 0x800f0001, 0x90e40001, /* mov r1, v1 */
6718 0x03000005, 0x800f0801, 0x80e40001, 0x90e40002, /* mul oC1, r1, v2 */
6719 0x02000001, 0x800f0802, 0x90441000, /* mov oC2, vPos.xyxy */
6720 0x04000058, 0x800f0803, 0x90e41001, 0x90e40000, 0xa0e40000, /* cmp oC3, vFace, v0, c0 */
6721 0x02000001, 0x900f0800, 0x90ff0001, /* mov oDepth, v1.w */
6722 0x0000ffff
6723 };
6724 static const struct
6725 {
6726 const DWORD *shader;
6727 D3DXSEMANTIC expected_input[MAXD3DDECLLENGTH];
6729 }
6730 tests[] =
6731 {
6732 {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}}},
6733 {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}}},
6734 {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}}},
6735 {ps_1_1, {{5, 0}, {10, 0}, {~0, ~0}}, {{10, 0}, {~0, ~0}}},
6736 {ps_2_0, {{10, 0}, {5, 0}, {~0, ~0}}, {{10, 0}, {~0, ~0}}},
6737 {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}}},
6738 };
6739 D3DXSEMANTIC semantics[MAXD3DDECLLENGTH];
6740 unsigned int count, count2;
6741 unsigned int i, j;
6742 HRESULT hr;
6743
6744 hr = D3DXGetShaderInputSemantics(invalid_1, NULL, NULL);
6745 ok(hr == D3DXERR_INVALIDDATA, "Unexpected hr %#lx.\n", hr);
6746 hr = D3DXGetShaderInputSemantics(invalid_2, NULL, NULL);
6747 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6748 hr = D3DXGetShaderInputSemantics(invalid_3, NULL, NULL);
6749 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6750
6752 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6753 hr = D3DXGetShaderInputSemantics(vs_1_1, semantics, NULL);
6754 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6755
6756 for (i = 0; i < ARRAY_SIZE(tests); ++i)
6757 {
6758 const DWORD *shader = tests[i].shader;
6759
6761 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6762 hr = D3DXGetShaderInputSemantics(shader, semantics, &count2);
6763 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6764 ok(count == count2, "Semantics count %u differs from previous count %u.\n", count2, count);
6765 for (j = 0; j < count; ++j)
6766 {
6767 ok(semantics[j].Usage == tests[i].expected_input[j].Usage
6768 && semantics[j].UsageIndex == tests[i].expected_input[j].UsageIndex,
6769 "Unexpected semantic %u, %u, test %u, idx %u.\n",
6770 semantics[j].Usage, semantics[j].UsageIndex, i, j);
6771 }
6772 ok(tests[i].expected_input[j].Usage == ~0 && tests[i].expected_input[j].UsageIndex == ~0,
6773 "Unexpected semantics count %u.\n", count);
6775 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6776 hr = D3DXGetShaderOutputSemantics(shader, semantics, &count2);
6777 ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr);
6778 ok(count == count2, "Semantics count %u differs from previous count %u.\n", count2, count);
6779 for (j = 0; j < count; ++j)
6780 {
6781 ok(semantics[j].Usage == tests[i].expected_output[j].Usage
6782 && semantics[j].UsageIndex == tests[i].expected_output[j].UsageIndex,
6783 "Unexpected semantic %u, %u, test %u, idx %u.\n",
6784 semantics[j].Usage, semantics[j].UsageIndex, i, j);
6785 }
6786 ok(tests[i].expected_output[j].Usage == ~0 && tests[i].expected_output[j].UsageIndex == ~0,
6787 "Unexpected semantics count %u.\n", count);
6788 }
6789}
#define MAXD3DDECLLENGTH
Definition: d3d9types.h:195
static const DWORD vs_2_0[]
Definition: asm.c:1726
HRESULT WINAPI D3DXGetShaderOutputSemantics(const DWORD *byte_code, D3DXSEMANTIC *semantics, UINT *count)
Definition: shader.c:2999
HRESULT WINAPI D3DXGetShaderInputSemantics(const DWORD *byte_code, D3DXSEMANTIC *semantics, UINT *count)
Definition: shader.c:2992
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:5883
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 252 of file shader.c.

Referenced by test_SetDefaults().

◆ blob

Definition at line 5882 of file shader.c.

◆ bool_count

unsigned int bool_count

Definition at line 6403 of file shader.c.

Referenced by test_registerset_defaults().

◆ bools

const DWORD bools[16]

Definition at line 6406 of file shader.c.

Referenced by test_registerset_defaults().

◆ constant_count

◆ constants

Definition at line 5885 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:27

Definition at line 177 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 204 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 93 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 112 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 119 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 143 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 169 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 137 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 263 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 281 of file shader.c.

Referenced by test_constant_tables().

◆ ctab_with_default_values

const DWORD ctab_with_default_values[]
static

Definition at line 212 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 256 of file shader.c.

Referenced by test_constant_tables().

◆ ctaboffset

UINT ctaboffset

Definition at line 1981 of file shader.c.

Referenced by test_get_shader_constant_variables(), and test_registerset().

◆ desc

Definition at line 1980 of file shader.c.

◆ float_count

unsigned int float_count

Definition at line 6401 of file shader.c.

Referenced by fill_params_array(), and test_registerset_defaults().

◆ floats

const DWORD floats[1024]

Definition at line 6404 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 254 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 286 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 1764 of file shader.c.

Referenced by test_get_shader_samplers().

◆ int_count

unsigned int int_count

Definition at line 6402 of file shader.c.

Referenced by test_registerset_defaults().

◆ ints

const DWORD ints[256]

Definition at line 6405 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 251 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 250 of file shader.c.

Referenced by test_SetDefaults().

◆ name

Definition at line 5878 of file shader.c.

◆ 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 5739 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 3258 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 3522 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 5849 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 3936 of file shader.c.

◆ registerset_blob_row_array

const DWORD registerset_blob_row_array[]
static

Definition at line 4245 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 2248 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 2468 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 5705 of file shader.c.

◆ registerset_blob_struct

const DWORD registerset_blob_struct[]
static

Definition at line 4743 of file shader.c.

◆ registerset_blob_struct_array

const DWORD registerset_blob_struct_array[]
static

Definition at line 5028 of file shader.c.

◆ registerset_blob_struct_struct

const DWORD registerset_blob_struct_struct[]
static

Definition at line 5382 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 2754 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 2959 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 5750 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 3699 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 3845 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 3553 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 3626 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 3772 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 3371 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 3460 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 3283 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 3327 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 3415 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 5864 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 4466 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 4632 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 4280 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 4373 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 4539 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 4073 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 4172 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 3963 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 4018 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 4117 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 2595 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 2634 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 2493 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 2544 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 2685 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 2417 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 2384 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 2270 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 2303 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 2351 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 5720 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 5185 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 5305 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 5065 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 5124 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 5246 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 4869 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 4963 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 4775 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 4822 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 4916 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 5538 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 5639 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 5426 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 5478 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 5587 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 3087 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 3138 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 2985 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 3036 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 3189 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 2842 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 2875 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 2776 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 2809 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 2908 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 5765 of file shader.c.

◆ registerset_test_column_array_bool

const struct registerset_test registerset_test_column_array_bool[]
static

Definition at line 3706 of file shader.c.

◆ registerset_test_column_array_bool_float

const struct registerset_test registerset_test_column_array_bool_float[]
static

Definition at line 3852 of file shader.c.

◆ registerset_test_column_array_float

const struct registerset_test registerset_test_column_array_float[]
static

Definition at line 3560 of file shader.c.

◆ registerset_test_column_array_int

const struct registerset_test registerset_test_column_array_int[]
static

Definition at line 3633 of file shader.c.

◆ registerset_test_column_array_int_float

const struct registerset_test registerset_test_column_array_int_float[]
static

Definition at line 3779 of file shader.c.

◆ registerset_test_column_bool

const struct registerset_test registerset_test_column_bool[]
static

Definition at line 3376 of file shader.c.

◆ registerset_test_column_bool_float

const struct registerset_test registerset_test_column_bool_float[]
static

Definition at line 3465 of file shader.c.

◆ registerset_test_column_float

const struct registerset_test registerset_test_column_float[]
static

Definition at line 3288 of file shader.c.

◆ registerset_test_column_int

const struct registerset_test registerset_test_column_int[]
static

Definition at line 3332 of file shader.c.

◆ registerset_test_column_int_float

const struct registerset_test registerset_test_column_int_float[]
static

Definition at line 3420 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 2200 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 5870 of file shader.c.

◆ registerset_test_row_array_bool

const struct registerset_test registerset_test_row_array_bool[]
static

Definition at line 4473 of file shader.c.

◆ registerset_test_row_array_bool_float

const struct registerset_test registerset_test_row_array_bool_float[]
static

Definition at line 4639 of file shader.c.

◆ registerset_test_row_array_float

const struct registerset_test registerset_test_row_array_float[]
static

Definition at line 4287 of file shader.c.

◆ registerset_test_row_array_int

const struct registerset_test registerset_test_row_array_int[]
static

Definition at line 4380 of file shader.c.

◆ registerset_test_row_array_int_float

const struct registerset_test registerset_test_row_array_int_float[]
static

Definition at line 4546 of file shader.c.

◆ registerset_test_row_bool

const struct registerset_test registerset_test_row_bool[]
static

Definition at line 4078 of file shader.c.

◆ registerset_test_row_bool_float

const struct registerset_test registerset_test_row_bool_float[]
static

Definition at line 4177 of file shader.c.

◆ registerset_test_row_float

const struct registerset_test registerset_test_row_float[]
static

Definition at line 3968 of file shader.c.

◆ registerset_test_row_int

const struct registerset_test registerset_test_row_int[]
static

Definition at line 4023 of file shader.c.

◆ registerset_test_row_int_float

const struct registerset_test registerset_test_row_int_float[]
static

Definition at line 4122 of file shader.c.

◆ registerset_test_scalar_array_bool

const struct registerset_test registerset_test_scalar_array_bool[]
static

Definition at line 2602 of file shader.c.

◆ registerset_test_scalar_array_bool_float

const struct registerset_test registerset_test_scalar_array_bool_float[]
static

Definition at line 2641 of file shader.c.

◆ registerset_test_scalar_array_float

const struct registerset_test registerset_test_scalar_array_float[]
static

Definition at line 2500 of file shader.c.

◆ registerset_test_scalar_array_int

const struct registerset_test registerset_test_scalar_array_int[]
static

Definition at line 2551 of file shader.c.

◆ registerset_test_scalar_array_int_float

const struct registerset_test registerset_test_scalar_array_int_float[]
static

Definition at line 2692 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 2422 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 2389 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 2275 of file shader.c.

◆ registerset_test_scalar_int

const struct registerset_test registerset_test_scalar_int[]
static

Definition at line 2308 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 2356 of file shader.c.

◆ registerset_test_struct_array_bool

const struct registerset_test registerset_test_struct_array_bool[]
static

Definition at line 5196 of file shader.c.

◆ registerset_test_struct_array_bool_float

const struct registerset_test registerset_test_struct_array_bool_float[]
static

Definition at line 5316 of file shader.c.

◆ registerset_test_struct_array_float

const struct registerset_test registerset_test_struct_array_float[]
static

Definition at line 5076 of file shader.c.

◆ registerset_test_struct_array_int

const struct registerset_test registerset_test_struct_array_int[]
static

Definition at line 5135 of file shader.c.

◆ registerset_test_struct_array_int_float

const struct registerset_test registerset_test_struct_array_int_float[]
static

Definition at line 5257 of file shader.c.

◆ registerset_test_struct_bool

const struct registerset_test registerset_test_struct_bool[]
static

Definition at line 4876 of file shader.c.

◆ registerset_test_struct_bool_float

const struct registerset_test registerset_test_struct_bool_float[]
static

Definition at line 4970 of file shader.c.

◆ registerset_test_struct_float

const struct registerset_test registerset_test_struct_float[]
static

Definition at line 4782 of file shader.c.

◆ registerset_test_struct_int

const struct registerset_test registerset_test_struct_int[]
static

Definition at line 4829 of file shader.c.

◆ registerset_test_struct_int_float

const struct registerset_test registerset_test_struct_int_float[]
static

Definition at line 4923 of file shader.c.

◆ registerset_test_struct_struct_bool

const struct registerset_test registerset_test_struct_struct_bool[]
static

Definition at line 5548 of file shader.c.

◆ registerset_test_struct_struct_bool_float

const struct registerset_test registerset_test_struct_struct_bool_float[]
static

Definition at line 5649 of file shader.c.

◆ registerset_test_struct_struct_float

const struct registerset_test registerset_test_struct_struct_float[]
static

Definition at line 5436 of file shader.c.

◆ registerset_test_struct_struct_int

const struct registerset_test registerset_test_struct_struct_int[]
static

Definition at line 5488 of file shader.c.

◆ registerset_test_struct_struct_int_float

const struct registerset_test registerset_test_struct_struct_int_float[]
static

Definition at line 5597 of file shader.c.

◆ registerset_test_vector_array_bool

const struct registerset_test registerset_test_vector_array_bool[]
static

Definition at line 3094 of file shader.c.

◆ registerset_test_vector_array_bool_float

const struct registerset_test registerset_test_vector_array_bool_float[]
static

Definition at line 3145 of file shader.c.

◆ registerset_test_vector_array_float

const struct registerset_test registerset_test_vector_array_float[]
static

Definition at line 2992 of file shader.c.

◆ registerset_test_vector_array_int

const struct registerset_test registerset_test_vector_array_int[]
static

Definition at line 3043 of file shader.c.

◆ registerset_test_vector_array_int_float

const struct registerset_test registerset_test_vector_array_int_float[]
static

Definition at line 3196 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 2847 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 2880 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 2781 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 2814 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 2913 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 61 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 76 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 69 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 39 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 41 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 35 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 52 of file shader.c.

Referenced by 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 37 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 43 of file shader.c.

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

◆ start

Definition at line 5880 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 1913 of file shader.c.

Referenced by test_get_shader_constant_variables().

◆ 

const struct { ... } test_get_shader_constant_variables_data[]

◆ tests

Definition at line 5883 of file shader.c.

Referenced by test_shader_semantics().

◆ var

const char* var

Definition at line 5879 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(), _unset_props(), AccPropServices_SetHmenuProp(), AccPropServices_SetHwndProp(), AccPropServices_SetPropValue(), activate_window(), add_dispinterface_typeinfo(), add_semantic_var(), add_structure_typeinfo(), add_var_desc(), ADsBuildVarArrayStr(), alloc_detached_vars(), allocate_buffers(), allocate_const_registers(), allocate_objects(), allocate_register_reservations(), allocate_semantic_register(), allocate_semantic_registers(), allocate_temp_registers(), allocate_variable_temp_register(), append_output_copy(), append_output_copy_recurse(), append_output_var_copy(), append_var_list_signature(), assign_stub_out_args(), autoplug(), calculate_resource_register_counts(), call_docview_84(), call_explorer_69(), call_script(), cc_token(), cff_face_init(), check_acc_vals_(), check_env_var_(), check_interface_attrs(), compute_liveness(), compute_liveness_recurse(), copy_from_variant(), copy_propagation_create_var_def(), copy_propagation_get_value(), copy_propagation_invalidate_from_block(), copy_propagation_record_store(), copy_propagation_replace_with_constant_vector(), copy_propagation_replace_with_single_instr(), copy_variableinfo_from_type(), create_filter_data(), create_xmlhttprequest(), d3d10_effect_matrix_variable_GetMatrix(), d3d10_effect_matrix_variable_GetMatrixArray(), d3d10_effect_matrix_variable_GetMatrixTranspose(), d3d10_effect_matrix_variable_GetMatrixTransposeArray(), d3d10_effect_matrix_variable_SetMatrix(), d3d10_effect_matrix_variable_SetMatrixArray(), d3d10_effect_matrix_variable_SetMatrixTranspose(), d3d10_effect_matrix_variable_SetMatrixTransposeArray(), d3d10_effect_string_variable_GetString(), d3d10_effect_variable_GetAnnotationByIndex(), d3d10_effect_variable_GetAnnotationByName(), dce(), debugstr_variant(), declare_stub_args(), decompose_fx_4_state_block(), decompose_fx_4_state_block_expand_array(), decompose_fx_4_state_function_call(), disp_propget(), disp_propput(), dispex_propput(), doc_write(), document_write(), domdoc_getProperty(), domelem_setAttribute(), domselection_getProperty(), domselection_setProperty(), drivecoll_enumvariant_Next(), dump_ir_var(), encode_var(), enum_find_filter(), enumvar_Next(), enumvariant_Next(), env_get_valueW(), CBaseBar::Exec(), exec_assoc_view(), exec_global_code(), exec_query(), filecoll_enumvariant_Next(), fill_params_array(), FilterMapper3_EnumMatchingFilters(), FilterMapper3_RegisterFilter(), FilterMapper_EnumMatchingFilters(), find_splitter(), foldercoll_enumvariant_Next(), free_variable(), fx_4_parse_objects(), fx_parse_fx_4_annotations(), fx_parse_fx_4_numeric_variables(), fx_write_context_init(), generate_vsir_signature(), generate_vsir_signature_entry(), get_allocated_object(), get_antecedent(), get_attribute_value(), get_doc_event(), get_doc_ready_state(), get_element_variant_from_node_variant(), get_env(), get_event_handler(), get_explicit_generic_handle_type(), get_filter_info(), 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_window_event(), GetEnvVarOrSpecial(), GetShellFolder2ItemDetailsExToBuffer(), handle_navigation_error(), handle_xml_load(), has_out_arg_or_return(), hlsl_add_var(), hlsl_calculate_buffer_offset(), hlsl_calculate_buffer_offsets(), hlsl_component_to_string(), hlsl_ctx_cleanup(), hlsl_dump_var_default_values(), hlsl_emit_bytecode(), hlsl_get_var(), hlsl_init_simple_deref_from_var(), hlsl_new_synthetic_var(), hlsl_new_synthetic_var_named(), hlsl_new_var(), hlsl_new_var_load(), hlsl_reg_from_deref(), hlsl_var_has_buffer_offset_register_reservation(), HostObject_prop_put(), HTMLElement2_put_accessKey(), HTMLElement3_get_disabled(), HTMLElement3_put_disabled(), HTMLElement_get_title(), HTMLElement_put_title(), HTMLStyle3_get_zoom(), HTMLStyle3_put_zoom(), init_deref(), init_script_engine(), init_var_liveness(), InitVariantFromFileTime(), insert_ensuring_decreasing_bind_count(), IRecordInfoImpl_RecordClear(), is_const_decl(), is_full_pointer_function(), is_ptrchain_attr(), is_supported_object_variable(), CFolderItems::Item(), CFolderItemVerbs::Item(), ITypeLib2_fnFindName(), jsval_variant(), le16_add_cpu(), le32_add_cpu(), le64_add_cpu(), load_manifest(), lookup_dynamic_vars(), lower_combined_samples(), lower_index_loads(), lower_matrix_swizzles(), lower_nonconstant_array_loads(), lower_trig(), make_exprt(), mark_indexable_vars(), mark_vars_usage(), moniker_BindToObject(), node_append_child(), objectset_ItemIndex(), OleCommandTarget_Exec(), OleObject_SetClientSite(), parse_config_stream(), parse_elem_text(), parse_fx10_default_value(), parse_fx10_object_variable(), PB_Read(), port_mapping_enum_Next(), PPB_Load(), prepare_for_binding(), prepend_input_copy(), prepend_input_copy_recurse(), prepend_input_var_copy(), print_phase_basetype(), print_phase_function(), TConfig::print_value(), process_entry_function(), process_tfs_iface(), property_bag_Read(), property_bag_Write(), propertyset_Item(), PropertyStorage_WritePropertyToStream(), PropertyStorage_WriteToStream(), PropVariantToVariant(), put_propval(), query_env_var_(), record_get_value(), record_set_value(), refresh_proc(), register_avicap_devices(), register_codec(), register_deref_usage(), register_dsound_devices(), register_midiout_devices(), register_vfw_codecs(), register_wavein_devices(), register_waveout_devices(), RegisterDefaultAcceptHeaders(), release_dynamic_var(), release_exec(), remove_attribute(), replace_type_parameters_in_var(), replace_type_parameters_in_var_list(), resolve_fx_4_state_block_values(), RtlSetEnvironmentVariable(), run_scripts(), schema_cache_add(), ScriptTypeInfo_GetDocumentation(), ScriptTypeInfo_GetIDsOfNames(), ScriptTypeInfo_GetNames(), set_doc_event(), set_document_navigation(), set_download_state(), set_env_var(), set_event_handler(), set_node_event(), TConfig::set_value(), set_window_event(), SetEnvironmentStringsW(), setup_edit_mode(), SHPropertyBag_ReadLONG(), sm1_generate_vsir_sampler_dcls(), sm1_sort_extern(), sm1_sort_externs(), sm4_generate_vsir_add_function(), sm4_generate_vsir_instr_dcl_semantic(), sm4_get_extern_resources(), sm4_numeric_register_from_deref(), sm4_register_from_deref(), sort_synthetic_separated_samplers_first(), sort_uniform_by_numeric_bind_count(), sort_uniforms_by_numeric_bind_count(), technique_matches_version(), test_AccessibleObjectFromPoint(), test_ADsBuildVarArrayStr(), test_async_xhr(), test_async_xhr_abort(), test_attr_collection_disp(), test_child_col_disp(), test_code_persistence(), test_codec(), test_container_properties(), test_create(), test_create_attribute(), test_create_elems(), test_createNode(), test_createProcessingInstruction(), test_default_properties(), test_devenum(), test_directshow_filter(), test_dmo(), test_domdoc(), test_domnode(), test_DriveCollection(), test_dsound(), test_dump_typelib(), 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_InitVariantFromFileTime(), test_Installer_Products(), test_isexpression(), test_items(), test_IXMLDOMDocument2(), test_legacy_filter(), test_load_with_site(), test_locator(), test_max_element_depth_values(), test_midiout(), test_misc(), test_multi_encoder_impl(), test_named_items(), test_namespace(), test_namespaces_change(), test_nextdispid(), test_normalize_attribute_values(), test_OleLoadPicturePath(), test_ParseDisplayName(), test_PropVariantToGUID(), test_PropVariantToVariant(), test_reflection(), test_RegExp_Replace(), test_replacechild_elems(), test_saxreader(), test_script_run(), test_script_typeinfo(), test_splitText(), test_static_port_mapping_collection(), test_SummaryInfo(), test_sync_xhr(), test_timeout(), test_typeinfo(), test_TypeInfo(), test_validate_on_parse_values(), test_VarFormatFromTokens(), test_VariantToPropVariant(), test_VariantToStringWithDefault(), test_vfw(), test_video_input(), test_wavein(), test_waveout(), test_xmlelem_collection(), test_xmlhttprequest(), test_xmlTypes(), test_XPath(), testCodepage(), testPropsHelper(), testQuery(), TLB_SanitizeVariant(), TLB_set_custdata(), to_array(), to_bstr_array(), to_byte_array(), to_i4_array(), to_longlong(), track_object_components_sampler_dim(), tt_face_get_metrics(), type_buffer_alignment(), uia_iface_VariantToRect(), var_is_user_input(), variant_func(), variant_to_jsval(), variant_to_nsastr(), VariantToPropVariant(), anonymous_namespace{mstscax.cpp}::VariantToString(), VariantToString(), visit_statement(), Widget_VarArg_Ref_Run(), Widget_VarArg_Run(), write_conf_or_var_desc(), write_filter_data(), write_function_stub(), write_fx_2_annotation(), write_fx_2_annotations(), write_fx_2_initial_value(), write_fx_2_object_initializer(), write_fx_2_parameters(), write_fx_2_pass(), write_fx_2_technique(), write_fx_4_annotation(), write_fx_4_buffer(), write_fx_4_numeric_variable(), write_fx_4_object_variable(), write_fx_4_pass(), write_fx_4_shader_initializer(), write_fx_4_state_assignment(), write_fx_4_state_block(), write_fx_4_state_object_initializer(), write_fx_4_string_initializer(), write_fx_4_technique(), write_fx_5_shader_initializer(), write_group(), write_groups(), write_new_procformatstring_type(), write_objects(), write_old_procformatstring_type(), write_parameter_conf_or_var_exprs(), write_parameters_init(), write_pass(), write_pointer_checks(), write_proc_func_interp(), write_procformatstring_func(), write_remoting_arg(), write_remoting_arguments(), write_rpc_interface_start(), write_sm1_uniforms(), write_sm4_rdef(), write_techniques(), xmldoc_encoding(), xmlInitRandom(), 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 253 of file shader.c.

Referenced by test_SetDefaults().