Module: wine Branch: master Commit: 9502b8e843cf3589f7d2786a5d7e21a4f8ecc289 URL: https://source.winehq.org/git/wine.git/?a=commit;h=9502b8e843cf3589f7d2786a5...
Author: Józef Kucia jkucia@codeweavers.com Date: Fri Mar 29 13:00:14 2019 +0100
wined3d: Pass wined3d_adapter to vp_get_caps().
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/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 59d035e..d88236e 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 d23691b..a3a8486 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 603ccc6..5c0d9ae 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -11677,8 +11677,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 fcad10f..98be4cf 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 1b89aff..253b395 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);