From c525cf381d9bb54454e04df24fde3bf5447cb537 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Mon, 21 Jan 2013 09:08:37 +0100 Subject: [PATCH] wined3d: Move "vs_clipping" to the shader caps. --- dlls/wined3d/arb_program_shader.c | 4 +++- dlls/wined3d/device.c | 2 +- dlls/wined3d/glsl_shader.c | 2 +- dlls/wined3d/shader.c | 2 +- dlls/wined3d/wined3d_private.h | 4 +++- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index f502260105c..0d0db64e853 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -5062,7 +5062,9 @@ static void shader_arb_get_caps(const struct wined3d_gl_info *gl_info, struct sh caps->ps_1x_max_value = 0.0f; } - caps->vs_clipping = use_nv_clip(gl_info); + caps->wined3d_caps = 0; + if (use_nv_clip(gl_info)) + caps->wined3d_caps |= WINED3D_SHADER_CAP_VS_CLIPPING; } static BOOL shader_arb_color_fixup_supported(struct color_fixup_desc fixup) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 984fa3b343c..cedb39e292d 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -5659,7 +5659,7 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d, device->ps_version = shader_caps.ps_version; device->d3d_vshader_constantF = shader_caps.vs_uniform_count; device->d3d_pshader_constantF = shader_caps.ps_uniform_count; - device->vs_clipping = shader_caps.vs_clipping; + device->vs_clipping = shader_caps.wined3d_caps & WINED3D_SHADER_CAP_VS_CLIPPING; fragment_pipeline = adapter->fragment_pipe; fragment_pipeline->get_caps(&adapter->gl_info, &ffp_caps); diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 3b473588b32..a9ca2cdfef8 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -6205,7 +6205,7 @@ static void shader_glsl_get_caps(const struct wined3d_gl_info *gl_info, struct s */ caps->ps_1x_max_value = 8.0; - caps->vs_clipping = TRUE; + caps->wined3d_caps = WINED3D_SHADER_CAP_VS_CLIPPING; } static BOOL shader_glsl_color_fixup_supported(struct color_fixup_desc fixup) diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index 596066f15ca..2bb5f21aed5 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -1549,7 +1549,7 @@ static void shader_none_get_caps(const struct wined3d_gl_info *gl_info, struct s caps->vs_uniform_count = 0; caps->ps_uniform_count = 0; caps->ps_1x_max_value = 0.0f; - caps->vs_clipping = FALSE; + caps->wined3d_caps = 0; } static BOOL shader_none_color_fixup_supported(struct color_fixup_desc fixup) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index b1688d189c9..f59a736d7fe 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -714,6 +714,8 @@ extern const struct wined3d_shader_frontend sm4_shader_frontend DECLSPEC_HIDDEN; typedef void (*SHADER_HANDLER)(const struct wined3d_shader_instruction *); +#define WINED3D_SHADER_CAP_VS_CLIPPING 0x00000001 + struct shader_caps { UINT vs_version; @@ -724,7 +726,7 @@ struct shader_caps DWORD ps_uniform_count; float ps_1x_max_value; - BOOL vs_clipping; + DWORD wined3d_caps; }; enum tex_types