You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against 6372cd8e49a662942a80d2decd1f7eae3541c45b.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 73ba4bb84fd27c19ee2b538d36c315130a2eed4e Mon Sep 17 00:00:00 2001
|
||||
From 32adb7bac2cba5547deea47ee576f6f4fa8fb5c5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 10 Oct 2013 16:29:42 +0200
|
||||
Subject: wined3d: Create dummy textures through the CS.
|
||||
@@ -12,10 +12,10 @@ crash.
|
||||
3 files changed, 35 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 0089911..2aa43d6 100644
|
||||
index 92170c3..52263e2 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -82,6 +82,7 @@ enum wined3d_cs_op
|
||||
@@ -81,6 +81,7 @@ enum wined3d_cs_op
|
||||
WINED3D_CS_OP_CREATE_VBO,
|
||||
WINED3D_CS_OP_GET_DC,
|
||||
WINED3D_CS_OP_RELEASE_DC,
|
||||
@@ -23,7 +23,7 @@ index 0089911..2aa43d6 100644
|
||||
WINED3D_CS_OP_STOP,
|
||||
};
|
||||
|
||||
@@ -483,6 +484,11 @@ struct wined3d_cs_get_release_dc
|
||||
@@ -476,6 +477,11 @@ struct wined3d_cs_get_release_dc
|
||||
unsigned int sub_resource_idx;
|
||||
};
|
||||
|
||||
@@ -35,7 +35,7 @@ index 0089911..2aa43d6 100644
|
||||
static void wined3d_cs_mt_submit(struct wined3d_cs *cs, size_t size)
|
||||
{
|
||||
LONG new_val = (cs->queue.head + size) & (WINED3D_CS_QUEUE_SIZE - 1);
|
||||
@@ -2533,6 +2539,28 @@ void wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture *t
|
||||
@@ -2490,6 +2496,28 @@ void wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture *t
|
||||
cs->ops->finish(cs);
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ index 0089911..2aa43d6 100644
|
||||
static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
|
||||
{
|
||||
/* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop,
|
||||
@@ -2593,6 +2621,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
@@ -2549,6 +2577,7 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_CREATE_VBO */ wined3d_cs_exec_create_vbo,
|
||||
/* WINED3D_CS_OP_GET_DC */ wined3d_cs_exec_get_dc,
|
||||
/* WINED3D_CS_OP_RELEASE_DC */ wined3d_cs_exec_release_dc,
|
||||
@@ -73,7 +73,7 @@ index 0089911..2aa43d6 100644
|
||||
|
||||
static inline void *_wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, BOOL prio)
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 2b5c063..2dfed0a 100644
|
||||
index b3c6280..0fbf381 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -663,7 +663,7 @@ out:
|
||||
@@ -85,7 +85,7 @@ index 2b5c063..2dfed0a 100644
|
||||
{
|
||||
const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info;
|
||||
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
||||
@@ -1054,17 +1054,15 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
@@ -1060,17 +1060,15 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
device->swapchains[0] = swapchain;
|
||||
device_init_swapchain_state(device, swapchain);
|
||||
|
||||
@@ -93,7 +93,7 @@ index 2b5c063..2dfed0a 100644
|
||||
context = context_acquire(device, NULL);
|
||||
-
|
||||
- create_dummy_textures(device, context);
|
||||
create_default_samplers(device);
|
||||
create_default_samplers(device, context);
|
||||
+ context_release(context);
|
||||
|
||||
device->contexts[0]->last_was_rhw = 0;
|
||||
@@ -105,20 +105,20 @@ index 2b5c063..2dfed0a 100644
|
||||
/* Clear the screen */
|
||||
if (swapchain->back_buffers && swapchain->back_buffers[0])
|
||||
clear_flags |= WINED3DCLEAR_TARGET;
|
||||
@@ -4639,7 +4637,7 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
|
||||
@@ -4648,7 +4646,7 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
|
||||
|
||||
swapchain->context[0] = context;
|
||||
swapchain->num_contexts = 1;
|
||||
- create_dummy_textures(device, context);
|
||||
+ device_create_dummy_textures(device, context);
|
||||
create_default_samplers(device);
|
||||
create_default_samplers(device, context);
|
||||
context_release(context);
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index a524314..b8b597d 100644
|
||||
index f60d01e..6bbf0d6 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2550,7 +2550,7 @@ struct wined3d_gl_bo *wined3d_device_get_bo(struct wined3d_device *device, UINT
|
||||
@@ -2563,7 +2563,7 @@ struct wined3d_gl_bo *wined3d_device_get_bo(struct wined3d_device *device, UINT
|
||||
GLenum type_hint, struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||
void wined3d_device_release_bo(struct wined3d_device *device, struct wined3d_gl_bo *bo,
|
||||
const struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||
@@ -127,7 +127,7 @@ index a524314..b8b597d 100644
|
||||
|
||||
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
|
||||
{
|
||||
@@ -3121,6 +3121,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
|
||||
@@ -3135,6 +3135,7 @@ 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;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 9cf15a571fd8e6eb8ae5cbb7769827a09f6f7ff6 Mon Sep 17 00:00:00 2001
|
||||
From da044c1554c39e435d4fa62d036a1b3e8b3d051e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 10 Oct 2013 18:40:04 +0200
|
||||
Subject: wined3d: Recreate ctx and dummy textures through the CS after resets.
|
||||
@@ -8,10 +8,10 @@ Subject: wined3d: Recreate ctx and dummy textures through the CS after resets.
|
||||
1 file changed, 5 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 2c93215..ed1bba1 100644
|
||||
index 0fbf381..2b30135 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -4561,7 +4561,6 @@ static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d
|
||||
@@ -4607,7 +4607,6 @@ static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d
|
||||
static HRESULT create_primary_opengl_context(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
|
||||
{
|
||||
struct wined3d_context *context;
|
||||
@@ -19,7 +19,7 @@ index 2c93215..ed1bba1 100644
|
||||
HRESULT hr;
|
||||
|
||||
if (FAILED(hr = device->shader_backend->shader_alloc_private(device,
|
||||
@@ -4578,29 +4577,17 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
|
||||
@@ -4624,29 +4623,17 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -51,9 +51,9 @@ index 2c93215..ed1bba1 100644
|
||||
- device_create_dummy_textures(device, context);
|
||||
+ wined3d_cs_emit_create_dummy_textures(device->cs);
|
||||
+ context = context_acquire(device, NULL);
|
||||
create_default_samplers(device);
|
||||
create_default_samplers(device, context);
|
||||
context_release(context);
|
||||
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
From e55823e0bef6e6d5d9ff1bce222bc5b7853f18a1 Mon Sep 17 00:00:00 2001
|
||||
From fc4e50699e4494de94a941c52799e987d6702e28 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefandoesinger@gmx.at>
|
||||
Date: Sat, 7 May 2016 21:16:47 +0100
|
||||
Subject: wined3d: Call create_default_sampler from create_dummy_textures.
|
||||
|
||||
I should really rename it, don't feel like it now.
|
||||
---
|
||||
dlls/wined3d/device.c | 76 ++++++++++++++++++++++++---------------------------
|
||||
1 file changed, 35 insertions(+), 41 deletions(-)
|
||||
dlls/wined3d/device.c | 75 +++++++++++++++++++++++----------------------------
|
||||
1 file changed, 34 insertions(+), 41 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index ed1bba1..2449d77 100644
|
||||
index 2b30135..32946e8 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -664,6 +664,39 @@ out:
|
||||
@@ -663,6 +663,39 @@ out:
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
+static void create_default_samplers(struct wined3d_device *device)
|
||||
+static void create_default_samplers(struct wined3d_device *device, struct wined3d_context *context)
|
||||
+{
|
||||
+ const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
||||
+ const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
+
|
||||
+ if (gl_info->supported[ARB_SAMPLER_OBJECTS])
|
||||
+ {
|
||||
@@ -52,22 +52,21 @@ index ed1bba1..2449d77 100644
|
||||
void device_create_dummy_textures(struct wined3d_device *device, struct wined3d_context *context)
|
||||
{
|
||||
const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info;
|
||||
@@ -756,6 +789,8 @@ void device_create_dummy_textures(struct wined3d_device *device, struct wined3d_
|
||||
checkGLcall("glTexImage3D");
|
||||
}
|
||||
@@ -774,6 +807,7 @@ void device_create_dummy_textures(struct wined3d_device *device, struct wined3d_
|
||||
}
|
||||
+
|
||||
+ create_default_samplers(device);
|
||||
|
||||
context_bind_dummy_textures(device, context);
|
||||
+ create_default_samplers(device, context);
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@@ -798,39 +833,6 @@ static void destroy_dummy_textures(struct wined3d_device *device, const struct w
|
||||
@@ -803,39 +837,6 @@ static void destroy_dummy_textures(struct wined3d_device *device, const struct w
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
-static void create_default_samplers(struct wined3d_device *device)
|
||||
-static void create_default_samplers(struct wined3d_device *device, struct wined3d_context *context)
|
||||
-{
|
||||
- const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
||||
- const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
-
|
||||
- if (gl_info->supported[ARB_SAMPLER_OBJECTS])
|
||||
- {
|
||||
@@ -101,7 +100,7 @@ index ed1bba1..2449d77 100644
|
||||
static void destroy_default_samplers(struct wined3d_device *device)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
||||
@@ -986,7 +988,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
@@ -1001,7 +1002,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
{
|
||||
static const struct wined3d_color black = {0.0f, 0.0f, 0.0f, 0.0f};
|
||||
struct wined3d_swapchain *swapchain = NULL;
|
||||
@@ -109,17 +108,17 @@ index ed1bba1..2449d77 100644
|
||||
DWORD clear_flags = 0;
|
||||
HRESULT hr;
|
||||
|
||||
@@ -1045,9 +1046,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
@@ -1061,9 +1061,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
device_init_swapchain_state(device, swapchain);
|
||||
|
||||
wined3d_cs_emit_create_dummy_textures(device->cs);
|
||||
- context = context_acquire(device, NULL);
|
||||
- create_default_samplers(device);
|
||||
- create_default_samplers(device, context);
|
||||
- context_release(context);
|
||||
|
||||
device->contexts[0]->last_was_rhw = 0;
|
||||
|
||||
@@ -4560,7 +4558,6 @@ static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d
|
||||
@@ -4606,7 +4603,6 @@ static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d
|
||||
|
||||
static HRESULT create_primary_opengl_context(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
|
||||
{
|
||||
@@ -127,16 +126,16 @@ index ed1bba1..2449d77 100644
|
||||
HRESULT hr;
|
||||
|
||||
if (FAILED(hr = device->shader_backend->shader_alloc_private(device,
|
||||
@@ -4587,9 +4584,6 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
|
||||
@@ -4633,9 +4629,6 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
|
||||
}
|
||||
|
||||
wined3d_cs_emit_create_dummy_textures(device->cs);
|
||||
- context = context_acquire(device, NULL);
|
||||
- create_default_samplers(device);
|
||||
- create_default_samplers(device, context);
|
||||
- context_release(context);
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
--
|
||||
2.8.0
|
||||
2.9.0
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user