Signed-off-by: Józef Kucia jkucia@codeweavers.com --- dlls/wined3d/adapter_gl.c | 2 +- dlls/wined3d/directx.c | 2 +- dlls/wined3d/glsl_shader.c | 4 +++- dlls/wined3d/state.c | 6 ++++-- dlls/wined3d/wined3d_private.h | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index 59d035e0ab07..d88236e5d47b 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -3722,7 +3722,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter,
d3d_info->viewport_array_index_any_shader = !!gl_info->supported[ARB_SHADER_VIEWPORT_LAYER_ARRAY];
- adapter->vertex_pipe->vp_get_caps(gl_info, &vertex_caps); + adapter->vertex_pipe->vp_get_caps(adapter, &vertex_caps); d3d_info->xyzrhw = vertex_caps.xyzrhw; d3d_info->ffp_generic_attributes = vertex_caps.ffp_generic_attributes; d3d_info->limits.ffp_vertex_blend_matrices = vertex_caps.max_vertex_blend_matrices; diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index d23691b4cc8e..a3a8486200bc 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -1969,7 +1969,7 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, unsigned in
adapter->shader_backend->shader_get_caps(adapter, &shader_caps); adapter->fragment_pipe->get_caps(gl_info, &fragment_caps); - adapter->vertex_pipe->vp_get_caps(gl_info, &vertex_caps); + adapter->vertex_pipe->vp_get_caps(adapter, &vertex_caps);
/* Add shader misc caps. Only some of them belong to the shader parts of the pipeline */ caps->PrimitiveMiscCaps |= fragment_caps.PrimitiveMiscCaps; diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 9ec570b900c4..c5182c39cb8f 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -11676,8 +11676,10 @@ const struct wined3d_shader_backend_ops glsl_shader_backend =
static void glsl_vertex_pipe_vp_enable(const struct wined3d_gl_info *gl_info, BOOL enable) {}
-static void glsl_vertex_pipe_vp_get_caps(const struct wined3d_gl_info *gl_info, struct wined3d_vertex_caps *caps) +static void glsl_vertex_pipe_vp_get_caps(const struct wined3d_adapter *adapter, struct wined3d_vertex_caps *caps) { + const struct wined3d_gl_info *gl_info = &adapter->gl_info; + caps->xyzrhw = TRUE; caps->emulated_flatshading = !needs_legacy_glsl_syntax(gl_info); caps->ffp_generic_attributes = TRUE; diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index fcad10f7a19b..98be4cfff908 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -5200,8 +5200,10 @@ static void *ffp_alloc(const struct wined3d_shader_backend_ops *shader_backend,
static void ffp_free(struct wined3d_device *device, struct wined3d_context *context) {}
-static void vp_ffp_get_caps(const struct wined3d_gl_info *gl_info, struct wined3d_vertex_caps *caps) +static void vp_ffp_get_caps(const struct wined3d_adapter *adapter, struct wined3d_vertex_caps *caps) { + const struct wined3d_gl_info *gl_info = &adapter->gl_info; + caps->xyzrhw = FALSE; caps->ffp_generic_attributes = FALSE; caps->max_active_lights = gl_info->limits.lights; @@ -5318,7 +5320,7 @@ static void *none_alloc(const struct wined3d_shader_backend_ops *shader_backend,
static void none_free(struct wined3d_device *device, struct wined3d_context *context) {}
-static void vp_none_get_caps(const struct wined3d_gl_info *gl_info, struct wined3d_vertex_caps *caps) +static void vp_none_get_caps(const struct wined3d_adapter *adapter, struct wined3d_vertex_caps *caps) { memset(caps, 0, sizeof(*caps)); } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 1b89affd030d..253b3950ea7c 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2087,7 +2087,7 @@ struct wined3d_vertex_caps struct wined3d_vertex_pipe_ops { void (*vp_enable)(const struct wined3d_gl_info *gl_info, BOOL enable); - void (*vp_get_caps)(const struct wined3d_gl_info *gl_info, struct wined3d_vertex_caps *caps); + void (*vp_get_caps)(const struct wined3d_adapter *adapter, struct wined3d_vertex_caps *caps); DWORD (*vp_get_emul_mask)(const struct wined3d_gl_info *gl_info); void *(*vp_alloc)(const struct wined3d_shader_backend_ops *shader_backend, void *shader_priv); void (*vp_free)(struct wined3d_device *device, struct wined3d_context *context);