Rebase against 1576dc3dd26c7bbb2ed8eb68f11799f1f1d8b6a2.

This commit is contained in:
Sebastian Lackner 2017-01-08 04:42:04 +01:00
parent cb8a0d2ffd
commit b51fe90caa
8 changed files with 487 additions and 250 deletions

View File

@ -1,4 +1,4 @@
From 26a7497a9fb1184080a1622f6a834bed50d2a239 Mon Sep 17 00:00:00 2001
From ff83c3ee1b422915d690411cda05db19ceacbdf1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Wed, 3 Jun 2015 22:57:21 +0200
Subject: winex11.drv: Allow changing the opengl pixel format on the desktop
@ -18,7 +18,7 @@ it seems to be a suitable workaround as it fixes multiple applications.
4 files changed, 48 insertions(+), 7 deletions(-)
diff --git a/dlls/d3d10_1/tests/d3d10_1.c b/dlls/d3d10_1/tests/d3d10_1.c
index f5b1454..ac21f68 100644
index e1d6d4c97c2..bf6a9a138dd 100644
--- a/dlls/d3d10_1/tests/d3d10_1.c
+++ b/dlls/d3d10_1/tests/d3d10_1.c
@@ -226,8 +226,18 @@ static void test_create_device(void)
@ -43,10 +43,10 @@ index f5b1454..ac21f68 100644
swapchain = (IDXGISwapChain *)0xdeadbeef;
device = (ID3D10Device1 *)0xdeadbeef;
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index 04a369c..ee506f5 100644
index ac4393dd3b3..49356b398c1 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -805,10 +805,22 @@ static void test_create_device(void)
@@ -1451,10 +1451,22 @@ static void test_create_device(void)
hr = D3D11CreateDeviceAndSwapChain(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, 0, NULL, 0, D3D11_SDK_VERSION,
&swapchain_desc, &swapchain, &device, &feature_level, &immediate_context);
todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "D3D11CreateDeviceAndSwapChain returned %#x.\n", hr);
@ -74,10 +74,10 @@ index 04a369c..ee506f5 100644
swapchain = (IDXGISwapChain *)0xdeadbeef;
device = (ID3D11Device *)0xdeadbeef;
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index 4302f76..342f8d2 100644
index aa266a5186e..986000d0278 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -11171,6 +11171,21 @@ static void test_get_render_target_data(void)
@@ -11401,6 +11401,21 @@ static void test_render_target_device_mismatch(void)
DestroyWindow(window);
}
@ -99,19 +99,19 @@ index 4302f76..342f8d2 100644
START_TEST(device)
{
WNDCLASSA wc = {0};
@@ -11287,6 +11302,7 @@ START_TEST(device)
test_check_device_format();
@@ -11518,6 +11533,7 @@ START_TEST(device)
test_miptree_layout();
test_get_render_target_data();
test_render_target_device_mismatch();
+ test_desktop_window();
UnregisterClassA("d3d9_test_wc", GetModuleHandleA(NULL));
}
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index 0f7534e..613d1df 100644
index d89a19330f7..b5faac56ade 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -1457,12 +1457,15 @@ static BOOL set_pixel_format(HDC hdc, int format, BOOL allow_change)
@@ -1469,12 +1469,15 @@ static BOOL set_pixel_format(HDC hdc, int format, BOOL allow_change)
TRACE("(%p,%d)\n", hdc, format);
@ -129,5 +129,5 @@ index 0f7534e..613d1df 100644
if (!fmt)
{
--
2.8.0
2.11.0

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "56959b18085ea22050d0226f669f112abfb37850"
echo "1576dc3dd26c7bbb2ed8eb68f11799f1f1d8b6a2"
}
# Show version information

View File

@ -1,4 +1,4 @@
From 9364fbffd1a4a65bb2b833f3d53cfa24bcf9a3b2 Mon Sep 17 00:00:00 2001
From a24f32505c70e8cb5a6961f69c1165d5806816ce 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
@ -20,7 +20,7 @@ Subject: wined3d: Move the framebuffer into wined3d_state
13 files changed, 194 insertions(+), 135 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index 5de7c02..d3d35c5 100644
index 247bc360085..cb81f7f6ceb 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -704,7 +704,7 @@ static void shader_arb_load_constants_internal(struct shader_arb_priv *priv,
@ -42,10 +42,10 @@ index 5de7c02..d3d35c5 100644
}
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 0642766..0545e57 100644
index a7794fac2cb..1f991b63852 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -1706,6 +1706,11 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
@@ -1710,6 +1710,11 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
goto out;
}
@ -57,7 +57,7 @@ index 0642766..0545e57 100644
/* Initialize the texture unit mapping to a 1:1 mapping */
for (s = 0; s < MAX_COMBINED_SAMPLERS; ++s)
{
@@ -2026,6 +2031,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);
@ -65,7 +65,7 @@ index 0642766..0545e57 100644
HeapFree(GetProcessHeap(), 0, ret->free_event_queries);
HeapFree(GetProcessHeap(), 0, ret->free_occlusion_queries);
HeapFree(GetProcessHeap(), 0, ret->free_timestamp_queries);
@@ -2073,6 +2079,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);
@ -73,7 +73,7 @@ index 0642766..0545e57 100644
HeapFree(GetProcessHeap(), 0, context->draw_buffers);
HeapFree(GetProcessHeap(), 0, context->blit_targets);
device_context_remove(device, context);
@@ -2627,7 +2634,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
@@ -2632,7 +2639,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
DWORD rt_mask = 0, *cur_mask;
UINT i;
@ -82,7 +82,7 @@ index 0642766..0545e57 100644
|| rt_count != gl_info->limits.buffers)
{
if (!context_validate_rt_config(rt_count, rts, dsv))
@@ -2672,6 +2679,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
@@ -2677,6 +2684,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);
}
@ -91,7 +91,7 @@ index 0642766..0545e57 100644
}
else if (wined3d_settings.offscreen_rendering_mode == ORM_FBO
&& (!rt_count || wined3d_resource_is_offscreen(rts[0]->resource)))
@@ -2729,7 +2738,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
@@ -2734,7 +2743,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)
{
@ -100,7 +100,7 @@ index 0642766..0545e57 100644
struct wined3d_shader *ps = state->shader[WINED3D_SHADER_TYPE_PIXEL];
DWORD rt_mask, rt_mask_bits;
unsigned int i;
@@ -2759,7 +2768,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
@@ -2764,7 +2773,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);
@ -109,7 +109,7 @@ index 0642766..0545e57 100644
DWORD *cur_mask;
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
@@ -3048,6 +3057,8 @@ void context_state_drawbuf(struct wined3d_context *context, const struct wined3d
@@ -3053,6 +3062,8 @@ void context_state_drawbuf(struct wined3d_context *context, const struct wined3d
context_apply_draw_buffers(context, rt_mask);
*cur_mask = rt_mask;
}
@ -118,7 +118,7 @@ index 0642766..0545e57 100644
}
static BOOL fixed_get_input(BYTE usage, BYTE usage_idx, unsigned int *regnum)
@@ -3479,7 +3490,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context,
@@ -3484,7 +3495,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;
@ -128,7 +128,7 @@ index 0642766..0545e57 100644
WORD map;
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 1029c1a..3bca1bd 100644
index 1029c1a1810..3bca1bd882f 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -350,19 +350,19 @@ static void wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data)
@ -281,7 +281,7 @@ index 1029c1a..3bca1bd 100644
HeapFree(GetProcessHeap(), 0, cs);
}
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 1ce6d76..9757cd5 100644
index 8d6cbe358ae..c5eed77293a 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1004,7 +1004,7 @@ static void device_init_swapchain_state(struct wined3d_device *device, struct wi
@ -564,21 +564,21 @@ index 1ce6d76..9757cd5 100644
wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect);
}
@@ -5021,11 +5008,11 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
@@ -5023,11 +5010,11 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
{
- if ((rtv = device->fb.render_targets[i]) && rtv->resource == resource)
+ if ((rtv = device->state.fb.render_targets[i]) && rtv->resource == resource)
ERR("Resource %p is still in use as render target %u.\n", resource, i);
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
{
- if ((rtv = device->fb.render_targets[i]) && rtv->resource == resource)
+ if ((rtv = device->state.fb.render_targets[i]) && rtv->resource == resource)
ERR("Resource %p is still in use as render target %u.\n", resource, i);
}
- if ((rtv = device->fb.depth_stencil) && rtv->resource == resource)
+ if ((rtv = device->state.fb.depth_stencil) && rtv->resource == resource)
ERR("Resource %p is still in use as depth/stencil buffer.\n", resource);
}
- if ((rtv = device->fb.depth_stencil) && rtv->resource == resource)
+ if ((rtv = device->state.fb.depth_stencil) && rtv->resource == resource)
ERR("Resource %p is still in use as depth/stencil buffer.\n", resource);
switch (type)
@@ -5150,8 +5137,12 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
@@ -5153,8 +5140,12 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
device->blitter = adapter->blitter;
@ -594,7 +594,7 @@ index 1ce6d76..9757cd5 100644
if (!(device->cs = wined3d_cs_create(device)))
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
index 06c5bc9..fa92f25 100644
index 06c5bc9b491..fa92f25adb0 100644
--- a/dlls/wined3d/drawprim.c
+++ b/dlls/wined3d/drawprim.c
@@ -413,7 +413,7 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
@ -607,7 +607,7 @@ index 06c5bc9..fa92f25 100644
struct wined3d_event_query *ib_query = NULL;
struct wined3d_stream_info si_emulated;
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index a3c2190..4edeb01 100644
index fbecd167cb0..c54c4d9c325 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -1561,7 +1561,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
@ -620,10 +620,10 @@ index a3c2190..4edeb01 100644
0.0f,
0.0f,
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
index 24051cc..5c28bff 100644
index 5e9b0de9cc2..f5bbb07f14b 100644
--- a/dlls/wined3d/shader.c
+++ b/dlls/wined3d/shader.c
@@ -3198,7 +3198,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
@@ -3208,7 +3208,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. */
@ -633,7 +633,7 @@ index 24051cc..5c28bff 100644
static unsigned int warned = 0;
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 6e89fbc..519c084 100644
index 6e89fbc92ac..519c084f47d 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -152,7 +152,7 @@ static void state_zenable(struct wined3d_context *context, const struct wined3d_
@ -737,7 +737,7 @@ index 6e89fbc..519c084 100644
else
gl_info->gl_ops.gl.p_glDisable(GL_FRAMEBUFFER_SRGB);
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index fd01752..2fd4ef4 100644
index fd017524075..2fd4ef494f7 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -431,6 +431,7 @@ void state_unbind_resources(struct wined3d_state *state)
@ -837,7 +837,7 @@ index fd01752..2fd4ef4 100644
if (type == WINED3D_SBT_RECORDED)
return WINED3D_OK;
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index d21b293..6db9ca8 100644
index 69122fbc3e5..35c5d489cc0 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2572,7 +2572,7 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
@ -850,7 +850,7 @@ index d21b293..6db9ca8 100644
struct wined3d_texture *src_texture;
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index dc7f5de..2773d2f 100644
index c95faddb42a..34558a8a1f2 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -488,7 +488,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain,
@ -863,10 +863,10 @@ index dc7f5de..2773d2f 100644
struct wined3d_texture *logo_texture;
struct wined3d_context *context;
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index 3eed41a..ea4d94d 100644
index 715823bfd28..2442228a7d4 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -4583,7 +4583,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
@@ -4624,7 +4624,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;
@ -875,7 +875,7 @@ index 3eed41a..ea4d94d 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;
@@ -5382,7 +5382,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
@@ -5423,7 +5423,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
break;
}
}
@ -885,10 +885,10 @@ index 3eed41a..ea4d94d 100644
|| !state->render_states[WINED3D_RS_CLIPPLANEENABLE])
{
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index df28689..497b79a 100644
index f6e287b1fbd..33d18326f2f 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1504,6 +1504,36 @@ struct wined3d_timestamp_query
@@ -1508,6 +1508,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;
@ -925,7 +925,7 @@ index df28689..497b79a 100644
struct wined3d_context
{
const struct wined3d_gl_info *gl_info;
@@ -1518,6 +1548,7 @@ struct wined3d_context
@@ -1522,6 +1552,7 @@ struct wined3d_context
DWORD dirtyArray[STATE_HIGHEST + 1]; /* Won't get bigger than that, a state is never marked dirty 2 times */
DWORD numDirtyEntries;
DWORD isStateDirty[STATE_HIGHEST / (sizeof(DWORD) * CHAR_BIT) + 1]; /* Bitmap to find out quickly if a state is dirty */
@ -933,7 +933,7 @@ index df28689..497b79a 100644
struct wined3d_device *device;
struct wined3d_swapchain *swapchain;
@@ -1630,12 +1661,6 @@ struct wined3d_context
@@ -1634,12 +1665,6 @@ struct wined3d_context
GLuint dummy_arbfp_prog;
};
@ -946,7 +946,7 @@ index df28689..497b79a 100644
typedef void (*APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id);
struct StateEntry
@@ -2442,7 +2467,7 @@ struct wined3d_stream_state
@@ -2446,7 +2471,7 @@ struct wined3d_stream_state
struct wined3d_state
{
DWORD flags;
@ -955,7 +955,7 @@ index df28689..497b79a 100644
struct wined3d_vertex_declaration *vertex_declaration;
struct wined3d_stream_output stream_output[MAX_STREAM_OUT];
@@ -2548,7 +2573,6 @@ struct wined3d_device
@@ -2552,7 +2577,6 @@ struct wined3d_device
struct wine_rb_tree samplers;
/* Render Target Support */
@ -963,7 +963,7 @@ index df28689..497b79a 100644
struct wined3d_surface *onscreen_depth_stencil;
struct wined3d_rendertarget_view *auto_depth_stencil_view;
@@ -3098,9 +3122,8 @@ struct wined3d_stateblock
@@ -3102,9 +3126,8 @@ struct wined3d_stateblock
void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN;
@ -975,7 +975,7 @@ index df28689..497b79a 100644
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
struct wined3d_cs_ops
@@ -3113,7 +3136,6 @@ struct wined3d_cs
@@ -3117,7 +3140,6 @@ struct wined3d_cs
{
const struct wined3d_cs_ops *ops;
struct wined3d_device *device;
@ -984,5 +984,5 @@ index df28689..497b79a 100644
size_t data_size;
--
2.9.0
2.11.0

View File

@ -1,16 +1,16 @@
From b5aa14996c4b4968eb011080fc0f9b6211c486aa Mon Sep 17 00:00:00 2001
From e5b486b16a916f4d08e671e8efb851aca39b1ade Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sat, 6 Jul 2013 18:26:11 +0200
Subject: wined3d: Add query support to the command stream
---
dlls/wined3d/cs.c | 36 ++++++++++++++++++++++++++++++++++++
dlls/wined3d/cs.c | 38 ++++++++++++++++++++++++++++++++++++++
dlls/wined3d/query.c | 15 +++++++++++----
dlls/wined3d/wined3d_private.h | 2 ++
3 files changed, 49 insertions(+), 4 deletions(-)
3 files changed, 51 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 2643713..ee57a56 100644
index 26437136163..b0a25f86374 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -74,6 +74,7 @@ enum wined3d_cs_op
@ -21,7 +21,7 @@ index 2643713..ee57a56 100644
WINED3D_CS_OP_STOP,
};
@@ -425,6 +426,13 @@ struct wined3d_cs_skip
@@ -425,6 +426,14 @@ struct wined3d_cs_skip
DWORD size;
};
@ -29,13 +29,14 @@ index 2643713..ee57a56 100644
+{
+ enum wined3d_cs_op opcode;
+ struct wined3d_query *query;
+ DWORD flags;
+ BOOL *ret;
+};
+
static void wined3d_cs_submit(struct wined3d_cs *cs, size_t size)
{
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
@@ -2131,6 +2139,33 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
@@ -2131,6 +2140,34 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
cs->ops->submit(cs, sizeof(*op));
}
@ -44,18 +45,19 @@ index 2643713..ee57a56 100644
+ const struct wined3d_cs_query_poll *op = data;
+ struct wined3d_query *query = op->query;
+
+ *op->ret = query->query_ops->query_poll(query);
+ *op->ret = query->query_ops->query_poll(query, op->flags);
+
+ return sizeof(*op);
+}
+
+void wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *query, BOOL *ret)
+void wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags, BOOL *ret)
+{
+ struct wined3d_cs_query_poll *op;
+
+ op = cs->ops->require_space(cs, sizeof(*op));
+ op->opcode = WINED3D_CS_OP_QUERY_POLL;
+ op->query = query;
+ op->flags = flags;
+ op->ret = ret;
+
+ cs->ops->submit(cs, sizeof(*op));
@ -69,7 +71,7 @@ index 2643713..ee57a56 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -2183,6 +2218,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2183,6 +2220,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_CLEAR_RTV */ wined3d_cs_exec_clear_rtv,
/* WINED3D_CS_OP_TEXTURE_MAP */ wined3d_cs_exec_texture_map,
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
@ -78,26 +80,26 @@ index 2643713..ee57a56 100644
static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size)
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
index 902e01a..d8cfb64 100644
index c5ca37d4878..c8dd76155d8 100644
--- a/dlls/wined3d/query.c
+++ b/dlls/wined3d/query.c
@@ -338,8 +338,13 @@ HRESULT CDECL wined3d_query_get_data(struct wined3d_query *query,
@@ -339,8 +339,13 @@ HRESULT CDECL wined3d_query_get_data(struct wined3d_query *query,
if (query->state == QUERY_CREATED)
WARN("Query wasn't started yet.\n");
- else if (!query->query_ops->query_poll(query))
- else if (!query->query_ops->query_poll(query, flags))
- return S_FALSE;
+ else
+ {
+ BOOL ret;
+ wined3d_cs_emit_query_poll(query->device->cs, query, &ret);
+ wined3d_cs_emit_query_poll(query->device->cs, query, flags, &ret);
+ if (!ret)
+ return S_FALSE;
+ }
if (data)
memcpy(data, query->data, min(data_size, query->data_size));
@@ -491,7 +496,7 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
@@ -492,7 +497,7 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
* restart. */
if (flags & WINED3DISSUE_BEGIN)
{
@ -106,7 +108,7 @@ index 902e01a..d8cfb64 100644
{
if (oq->context->tid != GetCurrentThreadId())
{
@@ -521,13 +526,14 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
@@ -522,13 +527,14 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
checkGLcall("glBeginQuery()");
context_release(context);
@ -122,7 +124,7 @@ index 902e01a..d8cfb64 100644
{
if (oq->context->tid != GetCurrentThreadId())
{
@@ -543,6 +549,7 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
@@ -544,6 +550,7 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
context_release(context);
}
}
@ -131,10 +133,10 @@ index 902e01a..d8cfb64 100644
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 12835d0..2f6a586 100644
index 6fff9e1674b..bf1ffb1e87c 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1491,6 +1491,7 @@ struct wined3d_occlusion_query
@@ -1495,6 +1495,7 @@ struct wined3d_occlusion_query
GLuint id;
struct wined3d_context *context;
UINT64 samples;
@ -142,14 +144,14 @@ index 12835d0..2f6a586 100644
};
struct wined3d_timestamp_query
@@ -3187,6 +3188,7 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
@@ -3191,6 +3192,7 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain,
const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, DWORD flags) DECLSPEC_HIDDEN;
void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *query, BOOL *ret) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags, BOOL *ret) DECLSPEC_HIDDEN;
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
UINT base_vertex_index) DECLSPEC_HIDDEN;
--
2.9.0
2.11.0

View File

@ -1,19 +1,19 @@
From 30ac0963aabd73ccd9a2035f828cc10ad8e9dc76 Mon Sep 17 00:00:00 2001
From 374805ab329cba9e7695c1fe46ce9b13fa4e6fcd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sat, 6 Jul 2013 19:18:48 +0200
Subject: wined3d: Poll queries automatically in the CS
---
dlls/wined3d/cs.c | 69 +++++++++++++++++++-----------------------
dlls/wined3d/query.c | 22 ++++++++------
dlls/wined3d/cs.c | 71 ++++++++++++++++++------------------------
dlls/wined3d/query.c | 23 ++++++++------
dlls/wined3d/wined3d_private.h | 5 +--
3 files changed, 46 insertions(+), 50 deletions(-)
3 files changed, 47 insertions(+), 52 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 9054fc3..920f93d 100644
index c3bfda433b4..977e0ac3bda 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -72,7 +72,6 @@ enum wined3d_cs_op
@@ -74,7 +74,6 @@ enum wined3d_cs_op
WINED3D_CS_OP_CLEAR_RTV,
WINED3D_CS_OP_TEXTURE_MAP,
WINED3D_CS_OP_TEXTURE_UNMAP,
@ -21,7 +21,7 @@ index 9054fc3..920f93d 100644
WINED3D_CS_OP_STOP,
};
@@ -411,13 +410,6 @@ struct wined3d_cs_skip
@@ -426,14 +425,6 @@ struct wined3d_cs_skip
DWORD size;
};
@ -29,13 +29,14 @@ index 9054fc3..920f93d 100644
-{
- enum wined3d_cs_op opcode;
- struct wined3d_query *query;
- DWORD flags;
- BOOL *ret;
-};
-
static void wined3d_cs_submit(struct wined3d_cs *cs, size_t size)
{
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
@@ -1682,8 +1674,9 @@ static UINT wined3d_cs_exec_query_issue(struct wined3d_cs *cs, const void *data)
@@ -1737,8 +1728,9 @@ static UINT wined3d_cs_exec_query_issue(struct wined3d_cs *cs, const void *data)
query->query_ops->query_issue(query, op->flags);
@ -47,7 +48,7 @@ index 9054fc3..920f93d 100644
return sizeof(*op);
}
@@ -2061,33 +2054,6 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
@@ -2143,34 +2135,6 @@ void wined3d_cs_emit_texture_unmap(struct wined3d_cs *cs, struct wined3d_texture
cs->ops->submit(cs, sizeof(*op));
}
@ -56,18 +57,19 @@ index 9054fc3..920f93d 100644
- const struct wined3d_cs_query_poll *op = data;
- struct wined3d_query *query = op->query;
-
- *op->ret = query->query_ops->query_poll(query);
- *op->ret = query->query_ops->query_poll(query, op->flags);
-
- return sizeof(*op);
-}
-
-void wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *query, BOOL *ret)
-void wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags, BOOL *ret)
-{
- struct wined3d_cs_query_poll *op;
-
- op = cs->ops->require_space(cs, sizeof(*op));
- op->opcode = WINED3D_CS_OP_QUERY_POLL;
- op->query = query;
- op->flags = flags;
- op->ret = ret;
-
- cs->ops->submit(cs, sizeof(*op));
@ -81,7 +83,7 @@ index 9054fc3..920f93d 100644
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
@@ -2138,7 +2104,6 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2223,7 +2187,6 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_CLEAR_RTV */ wined3d_cs_exec_clear_rtv,
/* WINED3D_CS_OP_TEXTURE_MAP */ wined3d_cs_exec_texture_map,
/* WINED3D_CS_OP_TEXTURE_UNMAP */ wined3d_cs_exec_texture_unmap,
@ -89,7 +91,7 @@ index 9054fc3..920f93d 100644
};
static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size)
@@ -2257,17 +2222,45 @@ void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs,
@@ -2342,17 +2305,45 @@ void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs,
wined3d_texture_incref(cs->onscreen_depth_stencil->container);
}
@ -101,7 +103,7 @@ index 9054fc3..920f93d 100644
+ {
+ BOOL ret;
+
+ ret = query->query_ops->query_poll(query);
+ ret = query->query_ops->query_poll(query, 0);
+ if (ret)
+ {
+ list_remove(&query->poll_list_entry);
@ -136,7 +138,7 @@ index 9054fc3..920f93d 100644
{
continue;
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
index 99a1411..b5e1fde 100644
index 001e7d1a9a9..e1ca7e7e01a 100644
--- a/dlls/wined3d/query.c
+++ b/dlls/wined3d/query.c
@@ -37,6 +37,7 @@ static void wined3d_query_init(struct wined3d_query *query, struct wined3d_devic
@ -147,7 +149,7 @@ index 99a1411..b5e1fde 100644
}
static struct wined3d_event_query *wined3d_event_query_from_query(struct wined3d_query *query)
@@ -266,6 +267,9 @@ static void wined3d_query_destroy_object(void *object)
@@ -267,6 +268,9 @@ static void wined3d_query_destroy_object(void *object)
{
struct wined3d_query *query = object;
@ -157,7 +159,7 @@ index 99a1411..b5e1fde 100644
/* Queries are specific to the GL context that created them. Not
* deleting the query will obviously leak it, but that's still better
* than potentially deleting a different query with the same id in this
@@ -330,12 +334,6 @@ HRESULT CDECL wined3d_query_get_data(struct wined3d_query *query,
@@ -331,12 +335,6 @@ HRESULT CDECL wined3d_query_get_data(struct wined3d_query *query,
if (flags)
WARN("Ignoring flags %#x.\n", flags);
@ -170,7 +172,7 @@ index 99a1411..b5e1fde 100644
if (query->state == QUERY_BUILDING)
{
WARN("Query is building, returning S_FALSE.\n");
@@ -343,14 +341,18 @@ HRESULT CDECL wined3d_query_get_data(struct wined3d_query *query,
@@ -344,14 +342,19 @@ HRESULT CDECL wined3d_query_get_data(struct wined3d_query *query,
}
if (query->state == QUERY_CREATED)
@ -181,23 +183,24 @@ index 99a1411..b5e1fde 100644
+ else if (!wined3d_settings.cs_multithreaded)
{
- BOOL ret;
- wined3d_cs_emit_query_poll(query->device->cs, query, &ret);
- wined3d_cs_emit_query_poll(query->device->cs, query, flags, &ret);
- if (!ret)
+ if (!query->query_ops->query_poll(query))
+ if (!query->query_ops->query_poll(query, flags))
return S_FALSE;
}
+ else if (query->counter_main != query->counter_retrieved)
+ {
+ /* FIXME: should flush */
+ return S_FALSE;
+ }
if (data)
memcpy(data, query->data, min(data_size, query->data_size));
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index d6518c7..83d270e 100644
index bb3595b2a6f..0abf4dbaa3c 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1396,7 +1396,8 @@ struct wined3d_query
@@ -1454,7 +1454,8 @@ struct wined3d_query
const void *data;
DWORD data_size;
const struct wined3d_query_ops *query_ops;
@ -207,7 +210,7 @@ index d6518c7..83d270e 100644
};
union wined3d_gl_query_object
@@ -3067,6 +3068,7 @@ struct wined3d_cs
@@ -3168,6 +3169,7 @@ struct wined3d_cs
struct wined3d_cs_queue queue;
LONG pending_presents;
@ -215,14 +218,14 @@ index d6518c7..83d270e 100644
};
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) DECLSPEC_HIDDEN;
@@ -3091,7 +3093,6 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
@@ -3193,7 +3195,6 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain,
const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, DWORD flags) DECLSPEC_HIDDEN;
void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags) DECLSPEC_HIDDEN;
-void wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *query, BOOL *ret) DECLSPEC_HIDDEN;
-void wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags, BOOL *ret) DECLSPEC_HIDDEN;
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_base_vertex_index(struct wined3d_cs *cs,
UINT base_vertex_index) DECLSPEC_HIDDEN;
--
2.9.0
2.11.0

View File

@ -1,4 +1,4 @@
From 48c046442f6e2ace49692a725e0b1ad2e67794d3 Mon Sep 17 00:00:00 2001
From 2551a777dc1ef94ae39b1ce075d1a347198886f4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Wed, 24 Jul 2013 17:27:35 +0200
Subject: wined3d: Don't poll queries that failed to start
@ -10,10 +10,10 @@ Subject: wined3d: Don't poll queries that failed to start
3 files changed, 23 insertions(+), 9 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index fb55549..105cf45 100644
index 68a5c3a6fcf..35b0ce2e7b9 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -2013,10 +2013,11 @@ static UINT wined3d_cs_exec_query_issue(struct wined3d_cs *cs, const void *data)
@@ -1734,10 +1734,11 @@ static UINT wined3d_cs_exec_query_issue(struct wined3d_cs *cs, const void *data)
{
const struct wined3d_cs_query_issue *op = data;
struct wined3d_query *query = op->query;
@ -28,10 +28,10 @@ index fb55549..105cf45 100644
list_add_tail(&cs->query_poll_list, &query->poll_list_entry);
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
index b5e1fde..164a60e 100644
index e1ca7e7e01a..5fa7f4cd83d 100644
--- a/dlls/wined3d/query.c
+++ b/dlls/wined3d/query.c
@@ -465,7 +465,7 @@ enum wined3d_query_type CDECL wined3d_query_get_type(const struct wined3d_query
@@ -479,7 +479,7 @@ enum wined3d_query_type CDECL wined3d_query_get_type(const struct wined3d_query
return query->type;
}
@ -40,7 +40,7 @@ index b5e1fde..164a60e 100644
{
TRACE("query %p, flags %#x.\n", query, flags);
@@ -474,20 +474,23 @@ static void wined3d_event_query_ops_issue(struct wined3d_query *query, DWORD fla
@@ -488,20 +488,23 @@ static void wined3d_event_query_ops_issue(struct wined3d_query *query, DWORD fla
struct wined3d_event_query *event_query = wined3d_event_query_from_query(query);
wined3d_event_query_issue(event_query, query->device);
@ -65,7 +65,7 @@ index b5e1fde..164a60e 100644
TRACE("query %p, flags %#x.\n", query, flags);
@@ -549,7 +552,10 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
@@ -563,7 +566,10 @@ static void wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD
}
}
oq->started = FALSE;
@ -75,8 +75,8 @@ index b5e1fde..164a60e 100644
+ return poll;
}
static BOOL wined3d_timestamp_query_ops_poll(struct wined3d_query *query)
@@ -590,7 +596,7 @@ static BOOL wined3d_timestamp_query_ops_poll(struct wined3d_query *query)
static BOOL wined3d_timestamp_query_ops_poll(struct wined3d_query *query, DWORD flags)
@@ -604,7 +610,7 @@ static BOOL wined3d_timestamp_query_ops_poll(struct wined3d_query *query, DWORD
return available;
}
@ -85,7 +85,7 @@ index b5e1fde..164a60e 100644
{
struct wined3d_timestamp_query *tq = wined3d_timestamp_query_from_query(query);
const struct wined3d_gl_info *gl_info;
@@ -613,6 +619,10 @@ static void wined3d_timestamp_query_ops_issue(struct wined3d_query *query, DWORD
@@ -627,6 +633,10 @@ static void wined3d_timestamp_query_ops_issue(struct wined3d_query *query, DWORD
checkGLcall("glQueryCounter()");
context_release(context);
}
@ -95,8 +95,8 @@ index b5e1fde..164a60e 100644
+ return FALSE;
}
static BOOL wined3d_timestamp_disjoint_query_ops_poll(struct wined3d_query *query)
@@ -622,9 +632,10 @@ static BOOL wined3d_timestamp_disjoint_query_ops_poll(struct wined3d_query *quer
static BOOL wined3d_timestamp_disjoint_query_ops_poll(struct wined3d_query *query, DWORD flags)
@@ -636,9 +646,10 @@ static BOOL wined3d_timestamp_disjoint_query_ops_poll(struct wined3d_query *quer
return TRUE;
}
@ -107,8 +107,8 @@ index b5e1fde..164a60e 100644
+ return FALSE;
}
static BOOL wined3d_statistics_query_ops_poll(struct wined3d_query *query)
@@ -634,9 +645,10 @@ static BOOL wined3d_statistics_query_ops_poll(struct wined3d_query *query)
static BOOL wined3d_statistics_query_ops_poll(struct wined3d_query *query, DWORD flags)
@@ -648,9 +659,10 @@ static BOOL wined3d_statistics_query_ops_poll(struct wined3d_query *query, DWORD
return TRUE;
}
@ -119,8 +119,8 @@ index b5e1fde..164a60e 100644
+ return FALSE;
}
static HRESULT wined3d_overflow_query_ops_poll(struct wined3d_query *query)
@@ -646,9 +658,10 @@ static HRESULT wined3d_overflow_query_ops_poll(struct wined3d_query *query)
static HRESULT wined3d_overflow_query_ops_poll(struct wined3d_query *query, DWORD flags)
@@ -660,9 +672,10 @@ static HRESULT wined3d_overflow_query_ops_poll(struct wined3d_query *query, DWOR
return TRUE;
}
@ -133,18 +133,18 @@ index b5e1fde..164a60e 100644
static const struct wined3d_query_ops event_query_ops =
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 0da5480..0abb30b 100644
index 9e8b8ad14c5..aac56fe1848 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1382,7 +1382,7 @@ enum wined3d_query_state
@@ -1440,7 +1440,7 @@ enum wined3d_query_state
struct wined3d_query_ops
{
BOOL (*query_poll)(struct wined3d_query *query);
BOOL (*query_poll)(struct wined3d_query *query, DWORD flags);
- void (*query_issue)(struct wined3d_query *query, DWORD flags);
+ BOOL (*query_issue)(struct wined3d_query *query, DWORD flags);
};
struct wined3d_query
--
2.9.0
2.11.0

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
From 40dce808e5579bd12a4a31eb93c0499000ae5f00 Mon Sep 17 00:00:00 2001
From 5237dd1b75bc109101d8476cdd0c8ce30cc628d4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 16 Apr 2016 18:18:54 +0200
Subject: wined3d: Add stubs for QUERY_TYPE_SO_STATISTICS and
@ -12,10 +12,10 @@ Subject: wined3d: Add stubs for QUERY_TYPE_SO_STATISTICS and
4 files changed, 100 insertions(+), 4 deletions(-)
diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c
index f3c4ac8..d3ddef7 100644
index 0b38265c83f..3c47f9cbcdb 100644
--- a/dlls/d3d10core/tests/device.c
+++ b/dlls/d3d10core/tests/device.c
@@ -3539,8 +3539,8 @@ static void test_create_query(void)
@@ -3591,8 +3591,8 @@ static void test_create_query(void)
{D3D10_QUERY_TIMESTAMP_DISJOINT, FALSE, FALSE},
{D3D10_QUERY_PIPELINE_STATISTICS, FALSE, TRUE},
{D3D10_QUERY_OCCLUSION_PREDICATE, TRUE, FALSE},
@ -27,10 +27,10 @@ index f3c4ac8..d3ddef7 100644
ULONG refcount, expected_refcount;
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index 276f58f..648dc05 100644
index ac4393dd3b3..ac96918aed3 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -4525,8 +4525,8 @@ static void test_create_query(void)
@@ -4566,8 +4566,8 @@ static void test_create_query(void)
{D3D11_QUERY_TIMESTAMP_DISJOINT, D3D_FEATURE_LEVEL_10_0, FALSE, FALSE, FALSE},
{D3D11_QUERY_PIPELINE_STATISTICS, D3D_FEATURE_LEVEL_10_0, FALSE, FALSE, TRUE},
{D3D11_QUERY_OCCLUSION_PREDICATE, D3D_FEATURE_LEVEL_10_0, TRUE, TRUE, FALSE},
@ -42,10 +42,10 @@ index 276f58f..648dc05 100644
{D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM0, D3D_FEATURE_LEVEL_11_0, TRUE, FALSE, TRUE},
{D3D11_QUERY_SO_STATISTICS_STREAM1, D3D_FEATURE_LEVEL_11_0, FALSE, FALSE, TRUE},
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
index 55e63e9..aca5d85 100644
index 9f75a493d5f..c5ca37d4878 100644
--- a/dlls/wined3d/query.c
+++ b/dlls/wined3d/query.c
@@ -295,6 +295,14 @@ static void wined3d_query_destroy_object(void *object)
@@ -296,6 +296,14 @@ static void wined3d_query_destroy_object(void *object)
{
HeapFree(GetProcessHeap(), 0, query);
}
@ -60,13 +60,13 @@ index 55e63e9..aca5d85 100644
else
{
ERR("Query %p has invalid type %#x.\n", query, query->type);
@@ -601,6 +609,30 @@ static void wined3d_timestamp_disjoint_query_ops_issue(struct wined3d_query *que
@@ -614,6 +622,30 @@ static void wined3d_timestamp_disjoint_query_ops_issue(struct wined3d_query *que
TRACE("query %p, flags %#x.\n", query, flags);
}
+static BOOL wined3d_statistics_query_ops_poll(struct wined3d_query *query)
+static BOOL wined3d_statistics_query_ops_poll(struct wined3d_query *query, DWORD flags)
+{
+ TRACE("query %p.\n", query);
+ TRACE("query %p, flags %#x.\n", query, flags);
+
+ return TRUE;
+}
@ -76,9 +76,9 @@ index 55e63e9..aca5d85 100644
+ FIXME("query %p, flags %#x.\n", query, flags);
+}
+
+static HRESULT wined3d_overflow_query_ops_poll(struct wined3d_query *query)
+static HRESULT wined3d_overflow_query_ops_poll(struct wined3d_query *query, DWORD flags)
+{
+ TRACE("query %p.\n", query);
+ TRACE("query %p, flags %#x.\n", query, flags);
+
+ return TRUE;
+}
@ -91,7 +91,7 @@ index 55e63e9..aca5d85 100644
static const struct wined3d_query_ops event_query_ops =
{
wined3d_event_query_ops_poll,
@@ -741,6 +773,58 @@ static HRESULT wined3d_timestamp_disjoint_query_create(struct wined3d_device *de
@@ -754,6 +786,58 @@ static HRESULT wined3d_timestamp_disjoint_query_create(struct wined3d_device *de
return WINED3D_OK;
}
@ -150,7 +150,7 @@ index 55e63e9..aca5d85 100644
HRESULT CDECL wined3d_query_create(struct wined3d_device *device,
enum wined3d_query_type type, void *parent, struct wined3d_query **query)
{
@@ -761,6 +845,12 @@ HRESULT CDECL wined3d_query_create(struct wined3d_device *device,
@@ -774,6 +858,12 @@ HRESULT CDECL wined3d_query_create(struct wined3d_device *device,
case WINED3D_QUERY_TYPE_TIMESTAMP_FREQ:
return wined3d_timestamp_disjoint_query_create(device, type, parent, query);
@ -164,10 +164,10 @@ index 55e63e9..aca5d85 100644
FIXME("Unhandled query type %#x.\n", type);
return WINED3DERR_NOTAVAILABLE;
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index cd2dd3b..10b1ec2 100644
index 7271ec055ae..0357bfda6d8 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -702,6 +702,12 @@ struct wined3d_query_data_timestamp_disjoint
@@ -705,6 +705,12 @@ struct wined3d_query_data_timestamp_disjoint
BOOL disjoint;
};
@ -181,5 +181,5 @@ index cd2dd3b..10b1ec2 100644
#define WINED3DISSUE_END (1u << 0)
#define WINED3DGETDATA_FLUSH (1u << 0)
--
2.9.0
2.11.0