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
Added patch to fix crash when trying to rendering without render target.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 9e7a6ec77afd6a2a0304b2a09697792f80c2a595 Mon Sep 17 00:00:00 2001
|
||||
From 848085bd98f238e46bc23113ed9329cb14b6c1cf Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 15 Nov 2016 22:07:56 +0100
|
||||
Subject: Revert "wined3d: Introduce
|
||||
@@ -14,7 +14,7 @@ This reverts commit 5cdb8f2486cf00a61c1aac20daef8c7cac0d8312.
|
||||
4 files changed, 10 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index ae8ca97..c526266 100644
|
||||
index 3cc78234b0d..7dbdc0aa1e2 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -291,8 +291,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
|
||||
@@ -37,10 +37,10 @@ index ae8ca97..c526266 100644
|
||||
else
|
||||
{
|
||||
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
index 3a899b3..6e89fbc 100644
|
||||
index 5952c6cc610..402bad31da0 100644
|
||||
--- a/dlls/wined3d/state.c
|
||||
+++ b/dlls/wined3d/state.c
|
||||
@@ -4633,7 +4633,7 @@ static void viewport_miscpart(struct wined3d_context *context, const struct wine
|
||||
@@ -4636,7 +4636,7 @@ static void viewport_miscpart(struct wined3d_context *context, const struct wine
|
||||
if (vp.height > target->height)
|
||||
vp.height = target->height;
|
||||
|
||||
@@ -49,7 +49,7 @@ index 3a899b3..6e89fbc 100644
|
||||
}
|
||||
else if (depth_stencil)
|
||||
{
|
||||
@@ -4675,7 +4675,7 @@ static void viewport_miscpart_cc(struct wined3d_context *context,
|
||||
@@ -4678,7 +4678,7 @@ static void viewport_miscpart_cc(struct wined3d_context *context,
|
||||
if (vp.height > target->height)
|
||||
vp.height = target->height;
|
||||
|
||||
@@ -58,17 +58,17 @@ index 3a899b3..6e89fbc 100644
|
||||
}
|
||||
else if (depth_stencil)
|
||||
{
|
||||
@@ -4860,7 +4860,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
|
||||
UINT height;
|
||||
UINT width;
|
||||
@@ -4865,7 +4865,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
|
||||
|
||||
- wined3d_rendertarget_view_get_drawable_size(target, context, &width, &height);
|
||||
+ surface_get_drawable_size(wined3d_rendertarget_view_get_surface(target), context, &width, &height);
|
||||
gl_info->gl_ops.gl.p_glScissor(r->left, height - r->bottom, r->right - r->left, r->bottom - r->top);
|
||||
}
|
||||
checkGLcall("glScissor");
|
||||
if (target)
|
||||
{
|
||||
- wined3d_rendertarget_view_get_drawable_size(target, context, &width, &height);
|
||||
+ surface_get_drawable_size(wined3d_rendertarget_view_get_surface(target), context, &width, &height);
|
||||
gl_info->gl_ops.gl.p_glScissor(r->left, height - r->bottom, r->right - r->left, r->bottom - r->top);
|
||||
}
|
||||
else
|
||||
diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c
|
||||
index 10eecc8..cfd2ce1 100644
|
||||
index 609f8f7365e..a0a46208343 100644
|
||||
--- a/dlls/wined3d/view.c
|
||||
+++ b/dlls/wined3d/view.c
|
||||
@@ -195,21 +195,10 @@ struct wined3d_resource * CDECL wined3d_rendertarget_view_get_resource(const str
|
||||
@@ -97,10 +97,10 @@ index 10eecc8..cfd2ce1 100644
|
||||
/* The drawable size of an onscreen drawable is the surface size.
|
||||
* (Actually: The window size, but the surface is created in window
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index f14ad98..52bf790 100644
|
||||
index e7321b889ac..28efc25b908 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2973,6 +2973,8 @@ HRESULT surface_color_fill(struct wined3d_surface *s,
|
||||
@@ -2987,6 +2987,8 @@ HRESULT surface_color_fill(struct wined3d_surface *s,
|
||||
const RECT *rect, const struct wined3d_color *color) DECLSPEC_HIDDEN;
|
||||
HRESULT wined3d_surface_create_dc(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
|
||||
void wined3d_surface_destroy_dc(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
|
||||
@@ -109,7 +109,7 @@ index f14ad98..52bf790 100644
|
||||
void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb,
|
||||
struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||
HRESULT surface_load_location(struct wined3d_surface *surface,
|
||||
@@ -3291,9 +3293,6 @@ static inline struct wined3d_surface *wined3d_rendertarget_view_get_surface(
|
||||
@@ -3302,9 +3304,6 @@ static inline struct wined3d_surface *wined3d_rendertarget_view_get_surface(
|
||||
return texture->sub_resources[view->sub_resource_idx].u.surface;
|
||||
}
|
||||
|
||||
@@ -120,5 +120,5 @@ index f14ad98..52bf790 100644
|
||||
{
|
||||
GLenum target;
|
||||
--
|
||||
2.9.0
|
||||
2.11.0
|
||||
|
||||
|
||||
@@ -6299,7 +6299,7 @@ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
}
|
||||
else if (depth_stencil)
|
||||
{
|
||||
@@ -4859,11 +4909,19 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
|
||||
@@ -4859,13 +4909,21 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -6311,15 +6311,17 @@ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
UINT height;
|
||||
UINT width;
|
||||
|
||||
if (target)
|
||||
{
|
||||
+#if !defined(STAGING_CSMT)
|
||||
wined3d_rendertarget_view_get_drawable_size(target, context, &width, &height);
|
||||
wined3d_rendertarget_view_get_drawable_size(target, context, &width, &height);
|
||||
+#else /* STAGING_CSMT */
|
||||
+ surface_get_drawable_size(wined3d_rendertarget_view_get_surface(target), context, &width, &height);
|
||||
+ surface_get_drawable_size(wined3d_rendertarget_view_get_surface(target), context, &width, &height);
|
||||
+#endif /* STAGING_CSMT */
|
||||
gl_info->gl_ops.gl.p_glScissor(r->left, height - r->bottom, r->right - r->left, r->bottom - r->top);
|
||||
}
|
||||
checkGLcall("glScissor");
|
||||
@@ -4935,7 +4993,11 @@ void state_srgbwrite(struct wined3d_context *context, const struct wined3d_state
|
||||
gl_info->gl_ops.gl.p_glScissor(r->left, height - r->bottom, r->right - r->left, r->bottom - r->top);
|
||||
}
|
||||
else
|
||||
@@ -4943,7 +5001,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