mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Rebase against d00f7315e0cec0c2fe34ba5ab2b55cf5718860dd.
This commit is contained in:
parent
1ff77100b8
commit
6057508b9b
@ -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
|
||||
|
||||
|
@ -52,7 +52,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "8af23cb93e4e1cd3686984399cb50d755f5171e3"
|
||||
echo "d00f7315e0cec0c2fe34ba5ab2b55cf5718860dd"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -8413,7 +8413,6 @@ if test "$enable_wined3d_CSMT_Main" -eq 1; then
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Get rid of the end_scene flush and finish.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Send update_texture calls through the CS.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Send update_sub_resource calls through the command stream.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Unload resources through the CS in uninit_3d.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Unload resources through the CS in device_reset.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Send getdc and releasedc through the command stream.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Create dummy textures through the CS.", 1 },';
|
||||
@ -8432,7 +8431,6 @@ if test "$enable_wined3d_CSMT_Main" -eq 1; then
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Move the framebuffer into wined3d_state.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Don'\''t access device state in clears.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Delete GL contexts through the CS in reset.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Delete GL contexts through the CS in uninit_3d.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Add swapchain waits.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Avoid destroying views in color and depth fills.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Run the cs asynchronously.", 1 },';
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 17b9cfdf3a6e5823b9cfa3df256e4bd892943762 Mon Sep 17 00:00:00 2001
|
||||
From 2a8c68c26efe1070dec94a6a5ccba281311756b7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 6 Jun 2015 06:53:34 +0200
|
||||
Subject: wined3d: Use real values for memory accounting on NVIDIA cards.
|
||||
@ -11,10 +11,10 @@ Subject: wined3d: Use real values for memory accounting on NVIDIA cards.
|
||||
4 files changed, 41 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
|
||||
index 8860bce..b345d1f 100644
|
||||
index 5aba575cc38..894b3324f90 100644
|
||||
--- a/dlls/d3d9/tests/device.c
|
||||
+++ b/dlls/d3d9/tests/device.c
|
||||
@@ -8857,10 +8857,13 @@ static void test_vidmem_accounting(void)
|
||||
@@ -9063,10 +9063,13 @@ static void test_vidmem_accounting(void)
|
||||
}
|
||||
vidmem_end = IDirect3DDevice9_GetAvailableTextureMem(device);
|
||||
|
||||
@ -33,10 +33,10 @@ index 8860bce..b345d1f 100644
|
||||
for (i = 0; i < sizeof(textures) / sizeof(*textures); i++)
|
||||
{
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index d1f77ca..312c8c1 100644
|
||||
index a7ee5bc099d..5b74a2b7b6c 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -1278,8 +1278,31 @@ void CDECL wined3d_device_set_multithreaded(struct wined3d_device *device)
|
||||
@@ -1258,8 +1258,31 @@ void CDECL wined3d_device_set_multithreaded(struct wined3d_device *device)
|
||||
|
||||
UINT CDECL wined3d_device_get_available_texture_mem(const struct wined3d_device *device)
|
||||
{
|
||||
@ -51,7 +51,7 @@ index d1f77ca..312c8c1 100644
|
||||
+ GLint vram_free_kb;
|
||||
+ UINT64 vram_free;
|
||||
+
|
||||
+ struct wined3d_context *context = context_acquire(device, NULL);
|
||||
+ struct wined3d_context *context = context_acquire(device, NULL, 0);
|
||||
+ gl_info->gl_ops.gl.p_glGetIntegerv(GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, &vram_free_kb);
|
||||
+ vram_free = (UINT64)vram_free_kb * 1024;
|
||||
+ context_release(context);
|
||||
@ -69,10 +69,10 @@ index d1f77ca..312c8c1 100644
|
||||
wine_dbgstr_longlong(device->adapter->vram_bytes),
|
||||
wine_dbgstr_longlong(device->adapter->vram_bytes_used),
|
||||
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
|
||||
index 43208b6f..8b26472 100644
|
||||
index 0f44e09e839..a213e2a5327 100644
|
||||
--- a/dlls/wined3d/directx.c
|
||||
+++ b/dlls/wined3d/directx.c
|
||||
@@ -228,6 +228,7 @@ static const struct wined3d_extension_map gl_extension_map[] =
|
||||
@@ -250,6 +250,7 @@ static const struct wined3d_extension_map gl_extension_map[] =
|
||||
{"GL_NV_vertex_program2", NV_VERTEX_PROGRAM2 },
|
||||
{"GL_NV_vertex_program2_option", NV_VERTEX_PROGRAM2_OPTION },
|
||||
{"GL_NV_vertex_program3", NV_VERTEX_PROGRAM3 },
|
||||
@ -80,7 +80,7 @@ index 43208b6f..8b26472 100644
|
||||
|
||||
/* SGI */
|
||||
{"GL_SGIS_generate_mipmap", SGIS_GENERATE_MIPMAP },
|
||||
@@ -1444,6 +1445,15 @@ static const struct gpu_description *query_gpu_description(const struct wined3d_
|
||||
@@ -1516,6 +1517,15 @@ static const struct gpu_description *query_gpu_description(const struct wined3d_
|
||||
TRACE("Card reports vendor PCI ID 0x%04x, device PCI ID 0x%04x, 0x%s bytes of video memory.\n",
|
||||
vendor, device, wine_dbgstr_longlong(*vram_bytes));
|
||||
}
|
||||
@ -97,10 +97,10 @@ index 43208b6f..8b26472 100644
|
||||
if (wined3d_settings.pci_vendor_id != PCI_VENDOR_NONE)
|
||||
{
|
||||
diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h
|
||||
index 356ee7c..2fb21ff 100644
|
||||
index e500df65635..06252d5711f 100644
|
||||
--- a/dlls/wined3d/wined3d_gl.h
|
||||
+++ b/dlls/wined3d/wined3d_gl.h
|
||||
@@ -161,6 +161,7 @@ enum wined3d_gl_extension
|
||||
@@ -180,6 +180,7 @@ enum wined3d_gl_extension
|
||||
NV_VERTEX_PROGRAM2,
|
||||
NV_VERTEX_PROGRAM2_OPTION,
|
||||
NV_VERTEX_PROGRAM3,
|
||||
@ -109,5 +109,5 @@ index 356ee7c..2fb21ff 100644
|
||||
SGIS_GENERATE_MIPMAP,
|
||||
/* WGL extensions */
|
||||
--
|
||||
2.8.0
|
||||
2.11.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From b79fac0cba54644719f1993f48550212666185ee Mon Sep 17 00:00:00 2001
|
||||
From 821cc7c5d0922b0e3eea0e2ce8d5dcc37ecca6d3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Tue, 1 Oct 2013 14:31:56 +0200
|
||||
Subject: wined3d: Hackily introduce a multithreaded command stream
|
||||
@ -14,7 +14,7 @@ Subject: wined3d: Hackily introduce a multithreaded command stream
|
||||
7 files changed, 517 insertions(+), 67 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c
|
||||
index 8cb90b796b8..b1b57a261a3 100644
|
||||
index dc9f77f302e..6197ea2ce8a 100644
|
||||
--- a/dlls/d3d10core/tests/device.c
|
||||
+++ b/dlls/d3d10core/tests/device.c
|
||||
@@ -3772,7 +3772,7 @@ static void test_occlusion_query(void)
|
||||
@ -27,10 +27,10 @@ index 8cb90b796b8..b1b57a261a3 100644
|
||||
memset(&data, 0xff, sizeof(data));
|
||||
hr = ID3D10Asynchronous_GetData(query, &data, sizeof(DWORD), 0);
|
||||
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
|
||||
index e477f220817..380224e2de7 100644
|
||||
index ab3fa83a103..be7ef5b3b1a 100644
|
||||
--- a/dlls/d3d11/tests/d3d11.c
|
||||
+++ b/dlls/d3d11/tests/d3d11.c
|
||||
@@ -5255,7 +5255,7 @@ static void test_occlusion_query(void)
|
||||
@@ -5271,7 +5271,7 @@ static void test_occlusion_query(void)
|
||||
memset(&data, 0xff, sizeof(data));
|
||||
hr = ID3D11DeviceContext_GetData(context, query, &data, sizeof(data), 0);
|
||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
@ -39,7 +39,7 @@ index e477f220817..380224e2de7 100644
|
||||
|
||||
memset(&data, 0xff, sizeof(data));
|
||||
hr = ID3D11DeviceContext_GetData(context, query, &data, sizeof(DWORD), 0);
|
||||
@@ -9543,7 +9543,7 @@ static void test_draw_uav_only(void)
|
||||
@@ -9606,7 +9606,7 @@ static void test_draw_uav_only(void)
|
||||
draw_quad(&test_context);
|
||||
draw_quad(&test_context);
|
||||
draw_quad(&test_context);
|
||||
@ -48,7 +48,7 @@ index e477f220817..380224e2de7 100644
|
||||
|
||||
ID3D11PixelShader_Release(ps);
|
||||
ID3D11Texture2D_Release(texture);
|
||||
@@ -13215,12 +13215,12 @@ static void test_cs_uav_store(void)
|
||||
@@ -13278,12 +13278,12 @@ static void test_cs_uav_store(void)
|
||||
ID3D11DeviceContext_CSSetShader(context, cs, NULL, 0);
|
||||
|
||||
ID3D11DeviceContext_Dispatch(context, 1, 1, 1);
|
||||
@ -63,7 +63,7 @@ index e477f220817..380224e2de7 100644
|
||||
|
||||
ID3D11ComputeShader_Release(cs);
|
||||
|
||||
@@ -13228,19 +13228,19 @@ static void test_cs_uav_store(void)
|
||||
@@ -13291,19 +13291,19 @@ static void test_cs_uav_store(void)
|
||||
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)cb, 0, NULL, &input, 0, 0);
|
||||
ID3D11DeviceContext_CSSetShader(context, NULL, NULL, 0);
|
||||
ID3D11DeviceContext_Dispatch(context, 1, 1, 1);
|
||||
@ -86,7 +86,7 @@ index e477f220817..380224e2de7 100644
|
||||
|
||||
ID3D11ComputeShader_Release(cs);
|
||||
|
||||
@@ -13251,17 +13251,17 @@ static void test_cs_uav_store(void)
|
||||
@@ -13314,17 +13314,17 @@ static void test_cs_uav_store(void)
|
||||
input.x = 1.0f;
|
||||
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)cb, 0, NULL, &input, 0, 0);
|
||||
ID3D11DeviceContext_Dispatch(context, texture_desc.Width, texture_desc.Height, 1);
|
||||
@ -108,7 +108,7 @@ index e477f220817..380224e2de7 100644
|
||||
|
||||
ID3D11ComputeShader_Release(cs);
|
||||
|
||||
@@ -13273,16 +13273,16 @@ static void test_cs_uav_store(void)
|
||||
@@ -13336,16 +13336,16 @@ static void test_cs_uav_store(void)
|
||||
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)cb, 0, NULL, &input, 0, 0);
|
||||
ID3D11DeviceContext_Dispatch(context, 15, 15, 1);
|
||||
SetRect(&rect, 0, 0, 60, 60);
|
||||
@ -129,7 +129,7 @@ index e477f220817..380224e2de7 100644
|
||||
|
||||
ID3D11ComputeShader_Release(cs);
|
||||
|
||||
@@ -13293,12 +13293,12 @@ static void test_cs_uav_store(void)
|
||||
@@ -13356,12 +13356,12 @@ static void test_cs_uav_store(void)
|
||||
input.x = 0.3f;
|
||||
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)cb, 0, NULL, &input, 0, 0);
|
||||
ID3D11DeviceContext_Dispatch(context, 1, 1, 1);
|
||||
@ -144,7 +144,7 @@ index e477f220817..380224e2de7 100644
|
||||
|
||||
ID3D11ComputeShader_Release(cs);
|
||||
|
||||
@@ -13451,10 +13451,10 @@ static void test_ps_cs_uav_binding(void)
|
||||
@@ -13514,10 +13514,10 @@ static void test_ps_cs_uav_binding(void)
|
||||
ID3D11DeviceContext_PSSetShader(context, ps, NULL, 0);
|
||||
|
||||
ID3D11DeviceContext_Dispatch(context, 1, 1, 1);
|
||||
@ -157,7 +157,7 @@ index e477f220817..380224e2de7 100644
|
||||
check_texture_float(ps_texture, 1.0f, 2);
|
||||
|
||||
input.x = 0.5f;
|
||||
@@ -13473,10 +13473,10 @@ static void test_ps_cs_uav_binding(void)
|
||||
@@ -13536,10 +13536,10 @@ static void test_ps_cs_uav_binding(void)
|
||||
input.x = 4.0f;
|
||||
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)ps_cb, 0, NULL, &input, 0, 0);
|
||||
ID3D11DeviceContext_Dispatch(context, 1, 1, 1);
|
||||
@ -171,7 +171,7 @@ index e477f220817..380224e2de7 100644
|
||||
|
||||
ID3D11ComputeShader_Release(cs);
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index 778cd4679ff..d3b8c24f511 100644
|
||||
index b73c992d854..8483a28283f 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -1353,6 +1353,9 @@ void context_release(struct wined3d_context *context)
|
||||
@ -184,9 +184,9 @@ index 778cd4679ff..d3b8c24f511 100644
|
||||
if (!--context->level)
|
||||
{
|
||||
if (context_restore_pixel_format(context))
|
||||
@@ -3692,6 +3695,13 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device, str
|
||||
@@ -3702,6 +3705,13 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device,
|
||||
|
||||
TRACE("device %p, target %p.\n", device, target);
|
||||
TRACE("device %p, texture %p, sub_resource_idx %u.\n", device, texture, sub_resource_idx);
|
||||
|
||||
+ if (wined3d_settings.cs_multithreaded && device->cs->thread_id != GetCurrentThreadId())
|
||||
+ {
|
||||
@ -1231,10 +1231,10 @@ index 3a46a3c9a30..aabcb675044 100644
|
||||
HeapFree(GetProcessHeap(), 0, cs->data);
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
|
||||
index 3bdba105105..abb4a664c1a 100644
|
||||
index 880f82f12ce..90208e607f3 100644
|
||||
--- a/dlls/wined3d/query.c
|
||||
+++ b/dlls/wined3d/query.c
|
||||
@@ -347,7 +347,7 @@ HRESULT CDECL wined3d_query_get_data(struct wined3d_query *query,
|
||||
@@ -350,7 +350,7 @@ HRESULT CDECL wined3d_query_get_data(struct wined3d_query *query,
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@ -1274,7 +1274,7 @@ index e7962465279..a8409cfd4b8 100644
|
||||
if (hkey) RegCloseKey( hkey );
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 0931d6aea95..684a04716dd 100644
|
||||
index 02e9d949db9..9d969287efc 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -306,6 +306,7 @@ struct wined3d_settings
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 04ea21a9ee8a73a1c463118a26f315cbe83d5fbf Mon Sep 17 00:00:00 2001
|
||||
From ff5e660a852ffa512b61f5bf3f8755376fec0370 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Wed, 10 Apr 2013 20:09:55 +0200
|
||||
Subject: wined3d: Wait for the cs to finish before destroying the device
|
||||
@ -8,19 +8,19 @@ Subject: wined3d: Wait for the cs to finish before destroying the device
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index d20906e7cc5..71701a816da 100644
|
||||
index b1ecc73f9f3..a410e7e2be5 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -1130,6 +1130,9 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
@@ -1192,6 +1192,9 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
if (!device->d3d_initialized)
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
+ if (wined3d_settings.cs_multithreaded)
|
||||
+ device->cs->ops->submit_and_wait(device->cs);
|
||||
+
|
||||
/* I don't think that the interface guarantees that the device is destroyed from the same thread
|
||||
* it was created. Thus make sure a context is active for the glDelete* calls
|
||||
*/
|
||||
if (device->logo_texture)
|
||||
wined3d_texture_decref(device->logo_texture);
|
||||
if (device->cursor_texture)
|
||||
--
|
||||
2.11.0
|
||||
|
||||
|
@ -27,7 +27,7 @@ index 4fcc496bb2d..e236edd97f2 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
- context = context_acquire(device, NULL);
|
||||
- context = context_acquire(device, NULL, 0);
|
||||
- /* We only have to do this if we need to read the, swapbuffers performs a flush for us */
|
||||
- context->gl_info->gl_ops.gl.p_glFlush();
|
||||
- /* No checkGLcall here to avoid locking the lock just for checking a call that hardly ever
|
||||
|
@ -44,7 +44,7 @@ index 3747197a26e..9f7f8455a01 100644
|
||||
+ const struct wined3d_cs_update_texture *op = data;
|
||||
+ struct wined3d_context *context;
|
||||
+
|
||||
+ context = context_acquire(cs->device, NULL);
|
||||
+ context = context_acquire(cs->device, NULL, 0);
|
||||
+ device_exec_update_texture(context, op->src, op->dst);
|
||||
+ context_release(context);
|
||||
+
|
||||
@ -118,7 +118,7 @@ index e236edd97f2..f712113e86e 100644
|
||||
- return WINED3DERR_INVALIDCALL;
|
||||
- }
|
||||
-
|
||||
- context = context_acquire(device, NULL);
|
||||
- context = context_acquire(device, NULL, 0);
|
||||
+ TRACE("context %p, src_texture %p, src_level %u, dst_texture %p, level_count %u.\n",
|
||||
+ context, src_texture, src_level, dst_texture, level_count);
|
||||
|
||||
@ -251,7 +251,7 @@ index e236edd97f2..f712113e86e 100644
|
||||
}
|
||||
|
||||
- /* Make sure that the destination texture is loaded. */
|
||||
- context = context_acquire(device, NULL);
|
||||
- context = context_acquire(device, NULL, 0);
|
||||
- wined3d_texture_load(dst_texture, context, FALSE);
|
||||
- context_release(context);
|
||||
-
|
||||
|
@ -60,7 +60,7 @@ index 9f7f8455a01..f021b9320e5 100644
|
||||
+ addr.buffer_object = 0;
|
||||
+ addr.addr = op->data;
|
||||
+
|
||||
+ context = context_acquire(texture->resource.device, NULL);
|
||||
+ context = context_acquire(texture->resource.device, NULL, 0);
|
||||
+
|
||||
+ /* Only load the sub-resource for partial updates. */
|
||||
+ if (!op->box || (!op->box->left && !op->box->top && !op->box->front
|
||||
@ -131,7 +131,7 @@ index 4f4221c1223..a6b2996f112 100644
|
||||
- addr.buffer_object = 0;
|
||||
- addr.addr = data;
|
||||
-
|
||||
- context = context_acquire(resource->device, NULL);
|
||||
- context = context_acquire(resource->device, NULL, 0);
|
||||
-
|
||||
- /* Only load the sub-resource for partial updates. */
|
||||
- if (!box || (!box->left && !box->top && !box->front
|
||||
|
@ -1,26 +0,0 @@
|
||||
From 2fb94b8d1c47c38586073f1fb8a7355c827e4082 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Wed, 2 Oct 2013 23:28:56 +0200
|
||||
Subject: wined3d: Unload resources through the CS in uninit_3d.
|
||||
|
||||
---
|
||||
dlls/wined3d/device.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 6395aaea6be..082489c295e 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -1153,6 +1153,9 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
wined3d_cs_emit_unload_resource(device->cs, resource);
|
||||
}
|
||||
|
||||
+ if (wined3d_settings.cs_multithreaded)
|
||||
+ device->cs->ops->submit_and_wait(device->cs);
|
||||
+
|
||||
wine_rb_clear(&device->samplers, device_free_sampler, NULL);
|
||||
|
||||
/* Destroy the depth blt resources, they will be invalid after the reset. Also free shader
|
||||
--
|
||||
2.11.0
|
||||
|
@ -123,7 +123,7 @@ index 1b4fa46b55e..e9641b95099 100644
|
||||
+ HRESULT hr = WINED3D_OK;
|
||||
+
|
||||
+ if (device->d3d_initialized)
|
||||
+ context = context_acquire(device, NULL);
|
||||
+ context = context_acquire(device, NULL, 0);
|
||||
+
|
||||
+ wined3d_texture_load_location(texture, sub_resource_idx, context, texture->resource.map_binding);
|
||||
+ wined3d_texture_invalidate_location(texture, sub_resource_idx, ~texture->resource.map_binding);
|
||||
@ -159,7 +159,7 @@ index 1b4fa46b55e..e9641b95099 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
- if (device->d3d_initialized)
|
||||
- context = context_acquire(device, NULL);
|
||||
- context = context_acquire(device, NULL, 0);
|
||||
-
|
||||
- wined3d_texture_load_location(texture, sub_resource_idx, context, texture->resource.map_binding);
|
||||
- wined3d_texture_invalidate_location(texture, sub_resource_idx, ~texture->resource.map_binding);
|
||||
|
@ -1,4 +1,4 @@
|
||||
From b8980974b1117ed0b1b792118e64265d2de984ff Mon Sep 17 00:00:00 2001
|
||||
From c3cc04eaa9c6274fdc189d39d995e2cfccab489a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 10 Oct 2013 16:29:42 +0200
|
||||
Subject: wined3d: Create dummy textures through the CS.
|
||||
@ -13,10 +13,10 @@ crash.
|
||||
4 files changed, 51 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
|
||||
index 045e2fa54f2..2e67b720f56 100644
|
||||
index 507496cace1..ab3fa83a103 100644
|
||||
--- a/dlls/d3d11/tests/d3d11.c
|
||||
+++ b/dlls/d3d11/tests/d3d11.c
|
||||
@@ -13205,12 +13205,12 @@ static void test_cs_uav_store(void)
|
||||
@@ -13278,12 +13278,12 @@ static void test_cs_uav_store(void)
|
||||
ID3D11DeviceContext_CSSetShader(context, cs, NULL, 0);
|
||||
|
||||
ID3D11DeviceContext_Dispatch(context, 1, 1, 1);
|
||||
@ -31,7 +31,7 @@ index 045e2fa54f2..2e67b720f56 100644
|
||||
|
||||
ID3D11ComputeShader_Release(cs);
|
||||
|
||||
@@ -13218,19 +13218,19 @@ static void test_cs_uav_store(void)
|
||||
@@ -13291,19 +13291,19 @@ static void test_cs_uav_store(void)
|
||||
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)cb, 0, NULL, &input, 0, 0);
|
||||
ID3D11DeviceContext_CSSetShader(context, NULL, NULL, 0);
|
||||
ID3D11DeviceContext_Dispatch(context, 1, 1, 1);
|
||||
@ -54,7 +54,7 @@ index 045e2fa54f2..2e67b720f56 100644
|
||||
|
||||
ID3D11ComputeShader_Release(cs);
|
||||
|
||||
@@ -13241,17 +13241,17 @@ static void test_cs_uav_store(void)
|
||||
@@ -13314,17 +13314,17 @@ static void test_cs_uav_store(void)
|
||||
input.x = 1.0f;
|
||||
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)cb, 0, NULL, &input, 0, 0);
|
||||
ID3D11DeviceContext_Dispatch(context, texture_desc.Width, texture_desc.Height, 1);
|
||||
@ -76,7 +76,7 @@ index 045e2fa54f2..2e67b720f56 100644
|
||||
|
||||
ID3D11ComputeShader_Release(cs);
|
||||
|
||||
@@ -13263,16 +13263,16 @@ static void test_cs_uav_store(void)
|
||||
@@ -13336,16 +13336,16 @@ static void test_cs_uav_store(void)
|
||||
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)cb, 0, NULL, &input, 0, 0);
|
||||
ID3D11DeviceContext_Dispatch(context, 15, 15, 1);
|
||||
SetRect(&rect, 0, 0, 60, 60);
|
||||
@ -97,7 +97,7 @@ index 045e2fa54f2..2e67b720f56 100644
|
||||
|
||||
ID3D11ComputeShader_Release(cs);
|
||||
|
||||
@@ -13283,12 +13283,12 @@ static void test_cs_uav_store(void)
|
||||
@@ -13356,12 +13356,12 @@ static void test_cs_uav_store(void)
|
||||
input.x = 0.3f;
|
||||
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)cb, 0, NULL, &input, 0, 0);
|
||||
ID3D11DeviceContext_Dispatch(context, 1, 1, 1);
|
||||
@ -112,7 +112,7 @@ index 045e2fa54f2..2e67b720f56 100644
|
||||
|
||||
ID3D11ComputeShader_Release(cs);
|
||||
|
||||
@@ -13441,10 +13441,10 @@ static void test_ps_cs_uav_binding(void)
|
||||
@@ -13514,10 +13514,10 @@ static void test_ps_cs_uav_binding(void)
|
||||
ID3D11DeviceContext_PSSetShader(context, ps, NULL, 0);
|
||||
|
||||
ID3D11DeviceContext_Dispatch(context, 1, 1, 1);
|
||||
@ -126,7 +126,7 @@ index 045e2fa54f2..2e67b720f56 100644
|
||||
|
||||
input.x = 0.5f;
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 9b267871a37..3a6bfe4d38a 100644
|
||||
index 7f5339599d8..bf6adf4be71 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -85,6 +85,7 @@ enum wined3d_cs_op
|
||||
@ -149,14 +149,14 @@ index 9b267871a37..3a6bfe4d38a 100644
|
||||
static inline BOOL wined3d_cs_process_block(struct wined3d_cs *cs, struct wined3d_cs_block *block);
|
||||
static void wined3d_cs_mt_submit(struct wined3d_cs *cs);
|
||||
|
||||
@@ -2323,6 +2329,27 @@ HRESULT wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -2331,6 +2337,27 @@ HRESULT wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture
|
||||
return hr;
|
||||
}
|
||||
|
||||
+static UINT wined3d_cs_exec_create_dummy_textures(struct wined3d_cs *cs, const void *data)
|
||||
+{
|
||||
+ const struct wined3d_cs_create_dummy_textures *op = data;
|
||||
+ struct wined3d_context *context = context_acquire(cs->device, NULL);
|
||||
+ struct wined3d_context *context = context_acquire(cs->device, NULL, 0);
|
||||
+
|
||||
+ device_create_dummy_textures(cs->device, context);
|
||||
+
|
||||
@ -177,7 +177,7 @@ index 9b267871a37..3a6bfe4d38a 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
|
||||
@@ -2373,6 +2400,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2381,6 +2408,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_UPDATE_SUB_RESOURCE */ wined3d_cs_exec_update_sub_resource,
|
||||
/* WINED3D_CS_OP_GET_DC */ wined3d_cs_exec_get_dc,
|
||||
/* WINED3D_CS_OP_RELEASE_DC */ wined3d_cs_exec_release_dc,
|
||||
@ -186,10 +186,10 @@ index 9b267871a37..3a6bfe4d38a 100644
|
||||
|
||||
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index b62d3ba473f..4f5a45c1f60 100644
|
||||
index 9c69d04c3f0..008be8ae010 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -607,7 +607,7 @@ out:
|
||||
@@ -610,7 +610,7 @@ out:
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@ -198,12 +198,21 @@ index b62d3ba473f..4f5a45c1f60 100644
|
||||
{
|
||||
const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info;
|
||||
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
||||
@@ -1038,17 +1038,15 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
@@ -1029,7 +1029,7 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
|
||||
|
||||
target = swapchain->back_buffers ? swapchain->back_buffers[0] : swapchain->front_buffer;
|
||||
context = context_acquire(device, target, 0);
|
||||
- create_dummy_textures(device, context);
|
||||
+ device_create_dummy_textures(device, context);
|
||||
create_default_samplers(device, context);
|
||||
context_release(context);
|
||||
|
||||
@@ -1106,17 +1106,15 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
device->swapchains[0] = swapchain;
|
||||
device_init_swapchain_state(device, swapchain);
|
||||
|
||||
+ wined3d_cs_emit_create_dummy_textures(device->cs);
|
||||
context = context_acquire(device, NULL);
|
||||
context = context_acquire(device, NULL, 0);
|
||||
-
|
||||
- create_dummy_textures(device, context);
|
||||
create_default_samplers(device, context);
|
||||
@ -218,17 +227,8 @@ index b62d3ba473f..4f5a45c1f60 100644
|
||||
/* Clear the screen */
|
||||
if (swapchain->back_buffers && swapchain->back_buffers[0])
|
||||
clear_flags |= WINED3DCLEAR_TARGET;
|
||||
@@ -4758,7 +4756,7 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
|
||||
|
||||
swapchain->context[0] = context;
|
||||
swapchain->num_contexts = 1;
|
||||
- create_dummy_textures(device, context);
|
||||
+ device_create_dummy_textures(device, context);
|
||||
create_default_samplers(device, context);
|
||||
context_release(context);
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 1ccb02544ce..e6d349b8186 100644
|
||||
index 2d0a97f706c..efd4a4dfd6d 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2672,6 +2672,7 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
|
||||
|
@ -1,17 +1,17 @@
|
||||
From dd497359d661b8ca14cdeb83140f569bab3632e1 Mon Sep 17 00:00:00 2001
|
||||
From 716641434adb8c9e8c9dc940d5a3a1f82c147de2 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 10 Oct 2013 18:40:04 +0200
|
||||
Subject: wined3d: Recreate ctx and dummy textures through the CS after resets.
|
||||
|
||||
---
|
||||
dlls/wined3d/device.c | 23 +++++------------------
|
||||
1 file changed, 5 insertions(+), 18 deletions(-)
|
||||
dlls/wined3d/device.c | 15 +++++++++++----
|
||||
1 file changed, 11 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index f3b74bb5a45..fe9c524d36c 100644
|
||||
index 008be8ae010..1427e4c85ef 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -4711,7 +4711,6 @@ static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d
|
||||
@@ -1010,7 +1010,6 @@ static void wined3d_device_delete_opengl_contexts(struct wined3d_device *device)
|
||||
static HRESULT create_primary_opengl_context(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
|
||||
{
|
||||
struct wined3d_context *context;
|
||||
@ -19,38 +19,24 @@ index f3b74bb5a45..fe9c524d36c 100644
|
||||
HRESULT hr;
|
||||
|
||||
if (FAILED(hr = device->shader_backend->shader_alloc_private(device,
|
||||
@@ -4728,29 +4727,17 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
|
||||
@@ -1027,9 +1026,17 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
|
||||
return hr;
|
||||
}
|
||||
|
||||
- /* Recreate the primary swapchain's context */
|
||||
- swapchain->context = HeapAlloc(GetProcessHeap(), 0, sizeof(*swapchain->context));
|
||||
- if (!swapchain->context)
|
||||
- {
|
||||
- ERR("Failed to allocate memory for swapchain context array.\n");
|
||||
- device->blitter->free_private(device);
|
||||
- device->shader_backend->shader_free_private(device);
|
||||
- return E_OUTOFMEMORY;
|
||||
- }
|
||||
-
|
||||
- target = swapchain->back_buffers ? swapchain->back_buffers[0] : swapchain->front_buffer;
|
||||
- if (!(context = context_create(swapchain, target, swapchain->ds_format)))
|
||||
- context = context_acquire(device, target, 0);
|
||||
- device_create_dummy_textures(device, context);
|
||||
+ hr = wined3d_cs_emit_create_swapchain_context(device->cs, swapchain);
|
||||
+ if (FAILED(hr))
|
||||
{
|
||||
WARN("Failed to create context.\n");
|
||||
device->blitter->free_private(device);
|
||||
device->shader_backend->shader_free_private(device);
|
||||
- HeapFree(GetProcessHeap(), 0, swapchain->context);
|
||||
- return E_FAIL;
|
||||
+ {
|
||||
+ WARN("Failed to create context.\n");
|
||||
+ device->blitter->free_private(device);
|
||||
+ device->shader_backend->shader_free_private(device);
|
||||
+ return hr;
|
||||
}
|
||||
|
||||
- swapchain->context[0] = context;
|
||||
- swapchain->num_contexts = 1;
|
||||
- device_create_dummy_textures(device, context);
|
||||
+ }
|
||||
+
|
||||
+ wined3d_cs_emit_create_dummy_textures(device->cs);
|
||||
+ context = context_acquire(device, NULL);
|
||||
+ context = context_acquire(device, NULL, 0);
|
||||
create_default_samplers(device, context);
|
||||
context_release(context);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From aa4fb9f42031758a65fc644884ab638799bb2264 Mon Sep 17 00:00:00 2001
|
||||
From 0c7a163631a32c68e50a24a4353665edf19c8f4f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefandoesinger@gmx.at>
|
||||
Date: Sat, 7 May 2016 21:16:47 +0100
|
||||
Subject: wined3d: Call create_default_sampler from create_dummy_textures.
|
||||
@ -9,10 +9,10 @@ I should really rename it, don't feel like it now.
|
||||
1 file changed, 34 insertions(+), 41 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index fe9c524d36c..33955e3f3f4 100644
|
||||
index 1427e4c85ef..7bb9895f90d 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -607,6 +607,39 @@ out:
|
||||
@@ -610,6 +610,39 @@ out:
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@ -52,7 +52,7 @@ index fe9c524d36c..33955e3f3f4 100644
|
||||
void device_create_dummy_textures(struct wined3d_device *device, struct wined3d_context *context)
|
||||
{
|
||||
const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info;
|
||||
@@ -741,6 +774,7 @@ void device_create_dummy_textures(struct wined3d_device *device, struct wined3d_
|
||||
@@ -744,6 +777,7 @@ void device_create_dummy_textures(struct wined3d_device *device, struct wined3d_
|
||||
}
|
||||
|
||||
context_bind_dummy_textures(device, context);
|
||||
@ -60,7 +60,7 @@ index fe9c524d36c..33955e3f3f4 100644
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@@ -775,39 +809,6 @@ static void destroy_dummy_textures(struct wined3d_device *device, struct wined3d
|
||||
@@ -778,39 +812,6 @@ static void destroy_dummy_textures(struct wined3d_device *device, struct wined3d
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@ -100,25 +100,7 @@ index fe9c524d36c..33955e3f3f4 100644
|
||||
static void destroy_default_samplers(struct wined3d_device *device, struct wined3d_context *context)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
@@ -974,7 +975,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
static const struct wined3d_color black = {0.0f, 0.0f, 0.0f, 0.0f};
|
||||
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
||||
struct wined3d_swapchain *swapchain = NULL;
|
||||
- struct wined3d_context *context;
|
||||
DWORD clear_flags = 0;
|
||||
HRESULT hr;
|
||||
|
||||
@@ -1039,9 +1039,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
device_init_swapchain_state(device, swapchain);
|
||||
|
||||
wined3d_cs_emit_create_dummy_textures(device->cs);
|
||||
- context = context_acquire(device, NULL);
|
||||
- create_default_samplers(device, context);
|
||||
- context_release(context);
|
||||
|
||||
device->contexts[0]->last_was_rhw = 0;
|
||||
|
||||
@@ -4710,7 +4707,6 @@ static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d
|
||||
@@ -1009,7 +1010,6 @@ static void wined3d_device_delete_opengl_contexts(struct wined3d_device *device)
|
||||
|
||||
static HRESULT create_primary_opengl_context(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
|
||||
{
|
||||
@ -126,16 +108,34 @@ index fe9c524d36c..33955e3f3f4 100644
|
||||
HRESULT hr;
|
||||
|
||||
if (FAILED(hr = device->shader_backend->shader_alloc_private(device,
|
||||
@@ -4737,9 +4733,6 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
|
||||
@@ -1036,9 +1036,6 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
|
||||
}
|
||||
|
||||
wined3d_cs_emit_create_dummy_textures(device->cs);
|
||||
- context = context_acquire(device, NULL);
|
||||
- context = context_acquire(device, NULL, 0);
|
||||
- create_default_samplers(device, context);
|
||||
- context_release(context);
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -1049,7 +1046,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
static const struct wined3d_color black = {0.0f, 0.0f, 0.0f, 0.0f};
|
||||
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
||||
struct wined3d_swapchain *swapchain = NULL;
|
||||
- struct wined3d_context *context;
|
||||
DWORD clear_flags = 0;
|
||||
HRESULT hr;
|
||||
|
||||
@@ -1114,9 +1110,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
device_init_swapchain_state(device, swapchain);
|
||||
|
||||
wined3d_cs_emit_create_dummy_textures(device->cs);
|
||||
- context = context_acquire(device, NULL, 0);
|
||||
- create_default_samplers(device, context);
|
||||
- context_release(context);
|
||||
|
||||
device->contexts[0]->last_was_rhw = 0;
|
||||
|
||||
--
|
||||
2.11.0
|
||||
|
||||
|
@ -90,8 +90,8 @@ index 5902feb88fa..93730acb906 100644
|
||||
- sampler->parent = parent;
|
||||
- sampler->desc = *desc;
|
||||
-
|
||||
- context = context_acquire(device, NULL);
|
||||
+ context = context_acquire(sampler->device, NULL);
|
||||
- context = context_acquire(device, NULL, 0);
|
||||
+ context = context_acquire(sampler->device, NULL, 0);
|
||||
gl_info = context->gl_info;
|
||||
|
||||
GL_EXTCALL(glGenSamplers(1, &sampler->name));
|
||||
|
@ -46,7 +46,7 @@ index 3e385ddf736..cdd11e41c91 100644
|
||||
+ struct wined3d_texture *texture = op->texture;
|
||||
+ struct wined3d_context *context;
|
||||
+
|
||||
+ context = context_acquire(cs->device, NULL);
|
||||
+ context = context_acquire(cs->device, NULL, 0);
|
||||
+ if (!wined3d_texture_load_location(texture, op->sub_resource_idx, context, texture->resource.map_binding))
|
||||
+ {
|
||||
+ ERR("Failed to load location %s.\n", wined3d_debug_location(texture->resource.map_binding));
|
||||
@ -111,7 +111,7 @@ index b62fff8c503..1ff9cbb87c3 100644
|
||||
- if (dirty_region)
|
||||
- WARN("Ignoring dirty_region %s.\n", debug_box(dirty_region));
|
||||
-
|
||||
- context = context_acquire(texture->resource.device, NULL);
|
||||
- context = context_acquire(texture->resource.device, NULL, 0);
|
||||
- if (!wined3d_texture_load_location(texture, sub_resource_idx, context, texture->resource.map_binding))
|
||||
- {
|
||||
- ERR("Failed to load location %s.\n", wined3d_debug_location(texture->resource.map_binding));
|
||||
|
@ -157,7 +157,7 @@ index 1ff9cbb87c3..02119dee645 100644
|
||||
* general, but if a buffer object was previously created we can. */
|
||||
if (!context)
|
||||
- {
|
||||
context = context_acquire(device, NULL);
|
||||
context = context_acquire(device, NULL, 0);
|
||||
- gl_info = context->gl_info;
|
||||
- }
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,17 +1,17 @@
|
||||
From 7888d0d12d9182cf9d5801cfe3b884f3f7a2708c Mon Sep 17 00:00:00 2001
|
||||
From 6473e74391c83d4035556251a0ff2e0c6904d6be Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Fri, 11 Oct 2013 10:11:13 +0200
|
||||
Subject: wined3d: Delete GL contexts through the CS in reset.
|
||||
|
||||
Let's see if this fixes the remaining fglrx crashes...
|
||||
---
|
||||
dlls/wined3d/cs.c | 29 ++++++++++++++++++++++++++++-
|
||||
dlls/wined3d/cs.c | 27 ++++++++++++++++++++++++++-
|
||||
dlls/wined3d/device.c | 25 ++++++++++++++-----------
|
||||
dlls/wined3d/wined3d_private.h | 4 ++++
|
||||
3 files changed, 46 insertions(+), 12 deletions(-)
|
||||
dlls/wined3d/wined3d_private.h | 2 ++
|
||||
3 files changed, 42 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index d65276072d4..1d7d6b9cd94 100644
|
||||
index 55c175ef093..cf59192bc4f 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -93,6 +93,7 @@ enum wined3d_cs_op
|
||||
@ -22,20 +22,19 @@ index d65276072d4..1d7d6b9cd94 100644
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -521,6 +522,12 @@ struct wined3d_cs_create_texture_view
|
||||
@@ -521,6 +522,11 @@ struct wined3d_cs_create_texture_view
|
||||
const struct wined3d_format *view_format;
|
||||
};
|
||||
|
||||
+struct wined3d_cs_delete_gl_contexts
|
||||
+{
|
||||
+ enum wined3d_cs_op opcode;
|
||||
+ struct wined3d_swapchain *swapchain;
|
||||
+};
|
||||
+
|
||||
static inline BOOL wined3d_cs_process_block(struct wined3d_cs *cs, struct wined3d_cs_block *block);
|
||||
static void wined3d_cs_mt_submit(struct wined3d_cs *cs);
|
||||
|
||||
@@ -2628,6 +2635,26 @@ void wined3d_cs_emit_create_texture_view(struct wined3d_cs *cs, struct wined3d_g
|
||||
@@ -2628,6 +2634,25 @@ void wined3d_cs_emit_create_texture_view(struct wined3d_cs *cs, struct wined3d_g
|
||||
cs->ops->submit_and_wait(cs);
|
||||
}
|
||||
|
||||
@ -43,18 +42,17 @@ index d65276072d4..1d7d6b9cd94 100644
|
||||
+{
|
||||
+ const struct wined3d_cs_delete_gl_contexts *op = data;
|
||||
+
|
||||
+ device_delete_opengl_contexts_cs(cs->device, op->swapchain);
|
||||
+ device_delete_opengl_contexts_cs(cs->device);
|
||||
+
|
||||
+ return sizeof(*op);
|
||||
+}
|
||||
+
|
||||
+void wined3d_cs_emit_delete_opengl_contexts(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain)
|
||||
+void wined3d_cs_emit_delete_opengl_contexts(struct wined3d_cs *cs)
|
||||
+{
|
||||
+ struct wined3d_cs_delete_gl_contexts *op;
|
||||
+
|
||||
+ op = cs->ops->require_space(cs, sizeof(*op));
|
||||
+ op->opcode = WINED3D_CS_OP_DELETE_GL_CONTEXTS;
|
||||
+ op->swapchain = swapchain;
|
||||
+
|
||||
+ cs->ops->submit_and_wait(cs);
|
||||
+}
|
||||
@ -62,7 +60,7 @@ index d65276072d4..1d7d6b9cd94 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
|
||||
@@ -2686,7 +2713,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2686,7 +2711,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_BUFFER_COPY */ wined3d_cs_exec_buffer_copy,
|
||||
/* WINED3D_CS_OP_CREATE_BUFFER_VIEW */ wined3d_cs_exec_create_buffer_view,
|
||||
/* WINED3D_CS_OP_CREATE_TEXTURE_VIEW */ wined3d_cs_exec_create_texture_view,
|
||||
@ -72,18 +70,17 @@ index d65276072d4..1d7d6b9cd94 100644
|
||||
|
||||
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 3f5fd7988d4..880e6c002ac 100644
|
||||
index adcd8dd2486..b95c7837139 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -4635,22 +4635,12 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
|
||||
}
|
||||
@@ -971,21 +971,11 @@ static void device_init_swapchain_state(struct wined3d_device *device, struct wi
|
||||
wined3d_device_set_render_state(device, WINED3D_RS_ZENABLE, ds_enable);
|
||||
}
|
||||
|
||||
-static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
|
||||
+void device_delete_opengl_contexts_cs(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
|
||||
-static void wined3d_device_delete_opengl_contexts(struct wined3d_device *device)
|
||||
+void device_delete_opengl_contexts_cs(struct wined3d_device *device)
|
||||
{
|
||||
- struct wined3d_resource *resource, *cursor;
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
struct wined3d_context *context;
|
||||
struct wined3d_shader *shader;
|
||||
|
||||
@ -99,11 +96,11 @@ index 3f5fd7988d4..880e6c002ac 100644
|
||||
LIST_FOR_EACH_ENTRY(shader, &device->shaders, struct wined3d_shader, shader_list_entry)
|
||||
{
|
||||
device->shader_backend->shader_destroy(shader);
|
||||
@@ -4684,6 +4674,19 @@ static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d
|
||||
swapchain->context = NULL;
|
||||
@@ -1007,6 +997,19 @@ static void wined3d_device_delete_opengl_contexts(struct wined3d_device *device)
|
||||
}
|
||||
}
|
||||
|
||||
+static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
|
||||
+static void wined3d_device_delete_opengl_contexts(struct wined3d_device *device)
|
||||
+{
|
||||
+ struct wined3d_resource *resource, *cursor;
|
||||
+
|
||||
@ -113,31 +110,29 @@ index 3f5fd7988d4..880e6c002ac 100644
|
||||
+ wined3d_cs_emit_unload_resource(device->cs, resource);
|
||||
+ }
|
||||
+
|
||||
+ wined3d_cs_emit_delete_opengl_contexts(device->cs, swapchain);
|
||||
+ wined3d_cs_emit_delete_opengl_contexts(device->cs);
|
||||
+}
|
||||
+
|
||||
static HRESULT create_primary_opengl_context(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
|
||||
{
|
||||
HRESULT hr;
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 454a64eb2ff..2eb5bbeca29 100644
|
||||
index dad79e97ae2..abb4ce0ec52 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2708,6 +2708,8 @@ void device_invalidate_state(const struct wined3d_device *device, DWORD state) D
|
||||
@@ -2705,6 +2705,7 @@ void device_invalidate_state(const struct wined3d_device *device, DWORD state) D
|
||||
void device_exec_update_texture(struct wined3d_context *context, struct wined3d_texture *src_texture,
|
||||
struct wined3d_texture *dst_texture) DECLSPEC_HIDDEN;
|
||||
void device_create_dummy_textures(struct wined3d_device *device, struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||
+void device_delete_opengl_contexts_cs(struct wined3d_device *device,
|
||||
+ struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
|
||||
+void device_delete_opengl_contexts_cs(struct wined3d_device *device) DECLSPEC_HIDDEN;
|
||||
struct wined3d_gl_bo *wined3d_device_get_bo(struct wined3d_device *device, UINT size, GLenum gl_usage,
|
||||
GLenum type_hint, struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||
void wined3d_device_release_bo(struct wined3d_device *device, struct wined3d_gl_bo *bo,
|
||||
@@ -3270,6 +3272,8 @@ HRESULT wined3d_cs_emit_create_buffer_view(struct wined3d_cs *cs, struct wined3d
|
||||
@@ -3267,6 +3268,7 @@ HRESULT wined3d_cs_emit_create_buffer_view(struct wined3d_cs *cs, struct wined3d
|
||||
void wined3d_cs_emit_create_dummy_textures(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
HRESULT wined3d_cs_emit_create_swapchain_context(struct wined3d_cs *cs,
|
||||
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_delete_opengl_contexts(struct wined3d_cs *cs,
|
||||
+ struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_delete_opengl_contexts(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_create_texture_view(struct wined3d_cs *cs, struct wined3d_gl_view *view,
|
||||
GLenum view_target, const struct wined3d_view_desc *desc, struct wined3d_texture *texture,
|
||||
const struct wined3d_format *view_format) DECLSPEC_HIDDEN;
|
||||
|
@ -1,76 +0,0 @@
|
||||
From 7e94bce422efd1634e69cc8b9729cf0744672e4c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Fri, 11 Oct 2013 10:17:42 +0200
|
||||
Subject: wined3d: Delete GL contexts through the CS in uninit_3d.
|
||||
|
||||
---
|
||||
dlls/wined3d/device.c | 30 +++---------------------------
|
||||
1 file changed, 3 insertions(+), 27 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 762ab2747c2..b990682a921 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -1110,8 +1110,6 @@ static void device_free_sampler(struct wine_rb_entry *entry, void *context)
|
||||
HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
{
|
||||
struct wined3d_resource *resource, *cursor;
|
||||
- const struct wined3d_gl_info *gl_info;
|
||||
- struct wined3d_context *context;
|
||||
UINT i;
|
||||
|
||||
TRACE("device %p.\n", device);
|
||||
@@ -1122,12 +1120,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
if (wined3d_settings.cs_multithreaded)
|
||||
device->cs->ops->submit_and_wait(device->cs);
|
||||
|
||||
- /* I don't think that the interface guarantees that the device is destroyed from the same thread
|
||||
- * it was created. Thus make sure a context is active for the glDelete* calls
|
||||
- */
|
||||
- context = context_acquire(device, NULL);
|
||||
- gl_info = context->gl_info;
|
||||
-
|
||||
if (device->logo_texture)
|
||||
wined3d_texture_decref(device->logo_texture);
|
||||
if (device->cursor_texture)
|
||||
@@ -1148,27 +1140,10 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
wined3d_cs_emit_unload_resource(device->cs, resource);
|
||||
}
|
||||
|
||||
- if (wined3d_settings.cs_multithreaded)
|
||||
- device->cs->ops->submit_and_wait(device->cs);
|
||||
-
|
||||
wine_rb_clear(&device->samplers, device_free_sampler, NULL);
|
||||
|
||||
- /* Destroy the depth blt resources, they will be invalid after the reset. Also free shader
|
||||
- * private data, it might contain opengl pointers
|
||||
- */
|
||||
- if (device->depth_blt_texture)
|
||||
- {
|
||||
- gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->depth_blt_texture);
|
||||
- device->depth_blt_texture = 0;
|
||||
- }
|
||||
-
|
||||
- /* Destroy the shader backend. Note that this has to happen after all shaders are destroyed. */
|
||||
- device->blitter->free_private(device);
|
||||
- device->shader_backend->shader_free_private(device);
|
||||
- destroy_dummy_textures(device, context);
|
||||
- destroy_default_samplers(device, context);
|
||||
-
|
||||
- context_release(context);
|
||||
+ /* FIXME: Is this in the right place??? */
|
||||
+ wined3d_cs_emit_delete_opengl_contexts(device->cs, device->swapchains[0]);
|
||||
|
||||
if (device->back_buffer_view)
|
||||
{
|
||||
@@ -4658,6 +4633,7 @@ void device_delete_opengl_contexts_cs(struct wined3d_device *device, struct wine
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, swapchain->context);
|
||||
swapchain->context = NULL;
|
||||
+ swapchain->num_contexts = 0;
|
||||
}
|
||||
|
||||
static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
|
||||
--
|
||||
2.11.0
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user