Commit 9502b8e8 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

wined3d: Pass wined3d_adapter to vp_get_caps().

parent 20a94e69
...@@ -3722,7 +3722,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter, ...@@ -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]; 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->xyzrhw = vertex_caps.xyzrhw;
d3d_info->ffp_generic_attributes = vertex_caps.ffp_generic_attributes; d3d_info->ffp_generic_attributes = vertex_caps.ffp_generic_attributes;
d3d_info->limits.ffp_vertex_blend_matrices = vertex_caps.max_vertex_blend_matrices; d3d_info->limits.ffp_vertex_blend_matrices = vertex_caps.max_vertex_blend_matrices;
......
...@@ -1969,7 +1969,7 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, unsigned in ...@@ -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->shader_backend->shader_get_caps(adapter, &shader_caps);
adapter->fragment_pipe->get_caps(gl_info, &fragment_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 */ /* Add shader misc caps. Only some of them belong to the shader parts of the pipeline */
caps->PrimitiveMiscCaps |= fragment_caps.PrimitiveMiscCaps; caps->PrimitiveMiscCaps |= fragment_caps.PrimitiveMiscCaps;
......
...@@ -11677,8 +11677,10 @@ const struct wined3d_shader_backend_ops glsl_shader_backend = ...@@ -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_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->xyzrhw = TRUE;
caps->emulated_flatshading = !needs_legacy_glsl_syntax(gl_info); caps->emulated_flatshading = !needs_legacy_glsl_syntax(gl_info);
caps->ffp_generic_attributes = TRUE; caps->ffp_generic_attributes = TRUE;
......
...@@ -5200,8 +5200,10 @@ static void *ffp_alloc(const struct wined3d_shader_backend_ops *shader_backend, ...@@ -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 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->xyzrhw = FALSE;
caps->ffp_generic_attributes = FALSE; caps->ffp_generic_attributes = FALSE;
caps->max_active_lights = gl_info->limits.lights; caps->max_active_lights = gl_info->limits.lights;
...@@ -5318,7 +5320,7 @@ static void *none_alloc(const struct wined3d_shader_backend_ops *shader_backend, ...@@ -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 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)); memset(caps, 0, sizeof(*caps));
} }
......
...@@ -2087,7 +2087,7 @@ struct wined3d_vertex_caps ...@@ -2087,7 +2087,7 @@ struct wined3d_vertex_caps
struct wined3d_vertex_pipe_ops struct wined3d_vertex_pipe_ops
{ {
void (*vp_enable)(const struct wined3d_gl_info *gl_info, BOOL enable); 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); 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_alloc)(const struct wined3d_shader_backend_ops *shader_backend, void *shader_priv);
void (*vp_free)(struct wined3d_device *device, struct wined3d_context *context); void (*vp_free)(struct wined3d_device *device, struct wined3d_context *context);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment