Commit 7bba86db authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

d3d10/tests: Build without -DWINE_NO_LONG_TYPES.

parent 09343d89
TESTDLL = d3d10.dll TESTDLL = d3d10.dll
IMPORTS = d3d10 IMPORTS = d3d10
EXTRADEFS = -DWINE_NO_LONG_TYPES -DD3D_COMPILER_VERSION=0 EXTRADEFS = -DD3D_COMPILER_VERSION=0
PARENTSRC = ../../d3dcompiler_43/tests PARENTSRC = ../../d3dcompiler_43/tests
C_SRCS = \ C_SRCS = \
......
...@@ -38,7 +38,7 @@ static void test_create_device(void) ...@@ -38,7 +38,7 @@ static void test_create_device(void)
if (i == D3D10_SDK_VERSION) if (i == D3D10_SDK_VERSION)
continue; continue;
hr = D3D10CreateDevice(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0, i, &device); hr = D3D10CreateDevice(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0, i, &device);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x for SDK version %#x.\n", hr, i); ok(hr == E_INVALIDARG, "Got unexpected hr %#lx for SDK version %#x.\n", hr, i);
} }
} }
...@@ -85,80 +85,80 @@ static void test_stateblock_mask(void) ...@@ -85,80 +85,80 @@ static void test_stateblock_mask(void)
mask_y.Predication = 0xaa; mask_y.Predication = 0xaa;
hr = D3D10StateBlockMaskDifference(&mask_x, &mask_y, &result); hr = D3D10StateBlockMaskDifference(&mask_x, &mask_y, &result);
ok(SUCCEEDED(hr), "D3D10StateBlockMaskDifference failed, hr %#x.\n", hr); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(result.VS == 0x66, "Got unexpected result.VS %#x.\n", result.VS); ok(result.VS == 0x66, "Got unexpected result.VS %#x.\n", result.VS);
ok(result.Predication == 0x33, "Got unexpected result.Predication %#x.\n", result.Predication); ok(result.Predication == 0x33, "Got unexpected result.Predication %#x.\n", result.Predication);
hr = D3D10StateBlockMaskDifference(NULL, &mask_y, &result); hr = D3D10StateBlockMaskDifference(NULL, &mask_y, &result);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = D3D10StateBlockMaskDifference(&mask_x, NULL, &result); hr = D3D10StateBlockMaskDifference(&mask_x, NULL, &result);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = D3D10StateBlockMaskDifference(&mask_x, &mask_y, NULL); hr = D3D10StateBlockMaskDifference(&mask_x, &mask_y, NULL);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = D3D10StateBlockMaskIntersect(&mask_x, &mask_y, &result); hr = D3D10StateBlockMaskIntersect(&mask_x, &mask_y, &result);
ok(SUCCEEDED(hr), "D3D10StateBlockMaskIntersect failed, hr %#x.\n", hr); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(result.VS == 0x11, "Got unexpected result.VS %#x.\n", result.VS); ok(result.VS == 0x11, "Got unexpected result.VS %#x.\n", result.VS);
ok(result.Predication == 0x88, "Got unexpected result.Predication %#x.\n", result.Predication); ok(result.Predication == 0x88, "Got unexpected result.Predication %#x.\n", result.Predication);
hr = D3D10StateBlockMaskIntersect(NULL, &mask_y, &result); hr = D3D10StateBlockMaskIntersect(NULL, &mask_y, &result);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = D3D10StateBlockMaskIntersect(&mask_x, NULL, &result); hr = D3D10StateBlockMaskIntersect(&mask_x, NULL, &result);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = D3D10StateBlockMaskIntersect(&mask_x, &mask_y, NULL); hr = D3D10StateBlockMaskIntersect(&mask_x, &mask_y, NULL);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = D3D10StateBlockMaskUnion(&mask_x, &mask_y, &result); hr = D3D10StateBlockMaskUnion(&mask_x, &mask_y, &result);
ok(SUCCEEDED(hr), "D3D10StateBlockMaskUnion failed, hr %#x.\n", hr); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(result.VS == 0x77, "Got unexpected result.VS %#x.\n", result.VS); ok(result.VS == 0x77, "Got unexpected result.VS %#x.\n", result.VS);
ok(result.Predication == 0xbb, "Got unexpected result.Predication %#x.\n", result.Predication); ok(result.Predication == 0xbb, "Got unexpected result.Predication %#x.\n", result.Predication);
hr = D3D10StateBlockMaskUnion(NULL, &mask_y, &result); hr = D3D10StateBlockMaskUnion(NULL, &mask_y, &result);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = D3D10StateBlockMaskUnion(&mask_x, NULL, &result); hr = D3D10StateBlockMaskUnion(&mask_x, NULL, &result);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = D3D10StateBlockMaskUnion(&mask_x, &mask_y, NULL); hr = D3D10StateBlockMaskUnion(&mask_x, &mask_y, NULL);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
memset(&result, 0xff, sizeof(result)); memset(&result, 0xff, sizeof(result));
hr = D3D10StateBlockMaskDisableAll(&result); hr = D3D10StateBlockMaskDisableAll(&result);
ok(SUCCEEDED(hr), "D3D10StateBlockMaskDisableAll failed, hr %#x.\n", hr); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!result.VS, "Got unexpected result.VS %#x.\n", result.VS); ok(!result.VS, "Got unexpected result.VS %#x.\n", result.VS);
ok(!result.Predication, "Got unexpected result.Predication %#x.\n", result.Predication); ok(!result.Predication, "Got unexpected result.Predication %#x.\n", result.Predication);
hr = D3D10StateBlockMaskDisableAll(NULL); hr = D3D10StateBlockMaskDisableAll(NULL);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
memset(&result, 0, sizeof(result)); memset(&result, 0, sizeof(result));
hr = D3D10StateBlockMaskEnableAll(&result); hr = D3D10StateBlockMaskEnableAll(&result);
ok(SUCCEEDED(hr), "D3D10StateBlockMaskEnableAll failed, hr %#x.\n", hr); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(result.VS == 0xff, "Got unexpected result.VS %#x.\n", result.VS); ok(result.VS == 0xff, "Got unexpected result.VS %#x.\n", result.VS);
ok(result.Predication == 0xff, "Got unexpected result.Predication %#x.\n", result.Predication); ok(result.Predication == 0xff, "Got unexpected result.Predication %#x.\n", result.Predication);
hr = D3D10StateBlockMaskEnableAll(NULL); hr = D3D10StateBlockMaskEnableAll(NULL);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
result.VS = 0xff; result.VS = 0xff;
hr = D3D10StateBlockMaskDisableCapture(&result, D3D10_DST_VS, 0, 1); hr = D3D10StateBlockMaskDisableCapture(&result, D3D10_DST_VS, 0, 1);
ok(SUCCEEDED(hr), "D3D10StateBlockMaskDisableCapture failed, hr %#x.\n", hr); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(result.VS == 0xfe, "Got unexpected result.VS %#x.\n", result.VS); ok(result.VS == 0xfe, "Got unexpected result.VS %#x.\n", result.VS);
hr = D3D10StateBlockMaskDisableCapture(&result, D3D10_DST_VS, 0, 4); hr = D3D10StateBlockMaskDisableCapture(&result, D3D10_DST_VS, 0, 4);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = D3D10StateBlockMaskDisableCapture(&result, D3D10_DST_VS, 1, 1); hr = D3D10StateBlockMaskDisableCapture(&result, D3D10_DST_VS, 1, 1);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = D3D10StateBlockMaskDisableCapture(NULL, D3D10_DST_VS, 0, 1); hr = D3D10StateBlockMaskDisableCapture(NULL, D3D10_DST_VS, 0, 1);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
result.VS = 0; result.VS = 0;
hr = D3D10StateBlockMaskEnableCapture(&result, D3D10_DST_VS, 0, 1); hr = D3D10StateBlockMaskEnableCapture(&result, D3D10_DST_VS, 0, 1);
ok(SUCCEEDED(hr), "D3D10StateBlockMaskEnableCapture failed, hr %#x.\n", hr); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(result.VS == 0x01, "Got unexpected result.VS %#x.\n", result.VS); ok(result.VS == 0x01, "Got unexpected result.VS %#x.\n", result.VS);
hr = D3D10StateBlockMaskEnableCapture(&result, D3D10_DST_VS, 0, 4); hr = D3D10StateBlockMaskEnableCapture(&result, D3D10_DST_VS, 0, 4);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = D3D10StateBlockMaskEnableCapture(&result, D3D10_DST_VS, 1, 1); hr = D3D10StateBlockMaskEnableCapture(&result, D3D10_DST_VS, 1, 1);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = D3D10StateBlockMaskEnableCapture(NULL, D3D10_DST_VS, 0, 1); hr = D3D10StateBlockMaskEnableCapture(NULL, D3D10_DST_VS, 0, 1);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(capture_test); ++i) for (i = 0; i < ARRAY_SIZE(capture_test); ++i)
{ {
memset(&result, 0xff, sizeof(result)); memset(&result, 0xff, sizeof(result));
hr = D3D10StateBlockMaskDisableCapture(&result, D3D10_DST_VS_SHADER_RESOURCES, hr = D3D10StateBlockMaskDisableCapture(&result, D3D10_DST_VS_SHADER_RESOURCES,
capture_test[i].start_idx, capture_test[i].count); capture_test[i].start_idx, capture_test[i].count);
ok(SUCCEEDED(hr), "D3D10StateBlockMaskDisableCapture failed, hr %#x.\n", hr); ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
ok(!memcmp(result.VSShaderResources, capture_test[i].expected_disable, 5), ok(!memcmp(result.VSShaderResources, capture_test[i].expected_disable, 5),
"Got unexpected result.VSShaderResources[0..4] {%#x, %#x, %#x, %#x, %#x} for test %u.\n", "Got unexpected result.VSShaderResources[0..4] {%#x, %#x, %#x, %#x, %#x} for test %u.\n",
...@@ -169,7 +169,7 @@ static void test_stateblock_mask(void) ...@@ -169,7 +169,7 @@ static void test_stateblock_mask(void)
memset(&result, 0, sizeof(result)); memset(&result, 0, sizeof(result));
hr = D3D10StateBlockMaskEnableCapture(&result, D3D10_DST_VS_SHADER_RESOURCES, hr = D3D10StateBlockMaskEnableCapture(&result, D3D10_DST_VS_SHADER_RESOURCES,
capture_test[i].start_idx, capture_test[i].count); capture_test[i].start_idx, capture_test[i].count);
ok(SUCCEEDED(hr), "D3D10StateBlockMaskEnableCapture failed, hr %#x.\n", hr); ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
ok(!memcmp(result.VSShaderResources, capture_test[i].expected_enable, 5), ok(!memcmp(result.VSShaderResources, capture_test[i].expected_enable, 5),
"Got unexpected result.VSShaderResources[0..4] {%#x, %#x, %#x, %#x, %#x} for test %u.\n", "Got unexpected result.VSShaderResources[0..4] {%#x, %#x, %#x, %#x, %#x} for test %u.\n",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -22,6 +22,9 @@ ...@@ -22,6 +22,9 @@
* The functions are e.g.: D3DGet*SignatureBlob, D3DReflect * The functions are e.g.: D3DGet*SignatureBlob, D3DReflect
*/ */
#ifndef WINE_NO_LONG_TYPES
#define WINE_NO_LONG_TYPES
#endif
#define COBJMACROS #define COBJMACROS
#include "initguid.h" #include "initguid.h"
#include "d3dcompiler.h" #include "d3dcompiler.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment