Commit 0d79d362 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

wined3d: Move validate_material_colour_source() to wined3d_private.h.

parent ae2696c9
...@@ -6378,16 +6378,6 @@ int wined3d_ffp_frag_program_key_compare(const void *key, const struct wine_rb_e ...@@ -6378,16 +6378,6 @@ int wined3d_ffp_frag_program_key_compare(const void *key, const struct wine_rb_e
return memcmp(ka, kb, sizeof(*ka)); return memcmp(ka, kb, sizeof(*ka));
} }
static enum wined3d_material_color_source validate_material_colour_source(WORD use_map,
enum wined3d_material_color_source source)
{
if (source == WINED3D_MCS_COLOR1 && use_map & (1u << WINED3D_FFP_DIFFUSE))
return source;
if (source == WINED3D_MCS_COLOR2 && use_map & (1u << WINED3D_FFP_SPECULAR))
return source;
return WINED3D_MCS_MATERIAL;
}
void wined3d_ffp_get_vs_settings(const struct wined3d_context *context, void wined3d_ffp_get_vs_settings(const struct wined3d_context *context,
const struct wined3d_state *state, struct wined3d_ffp_vs_settings *settings) const struct wined3d_state *state, struct wined3d_ffp_vs_settings *settings)
{ {
......
...@@ -4840,6 +4840,16 @@ static inline void wined3d_not_from_cs(struct wined3d_cs *cs) ...@@ -4840,6 +4840,16 @@ static inline void wined3d_not_from_cs(struct wined3d_cs *cs)
assert(cs->thread_id != GetCurrentThreadId()); assert(cs->thread_id != GetCurrentThreadId());
} }
static inline enum wined3d_material_color_source validate_material_colour_source(WORD use_map,
enum wined3d_material_color_source source)
{
if (source == WINED3D_MCS_COLOR1 && use_map & (1u << WINED3D_FFP_DIFFUSE))
return source;
if (source == WINED3D_MCS_COLOR2 && use_map & (1u << WINED3D_FFP_SPECULAR))
return source;
return WINED3D_MCS_MATERIAL;
}
/* The WNDCLASS-Name for the fake window which we use to retrieve the GL capabilities */ /* The WNDCLASS-Name for the fake window which we use to retrieve the GL capabilities */
#define WINED3D_OPENGL_WINDOW_CLASS_NAME "WineD3D_OpenGL" #define WINED3D_OPENGL_WINDOW_CLASS_NAME "WineD3D_OpenGL"
......
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