[PATCH 2/5] wined3d: Account for offscreen rendering in the pixel shader key only if vpos is used.

Matteo Bruni mbruni at codeweavers.com
Thu Oct 6 17:57:50 CDT 2016


Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
---
 dlls/wined3d/shader.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
index 594520c..4455416 100644
--- a/dlls/wined3d/shader.c
+++ b/dlls/wined3d/shader.c
@@ -3280,7 +3280,8 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
     if (d3d_info->emulated_flatshading)
         args->flatshading = state->render_states[WINED3D_RS_SHADEMODE] == WINED3D_SHADE_FLAT;
 
-    args->render_offscreen = gl_info->supported[ARB_FRAGMENT_COORD_CONVENTIONS] ? context->render_offscreen : 0;
+    args->render_offscreen = shader->reg_maps.vpos && gl_info->supported[ARB_FRAGMENT_COORD_CONVENTIONS]
+            ? context->render_offscreen : 0;
 }
 
 static HRESULT pixel_shader_init(struct wined3d_shader *shader, struct wined3d_device *device,
-- 
2.7.3




More information about the wine-patches mailing list