Removed patch to fix issues with invalid console handles for new processes (accepted upstream).

This commit is contained in:
Sebastian Lackner
2015-04-23 17:03:20 +02:00
parent a139cd10bd
commit 8e8e15c81a
7 changed files with 52 additions and 241 deletions

View File

@@ -1,4 +1,4 @@
From f3e0bbee4a69994ffdae5e15c180d65104ed515c Mon Sep 17 00:00:00 2001
From 9e339aaca2d76bc24048081c3e47b49a840c716e 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
@@ -11,13 +11,13 @@ Subject: wined3d: Move the framebuffer into wined3d_state
dlls/wined3d/drawprim.c | 14 ++---
dlls/wined3d/glsl_shader.c | 2 +-
dlls/wined3d/shader.c | 2 +-
dlls/wined3d/state.c | 18 +++---
dlls/wined3d/state.c | 20 +++----
dlls/wined3d/stateblock.c | 45 +++++++++++++--
dlls/wined3d/surface.c | 2 +-
dlls/wined3d/swapchain.c | 2 +-
dlls/wined3d/utils.c | 4 +-
dlls/wined3d/wined3d_private.h | 46 +++++++++++----
13 files changed, 171 insertions(+), 126 deletions(-)
13 files changed, 172 insertions(+), 127 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index c3878ea..78ecff7 100644
@@ -577,7 +577,7 @@ index f2c2f42..c6a72fc 100644
surface_modify_ds_location(ds, location, ds->ds_current_size.cx, ds->ds_current_size.cy);
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 655bb33..eddf6b5 100644
index f1bf0a3..77c526e 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -1083,7 +1083,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
@@ -590,20 +590,20 @@ index 655bb33..eddf6b5 100644
const struct wined3d_shader_lconst *lconst;
const char *prefix;
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
index d5a90c0..2746ba1 100644
index c249c9a..8a21921 100644
--- a/dlls/wined3d/shader.c
+++ b/dlls/wined3d/shader.c
@@ -2344,7 +2344,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
memset(args, 0, sizeof(*args)); /* FIXME: Make sure all bits are set. */
if (!gl_info->supported[ARB_FRAMEBUFFER_SRGB] && state->render_states[WINED3D_RS_SRGBWRITEENABLE])
{
- const struct wined3d_format *rt_format = state->fb->render_targets[0]->format;
+ const struct wined3d_format *rt_format = state->fb.render_targets[0]->format;
if (rt_format->flags & WINED3DFMT_FLAG_SRGB_WRITE)
- unsigned int rt_fmt_flags = state->fb->render_targets[0]->format_flags;
+ unsigned int rt_fmt_flags = state->fb.render_targets[0]->format_flags;
if (rt_fmt_flags & WINED3DFMT_FLAG_SRGB_WRITE)
{
static unsigned int warned = 0;
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 91f3485..6105283 100644
index b025dff..9a52777 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -105,7 +105,7 @@ static void state_zenable(struct wined3d_context *context, const struct wined3d_
@@ -615,16 +615,18 @@ index 91f3485..6105283 100644
{
TRACE("No Z buffer - disabling depth test\n");
zenable = WINED3D_ZB_FALSE;
@@ -367,7 +367,7 @@ static GLenum gl_blend_factor(enum wined3d_blend factor, const struct wined3d_fo
@@ -367,8 +367,8 @@ static GLenum gl_blend_factor(enum wined3d_blend factor, const struct wined3d_fo
static void state_blend(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{
- const struct wined3d_format *rt_format = state->fb->render_targets[0]->format;
- unsigned int rt_fmt_flags = state->fb->render_targets[0]->format_flags;
+ const struct wined3d_format *rt_format = state->fb.render_targets[0]->format;
+ unsigned int rt_fmt_flags = state->fb.render_targets[0]->format_flags;
const struct wined3d_gl_info *gl_info = context->gl_info;
GLenum srcBlend, dstBlend;
enum wined3d_blend d3d_blend;
@@ -812,7 +812,7 @@ static void state_stencil(struct wined3d_context *context, const struct wined3d_
@@ -813,7 +813,7 @@ static void state_stencil(struct wined3d_context *context, const struct wined3d_
GLint depthFail_ccw;
/* No stencil test without a stencil buffer. */
@@ -633,7 +635,7 @@ index 91f3485..6105283 100644
{
gl_info->gl_ops.gl.p_glDisable(GL_STENCIL_TEST);
checkGLcall("glDisable GL_STENCIL_TEST");
@@ -908,7 +908,7 @@ static void state_stencil(struct wined3d_context *context, const struct wined3d_
@@ -909,7 +909,7 @@ static void state_stencil(struct wined3d_context *context, const struct wined3d_
static void state_stencilwrite2s(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{
@@ -642,7 +644,7 @@ index 91f3485..6105283 100644
const struct wined3d_gl_info *gl_info = context->gl_info;
GL_EXTCALL(glActiveStencilFaceEXT(GL_BACK));
@@ -922,7 +922,7 @@ static void state_stencilwrite2s(struct wined3d_context *context, const struct w
@@ -923,7 +923,7 @@ static void state_stencilwrite2s(struct wined3d_context *context, const struct w
static void state_stencilwrite(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{
@@ -651,7 +653,7 @@ index 91f3485..6105283 100644
const struct wined3d_gl_info *gl_info = context->gl_info;
gl_info->gl_ops.gl.p_glStencilMask(mask);
@@ -1762,7 +1762,7 @@ static void state_depthbias(struct wined3d_context *context, const struct wined3
@@ -1763,7 +1763,7 @@ static void state_depthbias(struct wined3d_context *context, const struct wined3
if (state->render_states[WINED3D_RS_SLOPESCALEDEPTHBIAS]
|| state->render_states[WINED3D_RS_DEPTHBIAS])
{
@@ -660,7 +662,7 @@ index 91f3485..6105283 100644
float scale;
union
@@ -4657,7 +4657,7 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine
@@ -4658,7 +4658,7 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine
static void viewport_miscpart(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{
@@ -669,7 +671,7 @@ index 91f3485..6105283 100644
const struct wined3d_gl_info *gl_info = context->gl_info;
struct wined3d_viewport vp = state->viewport;
@@ -4835,7 +4835,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
@@ -4836,7 +4836,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
}
else
{
@@ -678,12 +680,12 @@ index 91f3485..6105283 100644
UINT height;
UINT width;
@@ -4899,7 +4899,7 @@ static void psorigin(struct wined3d_context *context, const struct wined3d_state
@@ -4900,7 +4900,7 @@ static void psorigin(struct wined3d_context *context, const struct wined3d_state
void state_srgbwrite(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{
- const struct wined3d_format *rt_format = state->fb->render_targets[0]->format;
+ const struct wined3d_format *rt_format = state->fb.render_targets[0]->format;
- unsigned int rt_fmt_flags = state->fb->render_targets[0]->format_flags;
+ unsigned int rt_fmt_flags = state->fb.render_targets[0]->format_flags;
const struct wined3d_gl_info *gl_info = context->gl_info;
TRACE("context %p, state %p, state_id %#x.\n", context, state, state_id);
@@ -815,7 +817,7 @@ index 1ac5e7a..454cb21 100644
struct wined3d_context *context;
struct wined3d_surface *front;
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index 1686e30..09408e4 100644
index 5596375..17435c4 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -3192,7 +3192,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
@@ -831,13 +833,13 @@ index 1686e30..09408e4 100644
unsigned int i;
DWORD ttff;
DWORD cop, aop, carg0, carg1, carg2, aarg0, aarg1, aarg2;
- const struct wined3d_format *rt_format = state->fb->render_targets[0]->format;
+ const struct wined3d_format *rt_format = state->fb.render_targets[0]->format;
- unsigned int rt_fmt_flags = state->fb->render_targets[0]->format_flags;
+ unsigned int rt_fmt_flags = state->fb.render_targets[0]->format_flags;
const struct wined3d_gl_info *gl_info = context->gl_info;
const struct wined3d_d3d_info *d3d_info = context->d3d_info;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 1d0d644..7253e54 100644
index e12ce80..2be7639 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1124,6 +1124,36 @@ struct wined3d_timestamp_query

View File

@@ -328,19 +328,21 @@ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
{
TRACE("No Z buffer - disabling depth test\n");
zenable = WINED3D_ZB_FALSE;
@@ -367,7 +371,11 @@
@@ -367,8 +371,13 @@
static void state_blend(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{
+#if defined(STAGING_CSMT)
const struct wined3d_format *rt_format = state->fb.render_targets[0]->format;
unsigned int rt_fmt_flags = state->fb.render_targets[0]->format_flags;
+#else /* STAGING_CSMT */
+ const struct wined3d_format *rt_format = state->fb->render_targets[0]->format;
+ unsigned int rt_fmt_flags = state->fb->render_targets[0]->format_flags;
+#endif /* STAGING_CSMT */
const struct wined3d_gl_info *gl_info = context->gl_info;
GLenum srcBlend, dstBlend;
enum wined3d_blend d3d_blend;
@@ -812,7 +820,11 @@
@@ -813,7 +822,11 @@
GLint depthFail_ccw;
/* No stencil test without a stencil buffer. */
@@ -352,7 +354,7 @@ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
{
gl_info->gl_ops.gl.p_glDisable(GL_STENCIL_TEST);
checkGLcall("glDisable GL_STENCIL_TEST");
@@ -908,7 +920,11 @@
@@ -909,7 +922,11 @@
static void state_stencilwrite2s(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{
@@ -364,7 +366,7 @@ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
const struct wined3d_gl_info *gl_info = context->gl_info;
GL_EXTCALL(glActiveStencilFaceEXT(GL_BACK));
@@ -922,7 +938,11 @@
@@ -923,7 +940,11 @@
static void state_stencilwrite(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{
@@ -376,7 +378,7 @@ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
const struct wined3d_gl_info *gl_info = context->gl_info;
gl_info->gl_ops.gl.p_glStencilMask(mask);
@@ -1163,10 +1183,17 @@
@@ -1164,10 +1185,17 @@
/* drop through */
case WINED3D_FOG_NONE:
@@ -394,7 +396,7 @@ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
new_source = FOGSOURCE_COORD;
gl_info->gl_ops.gl.p_glFogi(GL_FOG_MODE, GL_LINEAR);
checkGLcall("glFogi(GL_FOG_MODE, GL_LINEAR)");
@@ -1762,7 +1789,11 @@
@@ -1763,7 +1791,11 @@
if (state->render_states[WINED3D_RS_SLOPESCALEDEPTHBIAS]
|| state->render_states[WINED3D_RS_DEPTHBIAS])
{
@@ -406,7 +408,7 @@ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
float scale;
union
@@ -4303,9 +4334,15 @@
@@ -4304,9 +4336,15 @@
}
}
} else {
@@ -422,7 +424,7 @@ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
WARN("unsupported blending in openGl\n");
}
}
@@ -4657,7 +4694,11 @@
@@ -4658,7 +4696,11 @@
static void viewport_miscpart(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{
@@ -434,7 +436,7 @@ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
const struct wined3d_gl_info *gl_info = context->gl_info;
struct wined3d_viewport vp = state->viewport;
@@ -4835,7 +4876,11 @@
@@ -4836,7 +4878,11 @@
}
else
{
@@ -446,14 +448,14 @@ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
UINT height;
UINT width;
@@ -4899,7 +4944,11 @@
@@ -4900,7 +4946,11 @@
void state_srgbwrite(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{
+#if defined(STAGING_CSMT)
const struct wined3d_format *rt_format = state->fb.render_targets[0]->format;
unsigned int rt_fmt_flags = state->fb.render_targets[0]->format_flags;
+#else /* STAGING_CSMT */
+ const struct wined3d_format *rt_format = state->fb->render_targets[0]->format;
+ unsigned int rt_fmt_flags = state->fb->render_targets[0]->format_flags;
+#endif /* STAGING_CSMT */
const struct wined3d_gl_info *gl_info = context->gl_info;
@@ -1143,9 +1145,9 @@ diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
DWORD ttff;
DWORD cop, aop, carg0, carg1, carg2, aarg0, aarg1, aarg2;
+#if defined(STAGING_CSMT)
const struct wined3d_format *rt_format = state->fb.render_targets[0]->format;
unsigned int rt_fmt_flags = state->fb.render_targets[0]->format_flags;
+#else /* STAGING_CSMT */
+ const struct wined3d_format *rt_format = state->fb->render_targets[0]->format;
+ unsigned int rt_fmt_flags = state->fb->render_targets[0]->format_flags;
+#endif /* STAGING_CSMT */
const struct wined3d_gl_info *gl_info = context->gl_info;
const struct wined3d_d3d_info *d3d_info = context->d3d_info;
@@ -2253,7 +2255,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_rendertarget_view
{
@@ -2904,8 +3122,10 @@
@@ -2905,8 +3123,10 @@
return surface_from_resource(resource);
}
@@ -2264,7 +2266,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_shader_resource_view
{
LONG refcount;
@@ -2918,8 +3138,12 @@
@@ -2919,8 +3139,12 @@
struct wined3d_swapchain_ops
{
void (*swapchain_present)(struct wined3d_swapchain *swapchain, const RECT *src_rect,
@@ -2277,7 +2279,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
};
struct wined3d_swapchain
@@ -2959,8 +3183,10 @@
@@ -2960,8 +3184,10 @@
HDC swapchain_get_backup_dc(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
void swapchain_update_draw_bindings(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
void swapchain_update_render_to_fbo(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
@@ -2288,7 +2290,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
/*****************************************************************************
* Utility function prototypes
@@ -3175,7 +3401,9 @@
@@ -3176,7 +3402,9 @@
void shader_generate_main(const struct wined3d_shader *shader, struct wined3d_shader_buffer *buffer,
const struct wined3d_shader_reg_maps *reg_maps, const DWORD *byte_code, void *backend_ctx) DECLSPEC_HIDDEN;
BOOL shader_match_semantic(const char *semantic_name, enum wined3d_decl_usage usage) DECLSPEC_HIDDEN;
@@ -9124,11 +9126,11 @@ diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
if (!gl_info->supported[ARB_FRAMEBUFFER_SRGB] && state->render_states[WINED3D_RS_SRGBWRITEENABLE])
{
+#if defined(STAGING_CSMT)
const struct wined3d_format *rt_format = state->fb.render_targets[0]->format;
unsigned int rt_fmt_flags = state->fb.render_targets[0]->format_flags;
+#else /* STAGING_CSMT */
+ const struct wined3d_format *rt_format = state->fb->render_targets[0]->format;
+ unsigned int rt_fmt_flags = state->fb->render_targets[0]->format_flags;
+#endif /* STAGING_CSMT */
if (rt_format->flags & WINED3DFMT_FLAG_SRGB_WRITE)
if (rt_fmt_flags & WINED3DFMT_FLAG_SRGB_WRITE)
{
static unsigned int warned = 0;
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c