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:
@@ -52,13 +52,13 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "8a92dd9a5720c4b6b334e4f13629c0b0f5a72e94"
|
||||
echo "6372cd8e49a662942a80d2decd1f7eae3541c45b"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
version()
|
||||
{
|
||||
echo "Wine Staging 1.9.20"
|
||||
echo "Wine Staging 1.9.21 (unreleased)"
|
||||
echo "Copyright (C) 2014-2016 the Wine Staging project authors."
|
||||
echo ""
|
||||
echo "Patchset to be applied on upstream Wine:"
|
||||
|
@@ -1,130 +1,128 @@
|
||||
From 880bec01dc7a6eac676233e4c3817371f6145f56 Mon Sep 17 00:00:00 2001
|
||||
From 761d9fa421777e8cdec4d1f2f01cab3ef47589bc Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 23 Aug 2016 22:54:14 +0200
|
||||
Subject: wined3d: Create dummy 1d textures.
|
||||
|
||||
---
|
||||
dlls/wined3d/context.c | 14 ++++++++++++++
|
||||
dlls/wined3d/device.c | 28 ++++++++++++++++++++++++++++
|
||||
dlls/wined3d/context.c | 12 ++++++++++++
|
||||
dlls/wined3d/device.c | 26 ++++++++++++++++++++++++++
|
||||
dlls/wined3d/wined3d_private.h | 2 ++
|
||||
3 files changed, 44 insertions(+)
|
||||
3 files changed, 40 insertions(+)
|
||||
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index f5311af..74c3a49 100644
|
||||
index a362247..924ce844 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -1521,6 +1521,9 @@ static void bind_dummy_textures(const struct wined3d_device *device, const struc
|
||||
@@ -1521,6 +1521,7 @@ void context_bind_dummy_textures(const struct wined3d_device *device, const stru
|
||||
GL_EXTCALL(glActiveTexture(GL_TEXTURE0 + i));
|
||||
checkGLcall("glActiveTexture");
|
||||
|
||||
+ gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_1D, device->dummy_texture_1d[i]);
|
||||
+ checkGLcall("glBindTexture");
|
||||
+
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, device->dummy_texture_2d[i]);
|
||||
checkGLcall("glBindTexture");
|
||||
+ gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_1D, device->dummy_textures.tex_1d);
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, device->dummy_textures.tex_2d);
|
||||
|
||||
@@ -1544,6 +1547,9 @@ static void bind_dummy_textures(const struct wined3d_device *device, const struc
|
||||
if (gl_info->supported[ARB_TEXTURE_RECTANGLE])
|
||||
@@ -1533,7 +1534,10 @@ void context_bind_dummy_textures(const struct wined3d_device *device, const stru
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_CUBE_MAP, device->dummy_textures.tex_cube);
|
||||
|
||||
if (gl_info->supported[EXT_TEXTURE_ARRAY])
|
||||
{
|
||||
+ gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_1D_ARRAY, device->dummy_texture_1d_array[i]);
|
||||
+ checkGLcall("glBindTexture");
|
||||
+
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D_ARRAY, device->dummy_texture_2d_array[i]);
|
||||
checkGLcall("glBindTexture");
|
||||
}
|
||||
@@ -2392,6 +2398,14 @@ void context_bind_texture(struct wined3d_context *context, GLenum target, GLuint
|
||||
+ {
|
||||
+ gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_1D_ARRAY, device->dummy_textures.tex_1d_array);
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D_ARRAY, device->dummy_textures.tex_2d_array);
|
||||
+ }
|
||||
|
||||
checkGLcall("Bind dummy textures");
|
||||
}
|
||||
@@ -2381,6 +2385,14 @@ void context_bind_texture(struct wined3d_context *context, GLenum target, GLuint
|
||||
case GL_NONE:
|
||||
/* nothing to do */
|
||||
break;
|
||||
+ case GL_TEXTURE_1D:
|
||||
+ gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_1D, device->dummy_texture_1d[unit]);
|
||||
+ gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_1D, device->dummy_textures.tex_1d);
|
||||
+ checkGLcall("glBindTexture");
|
||||
+ break;
|
||||
+ case GL_TEXTURE_1D_ARRAY:
|
||||
+ gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_1D_ARRAY, device->dummy_texture_1d_array[unit]);
|
||||
+ gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_1D_ARRAY, device->dummy_textures.tex_1d_array);
|
||||
+ checkGLcall("glBindTexture");
|
||||
+ break;
|
||||
case GL_TEXTURE_2D:
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, device->dummy_texture_2d[unit]);
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, device->dummy_textures.tex_2d);
|
||||
checkGLcall("glBindTexture");
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index c2a8c55..1445399 100644
|
||||
index b8ac88a..1ee707e 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -702,6 +702,17 @@ static void create_dummy_textures(struct wined3d_device *device, struct wined3d_
|
||||
/* Make appropriate texture active */
|
||||
context_active_texture(context, gl_info, i);
|
||||
@@ -698,6 +698,17 @@ static void create_dummy_textures(struct wined3d_device *device, struct wined3d_
|
||||
* to each texture stage when the currently set D3D texture is NULL. */
|
||||
context_active_texture(context, gl_info, 0);
|
||||
|
||||
+ gl_info->gl_ops.gl.p_glGenTextures(1, &device->dummy_texture_1d[i]);
|
||||
+ checkGLcall("glGenTextures");
|
||||
+ TRACE("Dummy 1D texture %u given name %u.\n", i, device->dummy_texture_1d[i]);
|
||||
+ gl_info->gl_ops.gl.p_glGenTextures(1, &device->dummy_textures.tex_1d);
|
||||
+ checkGLcall("glGenTextures");
|
||||
+ TRACE("Dummy 1D texture given name %u.\n", device->dummy_textures.tex_1d);
|
||||
+
|
||||
+ gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_1D, device->dummy_texture_1d[i]);
|
||||
+ gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_1D, device->dummy_textures.tex_1d);
|
||||
+ checkGLcall("glBindTexture");
|
||||
+
|
||||
+ gl_info->gl_ops.gl.p_glTexImage1D(GL_TEXTURE_1D, 0, GL_RGBA8, 1, 0,
|
||||
+ GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, &color);
|
||||
+ checkGLcall("glTexImage1D");
|
||||
+
|
||||
gl_info->gl_ops.gl.p_glGenTextures(1, &device->dummy_textures.tex_2d);
|
||||
checkGLcall("glGenTextures");
|
||||
TRACE("Dummy 2D texture given name %u.\n", device->dummy_textures.tex_2d);
|
||||
@@ -756,6 +767,17 @@ static void create_dummy_textures(struct wined3d_device *device, struct wined3d_
|
||||
|
||||
if (gl_info->supported[EXT_TEXTURE_ARRAY])
|
||||
{
|
||||
+ gl_info->gl_ops.gl.p_glGenTextures(1, &device->dummy_textures.tex_1d_array);
|
||||
+ checkGLcall("glGenTextures");
|
||||
+ TRACE("Dummy 1D array texture given name %u.\n", device->dummy_textures.tex_1d_array);
|
||||
+
|
||||
+ gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_1D_ARRAY, device->dummy_textures.tex_1d_array);
|
||||
+ checkGLcall("glBindTexture");
|
||||
+
|
||||
+ gl_info->gl_ops.gl.p_glTexImage1D(GL_TEXTURE_1D, 0, GL_RGBA8, 1, 0,
|
||||
+ gl_info->gl_ops.gl.p_glTexImage2D(GL_TEXTURE_1D_ARRAY, 0, GL_RGBA8, 1, 1, 0,
|
||||
+ GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, &color);
|
||||
+ checkGLcall("glTexImage1D");
|
||||
+ checkGLcall("glTexImage2D");
|
||||
+
|
||||
gl_info->gl_ops.gl.p_glGenTextures(1, &device->dummy_texture_2d[i]);
|
||||
gl_info->gl_ops.gl.p_glGenTextures(1, &device->dummy_textures.tex_2d_array);
|
||||
checkGLcall("glGenTextures");
|
||||
TRACE("Dummy 2D texture %u given name %u.\n", i, device->dummy_texture_2d[i]);
|
||||
@@ -760,6 +771,17 @@ static void create_dummy_textures(struct wined3d_device *device, struct wined3d_
|
||||
|
||||
if (gl_info->supported[EXT_TEXTURE_ARRAY])
|
||||
{
|
||||
+ gl_info->gl_ops.gl.p_glGenTextures(1, &device->dummy_texture_1d_array[i]);
|
||||
+ checkGLcall("glGenTextures");
|
||||
+ TRACE("Dummy 1D array texture %u given name %u.\n", i, device->dummy_texture_1d_array[i]);
|
||||
+
|
||||
+ gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_1D_ARRAY, device->dummy_texture_1d_array[i]);
|
||||
+ checkGLcall("glBindTexture");
|
||||
+
|
||||
+ gl_info->gl_ops.gl.p_glTexImage2D(GL_TEXTURE_1D_ARRAY, 0, GL_RGBA8, 1, 1, 0,
|
||||
+ GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, &color);
|
||||
+ checkGLcall("glTexImage2D");
|
||||
+
|
||||
gl_info->gl_ops.gl.p_glGenTextures(1, &device->dummy_texture_2d_array[i]);
|
||||
checkGLcall("glGenTextures");
|
||||
TRACE("Dummy 2D array texture %u given name %u.\n", i, device->dummy_texture_2d_array[i]);
|
||||
@@ -783,6 +805,9 @@ static void destroy_dummy_textures(struct wined3d_device *device, const struct w
|
||||
{
|
||||
gl_info->gl_ops.gl.p_glDeleteTextures(count, device->dummy_texture_2d_array);
|
||||
checkGLcall("glDeleteTextures(count, device->dummy_texture_2d_array)");
|
||||
+
|
||||
+ gl_info->gl_ops.gl.p_glDeleteTextures(count, device->dummy_texture_1d_array);
|
||||
+ checkGLcall("glDeleteTextures(count, device->dummy_texture_1d_array)");
|
||||
}
|
||||
TRACE("Dummy 2D array texture given name %u.\n", device->dummy_textures.tex_2d_array);
|
||||
@@ -775,7 +797,10 @@ static void create_dummy_textures(struct wined3d_device *device, struct wined3d_
|
||||
static void destroy_dummy_textures(struct wined3d_device *device, const struct wined3d_gl_info *gl_info)
|
||||
{
|
||||
if (gl_info->supported[EXT_TEXTURE_ARRAY])
|
||||
+ {
|
||||
gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->dummy_textures.tex_2d_array);
|
||||
+ gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->dummy_textures.tex_1d_array);
|
||||
+ }
|
||||
|
||||
if (gl_info->supported[ARB_TEXTURE_CUBE_MAP])
|
||||
@@ -806,6 +831,9 @@ static void destroy_dummy_textures(struct wined3d_device *device, const struct w
|
||||
gl_info->gl_ops.gl.p_glDeleteTextures(count, device->dummy_texture_2d);
|
||||
checkGLcall("glDeleteTextures(count, device->dummy_texture_2d)");
|
||||
gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->dummy_textures.tex_cube);
|
||||
@@ -787,6 +812,7 @@ static void destroy_dummy_textures(struct wined3d_device *device, const struct w
|
||||
gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->dummy_textures.tex_rect);
|
||||
|
||||
gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->dummy_textures.tex_2d);
|
||||
+ gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->dummy_textures.tex_1d);
|
||||
|
||||
checkGLcall("Delete dummy textures");
|
||||
|
||||
+ gl_info->gl_ops.gl.p_glDeleteTextures(count, device->dummy_texture_1d);
|
||||
+ checkGLcall("glDeleteTextures(count, device->dummy_texture_1d)");
|
||||
+
|
||||
memset(device->dummy_texture_2d_array, 0, count * sizeof(*device->dummy_texture_2d_array));
|
||||
memset(device->dummy_texture_cube, 0, count * sizeof(*device->dummy_texture_cube));
|
||||
memset(device->dummy_texture_3d, 0, count * sizeof(*device->dummy_texture_3d));
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index e329962..dbb0a47 100644
|
||||
index a968bda..8b0def5 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2481,10 +2481,12 @@ struct wined3d_device
|
||||
struct wined3d_texture *logo_texture;
|
||||
|
||||
@@ -2488,10 +2488,12 @@ struct wined3d_device
|
||||
/* Textures for when no other textures are mapped */
|
||||
+ GLuint dummy_texture_1d[MAX_COMBINED_SAMPLERS];
|
||||
GLuint dummy_texture_2d[MAX_COMBINED_SAMPLERS];
|
||||
GLuint dummy_texture_rect[MAX_COMBINED_SAMPLERS];
|
||||
GLuint dummy_texture_3d[MAX_COMBINED_SAMPLERS];
|
||||
GLuint dummy_texture_cube[MAX_COMBINED_SAMPLERS];
|
||||
+ GLuint dummy_texture_1d_array[MAX_COMBINED_SAMPLERS];
|
||||
GLuint dummy_texture_2d_array[MAX_COMBINED_SAMPLERS];
|
||||
struct
|
||||
{
|
||||
+ GLuint tex_1d;
|
||||
GLuint tex_2d;
|
||||
GLuint tex_rect;
|
||||
GLuint tex_3d;
|
||||
GLuint tex_cube;
|
||||
+ GLuint tex_1d_array;
|
||||
GLuint tex_2d_array;
|
||||
} dummy_textures;
|
||||
|
||||
/* Default sampler used to emulate the direct resource access without using wined3d_sampler */
|
||||
--
|
||||
2.8.1
|
||||
2.9.0
|
||||
|
||||
|
@@ -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
@@ -1 +1 @@
|
||||
Wine Staging 1.9.20
|
||||
Wine Staging 1.9.21 (unreleased)
|
||||
|
Reference in New Issue
Block a user