wined3d: Clear caps to zero in shader caps query functions.

This commit is contained in:
Elizabeth Figura 2024-10-02 15:48:39 -05:00 committed by Alexandre Julliard
parent f588fec26c
commit 96c37c23f6
Notes: Alexandre Julliard 2024-11-13 22:30:11 +01:00
Approved-by: Jan Sikorski (@jsikorski)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/wine/merge_requests/6756
2 changed files with 6 additions and 0 deletions

View file

@ -11402,6 +11402,8 @@ static void shader_glsl_get_caps(const struct wined3d_adapter *adapter, struct s
TRACE("Shader model %u.\n", shader_model);
memset(caps, 0, sizeof(*caps));
caps->vs_version = min(wined3d_settings.max_sm_vs, shader_model);
caps->hs_version = min(wined3d_settings.max_sm_hs, shader_model);
caps->ds_version = min(wined3d_settings.max_sm_ds, shader_model);
@ -11743,6 +11745,8 @@ static void glsl_vertex_pipe_vp_get_caps(const struct wined3d_adapter *adapter,
{
const struct wined3d_gl_info *gl_info = &wined3d_adapter_gl_const(adapter)->gl_info;
memset(caps, 0, sizeof(*caps));
caps->emulated_flatshading = !needs_legacy_glsl_syntax(gl_info);
caps->max_active_lights = WINED3D_MAX_ACTIVE_LIGHTS;
caps->max_vertex_blend_matrices = MAX_VERTEX_BLENDS;

View file

@ -1065,6 +1065,8 @@ static void shader_spirv_init_context_state(struct wined3d_context *context)
static void shader_spirv_get_caps(const struct wined3d_adapter *adapter, struct shader_caps *caps)
{
memset(caps, 0, sizeof(*caps));
caps->vs_version = min(wined3d_settings.max_sm_vs, 5);
caps->hs_version = min(wined3d_settings.max_sm_hs, 5);
caps->ds_version = min(wined3d_settings.max_sm_ds, 5);