mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -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;
|
||||
- }
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
From 089e84881f1704b8280ee66ec74a06d641b07450 Mon Sep 17 00:00:00 2001
|
||||
From 83e81d1ca0c1a14e31f42253596859920f44ccb5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 20 Dec 2012 13:09:17 +0100
|
||||
Subject: wined3d: Move the framebuffer into wined3d_state
|
||||
|
||||
---
|
||||
dlls/wined3d/arb_program_shader.c | 4 +-
|
||||
dlls/wined3d/context.c | 19 +++++--
|
||||
dlls/wined3d/cs.c | 52 ++++++++++---------
|
||||
dlls/wined3d/device.c | 102 +++++++++++++++++---------------------
|
||||
dlls/wined3d/context.c | 19 ++++++--
|
||||
dlls/wined3d/cs.c | 52 ++++++++++----------
|
||||
dlls/wined3d/device.c | 100 +++++++++++++++++---------------------
|
||||
dlls/wined3d/drawprim.c | 2 +-
|
||||
dlls/wined3d/glsl_shader.c | 2 +-
|
||||
dlls/wined3d/shader.c | 2 +-
|
||||
@ -15,11 +15,11 @@ Subject: wined3d: Move the framebuffer into wined3d_state
|
||||
dlls/wined3d/stateblock.c | 47 ++++++++++++++++--
|
||||
dlls/wined3d/surface.c | 2 +-
|
||||
dlls/wined3d/utils.c | 4 +-
|
||||
dlls/wined3d/wined3d_private.h | 46 ++++++++++++-----
|
||||
12 files changed, 183 insertions(+), 127 deletions(-)
|
||||
dlls/wined3d/wined3d_private.h | 46 +++++++++++++-----
|
||||
12 files changed, 182 insertions(+), 126 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
|
||||
index 85ed462c78d..1191a6d5873 100644
|
||||
index 7ed83f4b609..86627090d29 100644
|
||||
--- a/dlls/wined3d/arb_program_shader.c
|
||||
+++ b/dlls/wined3d/arb_program_shader.c
|
||||
@@ -701,7 +701,7 @@ static void shader_arb_load_constants_internal(struct shader_arb_priv *priv,
|
||||
@ -41,10 +41,10 @@ index 85ed462c78d..1191a6d5873 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index 31725b27c88..c1cbaa677a0 100644
|
||||
index 8483a28283f..71e1191649e 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -1726,6 +1726,11 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
@@ -1723,6 +1723,11 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@ index 31725b27c88..c1cbaa677a0 100644
|
||||
/* Initialize the texture unit mapping to a 1:1 mapping */
|
||||
for (s = 0; s < MAX_COMBINED_SAMPLERS; ++s)
|
||||
{
|
||||
@@ -2047,6 +2052,7 @@ out:
|
||||
@@ -2031,6 +2036,7 @@ out:
|
||||
if (hdc) wined3d_release_dc(swapchain->win_handle, hdc);
|
||||
device->shader_backend->shader_free_context_data(ret);
|
||||
device->adapter->fragment_pipe->free_context_data(ret);
|
||||
@ -64,7 +64,7 @@ index 31725b27c88..c1cbaa677a0 100644
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_event_queries);
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_occlusion_queries);
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_timestamp_queries);
|
||||
@@ -2094,6 +2100,7 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont
|
||||
@@ -2078,6 +2084,7 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont
|
||||
device->shader_backend->shader_free_context_data(context);
|
||||
device->adapter->fragment_pipe->free_context_data(context);
|
||||
HeapFree(GetProcessHeap(), 0, context->fbo_key);
|
||||
@ -72,7 +72,7 @@ index 31725b27c88..c1cbaa677a0 100644
|
||||
HeapFree(GetProcessHeap(), 0, context->draw_buffers);
|
||||
HeapFree(GetProcessHeap(), 0, context->blit_targets);
|
||||
device_context_remove(device, context);
|
||||
@@ -2652,7 +2659,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2640,7 +2647,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
DWORD rt_mask = 0, *cur_mask;
|
||||
UINT i;
|
||||
|
||||
@ -81,7 +81,7 @@ index 31725b27c88..c1cbaa677a0 100644
|
||||
|| rt_count != gl_info->limits.buffers)
|
||||
{
|
||||
if (!context_validate_rt_config(rt_count, rts, dsv))
|
||||
@@ -2697,6 +2704,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2685,6 +2692,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
rt_mask = context_generate_rt_mask_no_fbo(context,
|
||||
rt_count ? wined3d_rendertarget_view_get_surface(rts[0])->container : NULL);
|
||||
}
|
||||
@ -90,7 +90,7 @@ index 31725b27c88..c1cbaa677a0 100644
|
||||
}
|
||||
else if (wined3d_settings.offscreen_rendering_mode == ORM_FBO
|
||||
&& (!rt_count || wined3d_resource_is_offscreen(rts[0]->resource)))
|
||||
@@ -2753,7 +2762,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2741,7 +2750,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
|
||||
static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const struct wined3d_state *state)
|
||||
{
|
||||
@ -99,7 +99,7 @@ index 31725b27c88..c1cbaa677a0 100644
|
||||
struct wined3d_shader *ps = state->shader[WINED3D_SHADER_TYPE_PIXEL];
|
||||
DWORD rt_mask, rt_mask_bits;
|
||||
unsigned int i;
|
||||
@@ -2783,7 +2792,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
|
||||
@@ -2771,7 +2780,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
|
||||
void context_state_fb(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
DWORD rt_mask = find_draw_buffers_mask(context, state);
|
||||
@ -108,7 +108,7 @@ index 31725b27c88..c1cbaa677a0 100644
|
||||
DWORD *cur_mask;
|
||||
|
||||
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
|
||||
@@ -3072,6 +3081,8 @@ void context_state_drawbuf(struct wined3d_context *context, const struct wined3d
|
||||
@@ -3060,6 +3069,8 @@ void context_state_drawbuf(struct wined3d_context *context, const struct wined3d
|
||||
context_apply_draw_buffers(context, rt_mask);
|
||||
*cur_mask = rt_mask;
|
||||
}
|
||||
@ -117,7 +117,7 @@ index 31725b27c88..c1cbaa677a0 100644
|
||||
}
|
||||
|
||||
static BOOL fixed_get_input(BYTE usage, BYTE usage_idx, unsigned int *regnum)
|
||||
@@ -3506,7 +3517,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context,
|
||||
@@ -3504,7 +3515,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context,
|
||||
const struct wined3d_device *device, const struct wined3d_state *state)
|
||||
{
|
||||
const struct StateEntry *state_table = context->state_table;
|
||||
@ -127,10 +127,10 @@ index 31725b27c88..c1cbaa677a0 100644
|
||||
WORD map;
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 4778b73b0dc..6d1ab033b4d 100644
|
||||
index c9626180db1..55c175ef093 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -622,7 +622,7 @@ static UINT wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
|
||||
@@ -624,7 +624,7 @@ static UINT wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
|
||||
wined3d_swapchain_set_window(swapchain, op->dst_window_override);
|
||||
|
||||
swapchain->swapchain_ops->swapchain_present(swapchain, &op->src_rect, &op->dst_rect, op->flags,
|
||||
@ -139,7 +139,7 @@ index 4778b73b0dc..6d1ab033b4d 100644
|
||||
|
||||
InterlockedDecrement(&cs->pending_presents);
|
||||
|
||||
@@ -685,19 +685,19 @@ static UINT wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
|
||||
@@ -687,19 +687,19 @@ static UINT wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
|
||||
state = &cs->state;
|
||||
wined3d_get_draw_rect(state, &draw_rect);
|
||||
device_clear_render_targets(device, device->adapter->gl_info.limits.buffers,
|
||||
@ -163,7 +163,7 @@ index 4778b73b0dc..6d1ab033b4d 100644
|
||||
|
||||
return size;
|
||||
}
|
||||
@@ -722,12 +722,12 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
@@ -724,12 +724,12 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
{
|
||||
for (i = 0; i < cs->device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@ -179,7 +179,7 @@ index 4778b73b0dc..6d1ab033b4d 100644
|
||||
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
@@ -902,11 +902,11 @@ static UINT wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
@@ -904,11 +904,11 @@ static UINT wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
}
|
||||
for (i = 0; i < cs->device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@ -195,7 +195,7 @@ index 4778b73b0dc..6d1ab033b4d 100644
|
||||
release_shader_resources(state, ~(1u << WINED3D_SHADER_TYPE_COMPUTE));
|
||||
release_unordered_access_resources(state->shader[WINED3D_SHADER_TYPE_PIXEL],
|
||||
state->unordered_access_view[WINED3D_PIPELINE_GRAPHICS]);
|
||||
@@ -944,11 +944,11 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
@@ -946,11 +946,11 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
}
|
||||
for (i = 0; i < cs->device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@ -211,7 +211,7 @@ index 4778b73b0dc..6d1ab033b4d 100644
|
||||
acquire_shader_resources(state, ~(1u << WINED3D_SHADER_TYPE_COMPUTE));
|
||||
acquire_unordered_access_resources(state->shader[WINED3D_SHADER_TYPE_PIXEL],
|
||||
state->unordered_access_view[WINED3D_PIPELINE_GRAPHICS]);
|
||||
@@ -1024,7 +1024,7 @@ static UINT wined3d_cs_exec_set_rendertarget_view(struct wined3d_cs *cs, const v
|
||||
@@ -1026,7 +1026,7 @@ static UINT wined3d_cs_exec_set_rendertarget_view(struct wined3d_cs *cs, const v
|
||||
{
|
||||
const struct wined3d_cs_set_rendertarget_view *op = data;
|
||||
|
||||
@ -220,7 +220,7 @@ index 4778b73b0dc..6d1ab033b4d 100644
|
||||
device_invalidate_state(cs->device, STATE_FRAMEBUFFER);
|
||||
|
||||
return sizeof(*op);
|
||||
@@ -1049,7 +1049,7 @@ static UINT wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
@@ -1051,7 +1051,7 @@ static UINT wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
struct wined3d_device *device = cs->device;
|
||||
struct wined3d_rendertarget_view *prev;
|
||||
|
||||
@ -229,7 +229,7 @@ index 4778b73b0dc..6d1ab033b4d 100644
|
||||
{
|
||||
struct wined3d_surface *prev_surface = wined3d_rendertarget_view_get_surface(prev);
|
||||
|
||||
@@ -1061,7 +1061,7 @@ static UINT wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
@@ -1063,7 +1063,7 @@ static UINT wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
}
|
||||
}
|
||||
|
||||
@ -238,7 +238,7 @@ index 4778b73b0dc..6d1ab033b4d 100644
|
||||
|
||||
if (!prev != !op->view)
|
||||
{
|
||||
@@ -1721,11 +1721,13 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
@@ -1731,11 +1731,13 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
static UINT wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
struct wined3d_adapter *adapter = cs->device->adapter;
|
||||
@ -254,7 +254,7 @@ index 4778b73b0dc..6d1ab033b4d 100644
|
||||
|
||||
return sizeof(struct wined3d_cs_reset_state);
|
||||
}
|
||||
@@ -2815,15 +2817,13 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -2831,15 +2833,13 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
return NULL;
|
||||
cs->tls_idx = TLS_OUT_OF_INDEXES;
|
||||
|
||||
@ -272,7 +272,7 @@ index 4778b73b0dc..6d1ab033b4d 100644
|
||||
cs->ops = &wined3d_cs_st_ops;
|
||||
cs->device = device;
|
||||
|
||||
@@ -2856,7 +2856,6 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -2872,7 +2872,6 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
err:
|
||||
state_cleanup(&cs->state);
|
||||
if (cs->tls_idx != TLS_OUT_OF_INDEXES) TlsFree(cs->tls_idx);
|
||||
@ -280,7 +280,7 @@ index 4778b73b0dc..6d1ab033b4d 100644
|
||||
HeapFree(GetProcessHeap(), 0, cs->data);
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
return NULL;
|
||||
@@ -2885,7 +2884,6 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
@@ -2901,7 +2900,6 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
}
|
||||
|
||||
TlsFree(cs->tls_idx);
|
||||
@ -289,10 +289,10 @@ index 4778b73b0dc..6d1ab033b4d 100644
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
}
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index c0f6f0421bb..c643b111aa2 100644
|
||||
index ec0f7d98ab7..3b619a37fee 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -955,7 +955,7 @@ static void device_init_swapchain_state(struct wined3d_device *device, struct wi
|
||||
@@ -958,7 +958,7 @@ static void device_init_swapchain_state(struct wined3d_device *device, struct wi
|
||||
BOOL ds_enable = !!swapchain->desc.enable_auto_depth_stencil;
|
||||
unsigned int i;
|
||||
|
||||
@ -301,7 +301,7 @@ index c0f6f0421bb..c643b111aa2 100644
|
||||
{
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@@ -973,7 +973,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
@@ -1044,7 +1044,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
struct wined3d_swapchain_desc *swapchain_desc)
|
||||
{
|
||||
static const struct wined3d_color black = {0.0f, 0.0f, 0.0f, 0.0f};
|
||||
@ -309,7 +309,7 @@ index c0f6f0421bb..c643b111aa2 100644
|
||||
struct wined3d_swapchain *swapchain = NULL;
|
||||
DWORD clear_flags = 0;
|
||||
HRESULT hr;
|
||||
@@ -985,9 +984,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
@@ -1056,9 +1055,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
if (device->wined3d->flags & WINED3D_NO3D)
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
@ -319,7 +319,7 @@ index c0f6f0421bb..c643b111aa2 100644
|
||||
if (FAILED(hr = device->shader_backend->shader_alloc_private(device,
|
||||
device->adapter->vertex_pipe, device->adapter->fragment_pipe)))
|
||||
{
|
||||
@@ -1059,7 +1055,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
@@ -1130,7 +1126,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
return WINED3D_OK;
|
||||
|
||||
err_out:
|
||||
@ -327,23 +327,14 @@ index c0f6f0421bb..c643b111aa2 100644
|
||||
HeapFree(GetProcessHeap(), 0, device->swapchains);
|
||||
device->swapchain_count = 0;
|
||||
if (device->back_buffer_view)
|
||||
@@ -1141,6 +1136,12 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
@@ -1203,33 +1198,16 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
|
||||
state_unbind_resources(&device->state);
|
||||
|
||||
+ if (device->auto_depth_stencil_view)
|
||||
+ {
|
||||
+ wined3d_rendertarget_view_decref(device->auto_depth_stencil_view);
|
||||
+ device->auto_depth_stencil_view = NULL;
|
||||
+ }
|
||||
+
|
||||
/* Unload resources */
|
||||
LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
|
||||
{
|
||||
@@ -1170,29 +1171,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
|
||||
context_release(context);
|
||||
|
||||
- wine_rb_clear(&device->samplers, device_free_sampler, NULL);
|
||||
-
|
||||
- wined3d_device_delete_opengl_contexts(device);
|
||||
-
|
||||
- if (device->fb.depth_stencil)
|
||||
- {
|
||||
- struct wined3d_rendertarget_view *view = device->fb.depth_stencil;
|
||||
@ -354,23 +345,28 @@ index c0f6f0421bb..c643b111aa2 100644
|
||||
- wined3d_rendertarget_view_decref(view);
|
||||
- }
|
||||
-
|
||||
- if (device->auto_depth_stencil_view)
|
||||
- {
|
||||
if (device->auto_depth_stencil_view)
|
||||
{
|
||||
- struct wined3d_rendertarget_view *view = device->auto_depth_stencil_view;
|
||||
-
|
||||
- device->auto_depth_stencil_view = NULL;
|
||||
+ wined3d_rendertarget_view_decref(device->auto_depth_stencil_view);
|
||||
device->auto_depth_stencil_view = NULL;
|
||||
- if (wined3d_rendertarget_view_decref(view))
|
||||
- ERR("Something's still holding the auto depth/stencil view (%p).\n", view);
|
||||
- }
|
||||
-
|
||||
- for (i = 0; i < gl_info->limits.buffers; ++i)
|
||||
}
|
||||
|
||||
- for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
- {
|
||||
- wined3d_device_set_rendertarget_view(device, i, NULL, FALSE);
|
||||
- }
|
||||
+ wine_rb_clear(&device->samplers, device_free_sampler, NULL);
|
||||
+
|
||||
+ wined3d_device_delete_opengl_contexts(device);
|
||||
+
|
||||
if (device->back_buffer_view)
|
||||
{
|
||||
wined3d_rendertarget_view_decref(device->back_buffer_view);
|
||||
@@ -1210,9 +1188,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
@@ -1247,9 +1225,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
device->swapchains = NULL;
|
||||
device->swapchain_count = 0;
|
||||
|
||||
@ -380,7 +376,7 @@ index c0f6f0421bb..c643b111aa2 100644
|
||||
device->d3d_initialized = FALSE;
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -2015,7 +1990,7 @@ static void resolve_depth_buffer(struct wined3d_state *state)
|
||||
@@ -2052,7 +2027,7 @@ static void resolve_depth_buffer(struct wined3d_state *state)
|
||||
|| !(dst_texture->resource.format_flags & WINED3DFMT_FLAG_DEPTH))
|
||||
return;
|
||||
|
||||
@ -389,7 +385,7 @@ index c0f6f0421bb..c643b111aa2 100644
|
||||
return;
|
||||
if (src_view->resource->type == WINED3D_RTYPE_BUFFER)
|
||||
{
|
||||
@@ -3537,6 +3512,8 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
||||
@@ -3574,6 +3549,8 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
||||
HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_count,
|
||||
const RECT *rects, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil)
|
||||
{
|
||||
@ -398,7 +394,7 @@ index c0f6f0421bb..c643b111aa2 100644
|
||||
TRACE("device %p, rect_count %u, rects %p, flags %#x, color %s, depth %.8e, stencil %u.\n",
|
||||
device, rect_count, rects, flags, debug_color(color), depth, stencil);
|
||||
|
||||
@@ -3548,7 +3525,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
@@ -3585,7 +3562,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
|
||||
if (flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL))
|
||||
{
|
||||
@ -407,7 +403,7 @@ index c0f6f0421bb..c643b111aa2 100644
|
||||
if (!ds)
|
||||
{
|
||||
WARN("Clearing depth and/or stencil without a depth stencil buffer attached, returning WINED3DERR_INVALIDCALL\n");
|
||||
@@ -3557,8 +3534,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
@@ -3594,8 +3571,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
}
|
||||
else if (flags & WINED3DCLEAR_TARGET)
|
||||
{
|
||||
@ -418,7 +414,7 @@ index c0f6f0421bb..c643b111aa2 100644
|
||||
{
|
||||
WARN("Silently ignoring depth and target clear with mismatching sizes\n");
|
||||
return WINED3D_OK;
|
||||
@@ -3908,8 +3885,8 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
|
||||
@@ -3945,8 +3922,8 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
|
||||
if (state->render_states[WINED3D_RS_ZENABLE] || state->render_states[WINED3D_RS_ZWRITEENABLE]
|
||||
|| state->render_states[WINED3D_RS_STENCILENABLE])
|
||||
{
|
||||
@ -429,7 +425,7 @@ index c0f6f0421bb..c643b111aa2 100644
|
||||
|
||||
if (ds && rt && (ds->width < rt->width || ds->height < rt->height))
|
||||
{
|
||||
@@ -4344,20 +4321,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
|
||||
@@ -4381,20 +4358,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -453,7 +449,7 @@ index c0f6f0421bb..c643b111aa2 100644
|
||||
|
||||
TRACE("device %p, view_idx %u, view %p, set_viewport %#x.\n",
|
||||
device, view_idx, view, set_viewport);
|
||||
@@ -4394,13 +4372,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
@@ -4431,13 +4409,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
}
|
||||
|
||||
|
||||
@ -469,7 +465,7 @@ index c0f6f0421bb..c643b111aa2 100644
|
||||
wined3d_cs_emit_set_rendertarget_view(device->cs, view_idx, view);
|
||||
/* Release after the assignment, to prevent device_resource_released()
|
||||
* from seeing the surface as still in use. */
|
||||
@@ -4412,18 +4390,19 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
@@ -4449,18 +4427,19 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
|
||||
void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device, struct wined3d_rendertarget_view *view)
|
||||
{
|
||||
@ -491,7 +487,7 @@ index c0f6f0421bb..c643b111aa2 100644
|
||||
wined3d_rendertarget_view_incref(view);
|
||||
wined3d_cs_emit_set_depth_stencil_view(device->cs, view);
|
||||
if (prev)
|
||||
@@ -4770,10 +4749,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4726,10 +4705,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
wined3d_texture_decref(device->cursor_texture);
|
||||
device->cursor_texture = NULL;
|
||||
}
|
||||
@ -503,7 +499,7 @@ index c0f6f0421bb..c643b111aa2 100644
|
||||
{
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@@ -4784,6 +4762,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4740,6 +4718,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
|
||||
if (reset_state)
|
||||
{
|
||||
@ -515,9 +511,9 @@ index c0f6f0421bb..c643b111aa2 100644
|
||||
LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
|
||||
{
|
||||
TRACE("Enumerating resource %p.\n", resource);
|
||||
@@ -4952,27 +4935,28 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4911,27 +4894,28 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
if (device->d3d_initialized)
|
||||
delete_opengl_contexts(device, swapchain);
|
||||
wined3d_device_delete_opengl_contexts(device);
|
||||
|
||||
- state_init(&device->state, &device->fb, &device->adapter->gl_info,
|
||||
- &device->adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT);
|
||||
@ -551,7 +547,7 @@ index c0f6f0421bb..c643b111aa2 100644
|
||||
wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect);
|
||||
}
|
||||
|
||||
@@ -5064,11 +5048,11 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
|
||||
@@ -5023,11 +5007,11 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
|
||||
{
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@ -565,7 +561,7 @@ index c0f6f0421bb..c643b111aa2 100644
|
||||
ERR("Resource %p is still in use as depth/stencil buffer.\n", resource);
|
||||
}
|
||||
|
||||
@@ -5194,8 +5178,12 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
|
||||
@@ -5153,8 +5137,12 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
|
||||
|
||||
device->blitter = adapter->blitter;
|
||||
|
||||
@ -581,7 +577,7 @@ index c0f6f0421bb..c643b111aa2 100644
|
||||
|
||||
if (!(device->cs = wined3d_cs_create(device)))
|
||||
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
|
||||
index 49804131efb..28b4c5a48da 100644
|
||||
index 48421ef545e..d8f2ad17f2e 100644
|
||||
--- a/dlls/wined3d/drawprim.c
|
||||
+++ b/dlls/wined3d/drawprim.c
|
||||
@@ -411,7 +411,7 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
|
||||
@ -594,10 +590,10 @@ index 49804131efb..28b4c5a48da 100644
|
||||
struct wined3d_event_query *ib_query = NULL;
|
||||
struct wined3d_rendertarget_view *dsv, *rtv;
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index 82e9fb7ea30..88dc4ee9cc6 100644
|
||||
index de2c0006ae1..8e902aae935 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -1629,7 +1629,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
|
||||
@@ -1630,7 +1630,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
|
||||
const struct wined3d_vec4 correction_params =
|
||||
{
|
||||
/* Position is relative to the framebuffer, not the viewport. */
|
||||
@ -607,10 +603,10 @@ index 82e9fb7ea30..88dc4ee9cc6 100644
|
||||
0.0f,
|
||||
0.0f,
|
||||
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
|
||||
index 814da178862..09ebbfa53c6 100644
|
||||
index 450e7913771..faf48a5126b 100644
|
||||
--- a/dlls/wined3d/shader.c
|
||||
+++ b/dlls/wined3d/shader.c
|
||||
@@ -3231,7 +3231,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
|
||||
@@ -3265,7 +3265,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
|
||||
UINT i;
|
||||
|
||||
memset(args, 0, sizeof(*args)); /* FIXME: Make sure all bits are set. */
|
||||
@ -824,10 +820,10 @@ index 8221b99977d..3c7b4b8a664 100644
|
||||
if (type == WINED3D_SBT_RECORDED)
|
||||
return WINED3D_OK;
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index e65630fafc8..c5ad5bd8475 100644
|
||||
index 15657ace57f..2753de76707 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -2514,7 +2514,7 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
|
||||
@@ -2518,7 +2518,7 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
|
||||
{
|
||||
struct wined3d_texture *dst_texture = dst_surface->container;
|
||||
struct wined3d_device *device = dst_texture->resource.device;
|
||||
@ -837,10 +833,10 @@ index e65630fafc8..c5ad5bd8475 100644
|
||||
struct wined3d_texture *src_texture;
|
||||
|
||||
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
index dde75a36be5..718808861bc 100644
|
||||
index 48879bcd6a0..4b737ade91b 100644
|
||||
--- a/dlls/wined3d/utils.c
|
||||
+++ b/dlls/wined3d/utils.c
|
||||
@@ -4651,7 +4651,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
|
||||
@@ -4640,7 +4640,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
|
||||
float y_offset = flip
|
||||
? (center_offset - (2.0f * y) - h) / h
|
||||
: (center_offset - (2.0f * y) - h) / -h;
|
||||
@ -849,7 +845,7 @@ index dde75a36be5..718808861bc 100644
|
||||
state->render_states[WINED3D_RS_ZENABLE] : WINED3D_ZB_FALSE;
|
||||
float z_scale = zenable ? clip_control ? 1.0f : 2.0f : 0.0f;
|
||||
float z_offset = zenable ? clip_control ? 0.0f : -1.0f : 0.0f;
|
||||
@@ -5450,7 +5450,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
|
||||
@@ -5439,7 +5439,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -859,10 +855,10 @@ index dde75a36be5..718808861bc 100644
|
||||
|| !state->render_states[WINED3D_RS_CLIPPLANEENABLE])
|
||||
{
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index ad8a3516ac7..8fc67581cf2 100644
|
||||
index f3116d2fb33..019dc1ddf07 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1552,6 +1552,36 @@ struct wined3d_timestamp_query
|
||||
@@ -1554,6 +1554,36 @@ struct wined3d_timestamp_query
|
||||
void context_alloc_timestamp_query(struct wined3d_context *context, struct wined3d_timestamp_query *query) DECLSPEC_HIDDEN;
|
||||
void context_free_timestamp_query(struct wined3d_timestamp_query *query) DECLSPEC_HIDDEN;
|
||||
|
||||
@ -899,7 +895,7 @@ index ad8a3516ac7..8fc67581cf2 100644
|
||||
struct wined3d_context
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
@@ -1567,6 +1597,7 @@ struct wined3d_context
|
||||
@@ -1569,6 +1599,7 @@ struct wined3d_context
|
||||
DWORD numDirtyEntries;
|
||||
DWORD isStateDirty[STATE_HIGHEST / (sizeof(DWORD) * CHAR_BIT) + 1]; /* Bitmap to find out quickly if a state is dirty */
|
||||
unsigned int dirty_compute_states[STATE_COMPUTE_COUNT / (sizeof(unsigned int) * CHAR_BIT) + 1];
|
||||
@ -907,7 +903,7 @@ index ad8a3516ac7..8fc67581cf2 100644
|
||||
|
||||
struct wined3d_device *device;
|
||||
struct wined3d_swapchain *swapchain;
|
||||
@@ -1680,12 +1711,6 @@ struct wined3d_context
|
||||
@@ -1682,12 +1713,6 @@ struct wined3d_context
|
||||
GLuint dummy_arbfp_prog;
|
||||
};
|
||||
|
||||
@ -920,7 +916,7 @@ index ad8a3516ac7..8fc67581cf2 100644
|
||||
typedef void (*APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id);
|
||||
|
||||
struct StateEntry
|
||||
@@ -2508,7 +2533,7 @@ struct wined3d_stream_state
|
||||
@@ -2511,7 +2536,7 @@ struct wined3d_stream_state
|
||||
struct wined3d_state
|
||||
{
|
||||
DWORD flags;
|
||||
@ -929,14 +925,14 @@ index ad8a3516ac7..8fc67581cf2 100644
|
||||
|
||||
struct wined3d_vertex_declaration *vertex_declaration;
|
||||
struct wined3d_stream_output stream_output[MAX_STREAM_OUT];
|
||||
@@ -2622,7 +2647,6 @@ struct wined3d_device
|
||||
@@ -2625,7 +2650,6 @@ struct wined3d_device
|
||||
struct wine_rb_tree samplers;
|
||||
|
||||
/* Render Target Support */
|
||||
- struct wined3d_fb_state fb;
|
||||
struct wined3d_rendertarget_view *auto_depth_stencil_view;
|
||||
|
||||
/* For rendering to a texture using glCopyTexImage */
|
||||
/* Cursor management */
|
||||
@@ -3164,9 +3188,8 @@ struct wined3d_stateblock
|
||||
void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
|
||||
|
||||
|
@ -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
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 0c368a9fa4e1417a0f5114769fa0b9f44d35ebde Mon Sep 17 00:00:00 2001
|
||||
From 4f06f7af54f1be5fee2c40c9a8d79d6f3d393a4e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 7 Feb 2017 22:37:58 +0100
|
||||
Subject: wined3d: Map vertex buffers through cs.
|
||||
@ -10,7 +10,7 @@ Subject: wined3d: Map vertex buffers through cs.
|
||||
3 files changed, 76 insertions(+), 44 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 42779efe69d..42ce9bafb80 100644
|
||||
index c71019b06bf..bd1ea2594b6 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -94,6 +94,7 @@ enum wined3d_cs_op
|
||||
@ -21,8 +21,8 @@ index 42779efe69d..42ce9bafb80 100644
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -528,6 +529,13 @@ struct wined3d_cs_delete_gl_contexts
|
||||
struct wined3d_swapchain *swapchain;
|
||||
@@ -527,6 +528,13 @@ struct wined3d_cs_delete_gl_contexts
|
||||
enum wined3d_cs_op opcode;
|
||||
};
|
||||
|
||||
+struct wined3d_cs_map_vertex_buffers
|
||||
@ -35,7 +35,7 @@ index 42779efe69d..42ce9bafb80 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);
|
||||
|
||||
@@ -2655,6 +2663,70 @@ void wined3d_cs_emit_delete_opengl_contexts(struct wined3d_cs *cs, struct wined3
|
||||
@@ -2653,6 +2661,70 @@ void wined3d_cs_emit_delete_opengl_contexts(struct wined3d_cs *cs)
|
||||
cs->ops->submit_and_wait(cs);
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ index 42779efe69d..42ce9bafb80 100644
|
||||
+ WORD map;
|
||||
+
|
||||
+ /* Need any context to write to the vbo. */
|
||||
+ context = context_acquire(cs->device, NULL);
|
||||
+ context = context_acquire(cs->device, NULL, 0);
|
||||
+ gl_info = context->gl_info;
|
||||
+
|
||||
+ vs = state->shader[WINED3D_SHADER_TYPE_VERTEX];
|
||||
@ -106,7 +106,7 @@ index 42779efe69d..42ce9bafb80 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
|
||||
@@ -2714,6 +2786,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2712,6 +2784,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_CREATE_BUFFER_VIEW */ wined3d_cs_exec_create_buffer_view,
|
||||
/* WINED3D_CS_OP_CREATE_TEXTURE_VIEW */ wined3d_cs_exec_create_texture_view,
|
||||
/* WINED3D_CS_OP_DELETE_GL_CONTEXTS */ wined3d_cs_exec_delete_gl_contexts,
|
||||
@ -115,10 +115,10 @@ index 42779efe69d..42ce9bafb80 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 ccfaa7f19e6..369fc47c097 100644
|
||||
index 9752912b1b0..5ef2886df06 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -2851,7 +2851,6 @@ void CDECL wined3d_device_set_unordered_access_view(struct wined3d_device *devic
|
||||
@@ -2916,7 +2916,6 @@ void CDECL wined3d_device_set_unordered_access_view(struct wined3d_device *devic
|
||||
wined3d_device_set_pipeline_unordered_access_view(device, WINED3D_PIPELINE_GRAPHICS, idx, uav);
|
||||
}
|
||||
|
||||
@ -126,7 +126,7 @@ index ccfaa7f19e6..369fc47c097 100644
|
||||
#define copy_and_next(dest, src, size) memcpy(dest, src, size); dest += (size)
|
||||
static HRESULT process_vertices_strided(const struct wined3d_device *device, DWORD dwDestIndex, DWORD dwCount,
|
||||
const struct wined3d_stream_info *stream_info, struct wined3d_buffer *dest, DWORD flags,
|
||||
@@ -3127,14 +3126,8 @@ HRESULT CDECL wined3d_device_process_vertices(struct wined3d_device *device,
|
||||
@@ -3192,14 +3191,8 @@ HRESULT CDECL wined3d_device_process_vertices(struct wined3d_device *device,
|
||||
UINT src_start_idx, UINT dst_idx, UINT vertex_count, struct wined3d_buffer *dst_buffer,
|
||||
const struct wined3d_vertex_declaration *declaration, DWORD flags, DWORD dst_fvf)
|
||||
{
|
||||
@ -141,12 +141,12 @@ index ccfaa7f19e6..369fc47c097 100644
|
||||
|
||||
TRACE("device %p, src_start_idx %u, dst_idx %u, vertex_count %u, "
|
||||
"dst_buffer %p, declaration %p, flags %#x, dst_fvf %#x.\n",
|
||||
@@ -3144,47 +3137,11 @@ HRESULT CDECL wined3d_device_process_vertices(struct wined3d_device *device,
|
||||
@@ -3209,47 +3202,11 @@ HRESULT CDECL wined3d_device_process_vertices(struct wined3d_device *device,
|
||||
if (declaration)
|
||||
FIXME("Output vertex declaration not implemented yet.\n");
|
||||
|
||||
- /* Need any context to write to the vbo. */
|
||||
- context = context_acquire(device, NULL);
|
||||
- context = context_acquire(device, NULL, 0);
|
||||
- gl_info = context->gl_info;
|
||||
-
|
||||
- vs = state->shader[WINED3D_SHADER_TYPE_VERTEX];
|
||||
@ -191,10 +191,10 @@ index ccfaa7f19e6..369fc47c097 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index c1200b127c5..a6a3eca0da2 100644
|
||||
index 6d8495f1993..aa54fc3a3e6 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3359,6 +3359,8 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
@@ -3354,6 +3354,8 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, unsigned int flags) DECLSPEC_HIDDEN;
|
||||
HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From b9a43f545bf226e61be143012930f623b2d35140 Mon Sep 17 00:00:00 2001
|
||||
From 8082e2c1c4e3f605716f8b1b124e224b321f03e4 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Wed, 8 Feb 2017 00:12:31 +0100
|
||||
Subject: wined3d: Introduce a separate priority queue.
|
||||
@ -9,10 +9,10 @@ Subject: wined3d: Introduce a separate priority queue.
|
||||
2 files changed, 79 insertions(+), 68 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index a94bc4a0f42..ca2aa81c276 100644
|
||||
index 42f57a1b91a..9ba97650a15 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -566,14 +566,16 @@ static struct wined3d_cs_block *wined3d_cs_list_dequeue(struct wined3d_cs_list *
|
||||
@@ -565,14 +565,16 @@ static struct wined3d_cs_block *wined3d_cs_list_dequeue(struct wined3d_cs_list *
|
||||
return LIST_ENTRY(head, struct wined3d_cs_block, entry);
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
return block;
|
||||
}
|
||||
}
|
||||
@@ -594,7 +596,7 @@ static void wined3d_cs_set_thread_block(const struct wined3d_cs *cs, struct wine
|
||||
@@ -593,7 +595,7 @@ static void wined3d_cs_set_thread_block(const struct wined3d_cs *cs, struct wine
|
||||
ERR("Failed to set thread block.\n");
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
{
|
||||
struct wined3d_cs_block *block;
|
||||
|
||||
@@ -608,6 +610,7 @@ static struct wined3d_cs_block *wined3d_cs_get_block(struct wined3d_cs *cs)
|
||||
@@ -607,6 +609,7 @@ static struct wined3d_cs_block *wined3d_cs_get_block(struct wined3d_cs *cs)
|
||||
}
|
||||
|
||||
block->pos = 0;
|
||||
@ -48,7 +48,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
|
||||
return block;
|
||||
}
|
||||
@@ -627,7 +630,7 @@ static void wined3d_cs_emit_fence(struct wined3d_cs *cs, BOOL *signalled)
|
||||
@@ -626,7 +629,7 @@ static void wined3d_cs_emit_fence(struct wined3d_cs *cs, BOOL *signalled)
|
||||
|
||||
*signalled = FALSE;
|
||||
|
||||
@ -57,7 +57,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_FENCE;
|
||||
op->signalled = signalled;
|
||||
}
|
||||
@@ -662,7 +665,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
@@ -661,7 +664,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
unsigned int i;
|
||||
LONG pending;
|
||||
|
||||
@ -66,7 +66,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_PRESENT;
|
||||
op->dst_window_override = dst_window_override;
|
||||
op->swapchain = swapchain;
|
||||
@@ -729,7 +732,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
@@ -728,7 +731,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
struct wined3d_cs_clear *op;
|
||||
unsigned int i;
|
||||
|
||||
@ -75,7 +75,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_CLEAR;
|
||||
op->flags = flags;
|
||||
op->color = *color;
|
||||
@@ -879,7 +882,7 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
|
||||
@@ -878,7 +881,7 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
|
||||
const struct wined3d_state *state = &cs->device->state;
|
||||
struct wined3d_cs_dispatch *op;
|
||||
|
||||
@ -84,7 +84,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_DISPATCH;
|
||||
op->group_count_x = group_count_x;
|
||||
op->group_count_y = group_count_y;
|
||||
@@ -941,7 +944,7 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
@@ -940,7 +943,7 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
struct wined3d_cs_draw *op;
|
||||
unsigned int i;
|
||||
|
||||
@ -93,7 +93,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_DRAW;
|
||||
op->base_vertex_idx = base_vertex_idx;
|
||||
op->start_idx = start_idx;
|
||||
@@ -990,7 +993,7 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
@@ -989,7 +992,7 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
{
|
||||
struct wined3d_cs_set_predication *op;
|
||||
|
||||
@ -102,7 +102,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_PREDICATION;
|
||||
op->predicate = predicate;
|
||||
op->value = value;
|
||||
@@ -1012,7 +1015,7 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
@@ -1011,7 +1014,7 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
{
|
||||
struct wined3d_cs_set_viewport *op;
|
||||
|
||||
@ -111,7 +111,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_VIEWPORT;
|
||||
op->viewport = *viewport;
|
||||
|
||||
@@ -1033,7 +1036,7 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
@@ -1032,7 +1035,7 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
{
|
||||
struct wined3d_cs_set_scissor_rect *op;
|
||||
|
||||
@ -120,7 +120,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_SCISSOR_RECT;
|
||||
op->rect = *rect;
|
||||
|
||||
@@ -1055,7 +1058,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
@@ -1054,7 +1057,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
{
|
||||
struct wined3d_cs_set_rendertarget_view *op;
|
||||
|
||||
@ -129,7 +129,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_RENDERTARGET_VIEW;
|
||||
op->view_idx = view_idx;
|
||||
op->view = view;
|
||||
@@ -1106,7 +1109,7 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
@@ -1105,7 +1108,7 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
{
|
||||
struct wined3d_cs_set_depth_stencil_view *op;
|
||||
|
||||
@ -138,7 +138,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_DEPTH_STENCIL_VIEW;
|
||||
op->view = view;
|
||||
|
||||
@@ -1127,7 +1130,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
@@ -1126,7 +1129,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
{
|
||||
struct wined3d_cs_set_vertex_declaration *op;
|
||||
|
||||
@ -147,7 +147,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_VERTEX_DECLARATION;
|
||||
op->declaration = declaration;
|
||||
|
||||
@@ -1161,7 +1164,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -1160,7 +1163,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
{
|
||||
struct wined3d_cs_set_stream_source *op;
|
||||
|
||||
@ -156,7 +156,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_STREAM_SOURCE;
|
||||
op->stream_idx = stream_idx;
|
||||
op->buffer = buffer;
|
||||
@@ -1189,7 +1192,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
|
||||
@@ -1188,7 +1191,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
|
||||
{
|
||||
struct wined3d_cs_set_stream_source_freq *op;
|
||||
|
||||
@ -165,7 +165,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_STREAM_SOURCE_FREQ;
|
||||
op->stream_idx = stream_idx;
|
||||
op->frequency = frequency;
|
||||
@@ -1222,7 +1225,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -1221,7 +1224,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
{
|
||||
struct wined3d_cs_set_stream_output *op;
|
||||
|
||||
@ -174,7 +174,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_STREAM_OUTPUT;
|
||||
op->stream_idx = stream_idx;
|
||||
op->buffer = buffer;
|
||||
@@ -1256,7 +1259,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
@@ -1255,7 +1258,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
{
|
||||
struct wined3d_cs_set_index_buffer *op;
|
||||
|
||||
@ -183,7 +183,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_INDEX_BUFFER;
|
||||
op->buffer = buffer;
|
||||
op->format_id = format_id;
|
||||
@@ -1287,7 +1290,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
@@ -1286,7 +1289,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
{
|
||||
struct wined3d_cs_set_constant_buffer *op;
|
||||
|
||||
@ -192,7 +192,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_CONSTANT_BUFFER;
|
||||
op->type = type;
|
||||
op->cb_idx = cb_idx;
|
||||
@@ -1381,7 +1384,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
@@ -1380,7 +1383,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
{
|
||||
struct wined3d_cs_set_texture *op;
|
||||
|
||||
@ -201,7 +201,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_TEXTURE;
|
||||
op->stage = stage;
|
||||
op->texture = texture;
|
||||
@@ -1413,7 +1416,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
@@ -1412,7 +1415,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
{
|
||||
struct wined3d_cs_set_shader_resource_view *op;
|
||||
|
||||
@ -210,7 +210,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_SHADER_RESOURCE_VIEW;
|
||||
op->type = type;
|
||||
op->view_idx = view_idx;
|
||||
@@ -1445,7 +1448,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
@@ -1444,7 +1447,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
{
|
||||
struct wined3d_cs_set_unordered_access_view *op;
|
||||
|
||||
@ -219,7 +219,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_UNORDERED_ACCESS_VIEW;
|
||||
op->pipeline = pipeline;
|
||||
op->view_idx = view_idx;
|
||||
@@ -1469,7 +1472,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -1468,7 +1471,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
{
|
||||
struct wined3d_cs_set_sampler *op;
|
||||
|
||||
@ -228,7 +228,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_SAMPLER;
|
||||
op->type = type;
|
||||
op->sampler_idx = sampler_idx;
|
||||
@@ -1494,7 +1497,7 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -1493,7 +1496,7 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
{
|
||||
struct wined3d_cs_set_shader *op;
|
||||
|
||||
@ -237,7 +237,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_SHADER;
|
||||
op->type = type;
|
||||
op->shader = shader;
|
||||
@@ -1517,7 +1520,7 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
@@ -1516,7 +1519,7 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
{
|
||||
struct wined3d_cs_set_rasterizer_state *op;
|
||||
|
||||
@ -246,7 +246,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_RASTERIZER_STATE;
|
||||
op->state = rasterizer_state;
|
||||
|
||||
@@ -1538,7 +1541,7 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
@@ -1537,7 +1540,7 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
{
|
||||
struct wined3d_cs_set_render_state *op;
|
||||
|
||||
@ -255,7 +255,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_RENDER_STATE;
|
||||
op->state = state;
|
||||
op->value = value;
|
||||
@@ -1561,7 +1564,7 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
@@ -1560,7 +1563,7 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
{
|
||||
struct wined3d_cs_set_texture_state *op;
|
||||
|
||||
@ -264,7 +264,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_TEXTURE_STATE;
|
||||
op->stage = stage;
|
||||
op->state = state;
|
||||
@@ -1585,7 +1588,7 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
@@ -1584,7 +1587,7 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
{
|
||||
struct wined3d_cs_set_sampler_state *op;
|
||||
|
||||
@ -273,7 +273,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_SAMPLER_STATE;
|
||||
op->sampler_idx = sampler_idx;
|
||||
op->state = state;
|
||||
@@ -1610,7 +1613,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
@@ -1609,7 +1612,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
{
|
||||
struct wined3d_cs_set_transform *op;
|
||||
|
||||
@ -282,7 +282,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_TRANSFORM;
|
||||
op->state = state;
|
||||
op->matrix = *matrix;
|
||||
@@ -1632,7 +1635,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
@@ -1631,7 +1634,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
{
|
||||
struct wined3d_cs_set_clip_plane *op;
|
||||
|
||||
@ -291,7 +291,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_CLIP_PLANE;
|
||||
op->plane_idx = plane_idx;
|
||||
op->plane = *plane;
|
||||
@@ -1710,7 +1713,7 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -1709,7 +1712,7 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
{
|
||||
struct wined3d_cs_set_color_key *op;
|
||||
|
||||
@ -300,7 +300,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_COLOR_KEY;
|
||||
op->texture = texture;
|
||||
op->flags = flags;
|
||||
@@ -1739,7 +1742,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
@@ -1738,7 +1741,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
{
|
||||
struct wined3d_cs_set_material *op;
|
||||
|
||||
@ -309,7 +309,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_MATERIAL;
|
||||
op->material = *material;
|
||||
|
||||
@@ -1764,7 +1767,7 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -1763,7 +1766,7 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
{
|
||||
struct wined3d_cs_reset_state *op;
|
||||
|
||||
@ -318,7 +318,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_RESET_STATE;
|
||||
|
||||
cs->ops->submit(cs);
|
||||
@@ -1783,7 +1786,7 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
|
||||
@@ -1782,7 +1785,7 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
|
||||
{
|
||||
struct wined3d_cs_destroy_object *op;
|
||||
|
||||
@ -327,7 +327,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_DESTROY_OBJECT;
|
||||
op->callback = callback;
|
||||
op->object = object;
|
||||
@@ -1805,7 +1808,7 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
@@ -1804,7 +1807,7 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
{
|
||||
struct wined3d_cs_query_issue *op;
|
||||
|
||||
@ -336,7 +336,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_QUERY_ISSUE;
|
||||
op->query = query;
|
||||
op->flags = flags;
|
||||
@@ -1828,7 +1831,7 @@ BOOL wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *que
|
||||
@@ -1827,7 +1830,7 @@ BOOL wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *que
|
||||
struct wined3d_cs_query_poll *op;
|
||||
BOOL ret;
|
||||
|
||||
@ -345,7 +345,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_QUERY_POLL;
|
||||
op->query = query;
|
||||
op->flags = flags;
|
||||
@@ -1854,7 +1857,7 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
@@ -1853,7 +1856,7 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
{
|
||||
struct wined3d_cs_preload_resource *op;
|
||||
|
||||
@ -354,7 +354,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_PRELOAD_RESOURCE;
|
||||
op->resource = resource;
|
||||
|
||||
@@ -1878,7 +1881,7 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
|
||||
@@ -1877,7 +1880,7 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
|
||||
{
|
||||
struct wined3d_cs_unload_resource *op;
|
||||
|
||||
@ -363,7 +363,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_UNLOAD_RESOURCE;
|
||||
op->resource = resource;
|
||||
|
||||
@@ -1904,7 +1907,7 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
@@ -1903,7 +1906,7 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
struct wined3d_cs_map *op;
|
||||
HRESULT hr;
|
||||
|
||||
@ -372,7 +372,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_MAP;
|
||||
op->resource = resource;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
@@ -1933,7 +1936,7 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc
|
||||
@@ -1932,7 +1935,7 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc
|
||||
struct wined3d_cs_unmap *op;
|
||||
HRESULT hr;
|
||||
|
||||
@ -381,7 +381,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_UNMAP;
|
||||
op->resource = resource;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
@@ -1959,7 +1962,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
|
||||
@@ -1958,7 +1961,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
|
||||
{
|
||||
struct wined3d_cs_finish *op;
|
||||
|
||||
@ -390,7 +390,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_GLFINISH;
|
||||
|
||||
cs->ops->submit(cs);
|
||||
@@ -2016,7 +2019,7 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
|
||||
@@ -2015,7 +2018,7 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
|
||||
{
|
||||
struct wined3d_cs_push_constants *op;
|
||||
|
||||
@ -399,7 +399,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_PUSH_CONSTANTS;
|
||||
op->p = p;
|
||||
op->start_idx = start_idx;
|
||||
@@ -2045,7 +2048,7 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
|
||||
@@ -2044,7 +2047,7 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
|
||||
{
|
||||
struct wined3d_cs_set_primitive_type *op;
|
||||
|
||||
@ -408,7 +408,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_PRIMITIVE_TYPE;
|
||||
op->gl_primitive_type = primitive_type;
|
||||
|
||||
@@ -2105,7 +2108,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
|
||||
@@ -2104,7 +2107,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
|
||||
{
|
||||
struct wined3d_cs_set_light *op;
|
||||
|
||||
@ -417,7 +417,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_LIGHT;
|
||||
op->light = *light;
|
||||
|
||||
@@ -2194,7 +2197,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enab
|
||||
@@ -2193,7 +2196,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enab
|
||||
{
|
||||
struct wined3d_cs_set_light_enable *op;
|
||||
|
||||
@ -426,7 +426,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_LIGHT_ENABLE;
|
||||
op->idx = idx;
|
||||
op->enable = enable;
|
||||
@@ -2224,7 +2227,7 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
|
||||
@@ -2223,7 +2226,7 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
|
||||
{
|
||||
struct wined3d_cs_blt *op;
|
||||
|
||||
@ -435,7 +435,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_BLT;
|
||||
op->dst_surface = dst_surface;
|
||||
op->dst_rect = *dst_rect;
|
||||
@@ -2263,7 +2266,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
@@ -2262,7 +2265,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
{
|
||||
struct wined3d_cs_clear_rtv *op;
|
||||
|
||||
@ -444,7 +444,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_CLEAR_RTV;
|
||||
op->view = view;
|
||||
op->rect = *rect;
|
||||
@@ -2299,7 +2302,7 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
|
||||
@@ -2298,7 +2301,7 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
|
||||
{
|
||||
struct wined3d_cs_update_texture *op;
|
||||
|
||||
@ -453,7 +453,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_UPDATE_TEXTURE;
|
||||
op->src = src;
|
||||
op->dst = dst;
|
||||
@@ -2365,7 +2368,7 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
@@ -2364,7 +2367,7 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
{
|
||||
struct wined3d_cs_update_sub_resource *op;
|
||||
|
||||
@ -462,7 +462,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_UPDATE_SUB_RESOURCE;
|
||||
op->resource = resource;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
@@ -2394,7 +2397,7 @@ HRESULT wined3d_cs_emit_get_dc(struct wined3d_cs *cs, struct wined3d_texture *te
|
||||
@@ -2393,7 +2396,7 @@ HRESULT wined3d_cs_emit_get_dc(struct wined3d_cs *cs, struct wined3d_texture *te
|
||||
struct wined3d_cs_get_release_dc *op;
|
||||
HRESULT hr;
|
||||
|
||||
@ -471,7 +471,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_GET_DC;
|
||||
op->texture = texture;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
@@ -2420,7 +2423,7 @@ HRESULT wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -2419,7 +2422,7 @@ HRESULT wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture
|
||||
struct wined3d_cs_get_release_dc *op;
|
||||
HRESULT hr;
|
||||
|
||||
@ -480,7 +480,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_RELEASE_DC;
|
||||
op->texture = texture;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
@@ -2446,7 +2449,7 @@ void wined3d_cs_emit_create_dummy_textures(struct wined3d_cs *cs)
|
||||
@@ -2445,7 +2448,7 @@ void wined3d_cs_emit_create_dummy_textures(struct wined3d_cs *cs)
|
||||
{
|
||||
struct wined3d_cs_create_dummy_textures *op;
|
||||
|
||||
@ -489,7 +489,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_CREATE_DUMMY_TEXTURES;
|
||||
|
||||
cs->ops->submit_and_wait(cs);
|
||||
@@ -2466,7 +2469,7 @@ HRESULT wined3d_cs_emit_create_swapchain_context(struct wined3d_cs *cs, struct w
|
||||
@@ -2465,7 +2468,7 @@ HRESULT wined3d_cs_emit_create_swapchain_context(struct wined3d_cs *cs, struct w
|
||||
struct wined3d_cs_create_swapchain_context *op;
|
||||
HRESULT hr;
|
||||
|
||||
@ -498,7 +498,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_CREATE_SWAPCHAIN_CONTEXT;
|
||||
op->swapchain = swapchain;
|
||||
op->hr = &hr;
|
||||
@@ -2489,7 +2492,7 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
|
||||
@@ -2488,7 +2491,7 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
|
||||
{
|
||||
struct wined3d_cs_update_swap_interval *op;
|
||||
|
||||
@ -507,7 +507,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_UPDATE_SWAP_INTERVAL;
|
||||
op->swapchain = swapchain;
|
||||
|
||||
@@ -2509,7 +2512,7 @@ void wined3d_cs_emit_sampler_init(struct wined3d_cs *cs, struct wined3d_sampler
|
||||
@@ -2508,7 +2511,7 @@ void wined3d_cs_emit_sampler_init(struct wined3d_cs *cs, struct wined3d_sampler
|
||||
{
|
||||
struct wined3d_cs_sampler_init *op;
|
||||
|
||||
@ -516,7 +516,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_SAMPLER_INIT;
|
||||
op->sampler = sampler;
|
||||
|
||||
@@ -2547,7 +2550,7 @@ void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
|
||||
@@ -2546,7 +2549,7 @@ void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
|
||||
if (dirty_region)
|
||||
WARN("Ignoring dirty_region %s.\n", debug_box(dirty_region));
|
||||
|
||||
@ -525,7 +525,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION;
|
||||
op->texture = texture;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
@@ -2577,7 +2580,7 @@ void wined3d_cs_emit_buffer_copy(struct wined3d_cs *cs, struct wined3d_buffer *d
|
||||
@@ -2576,7 +2579,7 @@ void wined3d_cs_emit_buffer_copy(struct wined3d_cs *cs, struct wined3d_buffer *d
|
||||
{
|
||||
struct wined3d_cs_buffer_copy *op;
|
||||
|
||||
@ -534,7 +534,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_BUFFER_COPY;
|
||||
op->dst_buffer = dst_buffer;
|
||||
op->dst_offset = dst_offset;
|
||||
@@ -2607,7 +2610,7 @@ HRESULT wined3d_cs_emit_create_buffer_view(struct wined3d_cs *cs, struct wined3d
|
||||
@@ -2606,7 +2609,7 @@ HRESULT wined3d_cs_emit_create_buffer_view(struct wined3d_cs *cs, struct wined3d
|
||||
struct wined3d_cs_create_buffer_view *op;
|
||||
HRESULT hr;
|
||||
|
||||
@ -543,7 +543,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_CREATE_BUFFER_VIEW;
|
||||
op->view = view;
|
||||
op->desc = desc;
|
||||
@@ -2635,7 +2638,7 @@ void wined3d_cs_emit_create_texture_view(struct wined3d_cs *cs, struct wined3d_g
|
||||
@@ -2634,7 +2637,7 @@ void wined3d_cs_emit_create_texture_view(struct wined3d_cs *cs, struct wined3d_g
|
||||
{
|
||||
struct wined3d_cs_create_texture_view *op;
|
||||
|
||||
@ -552,16 +552,16 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_CREATE_TEXTURE_VIEW;
|
||||
op->view = view;
|
||||
op->view_target = view_target;
|
||||
@@ -2659,7 +2662,7 @@ void wined3d_cs_emit_delete_opengl_contexts(struct wined3d_cs *cs, struct wined3
|
||||
@@ -2658,7 +2661,7 @@ 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 = cs->ops->require_space(cs, sizeof(*op), 0);
|
||||
op->opcode = WINED3D_CS_OP_DELETE_GL_CONTEXTS;
|
||||
op->swapchain = swapchain;
|
||||
|
||||
@@ -2722,7 +2725,7 @@ void wined3d_cs_emit_map_vertex_buffers(struct wined3d_cs *cs, UINT src_start_id
|
||||
cs->ops->submit_and_wait(cs);
|
||||
@@ -2720,7 +2723,7 @@ void wined3d_cs_emit_map_vertex_buffers(struct wined3d_cs *cs, UINT src_start_id
|
||||
{
|
||||
struct wined3d_cs_map_vertex_buffers *op;
|
||||
|
||||
@ -570,7 +570,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_MAP_vertex_buffers;
|
||||
op->src_start_idx = src_start_idx;
|
||||
op->stream_info = stream_info;
|
||||
@@ -2792,7 +2795,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2790,7 +2793,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_MAP_vertex_buffers */ wined3d_cs_exec_map_vertex_buffers,
|
||||
};
|
||||
|
||||
@ -579,7 +579,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
{
|
||||
if (size > cs->data_size)
|
||||
{
|
||||
@@ -2823,9 +2826,10 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
@@ -2821,9 +2824,10 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
wined3d_cs_st_submit,
|
||||
};
|
||||
|
||||
@ -591,7 +591,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
void *data;
|
||||
|
||||
assert(size <= sizeof(block->data));
|
||||
@@ -2833,8 +2837,11 @@ static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size)
|
||||
@@ -2831,8 +2835,11 @@ static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size)
|
||||
if (!block || block->pos + size > sizeof(block->data))
|
||||
{
|
||||
if (block)
|
||||
@ -604,7 +604,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
wined3d_cs_set_thread_block(cs, block);
|
||||
}
|
||||
|
||||
@@ -2852,7 +2859,7 @@ static void wined3d_cs_mt_submit(struct wined3d_cs *cs)
|
||||
@@ -2850,7 +2857,7 @@ static void wined3d_cs_mt_submit(struct wined3d_cs *cs)
|
||||
if (cs->thread_id == GetCurrentThreadId())
|
||||
wined3d_cs_process_block(cs, block);
|
||||
else
|
||||
@ -613,7 +613,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
}
|
||||
|
||||
static void wined3d_cs_mt_submit_and_wait(struct wined3d_cs *cs)
|
||||
@@ -2882,7 +2889,7 @@ static void wined3d_cs_emit_stop(struct wined3d_cs *cs)
|
||||
@@ -2880,7 +2887,7 @@ static void wined3d_cs_emit_stop(struct wined3d_cs *cs)
|
||||
|
||||
assert(cs->thread_id != GetCurrentThreadId());
|
||||
|
||||
@ -622,7 +622,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
op->opcode = WINED3D_CS_OP_STOP;
|
||||
|
||||
wined3d_cs_mt_submit(cs);
|
||||
@@ -2918,7 +2925,7 @@ static DWORD WINAPI wined3d_cs_run(void *thread_param)
|
||||
@@ -2916,7 +2923,7 @@ static DWORD WINAPI wined3d_cs_run(void *thread_param)
|
||||
for (;;)
|
||||
{
|
||||
struct wined3d_cs_block *block;
|
||||
@ -631,7 +631,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
if (!wined3d_cs_process_block(cs, block))
|
||||
break;
|
||||
}
|
||||
@@ -2962,6 +2969,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -2960,6 +2967,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
|
||||
wined3d_cs_list_init(&cs->free_list);
|
||||
wined3d_cs_list_init(&cs->exec_list);
|
||||
@ -639,7 +639,7 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
|
||||
if (!(cs->thread = CreateThread(NULL, 0, wined3d_cs_run, cs, 0, &cs->thread_id)))
|
||||
{
|
||||
@@ -2997,6 +3005,7 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
@@ -2995,6 +3003,7 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
|
||||
/* FIXME: Cleanup the block lists on thread exit. */
|
||||
#if 0
|
||||
@ -648,10 +648,10 @@ index a94bc4a0f42..ca2aa81c276 100644
|
||||
wined3d_cs_list_cleanup(&cs->free_list);
|
||||
#endif
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index f12d64474ea..751fd61de05 100644
|
||||
index 831375b1efd..2d888a51f61 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3218,12 +3218,13 @@ struct wined3d_cs_block
|
||||
@@ -3214,12 +3214,13 @@ struct wined3d_cs_block
|
||||
{
|
||||
struct list entry;
|
||||
UINT pos;
|
||||
@ -666,7 +666,7 @@ index f12d64474ea..751fd61de05 100644
|
||||
void (*submit)(struct wined3d_cs *cs);
|
||||
void (*submit_and_wait)(struct wined3d_cs *cs);
|
||||
};
|
||||
@@ -3241,6 +3242,7 @@ struct wined3d_cs
|
||||
@@ -3237,6 +3238,7 @@ struct wined3d_cs
|
||||
|
||||
struct wined3d_cs_list free_list;
|
||||
struct wined3d_cs_list exec_list;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
From d9a65443731686d1191b8ddd6c3fa340b4f3f766 Mon Sep 17 00:00:00 2001
|
||||
From 77e96719b681f37950972bd78478c1c08a5faebc Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Wed, 8 Feb 2017 19:35:36 +0100
|
||||
Subject: Revert "wined3d: Implement wined3d_buffer_upload_data() on top of
|
||||
@ -7,12 +7,12 @@ Subject: Revert "wined3d: Implement wined3d_buffer_upload_data() on top of
|
||||
This reverts commit e2dbbec1af8ae2ea8813148d56e14c8c211ee334.
|
||||
---
|
||||
dlls/wined3d/buffer.c | 30 +++++++++++++++++++-----------
|
||||
dlls/wined3d/device.c | 13 +++----------
|
||||
dlls/wined3d/device.c | 14 +++-----------
|
||||
dlls/wined3d/wined3d_private.h | 2 +-
|
||||
3 files changed, 23 insertions(+), 22 deletions(-)
|
||||
3 files changed, 23 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
index de5ab17d1d7..e6e4d8379df 100644
|
||||
index fa3e3a7380a..5cf7b1068f9 100644
|
||||
--- a/dlls/wined3d/buffer.c
|
||||
+++ b/dlls/wined3d/buffer.c
|
||||
@@ -532,7 +532,7 @@ ULONG CDECL wined3d_buffer_incref(struct wined3d_buffer *buffer)
|
||||
@ -91,10 +91,10 @@ index de5ab17d1d7..e6e4d8379df 100644
|
||||
|
||||
static ULONG buffer_resource_incref(struct wined3d_resource *resource)
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 0e969be247e..d2b332e0089 100644
|
||||
index a7ee5bc099d..a3adf3255f1 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -4078,6 +4078,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
@@ -4127,6 +4127,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
if (resource->type == WINED3D_RTYPE_BUFFER)
|
||||
{
|
||||
struct wined3d_buffer *buffer = buffer_from_resource(resource);
|
||||
@ -102,14 +102,15 @@ index 0e969be247e..d2b332e0089 100644
|
||||
|
||||
if (sub_resource_idx > 0)
|
||||
{
|
||||
@@ -4085,16 +4086,8 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
@@ -4134,17 +4135,8 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
return;
|
||||
}
|
||||
|
||||
- context = context_acquire(resource->device, NULL);
|
||||
- context = context_acquire(resource->device, NULL, 0);
|
||||
- if (!wined3d_buffer_load_location(buffer, context, WINED3D_LOCATION_BUFFER))
|
||||
- {
|
||||
- ERR("Failed to load buffer location.\n");
|
||||
- context_release(context);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
@ -122,10 +123,10 @@ index 0e969be247e..d2b332e0089 100644
|
||||
return;
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 7209ce8d170..3044f16d1ce 100644
|
||||
index 50b7c93cad8..30de702098a 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3261,7 +3261,7 @@ BOOL wined3d_buffer_load_location(struct wined3d_buffer *buffer,
|
||||
@@ -3300,7 +3300,7 @@ BOOL wined3d_buffer_load_location(struct wined3d_buffer *buffer,
|
||||
BYTE *wined3d_buffer_load_sysmem(struct wined3d_buffer *buffer, struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||
HRESULT wined3d_buffer_copy(struct wined3d_buffer *dst_buffer, unsigned int dst_offset,
|
||||
struct wined3d_buffer *src_buffer, unsigned int src_offset, unsigned int size) DECLSPEC_HIDDEN;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 0a7d13f672cea0839dade4d06a332c024bea9a24 Mon Sep 17 00:00:00 2001
|
||||
From 40557e752dfc48ee40e75173c6eb32bf640ef286 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Mon, 21 Mar 2016 18:27:59 +0100
|
||||
Subject: wined3d: Silence extremely noisy FIXME in
|
||||
@ -9,18 +9,18 @@ Subject: wined3d: Silence extremely noisy FIXME in
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 1f0a97a..2d8df58 100644
|
||||
index e77e13356a5..a26b2dfb619 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -1418,7 +1418,7 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
|
||||
@@ -1469,7 +1469,7 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
|
||||
sub_resource_idx = layer * texture->level_count;
|
||||
|
||||
if (dirty_region)
|
||||
- FIXME("Ignoring dirty_region %s.\n", debug_box(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))
|
||||
--
|
||||
2.9.0
|
||||
2.11.0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user