mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Rebase against 8af23cb93e4e1cd3686984399cb50d755f5171e3.
This commit is contained in:
parent
60d570e5f1
commit
1ff77100b8
@ -52,7 +52,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "e804e9a5bc9fde9ad8b84dfd121d44afbe177752"
|
||||
echo "8af23cb93e4e1cd3686984399cb50d755f5171e3"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
|
@ -1,38 +1,40 @@
|
||||
From 2f3f8e0f66c51a459b0a2bbd25dc7f6a7c3fe6bd Mon Sep 17 00:00:00 2001
|
||||
From f7b258f07407779e76637835505a3c59b8466d8d Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 7 Feb 2017 15:02:44 +0100
|
||||
Subject: wined3d: Send create_buffer_texture / create_texture_view through the
|
||||
CS.
|
||||
|
||||
---
|
||||
dlls/wined3d/cs.c | 73 +++++++++++++++++++++++++++++++++++++++++-
|
||||
dlls/wined3d/view.c | 13 ++++----
|
||||
dlls/wined3d/wined3d_private.h | 13 ++++++++
|
||||
3 files changed, 92 insertions(+), 7 deletions(-)
|
||||
dlls/wined3d/cs.c | 81 +++++++++++++++++++++++++++++++++++++++++-
|
||||
dlls/wined3d/view.c | 15 ++++----
|
||||
dlls/wined3d/wined3d_private.h | 15 ++++++++
|
||||
3 files changed, 103 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 51f315ee500..4778b73b0dc 100644
|
||||
index 5ecf15f5a01..9227a9c497c 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -91,6 +91,8 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_SAMPLER_INIT,
|
||||
WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION,
|
||||
WINED3D_CS_OP_BUFFER_COPY,
|
||||
+ WINED3D_CS_OP_CREATE_BUFFER_TEXTURE,
|
||||
+ WINED3D_CS_OP_CREATE_BUFFER_VIEW,
|
||||
+ WINED3D_CS_OP_CREATE_TEXTURE_VIEW,
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -499,6 +501,24 @@ struct wined3d_cs_buffer_copy
|
||||
@@ -499,6 +501,26 @@ struct wined3d_cs_buffer_copy
|
||||
unsigned int size;
|
||||
};
|
||||
|
||||
+struct wined3d_cs_create_buffer_texture
|
||||
+struct wined3d_cs_create_buffer_view
|
||||
+{
|
||||
+ enum wined3d_cs_op opcode;
|
||||
+ struct wined3d_gl_view *view;
|
||||
+ const struct wined3d_view_desc *desc;
|
||||
+ struct wined3d_buffer *buffer;
|
||||
+ const struct wined3d_format *view_format;
|
||||
+ HRESULT *hr;
|
||||
+};
|
||||
+
|
||||
+struct wined3d_cs_create_texture_view
|
||||
@ -48,7 +50,7 @@ index 51f315ee500..4778b73b0dc 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);
|
||||
|
||||
@@ -2507,7 +2527,6 @@ void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
|
||||
@@ -2515,7 +2537,6 @@ void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -56,31 +58,37 @@ index 51f315ee500..4778b73b0dc 100644
|
||||
static UINT wined3d_cs_exec_buffer_copy(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
const struct wined3d_cs_buffer_copy *op = data;
|
||||
@@ -2542,6 +2561,55 @@ void wined3d_cs_emit_buffer_copy(struct wined3d_cs *cs, struct wined3d_buffer *d
|
||||
@@ -2550,6 +2571,61 @@ void wined3d_cs_emit_buffer_copy(struct wined3d_cs *cs, struct wined3d_buffer *d
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
+static UINT wined3d_cs_exec_create_buffer_texture(struct wined3d_cs *cs, const void *data)
|
||||
+static UINT wined3d_cs_exec_create_buffer_view(struct wined3d_cs *cs, const void *data)
|
||||
+{
|
||||
+ const struct wined3d_cs_create_buffer_texture *op = data;
|
||||
+ const struct wined3d_cs_create_buffer_view *op = data;
|
||||
+
|
||||
+ create_buffer_texture(op->view, op->buffer, op->view_format);
|
||||
+ *op->hr = create_buffer_view(op->view, op->desc, op->buffer, op->view_format);
|
||||
+
|
||||
+ return sizeof(*op);
|
||||
+}
|
||||
+
|
||||
+void wined3d_cs_emit_create_buffer_texture(struct wined3d_cs *cs, struct wined3d_gl_view *view,
|
||||
+ struct wined3d_buffer *buffer, const struct wined3d_format *view_format)
|
||||
+HRESULT wined3d_cs_emit_create_buffer_view(struct wined3d_cs *cs, struct wined3d_gl_view *view,
|
||||
+ const struct wined3d_view_desc *desc, struct wined3d_buffer *buffer,
|
||||
+ const struct wined3d_format *view_format)
|
||||
+{
|
||||
+ struct wined3d_cs_create_buffer_texture *op;
|
||||
+ struct wined3d_cs_create_buffer_view *op;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ op = cs->ops->require_space(cs, sizeof(*op));
|
||||
+ op->opcode = WINED3D_CS_OP_CREATE_BUFFER_TEXTURE;
|
||||
+ op->opcode = WINED3D_CS_OP_CREATE_BUFFER_VIEW;
|
||||
+ op->view = view;
|
||||
+ op->desc = desc;
|
||||
+ op->buffer = buffer;
|
||||
+ op->view_format = view_format;
|
||||
+ op->hr = &hr;
|
||||
+
|
||||
+ cs->ops->submit_and_wait(cs);
|
||||
+
|
||||
+ return hr;
|
||||
+}
|
||||
+
|
||||
+static UINT wined3d_cs_exec_create_texture_view(struct wined3d_cs *cs, const void *data)
|
||||
@ -112,18 +120,18 @@ index 51f315ee500..4778b73b0dc 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
|
||||
@@ -2598,6 +2666,9 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2606,6 +2682,9 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_SAMPLER_INIT */ wined3d_cs_exec_sampler_init,
|
||||
/* WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION */ wined3d_cs_exec_texture_add_dirty_region,
|
||||
/* WINED3D_CS_OP_BUFFER_COPY */ wined3d_cs_exec_buffer_copy,
|
||||
+ /* WINED3D_CS_OP_CREATE_BUFFER_TEXTURE */ wined3d_cs_exec_create_buffer_texture,
|
||||
+ /* WINED3D_CS_OP_CREATE_BUFFER_VIEW */ wined3d_cs_exec_create_buffer_view,
|
||||
+ /* WINED3D_CS_OP_CREATE_TEXTURE_VIEW */ wined3d_cs_exec_create_texture_view,
|
||||
+
|
||||
};
|
||||
|
||||
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
|
||||
diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c
|
||||
index b97a25add3e..60bb483e7ff 100644
|
||||
index dd87f73b339..e62288f7b78 100644
|
||||
--- a/dlls/wined3d/view.c
|
||||
+++ b/dlls/wined3d/view.c
|
||||
@@ -72,7 +72,7 @@ static GLenum get_texture_view_target(const struct wined3d_gl_info *gl_info,
|
||||
@ -135,25 +143,25 @@ index b97a25add3e..60bb483e7ff 100644
|
||||
const struct wined3d_view_desc *desc, struct wined3d_texture *texture,
|
||||
const struct wined3d_format *view_format)
|
||||
{
|
||||
@@ -133,7 +133,7 @@ static void create_texture_view(struct wined3d_gl_view *view, GLenum view_target
|
||||
@@ -181,7 +181,7 @@ static void create_buffer_texture(struct wined3d_gl_view *view,
|
||||
context_release(context);
|
||||
}
|
||||
|
||||
-static void create_buffer_texture(struct wined3d_gl_view *view,
|
||||
+void create_buffer_texture(struct wined3d_gl_view *view,
|
||||
struct wined3d_buffer *buffer, const struct wined3d_format *view_format)
|
||||
-static HRESULT create_buffer_view(struct wined3d_gl_view *view,
|
||||
+HRESULT create_buffer_view(struct wined3d_gl_view *view,
|
||||
const struct wined3d_view_desc *desc, struct wined3d_buffer *buffer,
|
||||
const struct wined3d_format *view_format)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
@@ -475,7 +475,7 @@ static HRESULT wined3d_shader_resource_view_init(struct wined3d_shader_resource_
|
||||
FIXME("Ignoring buffer range %u-%u.\n", desc->u.buffer.start_idx, desc->u.buffer.count);
|
||||
}
|
||||
@@ -515,7 +515,7 @@ static HRESULT wined3d_shader_resource_view_init(struct wined3d_shader_resource_
|
||||
struct wined3d_buffer *buffer = buffer_from_resource(resource);
|
||||
HRESULT hr;
|
||||
|
||||
- create_buffer_texture(&view->gl_view, buffer, view_format);
|
||||
+ wined3d_cs_emit_create_buffer_texture(resource->device->cs, &view->gl_view, buffer, view_format);
|
||||
}
|
||||
- if (FAILED(hr = create_buffer_view(&view->gl_view, desc, buffer, view_format)))
|
||||
+ if (FAILED(hr = wined3d_cs_emit_create_buffer_view(resource->device->cs, &view->gl_view, desc, buffer, view_format)))
|
||||
return hr;
|
||||
}
|
||||
else
|
||||
@@ -506,7 +506,8 @@ static HRESULT wined3d_shader_resource_view_init(struct wined3d_shader_resource_
|
||||
@@ -546,7 +546,8 @@ static HRESULT wined3d_shader_resource_view_init(struct wined3d_shader_resource_
|
||||
else if (resource->format->typeless_id == view_format->typeless_id
|
||||
&& resource->format->gl_view_class == view_format->gl_view_class)
|
||||
{
|
||||
@ -163,7 +171,16 @@ index b97a25add3e..60bb483e7ff 100644
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -671,8 +672,8 @@ static HRESULT wined3d_unordered_access_view_init(struct wined3d_unordered_acces
|
||||
@@ -702,7 +703,7 @@ static HRESULT wined3d_unordered_access_view_init(struct wined3d_unordered_acces
|
||||
struct wined3d_buffer *buffer = buffer_from_resource(resource);
|
||||
HRESULT hr;
|
||||
|
||||
- if (FAILED(hr = create_buffer_view(&view->gl_view, desc, buffer, view->format)))
|
||||
+ if (FAILED(hr = wined3d_cs_emit_create_buffer_view(resource->device->cs, &view->gl_view, desc, buffer, view->format)))
|
||||
return hr;
|
||||
}
|
||||
else
|
||||
@@ -724,8 +725,8 @@ static HRESULT wined3d_unordered_access_view_init(struct wined3d_unordered_acces
|
||||
|
||||
if (desc->u.texture.layer_idx || desc->u.texture.layer_count != depth_or_layer_count)
|
||||
{
|
||||
@ -175,10 +192,10 @@ index b97a25add3e..60bb483e7ff 100644
|
||||
|
||||
view->layer_idx = desc->u.texture.layer_idx;
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 76394cac3ca..dbf6ef47134 100644
|
||||
index 46660964eda..2cd708ca910 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3222,6 +3222,8 @@ static inline void wined3d_resource_wait_idle(struct wined3d_resource *resource)
|
||||
@@ -3225,6 +3225,8 @@ static inline void wined3d_resource_wait_idle(struct wined3d_resource *resource)
|
||||
while (InterlockedCompareExchange(&resource->access_count, 0, 0));
|
||||
}
|
||||
|
||||
@ -187,12 +204,13 @@ index 76394cac3ca..dbf6ef47134 100644
|
||||
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_destroy(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
|
||||
@@ -3237,9 +3239,14 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
@@ -3240,9 +3242,15 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view,
|
||||
const RECT *rect, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil,
|
||||
const struct blit_shader *blitter) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_create_buffer_texture(struct wined3d_cs *cs, struct wined3d_gl_view *view,
|
||||
+ struct wined3d_buffer *buffer, const struct wined3d_format *view_format) DECLSPEC_HIDDEN;
|
||||
+HRESULT wined3d_cs_emit_create_buffer_view(struct wined3d_cs *cs, struct wined3d_gl_view *view,
|
||||
+ const struct wined3d_view_desc *desc, struct wined3d_buffer *buffer,
|
||||
+ const struct wined3d_format *view_format) DECLSPEC_HIDDEN;
|
||||
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;
|
||||
@ -202,12 +220,13 @@ index 76394cac3ca..dbf6ef47134 100644
|
||||
void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs,
|
||||
void (*callback)(void *object), void *object) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
|
||||
@@ -3421,6 +3428,12 @@ struct wined3d_gl_view
|
||||
@@ -3424,6 +3432,13 @@ struct wined3d_gl_view
|
||||
GLuint name;
|
||||
};
|
||||
|
||||
+void create_buffer_texture(struct wined3d_gl_view *view,
|
||||
+ struct wined3d_buffer *buffer, const struct wined3d_format *view_format) DECLSPEC_HIDDEN;
|
||||
+HRESULT create_buffer_view(struct wined3d_gl_view *view,
|
||||
+ const struct wined3d_view_desc *desc, struct wined3d_buffer *buffer,
|
||||
+ const struct wined3d_format *view_format) DECLSPEC_HIDDEN;
|
||||
+void create_texture_view(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,4 +1,4 @@
|
||||
From 5295f80c011f058f42c2b4e56c5751d296dd98b3 Mon Sep 17 00:00:00 2001
|
||||
From 7888d0d12d9182cf9d5801cfe3b884f3f7a2708c 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.
|
||||
@ -11,18 +11,18 @@ Let's see if this fixes the remaining fglrx crashes...
|
||||
3 files changed, 46 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 01c81cde95e..1809f3f3484 100644
|
||||
index d65276072d4..1d7d6b9cd94 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -93,6 +93,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_BUFFER_COPY,
|
||||
WINED3D_CS_OP_CREATE_BUFFER_TEXTURE,
|
||||
WINED3D_CS_OP_CREATE_BUFFER_VIEW,
|
||||
WINED3D_CS_OP_CREATE_TEXTURE_VIEW,
|
||||
+ WINED3D_CS_OP_DELETE_GL_CONTEXTS,
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -518,6 +519,12 @@ struct wined3d_cs_create_texture_view
|
||||
@@ -521,6 +522,12 @@ struct wined3d_cs_create_texture_view
|
||||
const struct wined3d_format *view_format;
|
||||
};
|
||||
|
||||
@ -35,7 +35,7 @@ index 01c81cde95e..1809f3f3484 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);
|
||||
|
||||
@@ -2596,6 +2603,26 @@ void wined3d_cs_emit_create_texture_view(struct wined3d_cs *cs, struct wined3d_g
|
||||
@@ -2628,6 +2635,26 @@ void wined3d_cs_emit_create_texture_view(struct wined3d_cs *cs, struct wined3d_g
|
||||
cs->ops->submit_and_wait(cs);
|
||||
}
|
||||
|
||||
@ -62,9 +62,9 @@ index 01c81cde95e..1809f3f3484 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
|
||||
@@ -2654,7 +2681,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2686,7 +2713,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_TEXTURE */ wined3d_cs_exec_create_buffer_texture,
|
||||
/* 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,
|
||||
@ -72,10 +72,10 @@ index 01c81cde95e..1809f3f3484 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 d70d51a7d7a..762ab2747c2 100644
|
||||
index 3f5fd7988d4..880e6c002ac 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -4621,22 +4621,12 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
|
||||
@@ -4635,22 +4635,12 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
|
||||
}
|
||||
}
|
||||
|
||||
@ -99,7 +99,7 @@ index d70d51a7d7a..762ab2747c2 100644
|
||||
LIST_FOR_EACH_ENTRY(shader, &device->shaders, struct wined3d_shader, shader_list_entry)
|
||||
{
|
||||
device->shader_backend->shader_destroy(shader);
|
||||
@@ -4670,6 +4660,19 @@ static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d
|
||||
@@ -4684,6 +4674,19 @@ static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d
|
||||
swapchain->context = NULL;
|
||||
}
|
||||
|
||||
@ -120,10 +120,10 @@ index d70d51a7d7a..762ab2747c2 100644
|
||||
{
|
||||
HRESULT hr;
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index aa0ca4bcc06..c7c212f294f 100644
|
||||
index 454a64eb2ff..2eb5bbeca29 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2666,6 +2666,8 @@ void device_invalidate_state(const struct wined3d_device *device, DWORD state) D
|
||||
@@ -2708,6 +2708,8 @@ 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;
|
||||
@ -132,7 +132,7 @@ index aa0ca4bcc06..c7c212f294f 100644
|
||||
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,
|
||||
@@ -3227,6 +3229,8 @@ void wined3d_cs_emit_create_buffer_texture(struct wined3d_cs *cs, struct wined3d
|
||||
@@ -3270,6 +3272,8 @@ 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;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 520d1bc8ae2e65db6244cf3b2c5115d1cfcc519e Mon Sep 17 00:00:00 2001
|
||||
From 0c368a9fa4e1417a0f5114769fa0b9f44d35ebde 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,18 +10,18 @@ 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 359f0ad4645..38e465b8f04 100644
|
||||
index 42779efe69d..42ce9bafb80 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -94,6 +94,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_CREATE_BUFFER_TEXTURE,
|
||||
WINED3D_CS_OP_CREATE_BUFFER_VIEW,
|
||||
WINED3D_CS_OP_CREATE_TEXTURE_VIEW,
|
||||
WINED3D_CS_OP_DELETE_GL_CONTEXTS,
|
||||
+ WINED3D_CS_OP_MAP_vertex_buffers,
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -526,6 +527,13 @@ struct wined3d_cs_delete_gl_contexts
|
||||
@@ -528,6 +529,13 @@ struct wined3d_cs_delete_gl_contexts
|
||||
struct wined3d_swapchain *swapchain;
|
||||
};
|
||||
|
||||
@ -35,7 +35,7 @@ index 359f0ad4645..38e465b8f04 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);
|
||||
|
||||
@@ -2639,6 +2647,70 @@ void wined3d_cs_emit_delete_opengl_contexts(struct wined3d_cs *cs, struct wined3
|
||||
@@ -2655,6 +2663,70 @@ void wined3d_cs_emit_delete_opengl_contexts(struct wined3d_cs *cs, struct wined3
|
||||
cs->ops->submit_and_wait(cs);
|
||||
}
|
||||
|
||||
@ -106,8 +106,8 @@ index 359f0ad4645..38e465b8f04 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence,
|
||||
@@ -2698,6 +2770,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_CREATE_BUFFER_TEXTURE */ wined3d_cs_exec_create_buffer_texture,
|
||||
@@ -2714,6 +2786,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,
|
||||
+ /* WINED3D_CS_OP_MAP_vertex_buffers */ wined3d_cs_exec_map_vertex_buffers,
|
||||
@ -115,7 +115,7 @@ index 359f0ad4645..38e465b8f04 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 b392878e2f9..44ac8ccef42 100644
|
||||
index ccfaa7f19e6..369fc47c097 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
|
||||
@ -191,10 +191,10 @@ index b392878e2f9..44ac8ccef42 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 6063aa7f390..d47aa20d5a4 100644
|
||||
index c1200b127c5..a6a3eca0da2 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3355,6 +3355,8 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
@@ -3359,6 +3359,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 d72fe8de3a880d62366abaa28dd2b1abc00adffd Mon Sep 17 00:00:00 2001
|
||||
From b9a43f545bf226e61be143012930f623b2d35140 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 6761e958cb8..dd018fee2cb 100644
|
||||
index a94bc4a0f42..ca2aa81c276 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -564,14 +564,16 @@ static struct wined3d_cs_block *wined3d_cs_list_dequeue(struct wined3d_cs_list *
|
||||
@@ -566,14 +566,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 6761e958cb8..dd018fee2cb 100644
|
||||
return block;
|
||||
}
|
||||
}
|
||||
@@ -592,7 +594,7 @@ static void wined3d_cs_set_thread_block(const struct wined3d_cs *cs, struct wine
|
||||
@@ -594,7 +596,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 6761e958cb8..dd018fee2cb 100644
|
||||
{
|
||||
struct wined3d_cs_block *block;
|
||||
|
||||
@@ -606,6 +608,7 @@ static struct wined3d_cs_block *wined3d_cs_get_block(struct wined3d_cs *cs)
|
||||
@@ -608,6 +610,7 @@ static struct wined3d_cs_block *wined3d_cs_get_block(struct wined3d_cs *cs)
|
||||
}
|
||||
|
||||
block->pos = 0;
|
||||
@ -48,7 +48,7 @@ index 6761e958cb8..dd018fee2cb 100644
|
||||
|
||||
return block;
|
||||
}
|
||||
@@ -625,7 +628,7 @@ static void wined3d_cs_emit_fence(struct wined3d_cs *cs, BOOL *signalled)
|
||||
@@ -627,7 +630,7 @@ static void wined3d_cs_emit_fence(struct wined3d_cs *cs, BOOL *signalled)
|
||||
|
||||
*signalled = FALSE;
|
||||
|
||||
@ -57,7 +57,7 @@ index 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_FENCE;
|
||||
op->signalled = signalled;
|
||||
}
|
||||
@@ -660,7 +663,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
@@ -662,7 +665,7 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
unsigned int i;
|
||||
LONG pending;
|
||||
|
||||
@ -66,7 +66,7 @@ index 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_PRESENT;
|
||||
op->dst_window_override = dst_window_override;
|
||||
op->swapchain = swapchain;
|
||||
@@ -727,7 +730,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
@@ -729,7 +732,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_CLEAR;
|
||||
op->flags = flags;
|
||||
op->color = *color;
|
||||
@@ -877,7 +880,7 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
|
||||
@@ -879,7 +882,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_DISPATCH;
|
||||
op->group_count_x = group_count_x;
|
||||
op->group_count_y = group_count_y;
|
||||
@@ -939,7 +942,7 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
@@ -941,7 +944,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_DRAW;
|
||||
op->base_vertex_idx = base_vertex_idx;
|
||||
op->start_idx = start_idx;
|
||||
@@ -988,7 +991,7 @@ void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query
|
||||
@@ -990,7 +993,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_PREDICATION;
|
||||
op->predicate = predicate;
|
||||
op->value = value;
|
||||
@@ -1010,7 +1013,7 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
@@ -1012,7 +1015,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_VIEWPORT;
|
||||
op->viewport = *viewport;
|
||||
|
||||
@@ -1031,7 +1034,7 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
@@ -1033,7 +1036,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_SCISSOR_RECT;
|
||||
op->rect = *rect;
|
||||
|
||||
@@ -1053,7 +1056,7 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
@@ -1055,7 +1058,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_RENDERTARGET_VIEW;
|
||||
op->view_idx = view_idx;
|
||||
op->view = view;
|
||||
@@ -1104,7 +1107,7 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
@@ -1106,7 +1109,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_DEPTH_STENCIL_VIEW;
|
||||
op->view = view;
|
||||
|
||||
@@ -1125,7 +1128,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
@@ -1127,7 +1130,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_VERTEX_DECLARATION;
|
||||
op->declaration = declaration;
|
||||
|
||||
@@ -1159,7 +1162,7 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -1161,7 +1164,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_STREAM_SOURCE;
|
||||
op->stream_idx = stream_idx;
|
||||
op->buffer = buffer;
|
||||
@@ -1187,7 +1190,7 @@ void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_i
|
||||
@@ -1189,7 +1192,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_STREAM_SOURCE_FREQ;
|
||||
op->stream_idx = stream_idx;
|
||||
op->frequency = frequency;
|
||||
@@ -1220,7 +1223,7 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -1222,7 +1225,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_STREAM_OUTPUT;
|
||||
op->stream_idx = stream_idx;
|
||||
op->buffer = buffer;
|
||||
@@ -1254,7 +1257,7 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
@@ -1256,7 +1259,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_INDEX_BUFFER;
|
||||
op->buffer = buffer;
|
||||
op->format_id = format_id;
|
||||
@@ -1285,7 +1288,7 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
@@ -1287,7 +1290,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_CONSTANT_BUFFER;
|
||||
op->type = type;
|
||||
op->cb_idx = cb_idx;
|
||||
@@ -1379,7 +1382,7 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined
|
||||
@@ -1381,7 +1384,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_TEXTURE;
|
||||
op->stage = stage;
|
||||
op->texture = texture;
|
||||
@@ -1403,7 +1406,7 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
@@ -1413,7 +1416,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_SHADER_RESOURCE_VIEW;
|
||||
op->type = type;
|
||||
op->view_idx = view_idx;
|
||||
@@ -1435,7 +1438,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
@@ -1445,7 +1448,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_UNORDERED_ACCESS_VIEW;
|
||||
op->pipeline = pipeline;
|
||||
op->view_idx = view_idx;
|
||||
@@ -1459,7 +1462,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -1469,7 +1472,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_SAMPLER;
|
||||
op->type = type;
|
||||
op->sampler_idx = sampler_idx;
|
||||
@@ -1484,7 +1487,7 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -1494,7 +1497,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_SHADER;
|
||||
op->type = type;
|
||||
op->shader = shader;
|
||||
@@ -1507,7 +1510,7 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
@@ -1517,7 +1520,7 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
{
|
||||
struct wined3d_cs_set_rasterizer_state *op;
|
||||
|
||||
@ -246,7 +246,7 @@ index 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_RASTERIZER_STATE;
|
||||
op->state = rasterizer_state;
|
||||
|
||||
@@ -1528,7 +1531,7 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
|
||||
@@ -1538,7 +1541,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_RENDER_STATE;
|
||||
op->state = state;
|
||||
op->value = value;
|
||||
@@ -1551,7 +1554,7 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
@@ -1561,7 +1564,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_TEXTURE_STATE;
|
||||
op->stage = stage;
|
||||
op->state = state;
|
||||
@@ -1575,7 +1578,7 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
@@ -1585,7 +1588,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_SAMPLER_STATE;
|
||||
op->sampler_idx = sampler_idx;
|
||||
op->state = state;
|
||||
@@ -1600,7 +1603,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
@@ -1610,7 +1613,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_TRANSFORM;
|
||||
op->state = state;
|
||||
op->matrix = *matrix;
|
||||
@@ -1622,7 +1625,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const
|
||||
@@ -1632,7 +1635,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_CLIP_PLANE;
|
||||
op->plane_idx = plane_idx;
|
||||
op->plane = *plane;
|
||||
@@ -1700,7 +1703,7 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -1710,7 +1713,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_COLOR_KEY;
|
||||
op->texture = texture;
|
||||
op->flags = flags;
|
||||
@@ -1729,7 +1732,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
@@ -1739,7 +1742,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_MATERIAL;
|
||||
op->material = *material;
|
||||
|
||||
@@ -1754,7 +1757,7 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -1764,7 +1767,7 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
{
|
||||
struct wined3d_cs_reset_state *op;
|
||||
|
||||
@ -318,7 +318,7 @@ index 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_RESET_STATE;
|
||||
|
||||
cs->ops->submit(cs);
|
||||
@@ -1773,7 +1776,7 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
|
||||
@@ -1783,7 +1786,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_DESTROY_OBJECT;
|
||||
op->callback = callback;
|
||||
op->object = object;
|
||||
@@ -1795,7 +1798,7 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu
|
||||
@@ -1805,7 +1808,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_QUERY_ISSUE;
|
||||
op->query = query;
|
||||
op->flags = flags;
|
||||
@@ -1818,7 +1821,7 @@ BOOL wined3d_cs_emit_query_poll(struct wined3d_cs *cs, struct wined3d_query *que
|
||||
@@ -1828,7 +1831,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_QUERY_POLL;
|
||||
op->query = query;
|
||||
op->flags = flags;
|
||||
@@ -1844,7 +1847,7 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
@@ -1854,7 +1857,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_PRELOAD_RESOURCE;
|
||||
op->resource = resource;
|
||||
|
||||
@@ -1868,7 +1871,7 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
|
||||
@@ -1878,7 +1881,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_UNLOAD_RESOURCE;
|
||||
op->resource = resource;
|
||||
|
||||
@@ -1894,7 +1897,7 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
@@ -1904,7 +1907,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_MAP;
|
||||
op->resource = resource;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
@@ -1923,7 +1926,7 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc
|
||||
@@ -1933,7 +1936,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_UNMAP;
|
||||
op->resource = resource;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
@@ -1949,7 +1952,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
|
||||
@@ -1959,7 +1962,7 @@ void wined3d_cs_emit_glfinish(struct wined3d_cs *cs)
|
||||
{
|
||||
struct wined3d_cs_finish *op;
|
||||
|
||||
@ -390,7 +390,7 @@ index 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_GLFINISH;
|
||||
|
||||
cs->ops->submit(cs);
|
||||
@@ -2006,7 +2009,7 @@ void wined3d_cs_emit_push_constants(struct wined3d_cs *cs, enum wined3d_push_con
|
||||
@@ -2016,7 +2019,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_PUSH_CONSTANTS;
|
||||
op->p = p;
|
||||
op->start_idx = start_idx;
|
||||
@@ -2035,7 +2038,7 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs, GLenum primitive_
|
||||
@@ -2045,7 +2048,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_PRIMITIVE_TYPE;
|
||||
op->gl_primitive_type = primitive_type;
|
||||
|
||||
@@ -2095,7 +2098,7 @@ void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light
|
||||
@@ -2105,7 +2108,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_LIGHT;
|
||||
op->light = *light;
|
||||
|
||||
@@ -2184,7 +2187,7 @@ void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enab
|
||||
@@ -2194,7 +2197,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_SET_LIGHT_ENABLE;
|
||||
op->idx = idx;
|
||||
op->enable = enable;
|
||||
@@ -2214,7 +2217,7 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
|
||||
@@ -2224,7 +2227,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_BLT;
|
||||
op->dst_surface = dst_surface;
|
||||
op->dst_rect = *dst_rect;
|
||||
@@ -2253,7 +2256,7 @@ void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarge
|
||||
@@ -2263,7 +2266,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_CLEAR_RTV;
|
||||
op->view = view;
|
||||
op->rect = *rect;
|
||||
@@ -2289,7 +2292,7 @@ void wined3d_cs_emit_update_texture(struct wined3d_cs *cs, struct wined3d_textur
|
||||
@@ -2299,7 +2302,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_UPDATE_TEXTURE;
|
||||
op->src = src;
|
||||
op->dst = dst;
|
||||
@@ -2355,7 +2358,7 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
@@ -2365,7 +2368,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_UPDATE_SUB_RESOURCE;
|
||||
op->resource = resource;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
@@ -2384,7 +2387,7 @@ HRESULT wined3d_cs_emit_get_dc(struct wined3d_cs *cs, struct wined3d_texture *te
|
||||
@@ -2394,7 +2397,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_GET_DC;
|
||||
op->texture = texture;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
@@ -2410,7 +2413,7 @@ HRESULT wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -2420,7 +2423,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_RELEASE_DC;
|
||||
op->texture = texture;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
@@ -2436,7 +2439,7 @@ void wined3d_cs_emit_create_dummy_textures(struct wined3d_cs *cs)
|
||||
@@ -2446,7 +2449,7 @@ void wined3d_cs_emit_create_dummy_textures(struct wined3d_cs *cs)
|
||||
{
|
||||
struct wined3d_cs_create_dummy_textures *op;
|
||||
|
||||
@ -489,7 +489,7 @@ index 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_CREATE_DUMMY_TEXTURES;
|
||||
|
||||
cs->ops->submit_and_wait(cs);
|
||||
@@ -2456,7 +2459,7 @@ HRESULT wined3d_cs_emit_create_swapchain_context(struct wined3d_cs *cs, struct w
|
||||
@@ -2466,7 +2469,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_CREATE_SWAPCHAIN_CONTEXT;
|
||||
op->swapchain = swapchain;
|
||||
op->hr = &hr;
|
||||
@@ -2479,7 +2482,7 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
|
||||
@@ -2489,7 +2492,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_UPDATE_SWAP_INTERVAL;
|
||||
op->swapchain = swapchain;
|
||||
|
||||
@@ -2499,7 +2502,7 @@ void wined3d_cs_emit_sampler_init(struct wined3d_cs *cs, struct wined3d_sampler
|
||||
@@ -2509,7 +2512,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_SAMPLER_INIT;
|
||||
op->sampler = sampler;
|
||||
|
||||
@@ -2537,7 +2540,7 @@ void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
|
||||
@@ -2547,7 +2550,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION;
|
||||
op->texture = texture;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
@@ -2567,7 +2570,7 @@ void wined3d_cs_emit_buffer_copy(struct wined3d_cs *cs, struct wined3d_buffer *d
|
||||
@@ -2577,7 +2580,7 @@ void wined3d_cs_emit_buffer_copy(struct wined3d_cs *cs, struct wined3d_buffer *d
|
||||
{
|
||||
struct wined3d_cs_buffer_copy *op;
|
||||
|
||||
@ -534,16 +534,16 @@ index 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_BUFFER_COPY;
|
||||
op->dst_buffer = dst_buffer;
|
||||
op->dst_offset = dst_offset;
|
||||
@@ -2595,7 +2598,7 @@ void wined3d_cs_emit_create_buffer_texture(struct wined3d_cs *cs, struct wined3d
|
||||
{
|
||||
struct wined3d_cs_create_buffer_texture *op;
|
||||
@@ -2607,7 +2610,7 @@ HRESULT wined3d_cs_emit_create_buffer_view(struct wined3d_cs *cs, struct wined3d
|
||||
struct wined3d_cs_create_buffer_view *op;
|
||||
HRESULT hr;
|
||||
|
||||
- op = cs->ops->require_space(cs, sizeof(*op));
|
||||
+ op = cs->ops->require_space(cs, sizeof(*op), 0);
|
||||
op->opcode = WINED3D_CS_OP_CREATE_BUFFER_TEXTURE;
|
||||
op->opcode = WINED3D_CS_OP_CREATE_BUFFER_VIEW;
|
||||
op->view = view;
|
||||
op->buffer = buffer;
|
||||
@@ -2619,7 +2622,7 @@ void wined3d_cs_emit_create_texture_view(struct wined3d_cs *cs, struct wined3d_g
|
||||
op->desc = desc;
|
||||
@@ -2635,7 +2638,7 @@ void wined3d_cs_emit_create_texture_view(struct wined3d_cs *cs, struct wined3d_g
|
||||
{
|
||||
struct wined3d_cs_create_texture_view *op;
|
||||
|
||||
@ -552,7 +552,7 @@ index 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_CREATE_TEXTURE_VIEW;
|
||||
op->view = view;
|
||||
op->view_target = view_target;
|
||||
@@ -2643,7 +2646,7 @@ void wined3d_cs_emit_delete_opengl_contexts(struct wined3d_cs *cs, struct wined3
|
||||
@@ -2659,7 +2662,7 @@ void wined3d_cs_emit_delete_opengl_contexts(struct wined3d_cs *cs, struct wined3
|
||||
{
|
||||
struct wined3d_cs_delete_gl_contexts *op;
|
||||
|
||||
@ -561,7 +561,7 @@ index 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_DELETE_GL_CONTEXTS;
|
||||
op->swapchain = swapchain;
|
||||
|
||||
@@ -2706,7 +2709,7 @@ void wined3d_cs_emit_map_vertex_buffers(struct wined3d_cs *cs, UINT src_start_id
|
||||
@@ -2722,7 +2725,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 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_MAP_vertex_buffers;
|
||||
op->src_start_idx = src_start_idx;
|
||||
op->stream_info = stream_info;
|
||||
@@ -2776,7 +2779,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2792,7 +2795,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 6761e958cb8..dd018fee2cb 100644
|
||||
{
|
||||
if (size > cs->data_size)
|
||||
{
|
||||
@@ -2807,9 +2810,10 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
@@ -2823,9 +2826,10 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
wined3d_cs_st_submit,
|
||||
};
|
||||
|
||||
@ -591,7 +591,7 @@ index 6761e958cb8..dd018fee2cb 100644
|
||||
void *data;
|
||||
|
||||
assert(size <= sizeof(block->data));
|
||||
@@ -2817,8 +2821,11 @@ static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size)
|
||||
@@ -2833,8 +2837,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 6761e958cb8..dd018fee2cb 100644
|
||||
wined3d_cs_set_thread_block(cs, block);
|
||||
}
|
||||
|
||||
@@ -2836,7 +2843,7 @@ static void wined3d_cs_mt_submit(struct wined3d_cs *cs)
|
||||
@@ -2852,7 +2859,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 6761e958cb8..dd018fee2cb 100644
|
||||
}
|
||||
|
||||
static void wined3d_cs_mt_submit_and_wait(struct wined3d_cs *cs)
|
||||
@@ -2866,7 +2873,7 @@ static void wined3d_cs_emit_stop(struct wined3d_cs *cs)
|
||||
@@ -2882,7 +2889,7 @@ static void wined3d_cs_emit_stop(struct wined3d_cs *cs)
|
||||
|
||||
assert(cs->thread_id != GetCurrentThreadId());
|
||||
|
||||
@ -622,7 +622,7 @@ index 6761e958cb8..dd018fee2cb 100644
|
||||
op->opcode = WINED3D_CS_OP_STOP;
|
||||
|
||||
wined3d_cs_mt_submit(cs);
|
||||
@@ -2902,7 +2909,7 @@ static DWORD WINAPI wined3d_cs_run(void *thread_param)
|
||||
@@ -2918,7 +2925,7 @@ static DWORD WINAPI wined3d_cs_run(void *thread_param)
|
||||
for (;;)
|
||||
{
|
||||
struct wined3d_cs_block *block;
|
||||
@ -631,7 +631,7 @@ index 6761e958cb8..dd018fee2cb 100644
|
||||
if (!wined3d_cs_process_block(cs, block))
|
||||
break;
|
||||
}
|
||||
@@ -2946,6 +2953,7 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -2962,6 +2969,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 6761e958cb8..dd018fee2cb 100644
|
||||
|
||||
if (!(cs->thread = CreateThread(NULL, 0, wined3d_cs_run, cs, 0, &cs->thread_id)))
|
||||
{
|
||||
@@ -2981,6 +2989,7 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
@@ -2997,6 +3005,7 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
|
||||
|
||||
/* FIXME: Cleanup the block lists on thread exit. */
|
||||
#if 0
|
||||
@ -648,10 +648,10 @@ index 6761e958cb8..dd018fee2cb 100644
|
||||
wined3d_cs_list_cleanup(&cs->free_list);
|
||||
#endif
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index a22bca662f5..1d8be3e89d9 100644
|
||||
index f12d64474ea..751fd61de05 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3215,12 +3215,13 @@ struct wined3d_cs_block
|
||||
@@ -3218,12 +3218,13 @@ struct wined3d_cs_block
|
||||
{
|
||||
struct list entry;
|
||||
UINT pos;
|
||||
@ -666,7 +666,7 @@ index a22bca662f5..1d8be3e89d9 100644
|
||||
void (*submit)(struct wined3d_cs *cs);
|
||||
void (*submit_and_wait)(struct wined3d_cs *cs);
|
||||
};
|
||||
@@ -3238,6 +3239,7 @@ struct wined3d_cs
|
||||
@@ -3241,6 +3242,7 @@ struct wined3d_cs
|
||||
|
||||
struct wined3d_cs_list free_list;
|
||||
struct wined3d_cs_list exec_list;
|
||||
|
@ -34,7 +34,7 @@ diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c
|
||||
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
|
||||
--- a/dlls/d3d11/tests/d3d11.c
|
||||
+++ b/dlls/d3d11/tests/d3d11.c
|
||||
@@ -9069,6 +9069,9 @@ float4 main(const ps_in v) : SV_TARGET
|
||||
@@ -9092,6 +9092,9 @@ float4 main(const ps_in v) : SV_TARGET
|
||||
ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)index_cb, 0, NULL, &index, 0, 0);
|
||||
|
||||
draw_quad(&test_context);
|
||||
@ -44,7 +44,7 @@ diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
|
||||
check_texture_color(test_context.backbuffer, test_data[i].expected, 1);
|
||||
}
|
||||
|
||||
@@ -11320,6 +11323,9 @@ static void test_line_antialiasing_blending(void)
|
||||
@@ -11345,6 +11348,9 @@ static void test_line_antialiasing_blending(void)
|
||||
|
||||
ID3D11DeviceContext_ClearRenderTargetView(context, test_context.backbuffer_rtv, &green.x);
|
||||
draw_color_quad(&test_context, &red);
|
||||
@ -231,7 +231,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
}
|
||||
|
||||
static BOOL fixed_get_input(BYTE usage, BYTE usage_idx, unsigned int *regnum)
|
||||
@@ -3490,7 +3540,11 @@ BOOL context_apply_draw_state(struct wined3d_context *context,
|
||||
@@ -3500,7 +3550,11 @@ 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;
|
||||
@ -243,7 +243,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
unsigned int i;
|
||||
WORD map;
|
||||
|
||||
@@ -3692,6 +3746,15 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device, str
|
||||
@@ -3702,6 +3756,15 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device, str
|
||||
|
||||
TRACE("device %p, target %p.\n", device, target);
|
||||
|
||||
@ -311,7 +311,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
+ WINED3D_CS_OP_SAMPLER_INIT,
|
||||
+ WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION,
|
||||
+ WINED3D_CS_OP_BUFFER_COPY,
|
||||
+ WINED3D_CS_OP_CREATE_BUFFER_TEXTURE,
|
||||
+ WINED3D_CS_OP_CREATE_BUFFER_VIEW,
|
||||
+ WINED3D_CS_OP_CREATE_TEXTURE_VIEW,
|
||||
+ WINED3D_CS_OP_DELETE_GL_CONTEXTS,
|
||||
+ WINED3D_CS_OP_MAP_vertex_buffers,
|
||||
@ -337,7 +337,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
struct wined3d_cs_preload_resource
|
||||
{
|
||||
enum wined3d_cs_op opcode;
|
||||
@@ -328,7 +371,305 @@ struct wined3d_cs_unmap
|
||||
@@ -328,7 +371,307 @@ struct wined3d_cs_unmap
|
||||
HRESULT *hr;
|
||||
};
|
||||
|
||||
@ -475,12 +475,14 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
+ unsigned int size;
|
||||
+};
|
||||
+
|
||||
+struct wined3d_cs_create_buffer_texture
|
||||
+struct wined3d_cs_create_buffer_view
|
||||
+{
|
||||
+ enum wined3d_cs_op opcode;
|
||||
+ struct wined3d_gl_view *view;
|
||||
+ const struct wined3d_view_desc *desc;
|
||||
+ struct wined3d_buffer *buffer;
|
||||
+ const struct wined3d_format *view_format;
|
||||
+ HRESULT *hr;
|
||||
+};
|
||||
+
|
||||
+struct wined3d_cs_create_texture_view
|
||||
@ -643,7 +645,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_present *op = data;
|
||||
struct wined3d_swapchain *swapchain;
|
||||
@@ -337,13 +678,24 @@ static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
|
||||
@@ -337,13 +680,24 @@ static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
|
||||
swapchain = op->swapchain;
|
||||
wined3d_swapchain_set_window(swapchain, op->dst_window_override);
|
||||
|
||||
@ -668,7 +670,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain,
|
||||
@@ -351,8 +703,14 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
@@ -351,8 +705,14 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
{
|
||||
struct wined3d_cs_present *op;
|
||||
unsigned int i;
|
||||
@ -683,7 +685,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
op->opcode = WINED3D_CS_OP_PRESENT;
|
||||
op->dst_window_override = dst_window_override;
|
||||
op->swapchain = swapchain;
|
||||
@@ -366,34 +724,75 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
@@ -366,34 +726,75 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw
|
||||
wined3d_resource_acquire(&swapchain->back_buffers[i]->resource);
|
||||
}
|
||||
|
||||
@ -759,7 +761,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
|
||||
@@ -403,7 +802,11 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
@@ -403,7 +804,11 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
struct wined3d_cs_clear *op;
|
||||
unsigned int i;
|
||||
|
||||
@ -771,7 +773,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
op->opcode = WINED3D_CS_OP_CLEAR;
|
||||
op->flags = flags;
|
||||
op->color = *color;
|
||||
@@ -416,12 +819,21 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
@@ -416,12 +821,21 @@ 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)
|
||||
{
|
||||
@ -793,7 +795,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
@@ -532,9 +944,15 @@ static void release_unordered_access_resources(const struct wined3d_shader *shad
|
||||
@@ -532,9 +946,15 @@ static void release_unordered_access_resources(const struct wined3d_shader *shad
|
||||
}
|
||||
}
|
||||
|
||||
@ -809,7 +811,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
const struct wined3d_cs_dispatch *op = data;
|
||||
|
||||
dispatch_compute(cs->device, state,
|
||||
@@ -543,6 +961,10 @@ static void wined3d_cs_exec_dispatch(struct wined3d_cs *cs, const void *data)
|
||||
@@ -543,6 +963,10 @@ static void wined3d_cs_exec_dispatch(struct wined3d_cs *cs, const void *data)
|
||||
release_shader_resources(state, 1u << WINED3D_SHADER_TYPE_COMPUTE);
|
||||
release_unordered_access_resources(state->shader[WINED3D_SHADER_TYPE_COMPUTE],
|
||||
state->unordered_access_view[WINED3D_PIPELINE_COMPUTE]);
|
||||
@ -820,7 +822,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
|
||||
@@ -551,7 +973,11 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
|
||||
@@ -551,7 +975,11 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
|
||||
const struct wined3d_state *state = &cs->device->state;
|
||||
struct wined3d_cs_dispatch *op;
|
||||
|
||||
@ -832,7 +834,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
op->opcode = WINED3D_CS_OP_DISPATCH;
|
||||
op->group_count_x = group_count_x;
|
||||
op->group_count_y = group_count_y;
|
||||
@@ -564,9 +990,15 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
|
||||
@@ -564,9 +992,15 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -848,7 +850,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
const struct wined3d_cs_draw *op = data;
|
||||
unsigned int i;
|
||||
|
||||
@@ -594,14 +1026,26 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
@@ -594,14 +1028,26 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
}
|
||||
for (i = 0; i < cs->device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@ -875,7 +877,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned int start_idx,
|
||||
@@ -611,7 +1055,11 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
@@ -611,7 +1057,11 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
struct wined3d_cs_draw *op;
|
||||
unsigned int i;
|
||||
|
||||
@ -887,7 +889,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
op->opcode = WINED3D_CS_OP_DRAW;
|
||||
op->base_vertex_idx = base_vertex_idx;
|
||||
op->start_idx = start_idx;
|
||||
@@ -634,11 +1082,19 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
@@ -634,11 +1084,19 @@ 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)
|
||||
{
|
||||
@ -907,7 +909,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
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]);
|
||||
@@ -646,38 +1102,61 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
@@ -646,38 +1104,61 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned i
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -969,7 +971,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_SET_VIEWPORT;
|
||||
op->viewport = *viewport;
|
||||
@@ -686,17 +1165,30 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
@@ -686,17 +1167,30 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
|
||||
}
|
||||
|
||||
static void wined3d_cs_exec_set_scissor_rect(struct wined3d_cs *cs, const void *data)
|
||||
@ -1000,7 +1002,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_SET_SCISSOR_RECT;
|
||||
op->rect = *rect;
|
||||
@@ -705,11 +1197,26 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
@@ -705,11 +1199,26 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
|
||||
}
|
||||
|
||||
static void wined3d_cs_exec_set_rendertarget_view(struct wined3d_cs *cs, const void *data)
|
||||
@ -1027,7 +1029,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int view_idx,
|
||||
@@ -717,21 +1224,35 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
@@ -717,21 +1226,35 @@ void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int v
|
||||
{
|
||||
struct wined3d_cs_set_rendertarget_view *op;
|
||||
|
||||
@ -1063,7 +1065,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
struct wined3d_surface *prev_surface = wined3d_rendertarget_view_get_surface(prev);
|
||||
|
||||
@@ -743,7 +1264,11 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
@@ -743,7 +1266,11 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
}
|
||||
}
|
||||
|
||||
@ -1075,7 +1077,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
|
||||
if (!prev != !op->view)
|
||||
{
|
||||
@@ -760,12 +1285,17 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
@@ -760,12 +1287,17 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const
|
||||
}
|
||||
|
||||
device_invalidate_state(device, STATE_FRAMEBUFFER);
|
||||
@ -1093,7 +1095,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_SET_DEPTH_STENCIL_VIEW;
|
||||
op->view = view;
|
||||
@@ -774,17 +1304,30 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
@@ -774,17 +1306,30 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3
|
||||
}
|
||||
|
||||
static void wined3d_cs_exec_set_vertex_declaration(struct wined3d_cs *cs, const void *data)
|
||||
@ -1124,7 +1126,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_SET_VERTEX_DECLARATION;
|
||||
op->declaration = declaration;
|
||||
@@ -793,6 +1336,14 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
@@ -793,6 +1338,14 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3
|
||||
}
|
||||
|
||||
static void wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void *data)
|
||||
@ -1139,7 +1141,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_stream_source *op = data;
|
||||
struct wined3d_stream_state *stream;
|
||||
@@ -810,6 +1361,10 @@ static void wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void
|
||||
@@ -810,6 +1363,10 @@ static void wined3d_cs_exec_set_stream_source(struct wined3d_cs *cs, const void
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
|
||||
device_invalidate_state(cs->device, STATE_STREAMSRC);
|
||||
@ -1150,7 +1152,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -817,17 +1372,27 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -817,17 +1374,27 @@ void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx,
|
||||
{
|
||||
struct wined3d_cs_set_stream_source *op;
|
||||
|
||||
@ -1178,7 +1180,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_stream_source_freq *op = data;
|
||||
struct wined3d_stream_state *stream;
|
||||
@@ -837,22 +1402,36 @@ static void wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const
|
||||
@@ -837,22 +1404,36 @@ static void wined3d_cs_exec_set_stream_source_freq(struct wined3d_cs *cs, const
|
||||
stream->flags = op->flags;
|
||||
|
||||
device_invalidate_state(cs->device, STATE_STREAMSRC);
|
||||
@ -1215,7 +1217,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_stream_output *op = data;
|
||||
struct wined3d_stream_output *stream;
|
||||
@@ -867,6 +1446,10 @@ static void wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void
|
||||
@@ -867,6 +1448,10 @@ static void wined3d_cs_exec_set_stream_output(struct wined3d_cs *cs, const void
|
||||
InterlockedIncrement(&op->buffer->resource.bind_count);
|
||||
if (prev)
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
@ -1226,7 +1228,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -874,16 +1457,26 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
@@ -874,16 +1459,26 @@ void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx,
|
||||
{
|
||||
struct wined3d_cs_set_stream_output *op;
|
||||
|
||||
@ -1253,7 +1255,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_index_buffer *op = data;
|
||||
struct wined3d_buffer *prev;
|
||||
@@ -899,6 +1492,10 @@ static void wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *
|
||||
@@ -899,6 +1494,10 @@ static void wined3d_cs_exec_set_index_buffer(struct wined3d_cs *cs, const void *
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
|
||||
device_invalidate_state(cs->device, STATE_INDEXBUFFER);
|
||||
@ -1264,7 +1266,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buffer *buffer,
|
||||
@@ -906,16 +1503,26 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
@@ -906,16 +1505,26 @@ void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buff
|
||||
{
|
||||
struct wined3d_cs_set_index_buffer *op;
|
||||
|
||||
@ -1291,7 +1293,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_constant_buffer *op = data;
|
||||
struct wined3d_buffer *prev;
|
||||
@@ -929,6 +1536,9 @@ static void wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const voi
|
||||
@@ -929,6 +1538,9 @@ static void wined3d_cs_exec_set_constant_buffer(struct wined3d_cs *cs, const voi
|
||||
InterlockedDecrement(&prev->resource.bind_count);
|
||||
|
||||
device_invalidate_state(cs->device, STATE_CONSTANT_BUFFER(op->type));
|
||||
@ -1301,7 +1303,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -936,16 +1546,26 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
@@ -936,16 +1548,26 @@ void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_sha
|
||||
{
|
||||
struct wined3d_cs_set_constant_buffer *op;
|
||||
|
||||
@ -1328,7 +1330,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = &cs->device->adapter->gl_info;
|
||||
const struct wined3d_d3d_info *d3d_info = &cs->device->adapter->d3d_info;
|
||||
@@ -1022,21 +1642,35 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1022,21 +1644,35 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
|
||||
|
||||
if (new_use_color_key)
|
||||
device_invalidate_state(cs->device, STATE_COLOR_KEY);
|
||||
@ -1364,7 +1366,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_shader_resource_view *op = data;
|
||||
struct wined3d_shader_resource_view *prev;
|
||||
@@ -1051,6 +1685,10 @@ static void wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, cons
|
||||
@@ -1051,6 +1687,10 @@ static void wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, cons
|
||||
|
||||
if (op->type != WINED3D_SHADER_TYPE_COMPUTE)
|
||||
device_invalidate_state(cs->device, STATE_SHADER_RESOURCE_BINDING);
|
||||
@ -1375,7 +1377,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -1058,16 +1696,26 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
@@ -1058,16 +1698,26 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3
|
||||
{
|
||||
struct wined3d_cs_set_shader_resource_view *op;
|
||||
|
||||
@ -1402,7 +1404,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_unordered_access_view *op = data;
|
||||
struct wined3d_unordered_access_view *prev;
|
||||
@@ -1081,6 +1729,10 @@ static void wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, con
|
||||
@@ -1081,6 +1731,10 @@ static void wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, con
|
||||
InterlockedDecrement(&prev->resource->bind_count);
|
||||
|
||||
device_invalidate_state(cs->device, STATE_UNORDERED_ACCESS_VIEW_BINDING(op->pipeline));
|
||||
@ -1413,7 +1415,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined3d_pipeline pipeline,
|
||||
@@ -1088,21 +1740,35 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
@@ -1088,21 +1742,35 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
{
|
||||
struct wined3d_cs_set_unordered_access_view *op;
|
||||
|
||||
@ -1449,7 +1451,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type type,
|
||||
@@ -1110,16 +1776,26 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
@@ -1110,16 +1778,26 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type
|
||||
{
|
||||
struct wined3d_cs_set_sampler *op;
|
||||
|
||||
@ -1476,7 +1478,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_shader *op = data;
|
||||
|
||||
@@ -1127,26 +1803,44 @@ static void wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data)
|
||||
@@ -1127,26 +1805,44 @@ static void wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data)
|
||||
device_invalidate_state(cs->device, STATE_SHADER(op->type));
|
||||
if (op->type != WINED3D_SHADER_TYPE_COMPUTE)
|
||||
device_invalidate_state(cs->device, STATE_SHADER_RESOURCE_BINDING);
|
||||
@ -1521,7 +1523,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
@@ -1154,6 +1848,7 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
@@ -1154,6 +1850,7 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
{
|
||||
struct wined3d_cs_set_rasterizer_state *op;
|
||||
|
||||
@ -1529,7 +1531,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_SET_RASTERIZER_STATE;
|
||||
op->state = rasterizer_state;
|
||||
@@ -1162,31 +1857,57 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
@@ -1162,31 +1859,57 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
}
|
||||
|
||||
static void wined3d_cs_exec_set_render_state(struct wined3d_cs *cs, const void *data)
|
||||
@ -1587,7 +1589,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
@@ -1194,21 +1915,35 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
@@ -1194,21 +1917,35 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage,
|
||||
{
|
||||
struct wined3d_cs_set_texture_state *op;
|
||||
|
||||
@ -1623,7 +1625,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
@@ -1216,22 +1951,36 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
@@ -1216,22 +1953,36 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx,
|
||||
{
|
||||
struct wined3d_cs_set_sampler_state *op;
|
||||
|
||||
@ -1660,7 +1662,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform_state state,
|
||||
@@ -1239,35 +1988,59 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
@@ -1239,35 +1990,59 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
{
|
||||
struct wined3d_cs_set_transform *op;
|
||||
|
||||
@ -1720,7 +1722,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
const struct wined3d_cs_set_color_key *op = data;
|
||||
struct wined3d_texture *texture = op->texture;
|
||||
@@ -1328,6 +2101,10 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
|
||||
@@ -1328,6 +2103,10 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1731,7 +1733,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
@@ -1335,7 +2112,11 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -1335,7 +2114,11 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
{
|
||||
struct wined3d_cs_set_color_key *op;
|
||||
|
||||
@ -1743,7 +1745,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
op->opcode = WINED3D_CS_OP_SET_COLOR_KEY;
|
||||
op->texture = texture;
|
||||
op->flags = flags;
|
||||
@@ -1346,22 +2127,33 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
@@ -1346,22 +2129,33 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture
|
||||
}
|
||||
else
|
||||
op->set = 0;
|
||||
@ -1777,7 +1779,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_SET_MATERIAL;
|
||||
op->material = *material;
|
||||
@@ -1372,17 +2164,37 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
@@ -1372,17 +2166,37 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
|
||||
static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
struct wined3d_adapter *adapter = cs->device->adapter;
|
||||
@ -1815,7 +1817,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
op = cs->ops->require_space(cs, sizeof(*op));
|
||||
op->opcode = WINED3D_CS_OP_RESET_STATE;
|
||||
|
||||
@@ -1390,17 +2202,32 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
@@ -1390,17 +2204,32 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
|
||||
}
|
||||
|
||||
static void wined3d_cs_exec_destroy_object(struct wined3d_cs *cs, const void *data)
|
||||
@ -1848,7 +1850,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
op->opcode = WINED3D_CS_OP_DESTROY_OBJECT;
|
||||
op->callback = callback;
|
||||
op->object = object;
|
||||
@@ -1408,40 +2235,96 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
|
||||
@@ -1408,40 +2237,96 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -1945,7 +1947,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
op->opcode = WINED3D_CS_OP_PRELOAD_RESOURCE;
|
||||
op->resource = resource;
|
||||
|
||||
@@ -1450,20 +2333,32 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
@@ -1450,20 +2335,32 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -1978,7 +1980,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
op->opcode = WINED3D_CS_OP_UNLOAD_RESOURCE;
|
||||
op->resource = resource;
|
||||
|
||||
@@ -1472,13 +2367,21 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
|
||||
@@ -1472,13 +2369,21 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
|
||||
cs->ops->submit(cs);
|
||||
}
|
||||
|
||||
@ -2000,7 +2002,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx,
|
||||
@@ -1487,7 +2390,11 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
@@ -1487,7 +2392,11 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
struct wined3d_cs_map *op;
|
||||
HRESULT hr;
|
||||
|
||||
@ -2012,7 +2014,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
op->opcode = WINED3D_CS_OP_MAP;
|
||||
op->resource = resource;
|
||||
op->sub_resource_idx = sub_resource_idx;
|
||||
@@ -1496,17 +2403,29 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
@@ -1496,17 +2405,29 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
op->flags = flags;
|
||||
op->hr = &hr;
|
||||
|
||||
@ -2042,7 +2044,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
}
|
||||
|
||||
HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx)
|
||||
@@ -1514,19 +2433,805 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc
|
||||
@@ -1514,19 +2435,811 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc
|
||||
struct wined3d_cs_unmap *op;
|
||||
HRESULT hr;
|
||||
|
||||
@ -2057,13 +2059,13 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
op->hr = &hr;
|
||||
|
||||
+#if !defined(STAGING_CSMT)
|
||||
cs->ops->submit(cs);
|
||||
+ cs->ops->submit(cs);
|
||||
+#else /* STAGING_CSMT */
|
||||
+ cs->ops->submit_and_wait(cs);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
+
|
||||
+ return hr;
|
||||
+}
|
||||
+
|
||||
+static UINT wined3d_cs_exec_glfinish(struct wined3d_cs *cs, const void *data)
|
||||
+{
|
||||
+ const struct wined3d_cs_finish *op = data;
|
||||
@ -2351,7 +2353,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
+ if (src_surface && src_surface != dst_surface)
|
||||
+ wined3d_resource_acquire(&src_surface->container->resource);
|
||||
+
|
||||
+ cs->ops->submit(cs);
|
||||
cs->ops->submit(cs);
|
||||
+}
|
||||
+
|
||||
+static UINT wined3d_cs_exec_clear_rtv(struct wined3d_cs *cs, const void *data)
|
||||
@ -2513,10 +2515,15 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
+ op->hr = &hr;
|
||||
+
|
||||
+ cs->ops->submit_and_wait(cs);
|
||||
+
|
||||
+ return hr;
|
||||
+}
|
||||
+
|
||||
+#endif /* STAGING_CSMT */
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
+#if !defined(STAGING_CSMT)
|
||||
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
+#else /* STAGING_CSMT */
|
||||
+static UINT wined3d_cs_exec_release_dc(struct wined3d_cs *cs, const void *data)
|
||||
+{
|
||||
+ const struct wined3d_cs_get_release_dc *op = data;
|
||||
@ -2539,15 +2546,10 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
+ op->hr = &hr;
|
||||
+
|
||||
+ cs->ops->submit_and_wait(cs);
|
||||
+#endif /* STAGING_CSMT */
|
||||
+
|
||||
+ return hr;
|
||||
+}
|
||||
+
|
||||
+#if !defined(STAGING_CSMT)
|
||||
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
+#else /* STAGING_CSMT */
|
||||
+static UINT wined3d_cs_exec_create_dummy_textures(struct wined3d_cs *cs, const void *data)
|
||||
+{
|
||||
+ const struct wined3d_cs_create_dummy_textures *op = data;
|
||||
@ -2708,27 +2710,33 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
+ cs->ops->submit(cs);
|
||||
+}
|
||||
+
|
||||
+static UINT wined3d_cs_exec_create_buffer_texture(struct wined3d_cs *cs, const void *data)
|
||||
+static UINT wined3d_cs_exec_create_buffer_view(struct wined3d_cs *cs, const void *data)
|
||||
+{
|
||||
+ const struct wined3d_cs_create_buffer_texture *op = data;
|
||||
+ const struct wined3d_cs_create_buffer_view *op = data;
|
||||
+
|
||||
+ create_buffer_texture(op->view, op->buffer, op->view_format);
|
||||
+ *op->hr = create_buffer_view(op->view, op->desc, op->buffer, op->view_format);
|
||||
+
|
||||
+ return sizeof(*op);
|
||||
+}
|
||||
+
|
||||
+void wined3d_cs_emit_create_buffer_texture(struct wined3d_cs *cs, struct wined3d_gl_view *view,
|
||||
+ struct wined3d_buffer *buffer, const struct wined3d_format *view_format)
|
||||
+HRESULT wined3d_cs_emit_create_buffer_view(struct wined3d_cs *cs, struct wined3d_gl_view *view,
|
||||
+ const struct wined3d_view_desc *desc, struct wined3d_buffer *buffer,
|
||||
+ const struct wined3d_format *view_format)
|
||||
+{
|
||||
+ struct wined3d_cs_create_buffer_texture *op;
|
||||
+ struct wined3d_cs_create_buffer_view *op;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ op = cs->ops->require_space(cs, sizeof(*op), 0);
|
||||
+ op->opcode = WINED3D_CS_OP_CREATE_BUFFER_TEXTURE;
|
||||
+ op->opcode = WINED3D_CS_OP_CREATE_BUFFER_VIEW;
|
||||
+ op->view = view;
|
||||
+ op->desc = desc;
|
||||
+ op->buffer = buffer;
|
||||
+ op->view_format = view_format;
|
||||
+ op->hr = &hr;
|
||||
+
|
||||
+ cs->ops->submit_and_wait(cs);
|
||||
+
|
||||
+ return hr;
|
||||
+}
|
||||
+
|
||||
+static UINT wined3d_cs_exec_create_texture_view(struct wined3d_cs *cs, const void *data)
|
||||
@ -2848,7 +2856,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
/* WINED3D_CS_OP_PRESENT */ wined3d_cs_exec_present,
|
||||
/* WINED3D_CS_OP_CLEAR */ wined3d_cs_exec_clear,
|
||||
/* WINED3D_CS_OP_DISPATCH */ wined3d_cs_exec_dispatch,
|
||||
@@ -1558,13 +3263,43 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -1558,13 +3271,43 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_RESET_STATE */ wined3d_cs_exec_reset_state,
|
||||
/* WINED3D_CS_OP_DESTROY_OBJECT */ wined3d_cs_exec_destroy_object,
|
||||
/* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue,
|
||||
@ -2881,7 +2889,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
+ /* WINED3D_CS_OP_SAMPLER_INIT */ wined3d_cs_exec_sampler_init,
|
||||
+ /* WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION */ wined3d_cs_exec_texture_add_dirty_region,
|
||||
+ /* WINED3D_CS_OP_BUFFER_COPY */ wined3d_cs_exec_buffer_copy,
|
||||
+ /* WINED3D_CS_OP_CREATE_BUFFER_TEXTURE */ wined3d_cs_exec_create_buffer_texture,
|
||||
+ /* 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,
|
||||
+ /* WINED3D_CS_OP_MAP_vertex_buffers */ wined3d_cs_exec_map_vertex_buffers,
|
||||
@ -2892,7 +2900,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
{
|
||||
if (size > cs->data_size)
|
||||
{
|
||||
@@ -1588,6 +3323,7 @@ static void wined3d_cs_st_submit(struct wined3d_cs *cs)
|
||||
@@ -1588,6 +3331,7 @@ static void wined3d_cs_st_submit(struct wined3d_cs *cs)
|
||||
wined3d_cs_op_handlers[opcode](cs, cs->data);
|
||||
}
|
||||
|
||||
@ -2900,7 +2908,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
static void wined3d_cs_st_push_constants(struct wined3d_cs *cs, enum wined3d_push_constants p,
|
||||
unsigned int start_idx, unsigned int count, const void *constants)
|
||||
{
|
||||
@@ -1628,15 +3364,161 @@ static void wined3d_cs_st_push_constants(struct wined3d_cs *cs, enum wined3d_pus
|
||||
@@ -1628,15 +3372,161 @@ static void wined3d_cs_st_push_constants(struct wined3d_cs *cs, enum wined3d_pus
|
||||
for (i = 0, context_count = device->context_count; i < context_count; ++i)
|
||||
{
|
||||
device->contexts[i]->constant_update_mask |= push_constant_info[p].mask;
|
||||
@ -3062,7 +3070,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
|
||||
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
{
|
||||
@@ -1646,34 +3528,97 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
@@ -1646,34 +3536,97 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device)
|
||||
if (!(cs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*cs))))
|
||||
return NULL;
|
||||
|
||||
@ -4676,7 +4684,7 @@ diff --git a/dlls/wined3d/sampler.c b/dlls/wined3d/sampler.c
|
||||
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
|
||||
--- a/dlls/wined3d/shader.c
|
||||
+++ b/dlls/wined3d/shader.c
|
||||
@@ -3235,7 +3235,11 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
|
||||
@@ -3247,7 +3247,11 @@ 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. */
|
||||
@ -6053,31 +6061,31 @@ diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c
|
||||
const struct wined3d_view_desc *desc, struct wined3d_texture *texture,
|
||||
const struct wined3d_format *view_format)
|
||||
{
|
||||
@@ -133,7 +137,11 @@ static void create_texture_view(struct wined3d_gl_view *view, GLenum view_target
|
||||
@@ -181,7 +185,11 @@ static void create_buffer_texture(struct wined3d_gl_view *view,
|
||||
context_release(context);
|
||||
}
|
||||
|
||||
+#if !defined(STAGING_CSMT)
|
||||
static void create_buffer_texture(struct wined3d_gl_view *view,
|
||||
static HRESULT create_buffer_view(struct wined3d_gl_view *view,
|
||||
+#else /* STAGING_CSMT */
|
||||
+void create_buffer_texture(struct wined3d_gl_view *view,
|
||||
+HRESULT create_buffer_view(struct wined3d_gl_view *view,
|
||||
+#endif /* STAGING_CSMT */
|
||||
struct wined3d_buffer *buffer, const struct wined3d_format *view_format)
|
||||
const struct wined3d_view_desc *desc, struct wined3d_buffer *buffer,
|
||||
const struct wined3d_format *view_format)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
@@ -475,7 +483,11 @@ static HRESULT wined3d_shader_resource_view_init(struct wined3d_shader_resource_
|
||||
FIXME("Ignoring buffer range %u-%u.\n", desc->u.buffer.start_idx, desc->u.buffer.count);
|
||||
}
|
||||
@@ -515,7 +523,11 @@ static HRESULT wined3d_shader_resource_view_init(struct wined3d_shader_resource_
|
||||
struct wined3d_buffer *buffer = buffer_from_resource(resource);
|
||||
HRESULT hr;
|
||||
|
||||
+#if !defined(STAGING_CSMT)
|
||||
create_buffer_texture(&view->gl_view, buffer, view_format);
|
||||
if (FAILED(hr = create_buffer_view(&view->gl_view, desc, buffer, view_format)))
|
||||
+#else /* STAGING_CSMT */
|
||||
+ wined3d_cs_emit_create_buffer_texture(resource->device->cs, &view->gl_view, buffer, view_format);
|
||||
+ if (FAILED(hr = wined3d_cs_emit_create_buffer_view(resource->device->cs, &view->gl_view, desc, buffer, view_format)))
|
||||
+#endif /* STAGING_CSMT */
|
||||
}
|
||||
return hr;
|
||||
}
|
||||
else
|
||||
@@ -506,7 +518,12 @@ static HRESULT wined3d_shader_resource_view_init(struct wined3d_shader_resource_
|
||||
@@ -546,7 +558,12 @@ static HRESULT wined3d_shader_resource_view_init(struct wined3d_shader_resource_
|
||||
else if (resource->format->typeless_id == view_format->typeless_id
|
||||
&& resource->format->gl_view_class == view_format->gl_view_class)
|
||||
{
|
||||
@ -6090,7 +6098,19 @@ diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -671,8 +688,13 @@ static HRESULT wined3d_unordered_access_view_init(struct wined3d_unordered_acces
|
||||
@@ -702,7 +719,11 @@ static HRESULT wined3d_unordered_access_view_init(struct wined3d_unordered_acces
|
||||
struct wined3d_buffer *buffer = buffer_from_resource(resource);
|
||||
HRESULT hr;
|
||||
|
||||
+#if !defined(STAGING_CSMT)
|
||||
if (FAILED(hr = create_buffer_view(&view->gl_view, desc, buffer, view->format)))
|
||||
+#else /* STAGING_CSMT */
|
||||
+ if (FAILED(hr = wined3d_cs_emit_create_buffer_view(resource->device->cs, &view->gl_view, desc, buffer, view->format)))
|
||||
+#endif /* STAGING_CSMT */
|
||||
return hr;
|
||||
}
|
||||
else
|
||||
@@ -724,8 +745,13 @@ static HRESULT wined3d_unordered_access_view_init(struct wined3d_unordered_acces
|
||||
|
||||
if (desc->u.texture.layer_idx || desc->u.texture.layer_count != depth_or_layer_count)
|
||||
{
|
||||
@ -6153,7 +6173,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
};
|
||||
|
||||
extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN;
|
||||
@@ -1496,6 +1499,9 @@ struct wined3d_query
|
||||
@@ -1497,6 +1500,9 @@ struct wined3d_query
|
||||
const void *data;
|
||||
DWORD data_size;
|
||||
const struct wined3d_query_ops *query_ops;
|
||||
@ -6163,7 +6183,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
};
|
||||
|
||||
union wined3d_gl_query_object
|
||||
@@ -1537,6 +1543,9 @@ struct wined3d_occlusion_query
|
||||
@@ -1538,6 +1544,9 @@ struct wined3d_occlusion_query
|
||||
GLuint id;
|
||||
struct wined3d_context *context;
|
||||
UINT64 samples;
|
||||
@ -6173,7 +6193,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
};
|
||||
|
||||
struct wined3d_timestamp_query
|
||||
@@ -1552,6 +1561,38 @@ struct wined3d_timestamp_query
|
||||
@@ -1553,6 +1562,38 @@ 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;
|
||||
|
||||
@ -6212,7 +6232,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
struct wined3d_context
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
@@ -1567,6 +1608,9 @@ struct wined3d_context
|
||||
@@ -1568,6 +1609,9 @@ 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];
|
||||
@ -6222,7 +6242,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
struct wined3d_device *device;
|
||||
struct wined3d_swapchain *swapchain;
|
||||
@@ -1680,12 +1724,14 @@ struct wined3d_context
|
||||
@@ -1681,12 +1725,14 @@ struct wined3d_context
|
||||
GLuint dummy_arbfp_prog;
|
||||
};
|
||||
|
||||
@ -6237,7 +6257,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
typedef void (*APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id);
|
||||
|
||||
struct StateEntry
|
||||
@@ -1824,7 +1870,11 @@ void context_alloc_event_query(struct wined3d_context *context,
|
||||
@@ -1825,7 +1871,11 @@ void context_alloc_event_query(struct wined3d_context *context,
|
||||
void context_alloc_occlusion_query(struct wined3d_context *context,
|
||||
struct wined3d_occlusion_query *query) DECLSPEC_HIDDEN;
|
||||
void context_apply_blit_state(struct wined3d_context *context, const struct wined3d_device *device) DECLSPEC_HIDDEN;
|
||||
@ -6249,7 +6269,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
UINT rt_count, const struct wined3d_fb_state *fb) DECLSPEC_HIDDEN;
|
||||
void context_apply_compute_state(struct wined3d_context *context,
|
||||
const struct wined3d_device *device, const struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
@@ -2507,7 +2557,11 @@ struct wined3d_stream_state
|
||||
@@ -2510,7 +2560,11 @@ struct wined3d_stream_state
|
||||
struct wined3d_state
|
||||
{
|
||||
DWORD flags;
|
||||
@ -6261,7 +6281,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
struct wined3d_vertex_declaration *vertex_declaration;
|
||||
struct wined3d_stream_output stream_output[MAX_STREAM_OUT];
|
||||
@@ -2555,6 +2609,16 @@ struct wined3d_state
|
||||
@@ -2558,6 +2612,16 @@ struct wined3d_state
|
||||
struct wined3d_rasterizer_state *rasterizer_state;
|
||||
};
|
||||
|
||||
@ -6278,7 +6298,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
#define WINED3D_UNMAPPED_STAGE ~0U
|
||||
|
||||
/* Multithreaded flag. Removed from the public header to signal that
|
||||
@@ -2613,7 +2677,9 @@ struct wined3d_device
|
||||
@@ -2616,7 +2680,9 @@ struct wined3d_device
|
||||
struct wine_rb_tree samplers;
|
||||
|
||||
/* Render Target Support */
|
||||
@ -6288,7 +6308,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
struct wined3d_rendertarget_view *auto_depth_stencil_view;
|
||||
|
||||
/* For rendering to a texture using glCopyTexImage */
|
||||
@@ -2669,6 +2735,17 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
@@ -2672,6 +2738,17 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN;
|
||||
@ -6306,7 +6326,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
|
||||
{
|
||||
@@ -2744,11 +2821,13 @@ static inline void wined3d_resource_release(struct wined3d_resource *resource)
|
||||
@@ -2747,11 +2824,13 @@ static inline void wined3d_resource_release(struct wined3d_resource *resource)
|
||||
InterlockedDecrement(&resource->access_count);
|
||||
}
|
||||
|
||||
@ -6320,7 +6340,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void resource_cleanup(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *device,
|
||||
enum wined3d_resource_type type, const struct wined3d_format *format,
|
||||
@@ -2859,7 +2938,11 @@ struct wined3d_texture
|
||||
@@ -2862,7 +2941,11 @@ struct wined3d_texture
|
||||
|
||||
unsigned int map_count;
|
||||
DWORD locations;
|
||||
@ -6332,7 +6352,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
} sub_resources[1];
|
||||
};
|
||||
|
||||
@@ -2912,9 +2995,16 @@ void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture,
|
||||
@@ -2915,9 +2998,16 @@ void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture,
|
||||
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
BOOL wined3d_texture_check_block_align(const struct wined3d_texture *texture,
|
||||
unsigned int level, const struct wined3d_box *box) DECLSPEC_HIDDEN;
|
||||
@ -6349,7 +6369,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void wined3d_texture_invalidate_location(struct wined3d_texture *texture,
|
||||
unsigned int sub_resource_idx, DWORD location) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_load(struct wined3d_texture *texture,
|
||||
@@ -2927,6 +3017,10 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned
|
||||
@@ -2930,6 +3020,10 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned
|
||||
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_prepare_texture(struct wined3d_texture *texture,
|
||||
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
@ -6360,7 +6380,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void wined3d_texture_set_map_binding(struct wined3d_texture *texture, DWORD map_binding) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_set_swapchain(struct wined3d_texture *texture,
|
||||
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
|
||||
@@ -3034,6 +3128,11 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
@@ -3037,6 +3131,11 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info,
|
||||
const struct wined3d_format *format, const RECT *src_rect, UINT src_pitch, const POINT *dst_point,
|
||||
BOOL srgb, const struct wined3d_const_bo_address *data) DECLSPEC_HIDDEN;
|
||||
@ -6372,7 +6392,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3d_context *context,
|
||||
const RECT *src_rect, const RECT *dst_rect, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
|
||||
@@ -3048,6 +3147,10 @@ struct wined3d_sampler
|
||||
@@ -3051,6 +3150,10 @@ struct wined3d_sampler
|
||||
GLuint name;
|
||||
};
|
||||
|
||||
@ -6383,7 +6403,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
struct wined3d_vertex_declaration_element
|
||||
{
|
||||
const struct wined3d_format *format;
|
||||
@@ -3143,9 +3246,14 @@ struct wined3d_stateblock
|
||||
@@ -3146,9 +3249,14 @@ struct wined3d_stateblock
|
||||
void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
|
||||
|
||||
void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
@ -6398,7 +6418,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
|
||||
enum wined3d_push_constants
|
||||
@@ -3158,6 +3266,7 @@ enum wined3d_push_constants
|
||||
@@ -3161,6 +3269,7 @@ enum wined3d_push_constants
|
||||
WINED3D_PUSH_CONSTANTS_PS_B,
|
||||
};
|
||||
|
||||
@ -6406,7 +6426,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
struct wined3d_cs_ops
|
||||
{
|
||||
void *(*require_space)(struct wined3d_cs *cs, size_t size);
|
||||
@@ -3165,34 +3274,129 @@ struct wined3d_cs_ops
|
||||
@@ -3168,34 +3277,130 @@ struct wined3d_cs_ops
|
||||
void (*push_constants)(struct wined3d_cs *cs, enum wined3d_push_constants p,
|
||||
unsigned int start_idx, unsigned int count, const void *constants);
|
||||
};
|
||||
@ -6495,8 +6515,9 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
+void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view,
|
||||
+ const RECT *rect, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil,
|
||||
+ const struct blit_shader *blitter) DECLSPEC_HIDDEN;
|
||||
+void wined3d_cs_emit_create_buffer_texture(struct wined3d_cs *cs, struct wined3d_gl_view *view,
|
||||
+ struct wined3d_buffer *buffer, const struct wined3d_format *view_format) DECLSPEC_HIDDEN;
|
||||
+HRESULT wined3d_cs_emit_create_buffer_view(struct wined3d_cs *cs, struct wined3d_gl_view *view,
|
||||
+ const struct wined3d_view_desc *desc, struct wined3d_buffer *buffer,
|
||||
+ const struct wined3d_format *view_format) DECLSPEC_HIDDEN;
|
||||
+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;
|
||||
@ -6536,7 +6557,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx,
|
||||
const struct wined3d_vec4 *plane) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture *texture,
|
||||
@@ -3203,9 +3407,17 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs,
|
||||
@@ -3206,9 +3411,17 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs,
|
||||
struct wined3d_rendertarget_view *view) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buffer *buffer,
|
||||
enum wined3d_format_id format_id, unsigned int offset) DECLSPEC_HIDDEN;
|
||||
@ -6554,7 +6575,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs,
|
||||
struct wined3d_rasterizer_state *rasterizer_state) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs,
|
||||
@@ -3237,17 +3449,35 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
@@ -3240,17 +3453,35 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
|
||||
struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
|
||||
@ -6590,13 +6611,14 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
|
||||
* fixed function semantics as D3DCOLOR or FLOAT16 */
|
||||
@@ -3348,6 +3578,14 @@ struct wined3d_gl_view
|
||||
@@ -3351,6 +3582,15 @@ struct wined3d_gl_view
|
||||
GLuint name;
|
||||
};
|
||||
|
||||
+#if defined(STAGING_CSMT)
|
||||
+void create_buffer_texture(struct wined3d_gl_view *view,
|
||||
+ struct wined3d_buffer *buffer, const struct wined3d_format *view_format) DECLSPEC_HIDDEN;
|
||||
+HRESULT create_buffer_view(struct wined3d_gl_view *view,
|
||||
+ const struct wined3d_view_desc *desc, struct wined3d_buffer *buffer,
|
||||
+ const struct wined3d_format *view_format) DECLSPEC_HIDDEN;
|
||||
+void create_texture_view(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;
|
||||
@ -6605,7 +6627,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
struct wined3d_shader_resource_view
|
||||
{
|
||||
LONG refcount;
|
||||
@@ -3383,7 +3621,12 @@ void wined3d_unordered_access_view_invalidate_location(struct wined3d_unordered_
|
||||
@@ -3386,7 +3626,12 @@ void wined3d_unordered_access_view_invalidate_location(struct wined3d_unordered_
|
||||
struct wined3d_swapchain_ops
|
||||
{
|
||||
void (*swapchain_present)(struct wined3d_swapchain *swapchain,
|
||||
@ -6618,7 +6640,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void (*swapchain_frontbuffer_updated)(struct wined3d_swapchain *swapchain);
|
||||
};
|
||||
|
||||
@@ -3420,6 +3663,10 @@ struct wined3d_swapchain
|
||||
@@ -3423,6 +3668,10 @@ struct wined3d_swapchain
|
||||
|
||||
void wined3d_swapchain_activate(struct wined3d_swapchain *swapchain, BOOL activate) DECLSPEC_HIDDEN;
|
||||
struct wined3d_context *swapchain_get_context(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
|
||||
|
Loading…
Reference in New Issue
Block a user