[PATCH 5/5] wined3d: Move "vs_clipping" to the shader caps.
Henri Verbeet
hverbeet at codeweavers.com
Mon Jan 21 02:08:37 CST 2013
---
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 f502260..0d0db64 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 984fa3b..cedb39e 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 3b47358..a9ca2cd 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 596066f..2bb5f21 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 b1688d1..f59a736 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
--
1.7.12.4
More information about the wine-patches
mailing list