mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Rebase against eac56fbda547e21cf9f40d57c913b3b582fc5697.
This commit is contained in:
parent
8bfc3ca97f
commit
2c7ec3747f
@ -1,4 +1,4 @@
|
||||
From ac80ddfb739fbe5d743c97715431d0f2e038830c Mon Sep 17 00:00:00 2001
|
||||
From c5fd5022f2e8a00a520f030919394f1b2b6559d4 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Mon, 11 Aug 2014 04:19:49 +0200
|
||||
Subject: kernel32/tests: Add tests for PIPE_NOWAIT in message mode.
|
||||
@ -8,7 +8,7 @@ Subject: kernel32/tests: Add tests for PIPE_NOWAIT in message mode.
|
||||
1 file changed, 96 insertions(+)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c
|
||||
index 3388833..4d782bd 100644
|
||||
index 81d4d39..18b371c 100644
|
||||
--- a/dlls/kernel32/tests/pipe.c
|
||||
+++ b/dlls/kernel32/tests/pipe.c
|
||||
@@ -2619,6 +2619,101 @@ static void test_overlapped_error(void)
|
||||
@ -113,14 +113,14 @@ index 3388833..4d782bd 100644
|
||||
static void test_NamedPipeHandleState(void)
|
||||
{
|
||||
HANDLE server, client;
|
||||
@@ -3043,6 +3138,7 @@ START_TEST(pipe)
|
||||
@@ -3114,6 +3209,7 @@ START_TEST(pipe)
|
||||
test_impersonation();
|
||||
test_overlapped();
|
||||
test_overlapped_error();
|
||||
+ test_nowait();
|
||||
test_NamedPipeHandleState();
|
||||
test_GetNamedPipeInfo();
|
||||
test_readfileex_pending();
|
||||
}
|
||||
--
|
||||
2.7.1
|
||||
2.9.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 2a458a2f67321fb801ad6203b21e644123dc90fa Mon Sep 17 00:00:00 2001
|
||||
From 8ce5ed62d1e49a3e738a8287e4611fe9f63437e0 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Mon, 11 Aug 2014 05:34:19 +0200
|
||||
Subject: ntdll: Allow to set PIPE_NOWAIT on byte-mode pipes.
|
||||
@ -12,7 +12,7 @@ matches the native implementation.
|
||||
2 files changed, 31 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c
|
||||
index 4d782bd..3cdbd93 100644
|
||||
index 18b371c..55f8d4f 100644
|
||||
--- a/dlls/kernel32/tests/pipe.c
|
||||
+++ b/dlls/kernel32/tests/pipe.c
|
||||
@@ -2619,7 +2619,7 @@ static void test_overlapped_error(void)
|
||||
@ -84,7 +84,7 @@ index 4d782bd..3cdbd93 100644
|
||||
|
||||
readden = 0xdeadbeef;
|
||||
SetLastError(0xdeadbeef);
|
||||
@@ -3138,7 +3158,8 @@ START_TEST(pipe)
|
||||
@@ -3209,7 +3229,8 @@ START_TEST(pipe)
|
||||
test_impersonation();
|
||||
test_overlapped();
|
||||
test_overlapped_error();
|
||||
@ -92,13 +92,13 @@ index 4d782bd..3cdbd93 100644
|
||||
+ test_nowait(PIPE_TYPE_BYTE);
|
||||
+ test_nowait(PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE);
|
||||
test_NamedPipeHandleState();
|
||||
test_GetNamedPipeInfo();
|
||||
test_readfileex_pending();
|
||||
}
|
||||
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
|
||||
index ac4d69a..06e5e9b 100644
|
||||
index 622cc45..c27a13f 100644
|
||||
--- a/dlls/ntdll/file.c
|
||||
+++ b/dlls/ntdll/file.c
|
||||
@@ -568,6 +568,8 @@ static NTSTATUS read_unix_fd(int fd, char *buf, ULONG *total, ULONG length,
|
||||
@@ -573,6 +573,8 @@ static NTSTATUS read_unix_fd(int fd, char *buf, ULONG *total, ULONG length,
|
||||
if (ret < 0) ERR("dequeue message failed reason: %s\n", strerror(errno));
|
||||
}
|
||||
}
|
||||
@ -108,5 +108,5 @@ index ac4d69a..06e5e9b 100644
|
||||
result = read( fd, buf + *total, length - *total );
|
||||
|
||||
--
|
||||
2.7.1
|
||||
2.9.0
|
||||
|
||||
|
@ -52,7 +52,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "7756d6ba9b0213d5533eb5248e62716e7e8409b8"
|
||||
echo "eac56fbda547e21cf9f40d57c913b3b582fc5697"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 761d9fa421777e8cdec4d1f2f01cab3ef47589bc Mon Sep 17 00:00:00 2001
|
||||
From 5c7954d9fe6f587a143c7d528351a2b75dd8d2a2 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.
|
||||
@ -10,10 +10,10 @@ Subject: wined3d: Create dummy 1d textures.
|
||||
3 files changed, 40 insertions(+)
|
||||
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index a362247..924ce844 100644
|
||||
index 394a2dc..6b7a180 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -1521,6 +1521,7 @@ void context_bind_dummy_textures(const struct wined3d_device *device, const stru
|
||||
@@ -1527,6 +1527,7 @@ void context_bind_dummy_textures(const struct wined3d_device *device, const stru
|
||||
GL_EXTCALL(glActiveTexture(GL_TEXTURE0 + i));
|
||||
checkGLcall("glActiveTexture");
|
||||
|
||||
@ -21,7 +21,7 @@ index a362247..924ce844 100644
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, device->dummy_textures.tex_2d);
|
||||
|
||||
if (gl_info->supported[ARB_TEXTURE_RECTANGLE])
|
||||
@@ -1533,7 +1534,10 @@ void context_bind_dummy_textures(const struct wined3d_device *device, const stru
|
||||
@@ -1539,7 +1540,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])
|
||||
@ -32,7 +32,7 @@ index a362247..924ce844 100644
|
||||
|
||||
checkGLcall("Bind dummy textures");
|
||||
}
|
||||
@@ -2381,6 +2385,14 @@ void context_bind_texture(struct wined3d_context *context, GLenum target, GLuint
|
||||
@@ -2405,6 +2409,14 @@ void context_bind_texture(struct wined3d_context *context, GLenum target, GLuint
|
||||
case GL_NONE:
|
||||
/* nothing to do */
|
||||
break;
|
||||
@ -48,7 +48,7 @@ index a362247..924ce844 100644
|
||||
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 b8ac88a..1ee707e 100644
|
||||
index de6d5a4..5636300 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -698,6 +698,17 @@ static void create_dummy_textures(struct wined3d_device *device, struct wined3d_
|
||||
@ -87,9 +87,9 @@ index b8ac88a..1ee707e 100644
|
||||
gl_info->gl_ops.gl.p_glGenTextures(1, &device->dummy_textures.tex_2d_array);
|
||||
checkGLcall("glGenTextures");
|
||||
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)
|
||||
{
|
||||
@@ -777,7 +799,10 @@ static void destroy_dummy_textures(struct wined3d_device *device, struct wined3d
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
|
||||
if (gl_info->supported[EXT_TEXTURE_ARRAY])
|
||||
+ {
|
||||
gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->dummy_textures.tex_2d_array);
|
||||
@ -98,7 +98,7 @@ index b8ac88a..1ee707e 100644
|
||||
|
||||
if (gl_info->supported[ARB_TEXTURE_CUBE_MAP])
|
||||
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
|
||||
@@ -789,6 +814,7 @@ static void destroy_dummy_textures(struct wined3d_device *device, struct wined3d
|
||||
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);
|
||||
@ -107,10 +107,10 @@ index b8ac88a..1ee707e 100644
|
||||
checkGLcall("Delete dummy textures");
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index a968bda..8b0def5 100644
|
||||
index 3887f91..bd5c1b6 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2488,10 +2488,12 @@ struct wined3d_device
|
||||
@@ -2491,10 +2491,12 @@ struct wined3d_device
|
||||
/* Textures for when no other textures are mapped */
|
||||
struct
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 5f447b4ff74e75dfeedd4e65f083b5320dd31cd4 Mon Sep 17 00:00:00 2001
|
||||
From 1ba81810e40d713d008452dbddc8708311ace3cb Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 20 Dec 2012 13:09:17 +0100
|
||||
Subject: wined3d: Move the framebuffer into wined3d_state
|
||||
@ -20,7 +20,7 @@ Subject: wined3d: Move the framebuffer into wined3d_state
|
||||
13 files changed, 194 insertions(+), 135 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
|
||||
index df62501..0c49d82 100644
|
||||
index 2edac17..dbcbbb0 100644
|
||||
--- a/dlls/wined3d/arb_program_shader.c
|
||||
+++ b/dlls/wined3d/arb_program_shader.c
|
||||
@@ -704,7 +704,7 @@ static void shader_arb_load_constants_internal(struct shader_arb_priv *priv,
|
||||
@ -32,7 +32,7 @@ index df62501..0c49d82 100644
|
||||
|
||||
/* Load DirectX 9 float constants for pixel shader */
|
||||
priv->highest_dirty_ps_const = shader_arb_load_constants_f(pshader, gl_info, GL_FRAGMENT_PROGRAM_ARB,
|
||||
@@ -4734,7 +4734,7 @@ static void shader_arb_select(void *shader_priv, struct wined3d_context *context
|
||||
@@ -4736,7 +4736,7 @@ static void shader_arb_select(void *shader_priv, struct wined3d_context *context
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -42,10 +42,10 @@ index df62501..0c49d82 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index 9683803..5984292 100644
|
||||
index ebfc122..3dddb40 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -1698,6 +1698,11 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
@@ -1704,6 +1704,11 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ index 9683803..5984292 100644
|
||||
/* Initialize the texture unit mapping to a 1:1 mapping */
|
||||
for (s = 0; s < MAX_COMBINED_SAMPLERS; ++s)
|
||||
{
|
||||
@@ -2005,6 +2010,7 @@ out:
|
||||
@@ -2012,6 +2017,7 @@ out:
|
||||
if (hdc) wined3d_release_dc(swapchain->win_handle, hdc);
|
||||
device->shader_backend->shader_free_context_data(ret);
|
||||
device->adapter->fragment_pipe->free_context_data(ret);
|
||||
@ -65,7 +65,7 @@ index 9683803..5984292 100644
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_event_queries);
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_occlusion_queries);
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_timestamp_queries);
|
||||
@@ -2041,6 +2047,7 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont
|
||||
@@ -2059,6 +2065,7 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont
|
||||
device->shader_backend->shader_free_context_data(context);
|
||||
device->adapter->fragment_pipe->free_context_data(context);
|
||||
HeapFree(GetProcessHeap(), 0, context->fbo_key);
|
||||
@ -73,7 +73,7 @@ index 9683803..5984292 100644
|
||||
HeapFree(GetProcessHeap(), 0, context->draw_buffers);
|
||||
HeapFree(GetProcessHeap(), 0, context->blit_targets);
|
||||
device_context_remove(device, context);
|
||||
@@ -2595,7 +2602,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2613,7 +2620,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
DWORD rt_mask = 0, *cur_mask;
|
||||
UINT i;
|
||||
|
||||
@ -82,7 +82,7 @@ index 9683803..5984292 100644
|
||||
|| rt_count != gl_info->limits.buffers)
|
||||
{
|
||||
if (!context_validate_rt_config(rt_count, rts, dsv))
|
||||
@@ -2640,6 +2647,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2658,6 +2665,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
rt_mask = context_generate_rt_mask_no_fbo(context,
|
||||
rt_count ? wined3d_rendertarget_view_get_surface(rts[0])->container : NULL);
|
||||
}
|
||||
@ -91,7 +91,7 @@ index 9683803..5984292 100644
|
||||
}
|
||||
else if (wined3d_settings.offscreen_rendering_mode == ORM_FBO
|
||||
&& (!rt_count || wined3d_resource_is_offscreen(rts[0]->resource)))
|
||||
@@ -2697,7 +2706,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2715,7 +2724,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
|
||||
static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const struct wined3d_state *state)
|
||||
{
|
||||
@ -100,7 +100,7 @@ index 9683803..5984292 100644
|
||||
struct wined3d_shader *ps = state->shader[WINED3D_SHADER_TYPE_PIXEL];
|
||||
DWORD rt_mask, rt_mask_bits;
|
||||
unsigned int i;
|
||||
@@ -2727,7 +2736,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
|
||||
@@ -2745,7 +2754,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
|
||||
void context_state_fb(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
DWORD rt_mask = find_draw_buffers_mask(context, state);
|
||||
@ -109,7 +109,7 @@ index 9683803..5984292 100644
|
||||
DWORD *cur_mask;
|
||||
|
||||
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
|
||||
@@ -2758,6 +2767,8 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat
|
||||
@@ -2776,6 +2785,8 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat
|
||||
context_apply_draw_buffers(context, rt_mask);
|
||||
*cur_mask = rt_mask;
|
||||
}
|
||||
@ -118,7 +118,7 @@ index 9683803..5984292 100644
|
||||
}
|
||||
|
||||
static void context_map_stage(struct wined3d_context *context, DWORD stage, DWORD unit)
|
||||
@@ -3389,7 +3400,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context,
|
||||
@@ -3407,7 +3418,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context,
|
||||
const struct wined3d_device *device, const struct wined3d_state *state)
|
||||
{
|
||||
const struct StateEntry *state_table = context->state_table;
|
||||
@ -281,7 +281,7 @@ index b4cbcab..0beb6c2 100644
|
||||
HeapFree(GetProcessHeap(), 0, cs);
|
||||
}
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 8937d52..f29ddb1 100644
|
||||
index fa6ee5b..9bcfad1 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -1002,7 +1002,7 @@ static void device_init_swapchain_state(struct wined3d_device *device, struct wi
|
||||
@ -345,11 +345,11 @@ index 8937d52..f29ddb1 100644
|
||||
/* Unload resources */
|
||||
LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
|
||||
{
|
||||
@@ -1220,37 +1232,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
* destroy the context. */
|
||||
@@ -1216,37 +1228,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
|
||||
context_release(context);
|
||||
|
||||
- /* Release the buffers (with sanity checks)*/
|
||||
- /* Release the buffers (with sanity checks) */
|
||||
- if (device->onscreen_depth_stencil)
|
||||
- {
|
||||
- surface = device->onscreen_depth_stencil;
|
||||
@ -383,7 +383,7 @@ index 8937d52..f29ddb1 100644
|
||||
if (device->back_buffer_view)
|
||||
{
|
||||
wined3d_rendertarget_view_decref(device->back_buffer_view);
|
||||
@@ -1268,9 +1249,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
@@ -1264,9 +1245,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
device->swapchains = NULL;
|
||||
device->swapchain_count = 0;
|
||||
|
||||
@ -393,7 +393,7 @@ index 8937d52..f29ddb1 100644
|
||||
device->d3d_initialized = FALSE;
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -2087,7 +2065,7 @@ static void resolve_depth_buffer(struct wined3d_state *state)
|
||||
@@ -2083,7 +2061,7 @@ static void resolve_depth_buffer(struct wined3d_state *state)
|
||||
|| !(dst_texture->resource.format_flags & WINED3DFMT_FLAG_DEPTH))
|
||||
return;
|
||||
|
||||
@ -402,7 +402,7 @@ index 8937d52..f29ddb1 100644
|
||||
return;
|
||||
if (src_view->resource->type == WINED3D_RTYPE_BUFFER)
|
||||
{
|
||||
@@ -3487,6 +3465,8 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
||||
@@ -3483,6 +3461,8 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
||||
HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_count,
|
||||
const RECT *rects, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil)
|
||||
{
|
||||
@ -411,7 +411,7 @@ index 8937d52..f29ddb1 100644
|
||||
TRACE("device %p, rect_count %u, rects %p, flags %#x, color %s, depth %.8e, stencil %u.\n",
|
||||
device, rect_count, rects, flags, debug_color(color), depth, stencil);
|
||||
|
||||
@@ -3498,7 +3478,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
@@ -3494,7 +3474,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
|
||||
if (flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL))
|
||||
{
|
||||
@ -420,7 +420,7 @@ index 8937d52..f29ddb1 100644
|
||||
if (!ds)
|
||||
{
|
||||
WARN("Clearing depth and/or stencil without a depth stencil buffer attached, returning WINED3DERR_INVALIDCALL\n");
|
||||
@@ -3507,8 +3487,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
@@ -3503,8 +3483,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
}
|
||||
else if (flags & WINED3DCLEAR_TARGET)
|
||||
{
|
||||
@ -431,7 +431,7 @@ index 8937d52..f29ddb1 100644
|
||||
{
|
||||
WARN("Silently ignoring depth and target clear with mismatching sizes\n");
|
||||
return WINED3D_OK;
|
||||
@@ -3824,8 +3804,8 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
|
||||
@@ -3820,8 +3800,8 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
|
||||
if (state->render_states[WINED3D_RS_ZENABLE] || state->render_states[WINED3D_RS_ZWRITEENABLE]
|
||||
|| state->render_states[WINED3D_RS_STENCILENABLE])
|
||||
{
|
||||
@ -442,7 +442,7 @@ index 8937d52..f29ddb1 100644
|
||||
|
||||
if (ds && rt && (ds->width < rt->width || ds->height < rt->height))
|
||||
{
|
||||
@@ -4283,20 +4263,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
|
||||
@@ -4279,20 +4259,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -466,7 +466,7 @@ index 8937d52..f29ddb1 100644
|
||||
|
||||
TRACE("device %p, view_idx %u, view %p, set_viewport %#x.\n",
|
||||
device, view_idx, view, set_viewport);
|
||||
@@ -4333,13 +4314,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
@@ -4329,13 +4310,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
}
|
||||
|
||||
|
||||
@ -482,7 +482,7 @@ index 8937d52..f29ddb1 100644
|
||||
wined3d_cs_emit_set_rendertarget_view(device->cs, view_idx, view);
|
||||
/* Release after the assignment, to prevent device_resource_released()
|
||||
* from seeing the surface as still in use. */
|
||||
@@ -4351,18 +4332,19 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
@@ -4347,18 +4328,19 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
|
||||
void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device, struct wined3d_rendertarget_view *view)
|
||||
{
|
||||
@ -504,7 +504,7 @@ index 8937d52..f29ddb1 100644
|
||||
wined3d_rendertarget_view_incref(view);
|
||||
wined3d_cs_emit_set_depth_stencil_view(device->cs, view);
|
||||
if (prev)
|
||||
@@ -4720,10 +4702,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4719,10 +4701,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
wined3d_texture_decref(device->cursor_texture);
|
||||
device->cursor_texture = NULL;
|
||||
}
|
||||
@ -516,7 +516,7 @@ index 8937d52..f29ddb1 100644
|
||||
{
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@@ -4732,6 +4713,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4731,6 +4712,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
}
|
||||
wined3d_device_set_depth_stencil_view(device, NULL);
|
||||
|
||||
@ -528,7 +528,7 @@ index 8937d52..f29ddb1 100644
|
||||
if (device->onscreen_depth_stencil)
|
||||
{
|
||||
wined3d_texture_decref(device->onscreen_depth_stencil->container);
|
||||
@@ -4900,27 +4886,28 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4899,27 +4885,28 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
if (device->d3d_initialized)
|
||||
delete_opengl_contexts(device, swapchain);
|
||||
|
||||
@ -564,7 +564,7 @@ index 8937d52..f29ddb1 100644
|
||||
wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect);
|
||||
}
|
||||
|
||||
@@ -5010,11 +4997,11 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
|
||||
@@ -5009,11 +4996,11 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
|
||||
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@ -578,7 +578,7 @@ index 8937d52..f29ddb1 100644
|
||||
ERR("Resource %p is still in use as depth/stencil buffer.\n", resource);
|
||||
|
||||
switch (type)
|
||||
@@ -5139,8 +5126,12 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
|
||||
@@ -5138,8 +5125,12 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
|
||||
|
||||
device->blitter = adapter->blitter;
|
||||
|
||||
@ -607,7 +607,7 @@ index e5b30db..1188009 100644
|
||||
struct wined3d_event_query *ib_query = NULL;
|
||||
struct wined3d_stream_info si_emulated;
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index ca76359..5d52f65 100644
|
||||
index 892b582..8b9485d 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -1514,7 +1514,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
|
||||
@ -633,7 +633,7 @@ index 594520c..c6d23ce 100644
|
||||
static unsigned int warned = 0;
|
||||
|
||||
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
index 8758925..d508d54 100644
|
||||
index 3bd22dc..ecb29c3 100644
|
||||
--- a/dlls/wined3d/state.c
|
||||
+++ b/dlls/wined3d/state.c
|
||||
@@ -152,7 +152,7 @@ static void state_zenable(struct wined3d_context *context, const struct wined3d_
|
||||
@ -715,7 +715,7 @@ index 8758925..d508d54 100644
|
||||
- const struct wined3d_rendertarget_view *target = state->fb->render_targets[0];
|
||||
+ const struct wined3d_rendertarget_view *depth_stencil = state->fb.depth_stencil;
|
||||
+ const struct wined3d_rendertarget_view *target = state->fb.render_targets[0];
|
||||
float pixel_center_offset = context->swapchain->device->wined3d->flags
|
||||
float pixel_center_offset = context->device->wined3d->flags
|
||||
& WINED3D_PIXEL_CENTER_INTEGER ? 0.5f : 0.0f;
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
@@ -4856,7 +4856,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
|
||||
@ -863,7 +863,7 @@ index d5478f4..f649b2f 100644
|
||||
struct wined3d_texture *logo_texture;
|
||||
struct wined3d_context *context;
|
||||
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
index fe57db9..aa199c5 100644
|
||||
index fbd5835..229d5db 100644
|
||||
--- a/dlls/wined3d/utils.c
|
||||
+++ b/dlls/wined3d/utils.c
|
||||
@@ -4532,7 +4532,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
|
||||
@ -885,7 +885,7 @@ index fe57db9..aa199c5 100644
|
||||
|| !state->render_states[WINED3D_RS_CLIPPLANEENABLE])
|
||||
{
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 01b5d9d..bc54b60 100644
|
||||
index 9d40df6..ec14ea5 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1447,6 +1447,36 @@ struct wined3d_timestamp_query
|
||||
@ -931,9 +931,9 @@ index 01b5d9d..bc54b60 100644
|
||||
DWORD isStateDirty[STATE_HIGHEST / (sizeof(DWORD) * CHAR_BIT) + 1]; /* Bitmap to find out quickly if a state is dirty */
|
||||
+ struct wined3d_fb_state current_fb;
|
||||
|
||||
struct wined3d_device *device;
|
||||
struct wined3d_swapchain *swapchain;
|
||||
struct
|
||||
@@ -1569,12 +1600,6 @@ struct wined3d_context
|
||||
@@ -1571,12 +1602,6 @@ struct wined3d_context
|
||||
GLuint dummy_arbfp_prog;
|
||||
};
|
||||
|
||||
@ -946,7 +946,7 @@ index 01b5d9d..bc54b60 100644
|
||||
typedef void (*APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id);
|
||||
|
||||
struct StateEntry
|
||||
@@ -2362,7 +2387,7 @@ struct wined3d_stream_state
|
||||
@@ -2364,7 +2389,7 @@ struct wined3d_stream_state
|
||||
struct wined3d_state
|
||||
{
|
||||
DWORD flags;
|
||||
@ -955,7 +955,7 @@ index 01b5d9d..bc54b60 100644
|
||||
|
||||
struct wined3d_vertex_declaration *vertex_declaration;
|
||||
struct wined3d_stream_output stream_output[MAX_STREAM_OUT];
|
||||
@@ -2467,7 +2492,6 @@ struct wined3d_device
|
||||
@@ -2469,7 +2494,6 @@ struct wined3d_device
|
||||
struct wine_rb_tree samplers;
|
||||
|
||||
/* Render Target Support */
|
||||
@ -963,7 +963,7 @@ index 01b5d9d..bc54b60 100644
|
||||
struct wined3d_surface *onscreen_depth_stencil;
|
||||
struct wined3d_rendertarget_view *auto_depth_stencil_view;
|
||||
|
||||
@@ -3017,9 +3041,8 @@ struct wined3d_stateblock
|
||||
@@ -3019,9 +3043,8 @@ struct wined3d_stateblock
|
||||
void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
|
||||
|
||||
void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
@ -975,7 +975,7 @@ index 01b5d9d..bc54b60 100644
|
||||
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
|
||||
struct wined3d_cs_ops
|
||||
@@ -3032,7 +3055,6 @@ struct wined3d_cs
|
||||
@@ -3034,7 +3057,6 @@ struct wined3d_cs
|
||||
{
|
||||
const struct wined3d_cs_ops *ops;
|
||||
struct wined3d_device *device;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From fc4e50699e4494de94a941c52799e987d6702e28 Mon Sep 17 00:00:00 2001
|
||||
From 21a06ced85ce0e69abdb0d0ed89cc9f3ee2910b9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefandoesinger@gmx.at>
|
||||
Date: Sat, 7 May 2016 21:16:47 +0100
|
||||
Subject: wined3d: Call create_default_sampler from create_dummy_textures.
|
||||
@ -9,7 +9,7 @@ I should really rename it, don't feel like it now.
|
||||
1 file changed, 34 insertions(+), 41 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 2b30135..32946e8 100644
|
||||
index e0ef122..1da8384 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -663,6 +663,39 @@ out:
|
||||
@ -60,7 +60,7 @@ index 2b30135..32946e8 100644
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@@ -803,39 +837,6 @@ static void destroy_dummy_textures(struct wined3d_device *device, const struct w
|
||||
@@ -805,39 +839,6 @@ static void destroy_dummy_textures(struct wined3d_device *device, struct wined3d
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@ -97,10 +97,10 @@ index 2b30135..32946e8 100644
|
||||
-}
|
||||
-
|
||||
-/* Context activation is done by the caller. */
|
||||
static void destroy_default_samplers(struct wined3d_device *device)
|
||||
static void destroy_default_samplers(struct wined3d_device *device, struct wined3d_context *context)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
||||
@@ -1001,7 +1002,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
@@ -1003,7 +1004,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;
|
||||
@ -108,7 +108,7 @@ index 2b30135..32946e8 100644
|
||||
DWORD clear_flags = 0;
|
||||
HRESULT hr;
|
||||
|
||||
@@ -1061,9 +1061,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
@@ -1063,9 +1063,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);
|
||||
@ -118,7 +118,7 @@ index 2b30135..32946e8 100644
|
||||
|
||||
device->contexts[0]->last_was_rhw = 0;
|
||||
|
||||
@@ -4606,7 +4603,6 @@ static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d
|
||||
@@ -4607,7 +4604,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)
|
||||
{
|
||||
@ -126,7 +126,7 @@ index 2b30135..32946e8 100644
|
||||
HRESULT hr;
|
||||
|
||||
if (FAILED(hr = device->shader_backend->shader_alloc_private(device,
|
||||
@@ -4633,9 +4629,6 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
|
||||
@@ -4634,9 +4630,6 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
|
||||
}
|
||||
|
||||
wined3d_cs_emit_create_dummy_textures(device->cs);
|
||||
|
@ -1,17 +1,17 @@
|
||||
From e7dcf35fcb8ae00086a72d4942972dcc1a4bc835 Mon Sep 17 00:00:00 2001
|
||||
From 9fac716a1f532a52481b61ccc2dc1dc46124a5fb Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Fri, 11 Oct 2013 10:17:42 +0200
|
||||
Subject: wined3d: Delete GL contexts through the CS in uninit_3d.
|
||||
|
||||
---
|
||||
dlls/wined3d/device.c | 33 +++------------------------------
|
||||
1 file changed, 3 insertions(+), 30 deletions(-)
|
||||
dlls/wined3d/device.c | 29 +++--------------------------
|
||||
1 file changed, 3 insertions(+), 26 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 20d09a2..60e21ba 100644
|
||||
index f6c5a52..d006531 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -1132,8 +1132,6 @@ static void device_free_sampler(struct wine_rb_entry *entry, void *context)
|
||||
@@ -1139,8 +1139,6 @@ static void device_free_sampler(struct wine_rb_entry *entry, void *context)
|
||||
HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
{
|
||||
struct wined3d_resource *resource, *cursor;
|
||||
@ -20,7 +20,7 @@ index 20d09a2..60e21ba 100644
|
||||
struct wined3d_surface *surface;
|
||||
UINT i;
|
||||
|
||||
@@ -1145,12 +1143,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
@@ -1152,12 +1150,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
if (wined3d_settings.cs_multithreaded)
|
||||
device->cs->ops->finish(device->cs);
|
||||
|
||||
@ -33,7 +33,7 @@ index 20d09a2..60e21ba 100644
|
||||
if (device->logo_texture)
|
||||
wined3d_texture_decref(device->logo_texture);
|
||||
if (device->cursor_texture)
|
||||
@@ -1182,31 +1174,11 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
@@ -1189,27 +1181,11 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
TRACE("Unloading resource %p.\n", resource);
|
||||
wined3d_cs_emit_unload_resource(device->cs, resource);
|
||||
}
|
||||
@ -54,20 +54,16 @@ index 20d09a2..60e21ba 100644
|
||||
- /* Destroy the shader backend. Note that this has to happen after all shaders are destroyed. */
|
||||
- device->blitter->free_private(device);
|
||||
- device->shader_backend->shader_free_private(device);
|
||||
- destroy_dummy_textures(device, gl_info);
|
||||
- destroy_default_samplers(device);
|
||||
- destroy_dummy_textures(device, context);
|
||||
- destroy_default_samplers(device, context);
|
||||
-
|
||||
- /* Release the context again as soon as possible. In particular,
|
||||
- * releasing the render target views below may release the last reference
|
||||
- * to the swapchain associated with this context, which in turn will
|
||||
- * destroy the context. */
|
||||
- context_release(context);
|
||||
+ /* FIXME: Is this in the right place??? */
|
||||
+ wined3d_cs_emit_delete_opengl_contexts(device->cs, device->swapchains[0]);
|
||||
|
||||
if (device->back_buffer_view)
|
||||
{
|
||||
@@ -4582,6 +4554,7 @@ void device_delete_opengl_contexts_cs(struct wined3d_device *device, struct wine
|
||||
@@ -4591,6 +4567,7 @@ void device_delete_opengl_contexts_cs(struct wined3d_device *device, struct wine
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, swapchain->context);
|
||||
swapchain->context = NULL;
|
||||
|
@ -39,7 +39,7 @@ diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader
|
||||
|
||||
/* We don't want shader constant dirtification to be an O(contexts), so just dirtify the active
|
||||
* context. On a context switch the old context will be fully dirtified */
|
||||
@@ -742,6 +754,14 @@ static void shader_arb_update_float_pixel_constants(struct wined3d_device *devic
|
||||
@@ -743,6 +755,14 @@ static void shader_arb_update_float_pixel_constants(struct wined3d_device *devic
|
||||
{
|
||||
struct wined3d_context *context = context_get_current();
|
||||
struct shader_arb_priv *priv = device->shader_priv;
|
||||
@ -54,7 +54,7 @@ diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader
|
||||
|
||||
/* We don't want shader constant dirtification to be an O(contexts), so just dirtify the active
|
||||
* context. On a context switch the old context will be fully dirtified */
|
||||
@@ -4722,7 +4742,11 @@ static void shader_arb_select(void *shader_priv, struct wined3d_context *context
|
||||
@@ -4724,7 +4744,11 @@ static void shader_arb_select(void *shader_priv, struct wined3d_context *context
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -66,7 +66,7 @@ diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader
|
||||
shader_arb_ps_local_constants(compiled, context, state, rt_height);
|
||||
}
|
||||
|
||||
@@ -7985,8 +8009,16 @@ static void arbfp_blit_surface(struct wined3d_device *device, enum wined3d_blit_
|
||||
@@ -7984,8 +8008,16 @@ static void arbfp_blit_surface(struct wined3d_device *device, enum wined3d_blit_
|
||||
/* Leave the opengl state valid for blitting */
|
||||
arbfp_blit_unset(context->gl_info);
|
||||
|
||||
@ -467,7 +467,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -1698,6 +1698,13 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
@@ -1704,6 +1704,13 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -481,7 +481,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
/* Initialize the texture unit mapping to a 1:1 mapping */
|
||||
for (s = 0; s < MAX_COMBINED_SAMPLERS; ++s)
|
||||
{
|
||||
@@ -2005,6 +2012,9 @@ out:
|
||||
@@ -2012,6 +2019,9 @@ out:
|
||||
if (hdc) wined3d_release_dc(swapchain->win_handle, hdc);
|
||||
device->shader_backend->shader_free_context_data(ret);
|
||||
device->adapter->fragment_pipe->free_context_data(ret);
|
||||
@ -491,7 +491,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_event_queries);
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_occlusion_queries);
|
||||
HeapFree(GetProcessHeap(), 0, ret->free_timestamp_queries);
|
||||
@@ -2041,6 +2051,9 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont
|
||||
@@ -2059,6 +2069,9 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont
|
||||
device->shader_backend->shader_free_context_data(context);
|
||||
device->adapter->fragment_pipe->free_context_data(context);
|
||||
HeapFree(GetProcessHeap(), 0, context->fbo_key);
|
||||
@ -501,7 +501,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
HeapFree(GetProcessHeap(), 0, context->draw_buffers);
|
||||
HeapFree(GetProcessHeap(), 0, context->blit_targets);
|
||||
device_context_remove(device, context);
|
||||
@@ -2586,7 +2599,11 @@ static BOOL context_validate_rt_config(UINT rt_count, struct wined3d_rendertarge
|
||||
@@ -2604,7 +2617,11 @@ static BOOL context_validate_rt_config(UINT rt_count, struct wined3d_rendertarge
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@ -513,7 +513,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
UINT rt_count, const struct wined3d_fb_state *fb)
|
||||
{
|
||||
struct wined3d_rendertarget_view **rts = fb->render_targets;
|
||||
@@ -2595,7 +2612,11 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2613,7 +2630,11 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
DWORD rt_mask = 0, *cur_mask;
|
||||
UINT i;
|
||||
|
||||
@ -525,7 +525,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
|| rt_count != gl_info->limits.buffers)
|
||||
{
|
||||
if (!context_validate_rt_config(rt_count, rts, dsv))
|
||||
@@ -2640,6 +2661,10 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2658,6 +2679,10 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
rt_mask = context_generate_rt_mask_no_fbo(context,
|
||||
rt_count ? wined3d_rendertarget_view_get_surface(rts[0])->container : NULL);
|
||||
}
|
||||
@ -536,7 +536,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
}
|
||||
else if (wined3d_settings.offscreen_rendering_mode == ORM_FBO
|
||||
&& (!rt_count || wined3d_resource_is_offscreen(rts[0]->resource)))
|
||||
@@ -2680,7 +2705,12 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2698,7 +2723,12 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_SCISSOR_TEST);
|
||||
if (rt_count && gl_info->supported[ARB_FRAMEBUFFER_SRGB])
|
||||
{
|
||||
@ -549,7 +549,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_FRAMEBUFFER_SRGB);
|
||||
else
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_FRAMEBUFFER_SRGB);
|
||||
@@ -2697,7 +2727,11 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
@@ -2715,7 +2745,11 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
||||
|
||||
static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const struct wined3d_state *state)
|
||||
{
|
||||
@ -561,7 +561,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
struct wined3d_shader *ps = state->shader[WINED3D_SHADER_TYPE_PIXEL];
|
||||
DWORD rt_mask, rt_mask_bits;
|
||||
unsigned int i;
|
||||
@@ -2727,7 +2761,11 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
|
||||
@@ -2745,7 +2779,11 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
|
||||
void context_state_fb(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
DWORD rt_mask = find_draw_buffers_mask(context, state);
|
||||
@ -573,7 +573,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
DWORD *cur_mask;
|
||||
|
||||
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
|
||||
@@ -2758,6 +2796,10 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat
|
||||
@@ -2776,6 +2814,10 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat
|
||||
context_apply_draw_buffers(context, rt_mask);
|
||||
*cur_mask = rt_mask;
|
||||
}
|
||||
@ -584,7 +584,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
}
|
||||
|
||||
static void context_map_stage(struct wined3d_context *context, DWORD stage, DWORD unit)
|
||||
@@ -3389,7 +3431,11 @@ BOOL context_apply_draw_state(struct wined3d_context *context,
|
||||
@@ -3407,7 +3449,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;
|
||||
@ -596,7 +596,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
unsigned int i;
|
||||
WORD map;
|
||||
|
||||
@@ -3422,8 +3468,17 @@ BOOL context_apply_draw_state(struct wined3d_context *context,
|
||||
@@ -3440,8 +3486,17 @@ BOOL context_apply_draw_state(struct wined3d_context *context,
|
||||
for (i = 0, map = context->stream_info.use_map; map; map >>= 1, ++i)
|
||||
{
|
||||
if (map & 1)
|
||||
@ -614,7 +614,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
}
|
||||
if (state->index_buffer)
|
||||
{
|
||||
@@ -3542,6 +3597,11 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device, str
|
||||
@@ -3561,6 +3616,11 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device, str
|
||||
|
||||
TRACE("device %p, target %p.\n", device, target);
|
||||
|
||||
@ -3613,7 +3613,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@@ -820,6 +881,7 @@ static void destroy_dummy_textures(struct wined3d_device *device, const struct w
|
||||
@@ -822,6 +883,7 @@ static void destroy_dummy_textures(struct wined3d_device *device, struct wined3d
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@ -3621,15 +3621,15 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
static void create_default_samplers(struct wined3d_device *device, struct wined3d_context *context)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
@@ -853,6 +915,7 @@ static void create_default_samplers(struct wined3d_device *device, struct wined3
|
||||
@@ -855,6 +917,7 @@ static void create_default_samplers(struct wined3d_device *device, struct wined3
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
+#endif /* STAGING_CSMT */
|
||||
static void destroy_default_samplers(struct wined3d_device *device)
|
||||
static void destroy_default_samplers(struct wined3d_device *device, struct wined3d_context *context)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
||||
@@ -999,7 +1062,11 @@ static void device_init_swapchain_state(struct wined3d_device *device, struct wi
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
@@ -1001,7 +1064,11 @@ static void device_init_swapchain_state(struct wined3d_device *device, struct wi
|
||||
BOOL ds_enable = !!swapchain->desc.enable_auto_depth_stencil;
|
||||
unsigned int i;
|
||||
|
||||
@ -3641,7 +3641,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
{
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@@ -1017,9 +1084,13 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
@@ -1019,9 +1086,13 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
struct wined3d_swapchain_desc *swapchain_desc)
|
||||
{
|
||||
static const struct wined3d_color black = {0.0f, 0.0f, 0.0f, 0.0f};
|
||||
@ -3655,7 +3655,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
DWORD clear_flags = 0;
|
||||
HRESULT hr;
|
||||
|
||||
@@ -1030,9 +1101,11 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
@@ -1032,9 +1103,11 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
if (device->wined3d->flags & WINED3D_NO3D)
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
@ -3667,7 +3667,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (FAILED(hr = device->shader_backend->shader_alloc_private(device,
|
||||
device->adapter->vertex_pipe, device->adapter->fragment_pipe)))
|
||||
{
|
||||
@@ -1081,17 +1154,23 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
@@ -1083,17 +1156,23 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
device->swapchains[0] = swapchain;
|
||||
device_init_swapchain_state(device, swapchain);
|
||||
|
||||
@ -3691,7 +3691,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
/* Clear the screen */
|
||||
if (swapchain->back_buffers && swapchain->back_buffers[0])
|
||||
clear_flags |= WINED3DCLEAR_TARGET;
|
||||
@@ -1107,7 +1186,9 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
@@ -1109,7 +1188,9 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||
return WINED3D_OK;
|
||||
|
||||
err_out:
|
||||
@ -3701,7 +3701,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
HeapFree(GetProcessHeap(), 0, device->swapchains);
|
||||
device->swapchain_count = 0;
|
||||
if (device->back_buffer_view)
|
||||
@@ -1164,8 +1245,10 @@ static void device_free_sampler(struct wine_rb_entry *entry, void *context)
|
||||
@@ -1166,8 +1247,10 @@ static void device_free_sampler(struct wine_rb_entry *entry, void *context)
|
||||
HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
{
|
||||
struct wined3d_resource *resource, *cursor;
|
||||
@ -3712,7 +3712,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
struct wined3d_surface *surface;
|
||||
UINT i;
|
||||
|
||||
@@ -1174,17 +1257,23 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
@@ -1176,17 +1259,23 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
if (!device->d3d_initialized)
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
@ -3736,7 +3736,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
state_unbind_resources(&device->state);
|
||||
|
||||
/* Unload resources */
|
||||
@@ -1222,9 +1311,21 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
@@ -1220,9 +1309,21 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
{
|
||||
surface = device->onscreen_depth_stencil;
|
||||
device->onscreen_depth_stencil = NULL;
|
||||
@ -3758,7 +3758,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (device->fb.depth_stencil)
|
||||
{
|
||||
struct wined3d_rendertarget_view *view = device->fb.depth_stencil;
|
||||
@@ -1234,9 +1335,13 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
@@ -1232,9 +1333,13 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
device->fb.depth_stencil = NULL;
|
||||
wined3d_rendertarget_view_decref(view);
|
||||
}
|
||||
@ -3772,7 +3772,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
struct wined3d_rendertarget_view *view = device->auto_depth_stencil_view;
|
||||
|
||||
device->auto_depth_stencil_view = NULL;
|
||||
@@ -1248,6 +1353,24 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
@@ -1246,6 +1351,24 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
{
|
||||
wined3d_device_set_rendertarget_view(device, i, NULL, FALSE);
|
||||
}
|
||||
@ -3797,7 +3797,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (device->back_buffer_view)
|
||||
{
|
||||
wined3d_rendertarget_view_decref(device->back_buffer_view);
|
||||
@@ -1265,9 +1388,11 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
@@ -1263,9 +1386,11 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
device->swapchains = NULL;
|
||||
device->swapchain_count = 0;
|
||||
|
||||
@ -3809,7 +3809,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
device->d3d_initialized = FALSE;
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -1312,7 +1437,11 @@ UINT CDECL wined3d_device_get_available_texture_mem(const struct wined3d_device
|
||||
@@ -1310,7 +1435,11 @@ UINT CDECL wined3d_device_get_available_texture_mem(const struct wined3d_device
|
||||
|
||||
/* We can not acquire the context unless there is a swapchain. */
|
||||
if (device->swapchains && gl_info->supported[NVX_GPU_MEMORY_INFO] &&
|
||||
@ -3821,7 +3821,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
{
|
||||
GLint vram_free_kb;
|
||||
UINT64 vram_free;
|
||||
@@ -1653,6 +1782,7 @@ HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device,
|
||||
@@ -1651,6 +1780,7 @@ HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device,
|
||||
light->direction.x, light->direction.y, light->direction.z,
|
||||
light->range, light->falloff, light->theta, light->phi);
|
||||
|
||||
@ -3829,7 +3829,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
/* Update the live definitions if the light is currently assigned a glIndex. */
|
||||
if (object->glIndex != -1 && !device->recording)
|
||||
{
|
||||
@@ -1661,6 +1791,7 @@ HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device,
|
||||
@@ -1659,6 +1789,7 @@ HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device,
|
||||
device_invalidate_state(device, STATE_ACTIVELIGHT(object->glIndex));
|
||||
}
|
||||
|
||||
@ -3837,7 +3837,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
/* Save away the information. */
|
||||
object->OriginalParms = *light;
|
||||
|
||||
@@ -1740,6 +1871,11 @@ HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device,
|
||||
@@ -1738,6 +1869,11 @@ HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device,
|
||||
FIXME("Unrecognized light type %#x.\n", light->type);
|
||||
}
|
||||
|
||||
@ -3849,7 +3849,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
@@ -1812,12 +1948,14 @@ HRESULT CDECL wined3d_device_set_light_enable(struct wined3d_device *device, UIN
|
||||
@@ -1810,12 +1946,14 @@ HRESULT CDECL wined3d_device_set_light_enable(struct wined3d_device *device, UIN
|
||||
{
|
||||
if (light_info->glIndex != -1)
|
||||
{
|
||||
@ -3864,7 +3864,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
device->update_state->lights[light_info->glIndex] = NULL;
|
||||
light_info->glIndex = -1;
|
||||
}
|
||||
@@ -1859,6 +1997,7 @@ HRESULT CDECL wined3d_device_set_light_enable(struct wined3d_device *device, UIN
|
||||
@@ -1857,6 +1995,7 @@ HRESULT CDECL wined3d_device_set_light_enable(struct wined3d_device *device, UIN
|
||||
WARN("Too many concurrently active lights\n");
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@ -3872,7 +3872,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
/* i == light_info->glIndex */
|
||||
if (!device->recording)
|
||||
@@ -1866,9 +2005,15 @@ HRESULT CDECL wined3d_device_set_light_enable(struct wined3d_device *device, UIN
|
||||
@@ -1864,9 +2003,15 @@ HRESULT CDECL wined3d_device_set_light_enable(struct wined3d_device *device, UIN
|
||||
device_invalidate_state(device, STATE_LIGHT_TYPE);
|
||||
device_invalidate_state(device, STATE_ACTIVELIGHT(i));
|
||||
}
|
||||
@ -3888,7 +3888,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
@@ -2039,6 +2184,11 @@ void CDECL wined3d_device_set_base_vertex_index(struct wined3d_device *device, I
|
||||
@@ -2037,6 +2182,11 @@ void CDECL wined3d_device_set_base_vertex_index(struct wined3d_device *device, I
|
||||
TRACE("device %p, base_index %d.\n", device, base_index);
|
||||
|
||||
device->update_state->base_vertex_index = base_index;
|
||||
@ -3900,7 +3900,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
INT CDECL wined3d_device_get_base_vertex_index(const struct wined3d_device *device)
|
||||
@@ -2084,7 +2234,11 @@ static void resolve_depth_buffer(struct wined3d_state *state)
|
||||
@@ -2082,7 +2232,11 @@ static void resolve_depth_buffer(struct wined3d_state *state)
|
||||
|| !(dst_texture->resource.format_flags & WINED3DFMT_FLAG_DEPTH))
|
||||
return;
|
||||
|
||||
@ -3912,7 +3912,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
return;
|
||||
if (src_view->resource->type == WINED3D_RTYPE_BUFFER)
|
||||
{
|
||||
@@ -2445,6 +2599,18 @@ struct wined3d_sampler * CDECL wined3d_device_get_vs_sampler(const struct wined3
|
||||
@@ -2443,6 +2597,18 @@ struct wined3d_sampler * CDECL wined3d_device_get_vs_sampler(const struct wined3
|
||||
return device->state.sampler[WINED3D_SHADER_TYPE_VERTEX][idx];
|
||||
}
|
||||
|
||||
@ -3931,7 +3931,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device,
|
||||
unsigned int start_idx, unsigned int count, const BOOL *constants)
|
||||
{
|
||||
@@ -2472,7 +2638,12 @@ HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device,
|
||||
@@ -2470,7 +2636,12 @@ HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device,
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -3944,7 +3944,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -2521,7 +2692,12 @@ HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device,
|
||||
@@ -2519,7 +2690,12 @@ HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device,
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -3957,7 +3957,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -2566,7 +2742,12 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device,
|
||||
@@ -2564,7 +2740,12 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device,
|
||||
memset(&device->recording->changed.vs_consts_f[start_idx], 1,
|
||||
count * sizeof(*device->recording->changed.vs_consts_f));
|
||||
else
|
||||
@ -3970,7 +3970,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -2705,7 +2886,12 @@ HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device,
|
||||
@@ -2703,7 +2884,12 @@ HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device,
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -3983,7 +3983,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -2754,7 +2940,12 @@ HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device,
|
||||
@@ -2752,7 +2938,12 @@ HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device,
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -3996,7 +3996,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -2800,7 +2991,12 @@ HRESULT CDECL wined3d_device_set_ps_consts_f(struct wined3d_device *device,
|
||||
@@ -2798,7 +2989,12 @@ HRESULT CDECL wined3d_device_set_ps_consts_f(struct wined3d_device *device,
|
||||
memset(&device->recording->changed.ps_consts_f[start_idx], 1,
|
||||
count * sizeof(*device->recording->changed.ps_consts_f));
|
||||
else
|
||||
@ -4009,7 +4009,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -2965,6 +3161,15 @@ static HRESULT process_vertices_strided(const struct wined3d_device *device, DWO
|
||||
@@ -2963,6 +3159,15 @@ static HRESULT process_vertices_strided(const struct wined3d_device *device, DWO
|
||||
}
|
||||
dest_ptr = map_desc.data;
|
||||
|
||||
@ -4025,7 +4025,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
wined3d_device_get_transform(device, WINED3D_TS_VIEW, &view_mat);
|
||||
wined3d_device_get_transform(device, WINED3D_TS_PROJECTION, &proj_mat);
|
||||
wined3d_device_get_transform(device, WINED3D_TS_WORLD_MATRIX(0), &world_mat);
|
||||
@@ -3526,8 +3731,10 @@ HRESULT CDECL wined3d_device_begin_scene(struct wined3d_device *device)
|
||||
@@ -3524,8 +3729,10 @@ HRESULT CDECL wined3d_device_begin_scene(struct wined3d_device *device)
|
||||
|
||||
HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
||||
{
|
||||
@ -4036,7 +4036,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
TRACE("device %p.\n", device);
|
||||
|
||||
if (!device->inScene)
|
||||
@@ -3536,6 +3743,7 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
||||
@@ -3534,6 +3741,7 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@ -4044,7 +4044,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
context = context_acquire(device, NULL);
|
||||
/* We only have to do this if we need to read the, swapbuffers performs a flush for us */
|
||||
context->gl_info->gl_ops.gl.p_glFlush();
|
||||
@@ -3543,6 +3751,7 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
||||
@@ -3541,6 +3749,7 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
||||
* fails. */
|
||||
context_release(context);
|
||||
|
||||
@ -4052,7 +4052,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
device->inScene = FALSE;
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -3550,6 +3759,10 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
||||
@@ -3548,6 +3757,10 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
||||
HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_count,
|
||||
const RECT *rects, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil)
|
||||
{
|
||||
@ -4063,7 +4063,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
TRACE("device %p, rect_count %u, rects %p, flags %#x, color %s, depth %.8e, stencil %u.\n",
|
||||
device, rect_count, rects, flags, debug_color(color), depth, stencil);
|
||||
|
||||
@@ -3561,7 +3774,11 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
@@ -3559,7 +3772,11 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
|
||||
if (flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL))
|
||||
{
|
||||
@ -4075,7 +4075,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (!ds)
|
||||
{
|
||||
WARN("Clearing depth and/or stencil without a depth stencil buffer attached, returning WINED3DERR_INVALIDCALL\n");
|
||||
@@ -3570,8 +3787,13 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
@@ -3568,8 +3785,13 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
}
|
||||
else if (flags & WINED3DCLEAR_TARGET)
|
||||
{
|
||||
@ -4089,7 +4089,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
{
|
||||
WARN("Silently ignoring depth and target clear with mismatching sizes\n");
|
||||
return WINED3D_OK;
|
||||
@@ -3617,7 +3839,9 @@ void CDECL wined3d_device_set_primitive_type(struct wined3d_device *device,
|
||||
@@ -3615,7 +3837,9 @@ void CDECL wined3d_device_set_primitive_type(struct wined3d_device *device,
|
||||
enum wined3d_primitive_type primitive_type)
|
||||
{
|
||||
GLenum gl_primitive_type, prev;
|
||||
@ -4099,7 +4099,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
TRACE("device %p, primitive_type %s\n", device, debug_d3dprimitivetype(primitive_type));
|
||||
|
||||
gl_primitive_type = gl_primitive_type_from_d3d(primitive_type);
|
||||
@@ -3625,8 +3849,13 @@ void CDECL wined3d_device_set_primitive_type(struct wined3d_device *device,
|
||||
@@ -3623,8 +3847,13 @@ void CDECL wined3d_device_set_primitive_type(struct wined3d_device *device,
|
||||
device->update_state->gl_primitive_type = gl_primitive_type;
|
||||
if (device->recording)
|
||||
device->recording->changed.primitive_type = TRUE;
|
||||
@ -4113,7 +4113,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
void CDECL wined3d_device_get_primitive_type(const struct wined3d_device *device,
|
||||
@@ -3686,10 +3915,16 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
|
||||
@@ -3684,10 +3913,16 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
|
||||
start_idx, index_count, start_instance, instance_count, TRUE);
|
||||
}
|
||||
|
||||
@ -4130,7 +4130,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
struct wined3d_const_bo_address data;
|
||||
struct wined3d_context *context;
|
||||
struct wined3d_map_desc src;
|
||||
@@ -3714,6 +3949,14 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
|
||||
@@ -3712,6 +3947,14 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
|
||||
}
|
||||
|
||||
context = context_acquire(device, NULL);
|
||||
@ -4145,7 +4145,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
/* Only a prepare, since we're uploading entire volumes. */
|
||||
wined3d_texture_prepare_texture(dst_texture, context, FALSE);
|
||||
@@ -3721,6 +3964,7 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
|
||||
@@ -3719,6 +3962,7 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
|
||||
|
||||
for (i = 0; i < level_count; ++i)
|
||||
{
|
||||
@ -4153,7 +4153,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (FAILED(hr = wined3d_resource_map(&src_texture->resource,
|
||||
src_level + i, &src, NULL, WINED3D_MAP_READONLY)))
|
||||
goto done;
|
||||
@@ -3737,16 +3981,94 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
|
||||
@@ -3735,16 +3979,94 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
|
||||
done:
|
||||
context_release(context);
|
||||
return hr;
|
||||
@ -4248,7 +4248,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
TRACE("device %p, src_texture %p, dst_texture %p.\n", device, src_texture, dst_texture);
|
||||
|
||||
@@ -3783,6 +4105,7 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
@@ -3781,6 +4103,7 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@ -4256,7 +4256,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
level_count = min(wined3d_texture_get_level_count(src_texture),
|
||||
wined3d_texture_get_level_count(dst_texture));
|
||||
|
||||
@@ -3805,9 +4128,21 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
@@ -3803,9 +4126,21 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
context_release(context);
|
||||
|
||||
/* Update every surface level of the texture. */
|
||||
@ -4278,7 +4278,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
{
|
||||
unsigned int src_levels = src_texture->level_count;
|
||||
unsigned int dst_levels = dst_texture->level_count;
|
||||
@@ -3840,6 +4175,38 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
@@ -3838,6 +4173,38 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
FIXME("Unsupported texture type %#x.\n", type);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
@ -4317,7 +4317,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device, DWORD *num_passes)
|
||||
@@ -3887,8 +4254,13 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
|
||||
@@ -3885,8 +4252,13 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
|
||||
if (state->render_states[WINED3D_RS_ZENABLE] || state->render_states[WINED3D_RS_ZWRITEENABLE]
|
||||
|| state->render_states[WINED3D_RS_STENCILENABLE])
|
||||
{
|
||||
@ -4331,7 +4331,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
if (ds && rt && (ds->width < rt->width || ds->height < rt->height))
|
||||
{
|
||||
@@ -4077,6 +4449,9 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
@@ -4075,6 +4447,9 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
struct wined3d_texture *dst_texture, *src_texture;
|
||||
RECT dst_rect, src_rect;
|
||||
HRESULT hr;
|
||||
@ -4341,7 +4341,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
TRACE("device %p, dst_resource %p, dst_sub_resource_idx %u, dst_x %u, dst_y %u, dst_z %u, "
|
||||
"src_resource %p, src_sub_resource_idx %u, src_box %s.\n",
|
||||
@@ -4164,6 +4539,16 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
@@ -4162,6 +4537,16 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
|
||||
if (src_box)
|
||||
{
|
||||
@ -4358,7 +4358,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
SetRect(&src_rect, src_box->left, src_box->top, src_box->right, src_box->bottom);
|
||||
}
|
||||
else
|
||||
@@ -4177,6 +4562,25 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
@@ -4175,6 +4560,25 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
SetRect(&dst_rect, dst_x, dst_y, dst_x + (src_rect.right - src_rect.left),
|
||||
dst_y + (src_rect.bottom - src_rect.top));
|
||||
|
||||
@ -4384,7 +4384,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (FAILED(hr = wined3d_texture_blt(dst_texture, dst_sub_resource_idx, &dst_rect,
|
||||
src_texture, src_sub_resource_idx, &src_rect, 0, NULL, WINED3D_TEXF_POINT)))
|
||||
WARN("Failed to blit, hr %#x.\n", hr);
|
||||
@@ -4189,6 +4593,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
@@ -4187,6 +4591,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
unsigned int depth_pitch)
|
||||
{
|
||||
struct wined3d_texture_sub_resource *sub_resource;
|
||||
@ -4392,7 +4392,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
struct wined3d_const_bo_address addr;
|
||||
unsigned int width, height, level;
|
||||
@@ -4197,6 +4602,9 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
@@ -4195,6 +4600,9 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
struct wined3d_surface *surface;
|
||||
POINT dst_point;
|
||||
RECT src_rect;
|
||||
@ -4402,7 +4402,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
TRACE("device %p, resource %p, sub_resource_idx %u, box %s, data %p, row_pitch %u, depth_pitch %u.\n",
|
||||
device, resource, sub_resource_idx, debug_box(box), data, row_pitch, depth_pitch);
|
||||
@@ -4230,6 +4638,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
@@ -4228,6 +4636,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
WARN("Invalid sub_resource_idx %u.\n", sub_resource_idx);
|
||||
return;
|
||||
}
|
||||
@ -4410,7 +4410,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
surface = sub_resource->u.surface;
|
||||
|
||||
level = sub_resource_idx % texture->level_count;
|
||||
@@ -4240,6 +4649,17 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
@@ -4238,6 +4647,17 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
src_rect.top = 0;
|
||||
if (box)
|
||||
{
|
||||
@ -4428,7 +4428,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (box->left >= box->right || box->right > width
|
||||
|| box->top >= box->bottom || box->bottom > height
|
||||
|| box->front >= box->back)
|
||||
@@ -4247,6 +4667,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
@@ -4245,6 +4665,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
WARN("Invalid box %s specified.\n", debug_box(box));
|
||||
return;
|
||||
}
|
||||
@ -4436,7 +4436,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
src_rect.right = box->right - box->left;
|
||||
src_rect.bottom = box->bottom - box->top;
|
||||
@@ -4281,6 +4702,11 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
@@ -4279,6 +4700,11 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
|
||||
wined3d_texture_validate_location(texture, sub_resource_idx, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
wined3d_texture_invalidate_location(texture, sub_resource_idx, ~WINED3D_LOCATION_TEXTURE_RGB);
|
||||
@ -4448,7 +4448,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *device,
|
||||
@@ -4289,8 +4715,13 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
|
||||
@@ -4287,8 +4713,13 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
|
||||
{
|
||||
const struct blit_shader *blitter;
|
||||
struct wined3d_resource *resource;
|
||||
@ -4462,7 +4462,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
TRACE("device %p, view %p, rect %s, flags %#x, color %s, depth %.8e, stencil %u.\n",
|
||||
device, view, wine_dbgstr_rect(rect), flags, debug_color(color), depth, stencil);
|
||||
@@ -4329,10 +4760,15 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
|
||||
@@ -4327,10 +4758,15 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@ -4478,7 +4478,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(const struct wined3d_device *device,
|
||||
@@ -4346,20 +4782,31 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
|
||||
@@ -4344,20 +4780,31 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -4510,7 +4510,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
TRACE("device %p, view_idx %u, view %p, set_viewport %#x.\n",
|
||||
device, view_idx, view, set_viewport);
|
||||
@@ -4396,13 +4843,21 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
@@ -4394,13 +4841,21 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
}
|
||||
|
||||
|
||||
@ -4532,7 +4532,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
wined3d_cs_emit_set_rendertarget_view(device->cs, view_idx, view);
|
||||
/* Release after the assignment, to prevent device_resource_released()
|
||||
* from seeing the surface as still in use. */
|
||||
@@ -4414,18 +4869,29 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
@@ -4412,18 +4867,29 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
|
||||
void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device, struct wined3d_rendertarget_view *view)
|
||||
{
|
||||
@ -4562,7 +4562,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
wined3d_rendertarget_view_incref(view);
|
||||
wined3d_cs_emit_set_depth_stencil_view(device->cs, view);
|
||||
if (prev)
|
||||
@@ -4659,19 +5125,26 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
|
||||
@@ -4657,19 +5123,26 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
|
||||
}
|
||||
}
|
||||
|
||||
@ -4589,7 +4589,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
LIST_FOR_EACH_ENTRY(shader, &device->shaders, struct wined3d_shader, shader_list_entry)
|
||||
{
|
||||
device->shader_backend->shader_destroy(shader);
|
||||
@@ -4700,12 +5173,30 @@ static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d
|
||||
@@ -4701,12 +5174,30 @@ static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, swapchain->context);
|
||||
swapchain->context = NULL;
|
||||
@ -4620,7 +4620,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
HRESULT hr;
|
||||
|
||||
if (FAILED(hr = device->shader_backend->shader_alloc_private(device,
|
||||
@@ -4722,6 +5213,7 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
|
||||
@@ -4723,6 +5214,7 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
|
||||
return hr;
|
||||
}
|
||||
|
||||
@ -4628,7 +4628,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
/* Recreate the primary swapchain's context */
|
||||
swapchain->context = HeapAlloc(GetProcessHeap(), 0, sizeof(*swapchain->context));
|
||||
if (!swapchain->context)
|
||||
@@ -4734,10 +5226,15 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
|
||||
@@ -4735,10 +5227,15 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
|
||||
|
||||
target = swapchain->back_buffers ? swapchain->back_buffers[0] : swapchain->front_buffer;
|
||||
if (!(context = context_create(swapchain, target, swapchain->ds_format)))
|
||||
@ -4644,7 +4644,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
HeapFree(GetProcessHeap(), 0, swapchain->context);
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -4747,6 +5244,12 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
|
||||
@@ -4748,6 +5245,12 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
|
||||
create_dummy_textures(device, context);
|
||||
create_default_samplers(device, context);
|
||||
context_release(context);
|
||||
@ -4657,7 +4657,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -4765,6 +5268,14 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4766,6 +5269,14 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
TRACE("device %p, swapchain_desc %p, mode %p, callback %p, reset_state %#x.\n",
|
||||
device, swapchain_desc, mode, callback, reset_state);
|
||||
|
||||
@ -4672,7 +4672,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (!(swapchain = wined3d_device_get_swapchain(device, 0)))
|
||||
{
|
||||
ERR("Failed to get the first implicit swapchain.\n");
|
||||
@@ -4783,10 +5294,16 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4784,10 +5295,16 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
wined3d_texture_decref(device->cursor_texture);
|
||||
device->cursor_texture = NULL;
|
||||
}
|
||||
@ -4689,7 +4689,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
{
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@@ -4795,10 +5312,22 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4796,10 +5313,22 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
}
|
||||
wined3d_device_set_depth_stencil_view(device, NULL);
|
||||
|
||||
@ -4712,7 +4712,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
if (reset_state)
|
||||
@@ -4963,27 +5492,48 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4964,27 +5493,48 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
if (device->d3d_initialized)
|
||||
delete_opengl_contexts(device, swapchain);
|
||||
|
||||
@ -4761,7 +4761,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect);
|
||||
}
|
||||
|
||||
@@ -4991,7 +5541,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4992,7 +5542,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
{
|
||||
if (reset_state)
|
||||
hr = create_primary_opengl_context(device, swapchain);
|
||||
@ -4773,7 +4773,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
/* All done. There is no need to reload resources or shaders, this will happen automatically on the
|
||||
@@ -5073,11 +5627,19 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
|
||||
@@ -5074,11 +5628,19 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
|
||||
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@ -4793,7 +4793,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
ERR("Resource %p is still in use as depth/stencil buffer.\n", resource);
|
||||
|
||||
switch (type)
|
||||
@@ -5202,8 +5764,17 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
|
||||
@@ -5203,8 +5765,17 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
|
||||
|
||||
device->blitter = adapter->blitter;
|
||||
|
||||
@ -4811,7 +4811,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
device->update_state = &device->state;
|
||||
|
||||
if (!(device->cs = wined3d_cs_create(device)))
|
||||
@@ -5297,3 +5868,58 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
@@ -5298,3 +5869,58 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
else
|
||||
return CallWindowProcA(proc, window, message, wparam, lparam);
|
||||
}
|
||||
@ -5530,7 +5530,7 @@ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
+ const struct wined3d_rendertarget_view *depth_stencil = state->fb.depth_stencil;
|
||||
+ const struct wined3d_rendertarget_view *target = state->fb.render_targets[0];
|
||||
+#endif /* STAGING_CSMT */
|
||||
float pixel_center_offset = context->swapchain->device->wined3d->flags
|
||||
float pixel_center_offset = context->device->wined3d->flags
|
||||
& WINED3D_PIXEL_CENTER_INTEGER ? 0.5f : 0.0f;
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
@@ -4856,7 +4898,11 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
|
||||
@ -8157,9 +8157,9 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
+ struct wined3d_fb_state current_fb;
|
||||
+#endif /* STAGING_CSMT */
|
||||
|
||||
struct wined3d_device *device;
|
||||
struct wined3d_swapchain *swapchain;
|
||||
struct
|
||||
@@ -1569,12 +1621,14 @@ struct wined3d_context
|
||||
@@ -1571,12 +1623,14 @@ struct wined3d_context
|
||||
GLuint dummy_arbfp_prog;
|
||||
};
|
||||
|
||||
@ -8174,7 +8174,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
|
||||
@@ -1713,7 +1767,11 @@ void context_alloc_event_query(struct wined3d_context *context,
|
||||
@@ -1715,7 +1769,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;
|
||||
@ -8186,7 +8186,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;
|
||||
BOOL context_apply_draw_state(struct wined3d_context *context,
|
||||
const struct wined3d_device *device, const struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
@@ -2362,7 +2420,11 @@ struct wined3d_stream_state
|
||||
@@ -2364,7 +2422,11 @@ struct wined3d_stream_state
|
||||
struct wined3d_state
|
||||
{
|
||||
DWORD flags;
|
||||
@ -8198,7 +8198,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];
|
||||
@@ -2409,6 +2471,16 @@ struct wined3d_state
|
||||
@@ -2411,6 +2473,16 @@ struct wined3d_state
|
||||
struct wined3d_rasterizer_state *rasterizer_state;
|
||||
};
|
||||
|
||||
@ -8215,7 +8215,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
|
||||
@@ -2461,16 +2533,21 @@ struct wined3d_device
|
||||
@@ -2463,16 +2535,21 @@ struct wined3d_device
|
||||
struct wined3d_rendertarget_view *back_buffer_view;
|
||||
struct wined3d_swapchain **swapchains;
|
||||
UINT swapchain_count;
|
||||
@ -8237,7 +8237,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
/* For rendering to a texture using glCopyTexImage */
|
||||
GLuint depth_blt_texture;
|
||||
|
||||
@@ -2522,9 +2599,23 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
@@ -2524,9 +2601,23 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
UINT message, WPARAM wparam, LPARAM lparam, WNDPROC proc) DECLSPEC_HIDDEN;
|
||||
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;
|
||||
@ -8261,7 +8261,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)
|
||||
{
|
||||
@@ -2569,7 +2660,11 @@ struct wined3d_resource
|
||||
@@ -2571,7 +2662,11 @@ struct wined3d_resource
|
||||
UINT depth;
|
||||
UINT size;
|
||||
DWORD priority;
|
||||
@ -8273,7 +8273,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
struct list resource_list_entry;
|
||||
LONG access_count;
|
||||
|
||||
@@ -2616,6 +2711,9 @@ void wined3d_resource_free_sysmem(struct wined3d_resource *resource) DECLSPEC_HI
|
||||
@@ -2618,6 +2713,9 @@ void wined3d_resource_free_sysmem(struct wined3d_resource *resource) DECLSPEC_HI
|
||||
GLbitfield wined3d_resource_gl_map_flags(DWORD d3d_flags) DECLSPEC_HIDDEN;
|
||||
GLenum wined3d_resource_gl_legacy_map_flags(DWORD d3d_flags) DECLSPEC_HIDDEN;
|
||||
BOOL wined3d_resource_is_offscreen(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
@ -8283,7 +8283,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void wined3d_resource_update_draw_binding(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
|
||||
/* Tests show that the start address of resources is 32 byte aligned */
|
||||
@@ -2677,6 +2775,9 @@ struct wined3d_texture
|
||||
@@ -2679,6 +2777,9 @@ struct wined3d_texture
|
||||
DWORD flags;
|
||||
GLenum target;
|
||||
DWORD update_map_binding;
|
||||
@ -8293,7 +8293,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
GLuint rb_multisample;
|
||||
GLuint rb_resolved;
|
||||
@@ -2713,7 +2814,12 @@ struct wined3d_texture
|
||||
@@ -2715,7 +2816,12 @@ struct wined3d_texture
|
||||
|
||||
unsigned int map_count;
|
||||
DWORD locations;
|
||||
@ -8306,7 +8306,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
} sub_resources[1];
|
||||
};
|
||||
|
||||
@@ -2764,11 +2870,23 @@ void wined3d_texture_bind(struct wined3d_texture *texture,
|
||||
@@ -2766,11 +2872,23 @@ void wined3d_texture_bind(struct wined3d_texture *texture,
|
||||
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture,
|
||||
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
@ -8330,7 +8330,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
struct wined3d_texture_sub_resource *wined3d_texture_get_sub_resource(struct wined3d_texture *texture,
|
||||
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_invalidate_location(struct wined3d_texture *texture,
|
||||
@@ -2781,13 +2899,26 @@ void *wined3d_texture_map_bo_address(const struct wined3d_bo_address *data, size
|
||||
@@ -2783,13 +2901,26 @@ void *wined3d_texture_map_bo_address(const struct wined3d_bo_address *data, size
|
||||
const struct wined3d_gl_info *gl_info, GLenum binding, DWORD flags) DECLSPEC_HIDDEN;
|
||||
BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned int sub_resource_idx,
|
||||
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
|
||||
@ -8357,7 +8357,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void wined3d_texture_upload_data(struct wined3d_texture *texture, unsigned int sub_resource_idx,
|
||||
const struct wined3d_context *context, const struct wined3d_const_bo_address *data,
|
||||
unsigned int row_pitch, unsigned int slice_pitch) DECLSPEC_HIDDEN;
|
||||
@@ -2896,7 +3027,11 @@ void surface_get_drawable_size(const struct wined3d_surface *surface, const stru
|
||||
@@ -2898,7 +3029,11 @@ void surface_get_drawable_size(const struct wined3d_surface *surface, const stru
|
||||
unsigned int *width, unsigned int *height) DECLSPEC_HIDDEN;
|
||||
void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb,
|
||||
struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||
@ -8369,7 +8369,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
|
||||
void surface_modify_ds_location(struct wined3d_surface *surface, DWORD location, UINT w, UINT h) DECLSPEC_HIDDEN;
|
||||
void surface_set_compatible_renderbuffer(struct wined3d_surface *surface,
|
||||
@@ -2907,6 +3042,11 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P
|
||||
@@ -2909,6 +3044,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;
|
||||
@ -8381,7 +8381,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;
|
||||
@@ -2921,6 +3061,12 @@ struct wined3d_sampler
|
||||
@@ -2923,6 +3063,12 @@ struct wined3d_sampler
|
||||
GLuint name;
|
||||
};
|
||||
|
||||
@ -8394,7 +8394,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;
|
||||
@@ -3016,6 +3162,7 @@ struct wined3d_stateblock
|
||||
@@ -3018,6 +3164,7 @@ struct wined3d_stateblock
|
||||
void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
|
||||
|
||||
void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
@ -8402,7 +8402,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void state_init(struct wined3d_state *state, struct wined3d_fb_state *fb,
|
||||
const struct wined3d_gl_info *gl_info, const struct wined3d_d3d_info *d3d_info,
|
||||
DWORD flags) DECLSPEC_HIDDEN;
|
||||
@@ -3029,54 +3176,150 @@ enum wined3d_push_constants
|
||||
@@ -3031,54 +3178,150 @@ enum wined3d_push_constants
|
||||
WINED3D_PUSH_CONSTANTS_PS_I,
|
||||
WINED3D_PUSH_CONSTANTS_VS_B,
|
||||
WINED3D_PUSH_CONSTANTS_PS_B,
|
||||
@ -8553,7 +8553,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,
|
||||
@@ -3106,6 +3349,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
@@ -3108,6 +3351,7 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
|
||||
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;
|
||||
@ -8561,7 +8561,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx,
|
||||
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, unsigned int flags) DECLSPEC_HIDDEN;
|
||||
@@ -3117,6 +3361,24 @@ static inline void wined3d_cs_push_constants(struct wined3d_cs *cs, enum wined3d
|
||||
@@ -3119,6 +3363,24 @@ static inline void wined3d_cs_push_constants(struct wined3d_cs *cs, enum wined3d
|
||||
{
|
||||
cs->ops->push_constants(cs, p, start_idx, count, constants);
|
||||
}
|
||||
@ -8586,7 +8586,7 @@ 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 */
|
||||
@@ -3143,6 +3405,9 @@ struct wined3d_buffer
|
||||
@@ -3145,6 +3407,9 @@ struct wined3d_buffer
|
||||
GLenum buffer_object_usage;
|
||||
GLenum buffer_type_hint;
|
||||
DWORD flags;
|
||||
@ -8596,7 +8596,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void *map_ptr;
|
||||
|
||||
struct wined3d_map_range *maps;
|
||||
@@ -3167,11 +3432,19 @@ void buffer_get_memory(struct wined3d_buffer *buffer, struct wined3d_context *co
|
||||
@@ -3169,11 +3434,19 @@ void buffer_get_memory(struct wined3d_buffer *buffer, struct wined3d_context *co
|
||||
BYTE *buffer_get_sysmem(struct wined3d_buffer *buffer, struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||
void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_context *context,
|
||||
const struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
@ -8616,7 +8616,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
struct wined3d_rendertarget_view
|
||||
{
|
||||
@@ -3233,7 +3506,12 @@ struct wined3d_unordered_access_view
|
||||
@@ -3235,7 +3508,12 @@ struct wined3d_unordered_access_view
|
||||
struct wined3d_swapchain_ops
|
||||
{
|
||||
void (*swapchain_present)(struct wined3d_swapchain *swapchain,
|
||||
@ -8629,7 +8629,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void (*swapchain_frontbuffer_updated)(struct wined3d_swapchain *swapchain);
|
||||
};
|
||||
|
||||
@@ -3270,6 +3548,10 @@ struct wined3d_swapchain
|
||||
@@ -3272,6 +3550,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…
x
Reference in New Issue
Block a user