Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- dlls/wined3d/adapter_gl.c | 1 + dlls/wined3d/utils.c | 8 +++++--- dlls/wined3d/wined3d_private.h | 1 + 3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index abfa31b324a..52fd6851f82 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -3796,6 +3796,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter, d3d_info->texture_swizzle = !!gl_info->supported[ARB_TEXTURE_SWIZZLE]; d3d_info->srgb_read_control = !!gl_info->supported[EXT_TEXTURE_SRGB_DECODE]; d3d_info->srgb_write_control = !!gl_info->supported[ARB_FRAMEBUFFER_SRGB]; + d3d_info->clip_control = !!gl_info->supported[ARB_CLIP_CONTROL];
if (gl_info->supported[ARB_TEXTURE_MULTISAMPLE]) d3d_info->multisample_draw_location = WINED3D_LOCATION_TEXTURE_RGB; diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 1e99deb079d..31eca98665f 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -5392,8 +5392,8 @@ void get_modelview_matrix(const struct wined3d_context *context, const struct wi void get_projection_matrix(const struct wined3d_context *context, const struct wined3d_state *state, struct wined3d_matrix *mat) { - BOOL clip_control = context->gl_info->supported[ARB_CLIP_CONTROL]; - BOOL flip = !clip_control && context->render_offscreen; + const struct wined3d_d3d_info *d3d_info = context->d3d_info; + BOOL clip_control, flip; float center_offset;
/* There are a couple of additional things we have to take into account @@ -5411,7 +5411,9 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w * driver, but small enough to prevent it from interfering with any * anti-aliasing. */
- if (!clip_control && context->d3d_info->wined3d_creation_flags & WINED3D_PIXEL_CENTER_INTEGER) + clip_control = d3d_info->clip_control; + flip = !clip_control && context->render_offscreen; + if (!clip_control && d3d_info->wined3d_creation_flags & WINED3D_PIXEL_CENTER_INTEGER) center_offset = 63.0f / 64.0f; else center_offset = -1.0f / 64.0f; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index a21721a675e..76a938a3e8c 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -214,6 +214,7 @@ struct wined3d_d3d_info uint32_t texture_swizzle : 1; uint32_t srgb_read_control : 1; uint32_t srgb_write_control : 1; + uint32_t clip_control : 1; enum wined3d_feature_level feature_level;
DWORD multisample_draw_location;