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:
@@ -0,0 +1,35 @@
|
||||
From cdec706cd4fcff6adee4a40ddcf0c2072982b56e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 21 Jan 2017 22:13:09 +0100
|
||||
Subject: wined3d: Handle no render target view case when setting scissors.
|
||||
|
||||
---
|
||||
dlls/wined3d/state.c | 12 ++++++++++--
|
||||
1 file changed, 10 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
index 3c0bb5eb132..b7050be1b3b 100644
|
||||
--- a/dlls/wined3d/state.c
|
||||
+++ b/dlls/wined3d/state.c
|
||||
@@ -4853,8 +4853,16 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
|
||||
UINT height;
|
||||
UINT width;
|
||||
|
||||
- wined3d_rendertarget_view_get_drawable_size(target, context, &width, &height);
|
||||
- gl_info->gl_ops.gl.p_glScissor(r->left, height - r->bottom, r->right - r->left, r->bottom - r->top);
|
||||
+ if (target)
|
||||
+ {
|
||||
+ wined3d_rendertarget_view_get_drawable_size(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
|
||||
+ {
|
||||
+ /* There is nothing to render to anyway */
|
||||
+ gl_info->gl_ops.gl.p_glScissor(0, 0, 0, 0);
|
||||
+ }
|
||||
}
|
||||
checkGLcall("glScissor");
|
||||
}
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From f0c26f58cc4c774adde80d9b8c02ca7b94adcaa9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 21 Jan 2017 22:17:32 +0100
|
||||
Subject: wined3d: Set draw buffer mask to zero (GL_NONE) when no render target
|
||||
view is attached.
|
||||
|
||||
---
|
||||
dlls/wined3d/context.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index 6112b40e60f..d168c959e30 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -2724,7 +2724,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
|
||||
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO)
|
||||
return context_generate_rt_mask_no_fbo(context, wined3d_rendertarget_view_get_surface(rts[0])->container);
|
||||
else if (!context->render_offscreen)
|
||||
- return context_generate_rt_mask_from_resource(rts[0]->resource);
|
||||
+ return rts[0] ? context_generate_rt_mask_from_resource(rts[0]->resource) : 0;
|
||||
|
||||
rt_mask = ps ? ps->reg_maps.rt_mask : 1;
|
||||
rt_mask &= context->d3d_info->valid_rt_mask;
|
||||
--
|
||||
2.11.0
|
||||
|
||||
1
patches/wined3d-Render_Target/definition
Normal file
1
patches/wined3d-Render_Target/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: Fix crash when trying to rendering without render target
|
||||
Reference in New Issue
Block a user