Module: wine Branch: master Commit: 9f85ec5082a55ac430ea548bacecdaf4997d425c URL: http://source.winehq.org/git/wine.git/?a=commit;h=9f85ec5082a55ac430ea548bac...
Author: Józef Kucia jkucia@codeweavers.com Date: Mon Oct 10 10:22:33 2016 +0200
wined3d: Get wined3d creation flags from d3d_info.
Signed-off-by: Józef Kucia jkucia@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/wined3d/glsl_shader.c | 6 +++--- dlls/wined3d/state.c | 4 ++-- dlls/wined3d/utils.c | 2 +- dlls/wined3d/wined3d_private.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 3d5e03f..4d9d9e7 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -1160,7 +1160,7 @@ static void shader_glsl_ffp_vertex_normalmatrix_uniform(const struct wined3d_con return;
get_modelview_matrix(context, state, 0, &mv); - if (context->device->wined3d->flags & WINED3D_LEGACY_FFP_LIGHTING) + if (context->d3d_info->wined3d_creation_flags & WINED3D_LEGACY_FFP_LIGHTING) invert_matrix_3d(&mv, &mv); else invert_matrix(&mv, &mv); @@ -2203,7 +2203,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont { if (gl_info->supported[ARB_FRAGMENT_COORD_CONVENTIONS]) { - if (shader->device->wined3d->flags & WINED3D_PIXEL_CENTER_INTEGER) + if (context->d3d_info->wined3d_creation_flags & WINED3D_PIXEL_CENTER_INTEGER) shader_addline(buffer, "layout(%spixel_center_integer) in vec4 gl_FragCoord;\n", ps_args->render_offscreen ? "" : "origin_upper_left, "); else if (!ps_args->render_offscreen) @@ -5948,7 +5948,7 @@ static GLuint shader_glsl_generate_pshader(const struct wined3d_context *context { if (gl_info->supported[ARB_FRAGMENT_COORD_CONVENTIONS]) shader_addline(buffer, "vpos = gl_FragCoord;\n"); - else if (shader->device->wined3d->flags & WINED3D_PIXEL_CENTER_INTEGER) + else if (context->d3d_info->wined3d_creation_flags & WINED3D_PIXEL_CENTER_INTEGER) shader_addline(buffer, "vpos = floor(vec4(0, ycorrection[0], 0, 0) + gl_FragCoord * vec4(1, ycorrection[1], 1, 1));\n"); else diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 71f47d6..9c1ddb0 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -1712,7 +1712,7 @@ static void state_depthbias(struct wined3d_context *context, const struct wined3 gl_info->gl_ops.gl.p_glEnable(GL_POLYGON_OFFSET_FILL); checkGLcall("glEnable(GL_POLYGON_OFFSET_FILL)");
- if (context->device->wined3d->flags & WINED3D_LEGACY_DEPTH_BIAS) + if (context->d3d_info->wined3d_creation_flags & WINED3D_LEGACY_DEPTH_BIAS) { float bias = -(float)const_bias.d; gl_info->gl_ops.gl.p_glPolygonOffset(bias, bias); @@ -4655,7 +4655,7 @@ static void viewport_miscpart_cc(struct wined3d_context *context, const struct wined3d_rendertarget_view *target = state->fb->render_targets[0]; /* See get_projection_matrix() in utils.c for a discussion about those * values. */ - float pixel_center_offset = context->device->wined3d->flags + float pixel_center_offset = context->d3d_info->wined3d_creation_flags & WINED3D_PIXEL_CENTER_INTEGER ? 63.0f / 128.0f : -1.0f / 128.0f; const struct wined3d_gl_info *gl_info = context->gl_info; struct wined3d_viewport vp = state->viewport; diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 2d86b51..2171611 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -4513,7 +4513,7 @@ 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->device->wined3d->flags & WINED3D_PIXEL_CENTER_INTEGER) + if (!clip_control && context->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 3887f91..45701cc 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3524,7 +3524,7 @@ static inline void shader_get_position_fixup(const struct wined3d_context *conte { float center_offset;
- if (context->device->wined3d->flags & WINED3D_PIXEL_CENTER_INTEGER) + if (context->d3d_info->wined3d_creation_flags & WINED3D_PIXEL_CENTER_INTEGER) center_offset = 63.0f / 64.0f; else center_offset = -1.0f / 64.0f;