You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against d00f7315e0cec0c2fe34ba5ab2b55cf5718860dd.
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
From 6a2fdc55c5d480b3bd0a26d3aaed1b31e4a7f8bb Mon Sep 17 00:00:00 2001
|
||||
From a30b83149208635d5e114f553c98ea8af569cbeb 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.
|
||||
|
||||
---
|
||||
dlls/d3d11/tests/d3d11.c | 131 +++++++++++++++++++++++++++++------------------
|
||||
1 file changed, 81 insertions(+), 50 deletions(-)
|
||||
dlls/d3d11/tests/d3d11.c | 137 +++++++++++++++++++++++++++++------------------
|
||||
1 file changed, 85 insertions(+), 52 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
|
||||
index 0dd286d..7768cdb 100644
|
||||
index 21c5627b862..1a3adee346f 100644
|
||||
--- a/dlls/d3d11/tests/d3d11.c
|
||||
+++ b/dlls/d3d11/tests/d3d11.c
|
||||
@@ -5671,6 +5671,7 @@ static void test_texture(void)
|
||||
@@ -5955,6 +5955,7 @@ static void test_texture(void)
|
||||
};
|
||||
struct texture
|
||||
{
|
||||
@@ -19,7 +19,7 @@ index 0dd286d..7768cdb 100644
|
||||
UINT width;
|
||||
UINT height;
|
||||
UINT miplevel_count;
|
||||
@@ -5682,7 +5683,7 @@ static void test_texture(void)
|
||||
@@ -5966,7 +5967,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 0dd286d..7768cdb 100644
|
||||
D3D11_SAMPLER_DESC sampler_desc;
|
||||
const struct shader *current_ps;
|
||||
D3D_FEATURE_LEVEL feature_level;
|
||||
@@ -5690,7 +5691,7 @@ static void test_texture(void)
|
||||
@@ -5974,7 +5975,7 @@ static void test_texture(void)
|
||||
ID3D11DeviceContext *context;
|
||||
ID3D11SamplerState *sampler;
|
||||
struct resource_readback rb;
|
||||
@@ -37,7 +37,7 @@ index 0dd286d..7768cdb 100644
|
||||
struct vec4 ps_constant;
|
||||
ID3D11PixelShader *ps;
|
||||
ID3D11Device *device;
|
||||
@@ -6030,6 +6031,7 @@ static void test_texture(void)
|
||||
@@ -6328,6 +6329,7 @@ static void test_texture(void)
|
||||
};
|
||||
static const struct texture rgba_texture =
|
||||
{
|
||||
@@ -45,7 +45,7 @@ index 0dd286d..7768cdb 100644
|
||||
4, 4, 3, 1, DXGI_FORMAT_R8G8B8A8_UNORM,
|
||||
{
|
||||
{rgba_level_0, 4 * sizeof(*rgba_level_0), 0},
|
||||
@@ -6037,33 +6039,51 @@ static void test_texture(void)
|
||||
@@ -6335,33 +6337,51 @@ static void test_texture(void)
|
||||
{rgba_level_2, sizeof(*rgba_level_2), 0},
|
||||
}
|
||||
};
|
||||
@@ -120,7 +120,21 @@ index 0dd286d..7768cdb 100644
|
||||
4, 4, 1, 3, DXGI_FORMAT_R8G8B8A8_UNORM,
|
||||
{
|
||||
{red_data, 6 * sizeof(*red_data)},
|
||||
@@ -6338,12 +6358,12 @@ static void test_texture(void)
|
||||
@@ -6369,9 +6389,11 @@ static void test_texture(void)
|
||||
{blue_data, 5 * sizeof(*blue_data)},
|
||||
}
|
||||
};
|
||||
- static const struct texture r32f_typeless = {4, 4, 1, 1, DXGI_FORMAT_R32_TYPELESS,
|
||||
+ static const struct texture r32f_typeless = {D3D11_RESOURCE_DIMENSION_TEXTURE2D,
|
||||
+ 4, 4, 1, 1, DXGI_FORMAT_R32_TYPELESS,
|
||||
{{r32_float, 4 * sizeof(*r32_float)}}};
|
||||
- static const struct texture r32u_typeless = {4, 4, 1, 1, DXGI_FORMAT_R32_TYPELESS,
|
||||
+ static const struct texture r32u_typeless = {D3D11_RESOURCE_DIMENSION_TEXTURE2D,
|
||||
+ 4, 4, 1, 1, DXGI_FORMAT_R32_TYPELESS,
|
||||
{{r32_uint, 4 * sizeof(*r32_uint)}}};
|
||||
static const DWORD red_colors[] =
|
||||
{
|
||||
@@ -6660,12 +6682,12 @@ static void test_texture(void)
|
||||
|
||||
ID3D11DeviceContext_PSSetConstantBuffers(context, 0, 1, &cb);
|
||||
|
||||
@@ -139,7 +153,7 @@ index 0dd286d..7768cdb 100644
|
||||
|
||||
sampler_desc.Filter = D3D11_FILTER_MIN_MAG_MIP_POINT;
|
||||
sampler_desc.AddressU = D3D11_TEXTURE_ADDRESS_CLAMP;
|
||||
@@ -6401,7 +6421,7 @@ static void test_texture(void)
|
||||
@@ -6723,7 +6745,7 @@ static void test_texture(void)
|
||||
if (current_texture != test->texture)
|
||||
{
|
||||
if (texture)
|
||||
@@ -148,7 +162,7 @@ index 0dd286d..7768cdb 100644
|
||||
if (srv)
|
||||
ID3D11ShaderResourceView_Release(srv);
|
||||
|
||||
@@ -6409,16 +6429,23 @@ static void test_texture(void)
|
||||
@@ -6731,16 +6753,23 @@ static void test_texture(void)
|
||||
|
||||
if (current_texture)
|
||||
{
|
||||
@@ -166,21 +180,21 @@ index 0dd286d..7768cdb 100644
|
||||
+ texture2d_desc.MipLevels = current_texture->miplevel_count;
|
||||
+ texture2d_desc.ArraySize = current_texture->array_size;
|
||||
+ texture2d_desc.Format = current_texture->format;
|
||||
+
|
||||
|
||||
- hr = ID3D11Device_CreateTexture2D(device, &texture_desc, current_texture->data, &texture);
|
||||
- ok(SUCCEEDED(hr), "Test %u: Failed to create 2d texture, hr %#x.\n", i, hr);
|
||||
+ hr = ID3D11Device_CreateTexture2D(device, &texture2d_desc, current_texture->data, &texture2d);
|
||||
+ ok(SUCCEEDED(hr), "Test %u: Failed to create 2d texture, hr %#x.\n", i, hr);
|
||||
+ texture = (ID3D11Resource *)texture2d;
|
||||
+ }
|
||||
|
||||
- hr = ID3D11Device_CreateTexture2D(device, &texture_desc, current_texture->data, &texture);
|
||||
- ok(SUCCEEDED(hr), "Test %u: Failed to create 2d texture, hr %#x.\n", i, hr);
|
||||
|
||||
- hr = ID3D11Device_CreateShaderResourceView(device, (ID3D11Resource *)texture, NULL, &srv);
|
||||
+
|
||||
+ hr = ID3D11Device_CreateShaderResourceView(device, texture, NULL, &srv);
|
||||
ok(SUCCEEDED(hr), "Test %u: Failed to create shader resource view, hr %#x.\n", i, hr);
|
||||
}
|
||||
else
|
||||
@@ -6472,7 +6499,7 @@ static void test_texture(void)
|
||||
@@ -6794,7 +6823,7 @@ static void test_texture(void)
|
||||
ID3D11ShaderResourceView_Release(srv);
|
||||
ID3D11SamplerState_Release(sampler);
|
||||
if (texture)
|
||||
@@ -189,7 +203,7 @@ index 0dd286d..7768cdb 100644
|
||||
ID3D11PixelShader_Release(ps);
|
||||
|
||||
if (is_warp_device(device) && feature_level < D3D_FEATURE_LEVEL_10_1)
|
||||
@@ -6517,26 +6544,30 @@ static void test_texture(void)
|
||||
@@ -6839,26 +6868,30 @@ static void test_texture(void)
|
||||
|
||||
if (current_texture != test->texture)
|
||||
{
|
||||
@@ -228,7 +242,7 @@ index 0dd286d..7768cdb 100644
|
||||
ok(SUCCEEDED(hr), "Test %u: Failed to create shader resource view, hr %#x.\n", i, hr);
|
||||
|
||||
ID3D11DeviceContext_PSSetShaderResources(context, 0, 1, &srv);
|
||||
@@ -6561,7 +6592,7 @@ static void test_texture(void)
|
||||
@@ -6883,7 +6916,7 @@ static void test_texture(void)
|
||||
release_resource_readback(&rb);
|
||||
}
|
||||
ID3D11PixelShader_Release(ps);
|
||||
@@ -238,5 +252,5 @@ index 0dd286d..7768cdb 100644
|
||||
ID3D11SamplerState_Release(sampler);
|
||||
|
||||
--
|
||||
2.8.1
|
||||
2.11.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 90cf55bb0be99d5e1244e4c5ec2ff0b7aecb39ef Mon Sep 17 00:00:00 2001
|
||||
From b2cf9ce61714a32e5f1727711b349a42b372bf10 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:15:54 +0200
|
||||
Subject: d3d11/tests: Add some basic 1d texture tests in test_texture.
|
||||
@@ -8,13 +8,13 @@ Subject: d3d11/tests: Add some basic 1d texture tests in test_texture.
|
||||
1 file changed, 109 insertions(+)
|
||||
|
||||
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
|
||||
index 50dc3b9..f5279ea 100644
|
||||
index 268ba4cc77d..28802d3ea8f 100644
|
||||
--- a/dlls/d3d11/tests/d3d11.c
|
||||
+++ b/dlls/d3d11/tests/d3d11.c
|
||||
@@ -5732,6 +5732,37 @@ static void test_texture(void)
|
||||
0x00000000, 0x00100e46, 0x00000000, 0x0700002d, 0x001020f2, 0x00000000, 0x00100e46, 0x00000000,
|
||||
@@ -6017,6 +6017,38 @@ static void test_texture(void)
|
||||
0x00107e46, 0x00000000, 0x0100003e,
|
||||
};
|
||||
static const struct shader ps_ld = {ps_ld_code, sizeof(ps_ld_code)};
|
||||
+ static const DWORD ps_ld_1d_code[] =
|
||||
+ {
|
||||
+#if 0
|
||||
@@ -46,13 +46,14 @@ index 50dc3b9..f5279ea 100644
|
||||
+ 0x00000000, 0x00100e46, 0x00000000, 0x0700002d, 0x001020f2, 0x00000000, 0x00100e46, 0x00000000,
|
||||
+ 0x00107e46, 0x00000000, 0x0100003e,
|
||||
+ };
|
||||
+ static const struct shader ps_ld_1d = {ps_ld_1d_code, sizeof(ps_ld_1d_code)};
|
||||
static const DWORD ps_ld_sint8_code[] =
|
||||
{
|
||||
#if 0
|
||||
@@ -5916,13 +5947,46 @@ static void test_texture(void)
|
||||
0x0020800a, 0x00000000, 0x00000000, 0x09000045, 0x001020f2, 0x00000000, 0x00100246, 0x00000000,
|
||||
0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0100003e,
|
||||
@@ -6175,6 +6207,38 @@ static void test_texture(void)
|
||||
0x0020800a, 0x00000000, 0x00000000, 0x0100003e,
|
||||
};
|
||||
static const struct shader ps_sample_l = {ps_sample_l_code, sizeof(ps_sample_l_code)};
|
||||
+ static const DWORD ps_sample_1d_array_code[] =
|
||||
+ {
|
||||
+#if 0
|
||||
@@ -84,19 +85,11 @@ index 50dc3b9..f5279ea 100644
|
||||
+ 0x09000045, 0x001020f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000,
|
||||
+ 0x00000000, 0x0100003e,
|
||||
+ };
|
||||
static const struct shader ps_ld = {ps_ld_code, sizeof(ps_ld_code)};
|
||||
+ static const struct shader ps_ld_1d = {ps_ld_1d_code, sizeof(ps_ld_1d_code)};
|
||||
static const struct shader ps_ld_sint8 = {ps_ld_sint8_code, sizeof(ps_ld_sint8_code)};
|
||||
static const struct shader ps_ld_uint8 = {ps_ld_uint8_code, sizeof(ps_ld_uint8_code)};
|
||||
static const struct shader ps_sample = {ps_sample_code, sizeof(ps_sample_code)};
|
||||
static const struct shader ps_sample_b = {ps_sample_b_code, sizeof(ps_sample_b_code)};
|
||||
static const struct shader ps_sample_l = {ps_sample_l_code, sizeof(ps_sample_l_code)};
|
||||
static const struct shader ps_sample_2d_array = {ps_sample_2d_array_code, sizeof(ps_sample_2d_array_code)};
|
||||
+ static const struct shader ps_sample_1d_array = {ps_sample_1d_array_code, sizeof(ps_sample_1d_array_code)};
|
||||
static const DWORD red_data[] =
|
||||
static const DWORD ps_sample_2d_array_code[] =
|
||||
{
|
||||
0xff0000ff, 0xff0000ff, 0xff0000ff, 0xff0000ff, 0x00000000, 0x00000000,
|
||||
@@ -6040,8 +6104,20 @@ static void test_texture(void)
|
||||
#if 0
|
||||
@@ -6338,8 +6402,20 @@ static void test_texture(void)
|
||||
{rgba_level_2, sizeof(*rgba_level_2), 0},
|
||||
}
|
||||
};
|
||||
@@ -117,7 +110,7 @@ index 50dc3b9..f5279ea 100644
|
||||
static const struct texture srgb_typeless = {D3D11_RESOURCE_DIMENSION_TEXTURE2D,
|
||||
4, 4, 1, 1, DXGI_FORMAT_R8G8B8A8_TYPELESS, {{srgb_data, 4 * sizeof(*srgb_data)}}};
|
||||
static const struct texture a8_texture = {D3D11_RESOURCE_DIMENSION_TEXTURE2D,
|
||||
@@ -6092,6 +6168,16 @@ static void test_texture(void)
|
||||
@@ -6390,6 +6466,16 @@ static void test_texture(void)
|
||||
{blue_data, 5 * sizeof(*blue_data)},
|
||||
}
|
||||
};
|
||||
@@ -131,10 +124,10 @@ index 50dc3b9..f5279ea 100644
|
||||
+ {blue_data, 0},
|
||||
+ }
|
||||
+ };
|
||||
static const DWORD red_colors[] =
|
||||
{
|
||||
0xff0000ff, 0xff0000ff, 0xff0000ff, 0xff0000ff,
|
||||
@@ -6195,6 +6281,11 @@ static void test_texture(void)
|
||||
static const struct texture r32f_typeless = {D3D11_RESOURCE_DIMENSION_TEXTURE2D,
|
||||
4, 4, 1, 1, DXGI_FORMAT_R32_TYPELESS,
|
||||
{{r32_float, 4 * sizeof(*r32_float)}}};
|
||||
@@ -6513,6 +6599,11 @@ static void test_texture(void)
|
||||
#define POINT D3D11_FILTER_MIN_MAG_MIP_POINT
|
||||
#define POINT_LINEAR D3D11_FILTER_MIN_MAG_POINT_MIP_LINEAR
|
||||
#define MIP_MAX D3D11_FLOAT32_MAX
|
||||
@@ -146,7 +139,7 @@ index 50dc3b9..f5279ea 100644
|
||||
{&ps_ld, &rgba_texture, POINT, 0.0f, 0.0f, 0.0f, 0.0f, rgba_level_0},
|
||||
{&ps_ld, &rgba_texture, POINT, 0.0f, 0.0f, 0.0f, 1.0f, level_1_colors},
|
||||
{&ps_ld, &rgba_texture, POINT, 0.0f, 0.0f, 0.0f, 2.0f, level_2_colors},
|
||||
@@ -6280,6 +6371,24 @@ static void test_texture(void)
|
||||
@@ -6598,6 +6689,24 @@ static void test_texture(void)
|
||||
{&ps_sample_l, NULL, POINT, 2.0f, 2.0f, 0.0f, 1.0f, zero_colors},
|
||||
{&ps_sample_l, NULL, POINT, 2.0f, 2.0f, MIP_MAX, 0.0f, zero_colors},
|
||||
{&ps_sample_l, NULL, POINT, 2.0f, 2.0f, MIP_MAX, 1.0f, zero_colors},
|
||||
@@ -172,5 +165,5 @@ index 50dc3b9..f5279ea 100644
|
||||
{&ps_sample_2d_array, &array_2d_texture, POINT, 0.0f, 0.0f, MIP_MAX, -1.0f, red_colors},
|
||||
{&ps_sample_2d_array, &array_2d_texture, POINT, 0.0f, 0.0f, MIP_MAX, 0.0f, red_colors},
|
||||
--
|
||||
2.8.1
|
||||
2.11.0
|
||||
|
||||
|
Reference in New Issue
Block a user