Rebase against e06b7693d6f0980b1db2fa3b9920c7a925ceb8be.

This commit is contained in:
Sebastian Lackner
2017-08-31 23:11:13 +02:00
parent f98abfe0dc
commit c50463197f
8 changed files with 48 additions and 169 deletions

View File

@@ -1,4 +1,4 @@
From 40d6f33a858061a8449c6b90a795efe926a119bb Mon Sep 17 00:00:00 2001
From 493acad9e14688b4acb817ac1daa59b2f21ef809 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 25 Aug 2016 20:06:28 +0200
Subject: d3d11/tests: Prepare test_texture for non 2d textures.
@@ -8,10 +8,10 @@ Subject: d3d11/tests: Prepare test_texture for non 2d textures.
1 file changed, 87 insertions(+), 53 deletions(-)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index 6013ae94323..d5d41721bce 100644
index a9d03322283..daf5dbdbd55 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -6213,6 +6213,7 @@ static void test_texture(void)
@@ -6245,6 +6245,7 @@ static void test_texture(void)
};
struct texture
{
@@ -19,7 +19,7 @@ index 6013ae94323..d5d41721bce 100644
UINT width;
UINT height;
UINT miplevel_count;
@@ -6224,7 +6225,7 @@ static void test_texture(void)
@@ -6256,7 +6257,7 @@ static void test_texture(void)
D3D11_SHADER_RESOURCE_VIEW_DESC srv_desc;
struct d3d11_test_context test_context;
const struct texture *current_texture;
@@ -28,7 +28,7 @@ index 6013ae94323..d5d41721bce 100644
D3D11_SAMPLER_DESC sampler_desc;
const struct shader *current_ps;
D3D_FEATURE_LEVEL feature_level;
@@ -6232,7 +6233,7 @@ static void test_texture(void)
@@ -6264,7 +6265,7 @@ static void test_texture(void)
ID3D11DeviceContext *context;
ID3D11SamplerState *sampler;
struct resource_readback rb;
@@ -37,7 +37,7 @@ index 6013ae94323..d5d41721bce 100644
struct vec4 ps_constant;
ID3D11PixelShader *ps;
ID3D11Device *device;
@@ -6593,6 +6594,7 @@ static void test_texture(void)
@@ -6625,6 +6626,7 @@ static void test_texture(void)
};
static const struct texture rgba_texture =
{
@@ -45,7 +45,7 @@ index 6013ae94323..d5d41721bce 100644
4, 4, 3, 1, DXGI_FORMAT_R8G8B8A8_UNORM,
{
{rgba_level_0, 4 * sizeof(*rgba_level_0), 0},
@@ -6600,33 +6602,51 @@ static void test_texture(void)
@@ -6632,33 +6634,51 @@ static void test_texture(void)
{rgba_level_2, sizeof(*rgba_level_2), 0},
}
};
@@ -120,7 +120,7 @@ index 6013ae94323..d5d41721bce 100644
4, 4, 1, 3, DXGI_FORMAT_R8G8B8A8_UNORM,
{
{red_data, 6 * sizeof(*red_data)},
@@ -6634,11 +6654,14 @@ static void test_texture(void)
@@ -6666,11 +6686,14 @@ static void test_texture(void)
{blue_data, 5 * sizeof(*blue_data)},
}
};
@@ -138,7 +138,7 @@ index 6013ae94323..d5d41721bce 100644
{{r9g9b9e5_data, 4 * sizeof(*r9g9b9e5_data)}}};
static const DWORD red_colors[] =
{
@@ -6936,12 +6959,12 @@ static void test_texture(void)
@@ -6968,12 +6991,12 @@ static void test_texture(void)
ID3D11DeviceContext_PSSetConstantBuffers(context, 0, 1, &cb);
@@ -157,7 +157,7 @@ index 6013ae94323..d5d41721bce 100644
sampler_desc.Filter = D3D11_FILTER_MIN_MAG_MIP_POINT;
sampler_desc.AddressU = D3D11_TEXTURE_ADDRESS_CLAMP;
@@ -6999,7 +7022,7 @@ static void test_texture(void)
@@ -7031,7 +7054,7 @@ static void test_texture(void)
if (current_texture != test->texture)
{
if (texture)
@@ -166,7 +166,7 @@ index 6013ae94323..d5d41721bce 100644
if (srv)
ID3D11ShaderResourceView_Release(srv);
@@ -7007,16 +7030,23 @@ static void test_texture(void)
@@ -7039,16 +7062,23 @@ static void test_texture(void)
if (current_texture)
{
@@ -198,7 +198,7 @@ index 6013ae94323..d5d41721bce 100644
ok(SUCCEEDED(hr), "Test %u: Failed to create shader resource view, hr %#x.\n", i, hr);
}
else
@@ -7070,7 +7100,7 @@ static void test_texture(void)
@@ -7102,7 +7132,7 @@ static void test_texture(void)
ID3D11ShaderResourceView_Release(srv);
ID3D11SamplerState_Release(sampler);
if (texture)
@@ -206,8 +206,8 @@ index 6013ae94323..d5d41721bce 100644
+ ID3D11Resource_Release(texture);
ID3D11PixelShader_Release(ps);
if (is_warp_device(device) && feature_level < D3D_FEATURE_LEVEL_10_1)
@@ -7115,26 +7145,30 @@ static void test_texture(void)
if (is_warp_device(device) && feature_level < D3D_FEATURE_LEVEL_11_0)
@@ -7147,26 +7177,30 @@ static void test_texture(void)
if (current_texture != test->texture)
{
@@ -246,7 +246,7 @@ index 6013ae94323..d5d41721bce 100644
ok(SUCCEEDED(hr), "Test %u: Failed to create shader resource view, hr %#x.\n", i, hr);
ID3D11DeviceContext_PSSetShaderResources(context, 0, 1, &srv);
@@ -7159,7 +7193,7 @@ static void test_texture(void)
@@ -7191,7 +7225,7 @@ static void test_texture(void)
release_resource_readback(&rb);
}
ID3D11PixelShader_Release(ps);
@@ -256,5 +256,5 @@ index 6013ae94323..d5d41721bce 100644
ID3D11SamplerState_Release(sampler);
--
2.12.2
2.14.1