From: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/d3d10_1/tests/d3d10_1.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
diff --git a/dlls/d3d10_1/tests/d3d10_1.c b/dlls/d3d10_1/tests/d3d10_1.c index 75b01c89903..ad7aaeb0dc4 100644 --- a/dlls/d3d10_1/tests/d3d10_1.c +++ b/dlls/d3d10_1/tests/d3d10_1.c @@ -1039,6 +1039,20 @@ static void test_fx_4_1_blend_state(void) ok(!refcount, "Device has %lu references left.\n", refcount); }
+static void test_shader_profiles(void) +{ + const char *profile; + + profile = D3D10GetVertexShaderProfile(NULL); + ok(!strcmp(profile, "vs_4_0"), "Unexpected profile %s.\n", profile); + + profile = D3D10GetGeometryShaderProfile(NULL); + ok(!strcmp(profile, "gs_4_0"), "Unexpected profile %s.\n", profile); + + profile = D3D10GetPixelShaderProfile(NULL); + ok(!strcmp(profile, "ps_4_0"), "Unexpected profile %s.\n", profile); +} + START_TEST(d3d10_1) { test_create_device(); @@ -1047,4 +1061,5 @@ START_TEST(d3d10_1) test_create_blend_state(); test_getdc(); test_fx_4_1_blend_state(); + test_shader_profiles(); }
From: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/d3d10_1/tests/d3d10_1.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
diff --git a/dlls/d3d10_1/tests/d3d10_1.c b/dlls/d3d10_1/tests/d3d10_1.c index ad7aaeb0dc4..e3cd3943594 100644 --- a/dlls/d3d10_1/tests/d3d10_1.c +++ b/dlls/d3d10_1/tests/d3d10_1.c @@ -1053,6 +1053,30 @@ static void test_shader_profiles(void) ok(!strcmp(profile, "ps_4_0"), "Unexpected profile %s.\n", profile); }
+static void test_compile_effect(void) +{ + char default_bs_source[] = "BlendState default_blend_state {};"; + char bs_source2[] = + "BlendState blend_state\n" + "{\n" + " srcblend[0] = zero;\n" + "};"; + ID3D10Blob *blob; + HRESULT hr; + + hr = D3D10CompileEffectFromMemory(default_bs_source, strlen(default_bs_source), + NULL, NULL, NULL, 0, 0, &blob, NULL); + todo_wine + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + if (SUCCEEDED(hr)) + ID3D10Blob_Release(blob); + + /* Compilation fails due to 10.1 feature incompatibility with fx_4_0 profile. */ + hr = D3D10CompileEffectFromMemory(bs_source2, strlen(bs_source2), NULL, NULL, NULL, + 0, 0, &blob, NULL); + ok(hr == E_FAIL, "Unexpected hr %#lx.\n", hr); +} + START_TEST(d3d10_1) { test_create_device(); @@ -1062,4 +1086,5 @@ START_TEST(d3d10_1) test_getdc(); test_fx_4_1_blend_state(); test_shader_profiles(); + test_compile_effect(); }
This merge request was approved by Matteo Bruni.