You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against 882980c17a9a033fa8e49a4c116af9583698d218.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 70827802a1fc98a6a804538508e6b35d618810cc Mon Sep 17 00:00:00 2001
|
||||
From fd4c139df920eac1a3f8268d29316de8777f57c3 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
|
||||
@@ -633,7 +633,7 @@ index 28d5972..37594b2 100644
|
||||
static unsigned int warned = 0;
|
||||
|
||||
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
index 572dda2..156e8a5 100644
|
||||
index 4e3243c..15be52e 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_
|
||||
@@ -645,25 +645,22 @@ index 572dda2..156e8a5 100644
|
||||
{
|
||||
TRACE("No Z buffer - disabling depth test\n");
|
||||
zenable = WINED3D_ZB_FALSE;
|
||||
@@ -452,14 +452,14 @@ static void state_blend(struct wined3d_context *context, const struct wined3d_st
|
||||
GLenum src_blend, dst_blend;
|
||||
unsigned int rt_fmt_flags;
|
||||
|
||||
- if (!state->fb->render_targets[0])
|
||||
+ if (!state->fb.render_targets[0])
|
||||
{
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_BLEND);
|
||||
return;
|
||||
@@ -466,11 +466,11 @@ static void state_blend(struct wined3d_context *context, const struct wined3d_st
|
||||
checkGLcall("glDisable(GL_LINE_SMOOTH)");
|
||||
}
|
||||
|
||||
- rt_format = state->fb->render_targets[0]->format;
|
||||
- rt_fmt_flags = state->fb->render_targets[0]->format_flags;
|
||||
+ rt_format = state->fb.render_targets[0]->format;
|
||||
+ rt_fmt_flags = state->fb.render_targets[0]->format_flags;
|
||||
- enable_blend = state->fb->render_targets[0] && state->render_states[WINED3D_RS_ALPHABLENDENABLE];
|
||||
+ enable_blend = state->fb.render_targets[0] && state->render_states[WINED3D_RS_ALPHABLENDENABLE];
|
||||
if (enable_blend)
|
||||
{
|
||||
- rt_format = state->fb->render_targets[0]->format;
|
||||
- rt_fmt_flags = state->fb->render_targets[0]->format_flags;
|
||||
+ rt_format = state->fb.render_targets[0]->format;
|
||||
+ rt_fmt_flags = state->fb.render_targets[0]->format_flags;
|
||||
|
||||
/* According to the red book, GL_LINE_SMOOTH needs GL_BLEND with specific
|
||||
* blending parameters to work. */
|
||||
@@ -861,7 +861,7 @@ static void state_stencil(struct wined3d_context *context, const struct wined3d_
|
||||
/* Disable blending in all cases even without pixelshaders.
|
||||
* With blending on we could face a big performance penalty.
|
||||
@@ -858,7 +858,7 @@ static void state_stencil(struct wined3d_context *context, const struct wined3d_
|
||||
GLint depthFail_ccw;
|
||||
|
||||
/* No stencil test without a stencil buffer. */
|
||||
@@ -672,7 +669,7 @@ index 572dda2..156e8a5 100644
|
||||
{
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_STENCIL_TEST);
|
||||
checkGLcall("glDisable GL_STENCIL_TEST");
|
||||
@@ -957,7 +957,7 @@ static void state_stencil(struct wined3d_context *context, const struct wined3d_
|
||||
@@ -954,7 +954,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)
|
||||
{
|
||||
@@ -681,7 +678,7 @@ index 572dda2..156e8a5 100644
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
|
||||
GL_EXTCALL(glActiveStencilFaceEXT(GL_BACK));
|
||||
@@ -971,7 +971,7 @@ static void state_stencilwrite2s(struct wined3d_context *context, const struct w
|
||||
@@ -968,7 +968,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)
|
||||
{
|
||||
@@ -690,7 +687,7 @@ index 572dda2..156e8a5 100644
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
|
||||
gl_info->gl_ops.gl.p_glStencilMask(mask);
|
||||
@@ -1709,7 +1709,7 @@ static void state_depthbias(struct wined3d_context *context, const struct wined3
|
||||
@@ -1706,7 +1706,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])
|
||||
{
|
||||
@@ -699,7 +696,7 @@ index 572dda2..156e8a5 100644
|
||||
float scale;
|
||||
|
||||
union
|
||||
@@ -4623,8 +4623,8 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine
|
||||
@@ -4620,8 +4620,8 @@ 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)
|
||||
{
|
||||
@@ -710,7 +707,7 @@ index 572dda2..156e8a5 100644
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
struct wined3d_viewport vp = state->viewport;
|
||||
unsigned int width, height;
|
||||
@@ -4810,7 +4810,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
|
||||
@@ -4807,7 +4807,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -719,7 +716,7 @@ index 572dda2..156e8a5 100644
|
||||
UINT height;
|
||||
UINT width;
|
||||
|
||||
@@ -4875,7 +4875,7 @@ void state_srgbwrite(struct wined3d_context *context, const struct wined3d_state
|
||||
@@ -4872,7 +4872,7 @@ void state_srgbwrite(struct wined3d_context *context, const struct wined3d_state
|
||||
|
||||
TRACE("context %p, state %p, state_id %#x.\n", context, state, state_id);
|
||||
|
||||
|
||||
@@ -5384,31 +5384,27 @@ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
{
|
||||
TRACE("No Z buffer - disabling depth test\n");
|
||||
zenable = WINED3D_ZB_FALSE;
|
||||
@@ -452,14 +456,23 @@ static void state_blend(struct wined3d_context *context, const struct wined3d_st
|
||||
GLenum src_blend, dst_blend;
|
||||
unsigned int rt_fmt_flags;
|
||||
|
||||
+#if !defined(STAGING_CSMT)
|
||||
if (!state->fb->render_targets[0])
|
||||
+#else /* STAGING_CSMT */
|
||||
+ if (!state->fb.render_targets[0])
|
||||
+#endif /* STAGING_CSMT */
|
||||
{
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_BLEND);
|
||||
return;
|
||||
@@ -466,11 +470,19 @@ static void state_blend(struct wined3d_context *context, const struct wined3d_st
|
||||
checkGLcall("glDisable(GL_LINE_SMOOTH)");
|
||||
}
|
||||
|
||||
+#if !defined(STAGING_CSMT)
|
||||
rt_format = state->fb->render_targets[0]->format;
|
||||
rt_fmt_flags = state->fb->render_targets[0]->format_flags;
|
||||
enable_blend = state->fb->render_targets[0] && state->render_states[WINED3D_RS_ALPHABLENDENABLE];
|
||||
if (enable_blend)
|
||||
{
|
||||
rt_format = state->fb->render_targets[0]->format;
|
||||
rt_fmt_flags = state->fb->render_targets[0]->format_flags;
|
||||
+#else /* STAGING_CSMT */
|
||||
+ rt_format = state->fb.render_targets[0]->format;
|
||||
+ rt_fmt_flags = state->fb.render_targets[0]->format_flags;
|
||||
+ enable_blend = state->fb.render_targets[0] && state->render_states[WINED3D_RS_ALPHABLENDENABLE];
|
||||
+ if (enable_blend)
|
||||
+ {
|
||||
+ rt_format = state->fb.render_targets[0]->format;
|
||||
+ rt_fmt_flags = state->fb.render_targets[0]->format_flags;
|
||||
+#endif /* STAGING_CSMT */
|
||||
|
||||
/* According to the red book, GL_LINE_SMOOTH needs GL_BLEND with specific
|
||||
* blending parameters to work. */
|
||||
@@ -861,7 +874,11 @@ static void state_stencil(struct wined3d_context *context, const struct wined3d_
|
||||
/* Disable blending in all cases even without pixelshaders.
|
||||
* With blending on we could face a big performance penalty.
|
||||
@@ -858,7 +870,11 @@ static void state_stencil(struct wined3d_context *context, const struct wined3d_
|
||||
GLint depthFail_ccw;
|
||||
|
||||
/* No stencil test without a stencil buffer. */
|
||||
@@ -5420,7 +5416,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");
|
||||
@@ -957,7 +974,11 @@ static void state_stencil(struct wined3d_context *context, const struct wined3d_
|
||||
@@ -954,7 +970,11 @@ 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)
|
||||
{
|
||||
@@ -5432,7 +5428,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));
|
||||
@@ -971,7 +992,11 @@ static void state_stencilwrite2s(struct wined3d_context *context, const struct w
|
||||
@@ -968,7 +988,11 @@ 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)
|
||||
{
|
||||
@@ -5444,7 +5440,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);
|
||||
@@ -1709,7 +1734,11 @@ static void state_depthbias(struct wined3d_context *context, const struct wined3
|
||||
@@ -1706,7 +1730,11 @@ static void state_depthbias(struct wined3d_context *context, const struct wined3
|
||||
if (state->render_states[WINED3D_RS_SLOPESCALEDEPTHBIAS]
|
||||
|| state->render_states[WINED3D_RS_DEPTHBIAS])
|
||||
{
|
||||
@@ -5456,7 +5452,7 @@ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
float scale;
|
||||
|
||||
union
|
||||
@@ -3642,7 +3671,11 @@ static void sampler(struct wined3d_context *context, const struct wined3d_state
|
||||
@@ -3639,7 +3667,11 @@ static void sampler(struct wined3d_context *context, const struct wined3d_state
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5468,7 +5464,7 @@ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
{
|
||||
ERR("Failed to create sampler.\n");
|
||||
sampler = NULL;
|
||||
@@ -4623,8 +4656,13 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine
|
||||
@@ -4620,8 +4652,13 @@ 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)
|
||||
{
|
||||
@@ -5482,7 +5478,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;
|
||||
unsigned int width, height;
|
||||
@@ -4810,7 +4848,11 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
|
||||
@@ -4807,7 +4844,11 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5494,7 +5490,7 @@ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
UINT height;
|
||||
UINT width;
|
||||
|
||||
@@ -4875,7 +4917,11 @@ void state_srgbwrite(struct wined3d_context *context, const struct wined3d_state
|
||||
@@ -4872,7 +4913,11 @@ void state_srgbwrite(struct wined3d_context *context, const struct wined3d_state
|
||||
|
||||
TRACE("context %p, state %p, state_id %#x.\n", context, state, state_id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user