Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
The formatting of the array initialization was inconsistent.
So I've made it consitent by placing the arrays and their size on one
line. All lines are below < 120 chars in length.
Initially I've tried to just stick to a line length of 100 or 120 but that
made the data look ugly.
To verify that the diff is a no-op I have added 77 empty lines as
padding after the whole registerset_data array initialization. That
produced the exact same object file as without this patch.
dlls/d3dx9_36/tests/shader.c | 383 +++++++++++++++++--------------------------
1 file changed, 153 insertions(+), 230 deletions(-)
diff --git a/dlls/d3dx9_36/tests/shader.c b/dlls/d3dx9_36/tests/shader.c
index c2b41cfdc7..1086e5e9d6 100644
--- a/dlls/d3dx9_36/tests/shader.c
+++ b/dlls/d3dx9_36/tests/shader.c
@@ -5675,267 +5675,190 @@ static const struct
registerset_data[] =
{
/* scalar */
- {"float", "f", 0, D3DXRS_FLOAT4, registerset_blob_scalar, registerset_test_scalar_float,
- sizeof(registerset_test_scalar_float) / sizeof(*registerset_test_scalar_float),
- registerset_constants_scalar_float,
- sizeof(registerset_constants_scalar_float) / sizeof(*registerset_constants_scalar_float)},
- {"int", "n", 0, D3DXRS_INT4, registerset_blob_scalar, registerset_test_scalar_int,
- sizeof(registerset_test_scalar_int) / sizeof(*registerset_test_scalar_int),
- registerset_constants_scalar_int,
- sizeof(registerset_constants_scalar_int) / sizeof(*registerset_constants_scalar_int)},
- {"int float", "nf", 4, D3DXRS_FLOAT4, registerset_blob_scalar, registerset_test_scalar_int_float,
- sizeof(registerset_test_scalar_int_float) / sizeof(*registerset_test_scalar_int_float),
- registerset_constants_scalar_int_float,
- sizeof(registerset_constants_scalar_int_float) / sizeof(*registerset_constants_scalar_int_float)},
- {"bool float", "bf", 8, D3DXRS_FLOAT4, registerset_blob_scalar, registerset_test_scalar_bool_float,
- sizeof(registerset_test_scalar_bool_float) / sizeof(*registerset_test_scalar_bool_float),
- registerset_constants_scalar_bool_float,
- sizeof(registerset_constants_scalar_bool_float) / sizeof(*registerset_constants_scalar_bool_float)},
- {"bool", "b", 0, D3DXRS_BOOL, registerset_blob_scalar, registerset_test_scalar_bool,
- sizeof(registerset_test_scalar_bool) / sizeof(*registerset_test_scalar_bool),
- registerset_constants_scalar_bool,
- sizeof(registerset_constants_scalar_bool) / sizeof(*registerset_constants_scalar_bool)},
+ {"float", "f", 0, D3DXRS_FLOAT4, registerset_blob_scalar,
+ registerset_test_scalar_float, ARRAY_SIZE(registerset_test_scalar_float),
+ registerset_constants_scalar_float, ARRAY_SIZE(registerset_constants_scalar_float)},
+ {"int", "n", 0, D3DXRS_INT4, registerset_blob_scalar,
+ registerset_test_scalar_int, ARRAY_SIZE(registerset_test_scalar_int),
+ registerset_constants_scalar_int, ARRAY_SIZE(registerset_constants_scalar_int)},
+ {"int float", "nf", 4, D3DXRS_FLOAT4, registerset_blob_scalar,
+ registerset_test_scalar_int_float, ARRAY_SIZE(registerset_test_scalar_int_float),
+ registerset_constants_scalar_int_float, ARRAY_SIZE(registerset_constants_scalar_int_float)},
+ {"bool float", "bf", 8, D3DXRS_FLOAT4, registerset_blob_scalar,
+ registerset_test_scalar_bool_float, ARRAY_SIZE(registerset_test_scalar_bool_float),
+ registerset_constants_scalar_bool_float, ARRAY_SIZE(registerset_constants_scalar_bool_float)},
+ {"bool", "b", 0, D3DXRS_BOOL, registerset_blob_scalar,
+ registerset_test_scalar_bool, ARRAY_SIZE(registerset_test_scalar_bool),
+ registerset_constants_scalar_bool, ARRAY_SIZE(registerset_constants_scalar_bool)},
/* scalar array */
- {"float [2]", "af", 0, D3DXRS_FLOAT4, registerset_blob_scalar_array, registerset_test_scalar_array_float,
- sizeof(registerset_test_scalar_array_float) / sizeof(*registerset_test_scalar_array_float),
- registerset_constants_scalar_array_float,
- sizeof(registerset_constants_scalar_array_float) / sizeof(*registerset_constants_scalar_array_float)},
- {"int [2]", "an", 0, D3DXRS_INT4, registerset_blob_scalar_array, registerset_test_scalar_array_int,
- sizeof(registerset_test_scalar_array_int) / sizeof(*registerset_test_scalar_array_int),
- registerset_constants_scalar_array_int,
- sizeof(registerset_constants_scalar_array_int) / sizeof(*registerset_constants_scalar_array_int)},
- {"bool [2]", "ab", 0, D3DXRS_BOOL, registerset_blob_scalar_array, registerset_test_scalar_array_bool,
- sizeof(registerset_test_scalar_array_bool) / sizeof(*registerset_test_scalar_array_bool),
- registerset_constants_scalar_array_bool,
- sizeof(registerset_constants_scalar_array_bool) / sizeof(*registerset_constants_scalar_array_bool)},
+ {"float [2]", "af", 0, D3DXRS_FLOAT4, registerset_blob_scalar_array,
+ registerset_test_scalar_array_float, ARRAY_SIZE(registerset_test_scalar_array_float),
+ registerset_constants_scalar_array_float, ARRAY_SIZE(registerset_constants_scalar_array_float)},
+ {"int [2]", "an", 0, D3DXRS_INT4, registerset_blob_scalar_array,
+ registerset_test_scalar_array_int, ARRAY_SIZE(registerset_test_scalar_array_int),
+ registerset_constants_scalar_array_int, ARRAY_SIZE(registerset_constants_scalar_array_int)},
+ {"bool [2]", "ab", 0, D3DXRS_BOOL, registerset_blob_scalar_array,
+ registerset_test_scalar_array_bool, ARRAY_SIZE(registerset_test_scalar_array_bool),
+ registerset_constants_scalar_array_bool, ARRAY_SIZE(registerset_constants_scalar_array_bool)},
{"int float [2]", "anf", 8, D3DXRS_FLOAT4, registerset_blob_scalar_array,
- registerset_test_scalar_array_int_float,
- sizeof(registerset_test_scalar_array_int_float) / sizeof(*registerset_test_scalar_array_int_float),
- registerset_constants_scalar_array_int_float,
- sizeof(registerset_constants_scalar_array_int_float) / sizeof(*registerset_constants_scalar_array_int_float)},
+ registerset_test_scalar_array_int_float, ARRAY_SIZE(registerset_test_scalar_array_int_float),
+ registerset_constants_scalar_array_int_float, ARRAY_SIZE(registerset_constants_scalar_array_int_float)},
{"bool float [2]", "abf", 16, D3DXRS_FLOAT4, registerset_blob_scalar_array,
- registerset_test_scalar_array_bool_float,
- sizeof(registerset_test_scalar_array_bool_float) / sizeof(*registerset_test_scalar_array_bool_float),
- registerset_constants_scalar_array_bool_float,
- sizeof(registerset_constants_scalar_array_bool_float) / sizeof(*registerset_constants_scalar_array_bool_float)},
+ registerset_test_scalar_array_bool_float, ARRAY_SIZE(registerset_test_scalar_array_bool_float),
+ registerset_constants_scalar_array_bool_float, ARRAY_SIZE(registerset_constants_scalar_array_bool_float)},
/* vector */
- {"float 3", "vf", 0, D3DXRS_FLOAT4, registerset_blob_vector, registerset_test_vector_float,
- sizeof(registerset_test_vector_float) / sizeof(*registerset_test_vector_float),
- registerset_constants_vector_float,
- sizeof(registerset_constants_vector_float) / sizeof(*registerset_constants_vector_float)},
- {"int 3", "vn", 0, D3DXRS_INT4, registerset_blob_vector, registerset_test_vector_int,
- sizeof(registerset_test_vector_int) / sizeof(*registerset_test_vector_int),
- registerset_constants_vector_int,
- sizeof(registerset_constants_vector_int) / sizeof(*registerset_constants_vector_int)},
- {"bool 3", "vb", 0, D3DXRS_BOOL, registerset_blob_vector, registerset_test_vector_bool,
- sizeof(registerset_test_vector_bool) / sizeof(*registerset_test_vector_bool),
- registerset_constants_vector_bool,
- sizeof(registerset_constants_vector_bool) / sizeof(*registerset_constants_vector_bool)},
- {"bool float 3", "vbf", 8, D3DXRS_FLOAT4, registerset_blob_vector, registerset_test_vector_bool_float,
- sizeof(registerset_test_vector_bool_float) / sizeof(*registerset_test_vector_bool_float),
- registerset_constants_vector_bool_float,
- sizeof(registerset_constants_vector_bool_float) / sizeof(*registerset_constants_vector_bool_float)},
- {"int float 3", "vnf", 4, D3DXRS_FLOAT4, registerset_blob_vector, registerset_test_vector_int_float,
- sizeof(registerset_test_vector_int_float) / sizeof(*registerset_test_vector_int_float),
- registerset_constants_vector_int_float,
- sizeof(registerset_constants_vector_int_float) / sizeof(*registerset_constants_vector_int_float)},
+ {"float 3", "vf", 0, D3DXRS_FLOAT4, registerset_blob_vector,
+ registerset_test_vector_float, ARRAY_SIZE(registerset_test_vector_float),
+ registerset_constants_vector_float, ARRAY_SIZE(registerset_constants_vector_float)},
+ {"int 3", "vn", 0, D3DXRS_INT4, registerset_blob_vector,
+ registerset_test_vector_int, ARRAY_SIZE(registerset_test_vector_int),
+ registerset_constants_vector_int, ARRAY_SIZE(registerset_constants_vector_int)},
+ {"bool 3", "vb", 0, D3DXRS_BOOL, registerset_blob_vector,
+ registerset_test_vector_bool, ARRAY_SIZE(registerset_test_vector_bool),
+ registerset_constants_vector_bool, ARRAY_SIZE(registerset_constants_vector_bool)},
+ {"bool float 3", "vbf", 8, D3DXRS_FLOAT4, registerset_blob_vector,
+ registerset_test_vector_bool_float, ARRAY_SIZE(registerset_test_vector_bool_float),
+ registerset_constants_vector_bool_float, ARRAY_SIZE(registerset_constants_vector_bool_float)},
+ {"int float 3", "vnf", 4, D3DXRS_FLOAT4, registerset_blob_vector,
+ registerset_test_vector_int_float, ARRAY_SIZE(registerset_test_vector_int_float),
+ registerset_constants_vector_int_float, ARRAY_SIZE(registerset_constants_vector_int_float)},
/* vector array */
- {"float 3 [2]", "vaf", 0, D3DXRS_FLOAT4, registerset_blob_vector_array, registerset_test_vector_array_float,
- sizeof(registerset_test_vector_array_float) / sizeof(*registerset_test_vector_array_float),
- registerset_constants_vector_array_float,
- sizeof(registerset_constants_vector_array_float) / sizeof(*registerset_constants_vector_array_float)},
- {"int 3 [2]", "van", 0, D3DXRS_INT4, registerset_blob_vector_array, registerset_test_vector_array_int,
- sizeof(registerset_test_vector_array_int) / sizeof(*registerset_test_vector_array_int),
- registerset_constants_vector_array_int,
- sizeof(registerset_constants_vector_array_int) / sizeof(*registerset_constants_vector_array_int)},
- {"bool 3 [2]", "vab", 0, D3DXRS_BOOL, registerset_blob_vector_array, registerset_test_vector_array_bool,
- sizeof(registerset_test_vector_array_bool) / sizeof(*registerset_test_vector_array_bool),
- registerset_constants_vector_array_bool,
- sizeof(registerset_constants_vector_array_bool) / sizeof(*registerset_constants_vector_array_bool)},
+ {"float 3 [2]", "vaf", 0, D3DXRS_FLOAT4, registerset_blob_vector_array,
+ registerset_test_vector_array_float, ARRAY_SIZE(registerset_test_vector_array_float),
+ registerset_constants_vector_array_float, ARRAY_SIZE(registerset_constants_vector_array_float)},
+ {"int 3 [2]", "van", 0, D3DXRS_INT4, registerset_blob_vector_array,
+ registerset_test_vector_array_int, ARRAY_SIZE(registerset_test_vector_array_int),
+ registerset_constants_vector_array_int, ARRAY_SIZE(registerset_constants_vector_array_int)},
+ {"bool 3 [2]", "vab", 0, D3DXRS_BOOL, registerset_blob_vector_array,
+ registerset_test_vector_array_bool, ARRAY_SIZE(registerset_test_vector_array_bool),
+ registerset_constants_vector_array_bool, ARRAY_SIZE(registerset_constants_vector_array_bool)},
{"bool float 3 [2]", "vabf", 16, D3DXRS_FLOAT4, registerset_blob_vector_array,
- registerset_test_vector_array_bool_float,
- sizeof(registerset_test_vector_array_bool_float) / sizeof(*registerset_test_vector_array_bool_float),
- registerset_constants_vector_array_bool_float,
- sizeof(registerset_constants_vector_array_bool_float) / sizeof(*registerset_constants_vector_array_bool_float)},
+ registerset_test_vector_array_bool_float, ARRAY_SIZE(registerset_test_vector_array_bool_float),
+ registerset_constants_vector_array_bool_float, ARRAY_SIZE(registerset_constants_vector_array_bool_float)},
{"int float 3 [2]", "vanf", 8, D3DXRS_FLOAT4, registerset_blob_vector_array,
- registerset_test_vector_array_int_float,
- sizeof(registerset_test_vector_array_int_float) / sizeof(*registerset_test_vector_array_int_float),
- registerset_constants_vector_array_int_float,
- sizeof(registerset_constants_vector_array_int_float) / sizeof(*registerset_constants_vector_array_int_float)},
+ registerset_test_vector_array_int_float, ARRAY_SIZE(registerset_test_vector_array_int_float),
+ registerset_constants_vector_array_int_float, ARRAY_SIZE(registerset_constants_vector_array_int_float)},
/* matrix column */
- {"float c3x2", "cf", 0, D3DXRS_FLOAT4, registerset_blob_column, registerset_test_column_float,
- sizeof(registerset_test_column_float) / sizeof(*registerset_test_column_float),
- registerset_constants_column_float,
- sizeof(registerset_constants_column_float) / sizeof(*registerset_constants_column_float)},
- {"int c3x2", "cn", 0, D3DXRS_INT4, registerset_blob_column, registerset_test_column_int,
- sizeof(registerset_test_column_int) / sizeof(*registerset_test_column_int),
- registerset_constants_column_int,
- sizeof(registerset_constants_column_int) / sizeof(*registerset_constants_column_int)},
- {"bool c3x2", "cb", 0, D3DXRS_BOOL, registerset_blob_column, registerset_test_column_bool,
- sizeof(registerset_test_column_bool) / sizeof(*registerset_test_column_bool),
- registerset_constants_column_bool,
- sizeof(registerset_constants_column_bool) / sizeof(*registerset_constants_column_bool)},
+ {"float c3x2", "cf", 0, D3DXRS_FLOAT4, registerset_blob_column,
+ registerset_test_column_float, ARRAY_SIZE(registerset_test_column_float),
+ registerset_constants_column_float, ARRAY_SIZE(registerset_constants_column_float)},
+ {"int c3x2", "cn", 0, D3DXRS_INT4, registerset_blob_column,
+ registerset_test_column_int, ARRAY_SIZE(registerset_test_column_int),
+ registerset_constants_column_int, ARRAY_SIZE(registerset_constants_column_int)},
+ {"bool c3x2", "cb", 0, D3DXRS_BOOL, registerset_blob_column,
+ registerset_test_column_bool, ARRAY_SIZE(registerset_test_column_bool),
+ registerset_constants_column_bool, ARRAY_SIZE(registerset_constants_column_bool)},
{"bool float c3x2", "cbf", 8, D3DXRS_FLOAT4, registerset_blob_column,
- registerset_test_column_bool_float,
- sizeof(registerset_test_column_bool_float) / sizeof(*registerset_test_column_bool_float),
- registerset_constants_column_bool_float,
- sizeof(registerset_constants_column_bool_float) / sizeof(*registerset_constants_column_bool_float)},
+ registerset_test_column_bool_float, ARRAY_SIZE(registerset_test_column_bool_float),
+ registerset_constants_column_bool_float, ARRAY_SIZE(registerset_constants_column_bool_float)},
{"int float c3x2", "cnf", 16, D3DXRS_FLOAT4, registerset_blob_column,
- registerset_test_column_int_float,
- sizeof(registerset_test_column_int_float) / sizeof(*registerset_test_column_int_float),
- registerset_constants_column_int_float,
- sizeof(registerset_constants_column_int_float) / sizeof(*registerset_constants_column_int_float)},
+ registerset_test_column_int_float, ARRAY_SIZE(registerset_test_column_int_float),
+ registerset_constants_column_int_float, ARRAY_SIZE(registerset_constants_column_int_float)},
/* matrix column array */
- {"float c3x2 [2]", "caf", 0, D3DXRS_FLOAT4, registerset_blob_column_array, registerset_test_column_array_float,
- sizeof(registerset_test_column_array_float) / sizeof(*registerset_test_column_array_float),
- registerset_constants_column_array_float,
- sizeof(registerset_constants_column_array_float) / sizeof(*registerset_constants_column_array_float)},
- {"int c3x2 [2]", "can", 0, D3DXRS_INT4, registerset_blob_column_array, registerset_test_column_array_int,
- sizeof(registerset_test_column_array_int) / sizeof(*registerset_test_column_array_int),
- registerset_constants_column_array_int,
- sizeof(registerset_constants_column_array_int) / sizeof(*registerset_constants_column_array_int)},
- {"bool c3x2 [2]", "cab", 0, D3DXRS_BOOL, registerset_blob_column_array, registerset_test_column_array_bool,
- sizeof(registerset_test_column_array_bool) / sizeof(*registerset_test_column_array_bool),
- registerset_constants_column_array_bool,
- sizeof(registerset_constants_column_array_bool) / sizeof(*registerset_constants_column_array_bool)},
+ {"float c3x2 [2]", "caf", 0, D3DXRS_FLOAT4, registerset_blob_column_array,
+ registerset_test_column_array_float, ARRAY_SIZE(registerset_test_column_array_float),
+ registerset_constants_column_array_float, ARRAY_SIZE(registerset_constants_column_array_float)},
+ {"int c3x2 [2]", "can", 0, D3DXRS_INT4, registerset_blob_column_array,
+ registerset_test_column_array_int, ARRAY_SIZE(registerset_test_column_array_int),
+ registerset_constants_column_array_int, ARRAY_SIZE(registerset_constants_column_array_int)},
+ {"bool c3x2 [2]", "cab", 0, D3DXRS_BOOL, registerset_blob_column_array,
+ registerset_test_column_array_bool, ARRAY_SIZE(registerset_test_column_array_bool),
+ registerset_constants_column_array_bool, ARRAY_SIZE(registerset_constants_column_array_bool)},
{"bool float c3x2 [2]", "cabf", 16, D3DXRS_FLOAT4, registerset_blob_column_array,
- registerset_test_column_array_bool_float,
- sizeof(registerset_test_column_array_bool_float) / sizeof(*registerset_test_column_array_bool_float),
- registerset_constants_column_array_bool_float,
- sizeof(registerset_constants_column_array_bool_float) / sizeof(*registerset_constants_column_array_bool_float)},
+ registerset_test_column_array_bool_float, ARRAY_SIZE(registerset_test_column_array_bool_float),
+ registerset_constants_column_array_bool_float, ARRAY_SIZE(registerset_constants_column_array_bool_float)},
{"int float c3x2 [2]", "canf", 32, D3DXRS_FLOAT4, registerset_blob_column_array,
- registerset_test_column_array_int_float,
- sizeof(registerset_test_column_array_int_float) / sizeof(*registerset_test_column_array_int_float),
- registerset_constants_column_array_int_float,
- sizeof(registerset_constants_column_array_int_float) / sizeof(*registerset_constants_column_array_int_float)},
+ registerset_test_column_array_int_float, ARRAY_SIZE(registerset_test_column_array_int_float),
+ registerset_constants_column_array_int_float, ARRAY_SIZE(registerset_constants_column_array_int_float)},
/* matrix row */
- {"float r3x2", "rf", 0, D3DXRS_FLOAT4, registerset_blob_row, registerset_test_row_float,
- sizeof(registerset_test_row_float) / sizeof(*registerset_test_row_float),
- registerset_constants_row_float,
- sizeof(registerset_constants_row_float) / sizeof(*registerset_constants_row_float)},
- {"int r3x2", "rn", 0, D3DXRS_INT4, registerset_blob_row, registerset_test_row_int,
- sizeof(registerset_test_row_int) / sizeof(*registerset_test_row_int),
- registerset_constants_row_int,
- sizeof(registerset_constants_row_int) / sizeof(*registerset_constants_row_int)},
- {"bool r3x2", "rb", 0, D3DXRS_BOOL, registerset_blob_row, registerset_test_row_bool,
- sizeof(registerset_test_row_bool) / sizeof(*registerset_test_row_bool),
- registerset_constants_row_bool,
- sizeof(registerset_constants_row_bool) / sizeof(*registerset_constants_row_bool)},
+ {"float r3x2", "rf", 0, D3DXRS_FLOAT4, registerset_blob_row,
+ registerset_test_row_float, ARRAY_SIZE(registerset_test_row_float),
+ registerset_constants_row_float, ARRAY_SIZE(registerset_constants_row_float)},
+ {"int r3x2", "rn", 0, D3DXRS_INT4, registerset_blob_row,
+ registerset_test_row_int, ARRAY_SIZE(registerset_test_row_int),
+ registerset_constants_row_int, ARRAY_SIZE(registerset_constants_row_int)},
+ {"bool r3x2", "rb", 0, D3DXRS_BOOL, registerset_blob_row,
+ registerset_test_row_bool, ARRAY_SIZE(registerset_test_row_bool),
+ registerset_constants_row_bool, ARRAY_SIZE(registerset_constants_row_bool)},
{"bool float r3x2", "rbf", 12, D3DXRS_FLOAT4, registerset_blob_row,
- registerset_test_row_bool_float,
- sizeof(registerset_test_row_bool_float) / sizeof(*registerset_test_row_bool_float),
- registerset_constants_row_bool_float,
- sizeof(registerset_constants_row_bool_float) / sizeof(*registerset_constants_row_bool_float)},
+ registerset_test_row_bool_float, ARRAY_SIZE(registerset_test_row_bool_float),
+ registerset_constants_row_bool_float, ARRAY_SIZE(registerset_constants_row_bool_float)},
{"int float r3x2", "rnf", 24, D3DXRS_FLOAT4, registerset_blob_row,
- registerset_test_row_int_float,
- sizeof(registerset_test_row_int_float) / sizeof(*registerset_test_row_int_float),
- registerset_constants_row_int_float,
- sizeof(registerset_constants_row_int_float) / sizeof(*registerset_constants_row_int_float)},
+ registerset_test_row_int_float, ARRAY_SIZE(registerset_test_row_int_float),
+ registerset_constants_row_int_float, ARRAY_SIZE(registerset_constants_row_int_float)},
/* matrix row array */
- {"float 3x2 [2]", "raf", 0, D3DXRS_FLOAT4, registerset_blob_row_array, registerset_test_row_array_float,
- sizeof(registerset_test_row_array_float) / sizeof(*registerset_test_row_array_float),
- registerset_constants_row_array_float,
- sizeof(registerset_constants_row_array_float) / sizeof(*registerset_constants_row_array_float)},
- {"int 3x2 [2]", "ran", 0, D3DXRS_INT4, registerset_blob_row_array, registerset_test_row_array_int,
- sizeof(registerset_test_row_array_int) / sizeof(*registerset_test_row_array_int),
- registerset_constants_row_array_int,
- sizeof(registerset_constants_row_array_int) / sizeof(*registerset_constants_row_array_int)},
- {"bool 3x2 [2]", "rab", 0, D3DXRS_BOOL, registerset_blob_row_array, registerset_test_row_array_bool,
- sizeof(registerset_test_row_array_bool) / sizeof(*registerset_test_row_array_bool),
- registerset_constants_row_array_bool,
- sizeof(registerset_constants_row_array_bool) / sizeof(*registerset_constants_row_array_bool)},
+ {"float 3x2 [2]", "raf", 0, D3DXRS_FLOAT4, registerset_blob_row_array,
+ registerset_test_row_array_float, ARRAY_SIZE(registerset_test_row_array_float),
+ registerset_constants_row_array_float, ARRAY_SIZE(registerset_constants_row_array_float)},
+ {"int 3x2 [2]", "ran", 0, D3DXRS_INT4, registerset_blob_row_array,
+ registerset_test_row_array_int, ARRAY_SIZE(registerset_test_row_array_int),
+ registerset_constants_row_array_int, ARRAY_SIZE(registerset_constants_row_array_int)},
+ {"bool 3x2 [2]", "rab", 0, D3DXRS_BOOL, registerset_blob_row_array,
+ registerset_test_row_array_bool, ARRAY_SIZE(registerset_test_row_array_bool),
+ registerset_constants_row_array_bool, ARRAY_SIZE(registerset_constants_row_array_bool)},
{"bool float 3x2 [2]", "rabf", 24, D3DXRS_FLOAT4, registerset_blob_row_array,
- registerset_test_row_array_bool_float,
- sizeof(registerset_test_row_array_bool_float) / sizeof(*registerset_test_row_array_bool_float),
- registerset_constants_row_array_bool_float,
- sizeof(registerset_constants_row_array_bool_float) / sizeof(*registerset_constants_row_array_bool_float)},
+ registerset_test_row_array_bool_float, ARRAY_SIZE(registerset_test_row_array_bool_float),
+ registerset_constants_row_array_bool_float, ARRAY_SIZE(registerset_constants_row_array_bool_float)},
{"int float 3x2 [2]", "ranf", 48, D3DXRS_FLOAT4, registerset_blob_row_array,
- registerset_test_row_array_int_float,
- sizeof(registerset_test_row_array_int_float) / sizeof(*registerset_test_row_array_int_float),
- registerset_constants_row_array_int_float,
- sizeof(registerset_constants_row_array_int_float) / sizeof(*registerset_constants_row_array_int_float)},
+ registerset_test_row_array_int_float, ARRAY_SIZE(registerset_test_row_array_int_float),
+ registerset_constants_row_array_int_float, ARRAY_SIZE(registerset_constants_row_array_int_float)},
/* struct */
- {"struct float", "sf", 0, D3DXRS_FLOAT4, registerset_blob_struct, registerset_test_struct_float,
- sizeof(registerset_test_struct_float) / sizeof(*registerset_test_struct_float),
- registerset_constants_struct_float,
- sizeof(registerset_constants_struct_float) / sizeof(*registerset_constants_struct_float)},
- {"struct int", "sn", 0, D3DXRS_INT4, registerset_blob_struct, registerset_test_struct_int,
- sizeof(registerset_test_struct_int) / sizeof(*registerset_test_struct_int),
- registerset_constants_struct_int,
- sizeof(registerset_constants_struct_int) / sizeof(*registerset_constants_struct_int)},
- {"struct bool", "sb", 0, D3DXRS_BOOL, registerset_blob_struct, registerset_test_struct_bool,
- sizeof(registerset_test_struct_bool) / sizeof(*registerset_test_struct_bool),
- registerset_constants_struct_bool,
- sizeof(registerset_constants_struct_bool) / sizeof(*registerset_constants_struct_bool)},
+ {"struct float", "sf", 0, D3DXRS_FLOAT4, registerset_blob_struct,
+ registerset_test_struct_float, ARRAY_SIZE(registerset_test_struct_float),
+ registerset_constants_struct_float, ARRAY_SIZE(registerset_constants_struct_float)},
+ {"struct int", "sn", 0, D3DXRS_INT4, registerset_blob_struct,
+ registerset_test_struct_int, ARRAY_SIZE(registerset_test_struct_int),
+ registerset_constants_struct_int, ARRAY_SIZE(registerset_constants_struct_int)},
+ {"struct bool", "sb", 0, D3DXRS_BOOL, registerset_blob_struct,
+ registerset_test_struct_bool, ARRAY_SIZE(registerset_test_struct_bool),
+ registerset_constants_struct_bool, ARRAY_SIZE(registerset_constants_struct_bool)},
{"struct bool float", "sbf", 16, D3DXRS_FLOAT4, registerset_blob_struct,
- registerset_test_struct_bool_float,
- sizeof(registerset_test_struct_bool_float) / sizeof(*registerset_test_struct_bool_float),
- registerset_constants_struct_bool_float,
- sizeof(registerset_constants_struct_bool_float) / sizeof(*registerset_constants_struct_bool_float)},
+ registerset_test_struct_bool_float, ARRAY_SIZE(registerset_test_struct_bool_float),
+ registerset_constants_struct_bool_float, ARRAY_SIZE(registerset_constants_struct_bool_float)},
{"struct int float", "snf", 8, D3DXRS_FLOAT4, registerset_blob_struct,
- registerset_test_struct_int_float,
- sizeof(registerset_test_struct_int_float) / sizeof(*registerset_test_struct_int_float),
- registerset_constants_struct_int_float,
- sizeof(registerset_constants_struct_int_float) / sizeof(*registerset_constants_struct_int_float)},
+ registerset_test_struct_int_float, ARRAY_SIZE(registerset_test_struct_int_float),
+ registerset_constants_struct_int_float, ARRAY_SIZE(registerset_constants_struct_int_float)},
/* struct array */
- {"struct float [2]", "saf", 0, D3DXRS_FLOAT4, registerset_blob_struct_array, registerset_test_struct_array_float,
- sizeof(registerset_test_struct_array_float) / sizeof(*registerset_test_struct_array_float),
- registerset_constants_struct_array_float,
- sizeof(registerset_constants_struct_array_float) / sizeof(*registerset_constants_struct_array_float)},
- {"struct int [2]", "san", 0, D3DXRS_INT4, registerset_blob_struct_array, registerset_test_struct_array_int,
- sizeof(registerset_test_struct_array_int) / sizeof(*registerset_test_struct_array_int),
- registerset_constants_struct_array_int,
- sizeof(registerset_constants_struct_array_int) / sizeof(*registerset_constants_struct_array_int)},
- {"struct bool [2]", "sab", 0, D3DXRS_BOOL, registerset_blob_struct_array, registerset_test_struct_array_bool,
- sizeof(registerset_test_struct_array_bool) / sizeof(*registerset_test_struct_array_bool),
- registerset_constants_struct_array_bool,
- sizeof(registerset_constants_struct_array_bool) / sizeof(*registerset_constants_struct_array_bool)},
+ {"struct float [2]", "saf", 0, D3DXRS_FLOAT4, registerset_blob_struct_array,
+ registerset_test_struct_array_float, ARRAY_SIZE(registerset_test_struct_array_float),
+ registerset_constants_struct_array_float, ARRAY_SIZE(registerset_constants_struct_array_float)},
+ {"struct int [2]", "san", 0, D3DXRS_INT4, registerset_blob_struct_array,
+ registerset_test_struct_array_int, ARRAY_SIZE(registerset_test_struct_array_int),
+ registerset_constants_struct_array_int, ARRAY_SIZE(registerset_constants_struct_array_int)},
+ {"struct bool [2]", "sab", 0, D3DXRS_BOOL, registerset_blob_struct_array,
+ registerset_test_struct_array_bool, ARRAY_SIZE(registerset_test_struct_array_bool),
+ registerset_constants_struct_array_bool, ARRAY_SIZE(registerset_constants_struct_array_bool)},
{"struct bool float [2]", "sabf", 32, D3DXRS_FLOAT4, registerset_blob_struct_array,
- registerset_test_struct_array_bool_float,
- sizeof(registerset_test_struct_array_bool_float) / sizeof(*registerset_test_struct_array_bool_float),
- registerset_constants_struct_array_bool_float,
- sizeof(registerset_constants_struct_array_bool_float) / sizeof(*registerset_constants_struct_array_bool_float)},
+ registerset_test_struct_array_bool_float, ARRAY_SIZE(registerset_test_struct_array_bool_float),
+ registerset_constants_struct_array_bool_float, ARRAY_SIZE(registerset_constants_struct_array_bool_float)},
{"struct int float [2]", "sanf", 16, D3DXRS_FLOAT4, registerset_blob_struct_array,
- registerset_test_struct_array_int_float,
- sizeof(registerset_test_struct_array_int_float) / sizeof(*registerset_test_struct_array_int_float),
- registerset_constants_struct_array_int_float,
- sizeof(registerset_constants_struct_array_int_float) / sizeof(*registerset_constants_struct_array_int_float)},
+ registerset_test_struct_array_int_float, ARRAY_SIZE(registerset_test_struct_array_int_float),
+ registerset_constants_struct_array_int_float, ARRAY_SIZE(registerset_constants_struct_array_int_float)},
/* struct struct */
- {"struct struct float", "ssf", 0, D3DXRS_FLOAT4, registerset_blob_struct_struct, registerset_test_struct_struct_float,
- sizeof(registerset_test_struct_struct_float) / sizeof(*registerset_test_struct_struct_float),
- registerset_constants_struct_struct_float,
- sizeof(registerset_constants_struct_struct_float) / sizeof(*registerset_constants_struct_struct_float)},
- {"struct struct int", "ssn", 0, D3DXRS_INT4, registerset_blob_struct_struct, registerset_test_struct_struct_int,
- sizeof(registerset_test_struct_struct_int) / sizeof(*registerset_test_struct_struct_int),
- registerset_constants_struct_struct_int,
- sizeof(registerset_constants_struct_struct_int) / sizeof(*registerset_constants_struct_struct_int)},
- {"struct struct bool", "ssb", 0, D3DXRS_BOOL, registerset_blob_struct_struct, registerset_test_struct_struct_bool,
- sizeof(registerset_test_struct_struct_bool) / sizeof(*registerset_test_struct_struct_bool),
- registerset_constants_struct_struct_bool,
- sizeof(registerset_constants_struct_struct_bool) / sizeof(*registerset_constants_struct_struct_bool)},
+ {"struct struct float", "ssf", 0, D3DXRS_FLOAT4, registerset_blob_struct_struct,
+ registerset_test_struct_struct_float, ARRAY_SIZE(registerset_test_struct_struct_float),
+ registerset_constants_struct_struct_float, ARRAY_SIZE(registerset_constants_struct_struct_float)},
+ {"struct struct int", "ssn", 0, D3DXRS_INT4, registerset_blob_struct_struct,
+ registerset_test_struct_struct_int, ARRAY_SIZE(registerset_test_struct_struct_int),
+ registerset_constants_struct_struct_int, ARRAY_SIZE(registerset_constants_struct_struct_int)},
+ {"struct struct bool", "ssb", 0, D3DXRS_BOOL, registerset_blob_struct_struct,
+ registerset_test_struct_struct_bool, ARRAY_SIZE(registerset_test_struct_struct_bool),
+ registerset_constants_struct_struct_bool, ARRAY_SIZE(registerset_constants_struct_struct_bool)},
{"struct struct bool float", "ssbf", 32, D3DXRS_FLOAT4, registerset_blob_struct_struct,
- registerset_test_struct_struct_bool_float,
- sizeof(registerset_test_struct_struct_bool_float) / sizeof(*registerset_test_struct_struct_bool_float),
- registerset_constants_struct_struct_bool_float,
- sizeof(registerset_constants_struct_struct_bool_float) / sizeof(*registerset_constants_struct_struct_bool_float)},
+ registerset_test_struct_struct_bool_float, ARRAY_SIZE(registerset_test_struct_struct_bool_float),
+ registerset_constants_struct_struct_bool_float, ARRAY_SIZE(registerset_constants_struct_struct_bool_float)},
{"struct struct int float", "ssnf", 16, D3DXRS_FLOAT4, registerset_blob_struct_struct,
- registerset_test_struct_struct_int_float,
- sizeof(registerset_test_struct_struct_int_float) / sizeof(*registerset_test_struct_struct_int_float),
- registerset_constants_struct_struct_int_float,
- sizeof(registerset_constants_struct_struct_int_float) / sizeof(*registerset_constants_struct_struct_int_float)},
+ registerset_test_struct_struct_int_float, ARRAY_SIZE(registerset_test_struct_struct_int_float),
+ registerset_constants_struct_struct_int_float, ARRAY_SIZE(registerset_constants_struct_struct_int_float)},
/* special */
{"int ran", "ran", 0, D3DXRS_INT4, registerset_blob_special_int, NULL, 0,
- registerset_constants_special_int,
- sizeof(registerset_constants_special_int) / sizeof(*registerset_constants_special_int)},
- {"bigvec", "vaf", 0, D3DXRS_FLOAT4, registerset_blob_bigvec, registerset_test_bigvec_float,
- sizeof(registerset_test_bigvec_float) / sizeof(*registerset_test_bigvec_float),
- registerset_constants_bigvec_float,
- sizeof(registerset_constants_bigvec_float) / sizeof(*registerset_constants_bigvec_float)},
+ registerset_constants_special_int, ARRAY_SIZE(registerset_constants_special_int)},
+ {"bigvec", "vaf", 0, D3DXRS_FLOAT4, registerset_blob_bigvec,
+ registerset_test_bigvec_float, ARRAY_SIZE(registerset_test_bigvec_float),
+ registerset_constants_bigvec_float, ARRAY_SIZE(registerset_constants_bigvec_float)},
{"cf", "cf", 0, D3DXRS_FLOAT4, registerset_blob_matrix_column_clamp,
- registerset_test_matrix_column_clamp,
- sizeof(registerset_test_matrix_column_clamp) / sizeof(*registerset_test_matrix_column_clamp),
- registerset_constants_matrix_column_clamp,
- sizeof(registerset_constants_matrix_column_clamp) / sizeof(*registerset_constants_matrix_column_clamp)},
+ registerset_test_matrix_column_clamp, ARRAY_SIZE(registerset_test_matrix_column_clamp),
+ registerset_constants_matrix_column_clamp, ARRAY_SIZE(registerset_constants_matrix_column_clamp)},
};
static void registerset_clear(IDirect3DDevice9 *device)
--
2.14.4