Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/wined3d/device.c | 32 ++++++++++++++++---------------- dlls/wined3d/wined3d.spec | 16 ---------------- include/wine/wined3d.h | 28 ---------------------------- 3 files changed, 16 insertions(+), 60 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 441601efcb..43505e6ad3 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1314,7 +1314,7 @@ HRESULT CDECL wined3d_device_get_stream_source(const struct wined3d_device *devi return WINED3D_OK; }
-HRESULT CDECL wined3d_device_set_stream_source_freq(struct wined3d_device *device, UINT stream_idx, UINT divider) +static HRESULT wined3d_device_set_stream_source_freq(struct wined3d_device *device, UINT stream_idx, UINT divider) { struct wined3d_stream_state *stream; UINT old_flags, old_freq; @@ -1350,7 +1350,7 @@ HRESULT CDECL wined3d_device_set_stream_source_freq(struct wined3d_device *devic return WINED3D_OK; }
-void CDECL wined3d_device_set_transform(struct wined3d_device *device, +static void wined3d_device_set_transform(struct wined3d_device *device, enum wined3d_transform_state d3dts, const struct wined3d_matrix *matrix) { TRACE("device %p, state %s, matrix %p.\n", @@ -1376,7 +1376,7 @@ void CDECL wined3d_device_set_transform(struct wined3d_device *device, wined3d_cs_emit_set_transform(device->cs, d3dts, matrix); }
-void CDECL wined3d_device_get_transform(const struct wined3d_device *device, +static void wined3d_device_get_transform(const struct wined3d_device *device, enum wined3d_transform_state state, struct wined3d_matrix *matrix) { TRACE("device %p, state %s, matrix %p.\n", device, debug_d3dtstype(state), matrix); @@ -1391,7 +1391,7 @@ void CDECL wined3d_device_get_transform(const struct wined3d_device *device, * stateblock problems. When capturing the state block, I duplicate the * hashmap, but when recording, just build a chain pretty much of commands to * be replayed. */ -HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device, +static HRESULT wined3d_device_set_light(struct wined3d_device *device, UINT light_idx, const struct wined3d_light *light) { struct wined3d_light_info *object = NULL; @@ -1523,7 +1523,7 @@ HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device, return WINED3D_OK; }
-HRESULT CDECL wined3d_device_set_light_enable(struct wined3d_device *device, UINT light_idx, BOOL enable) +static HRESULT wined3d_device_set_light_enable(struct wined3d_device *device, UINT light_idx, BOOL enable) { struct wined3d_light_info *light_info;
@@ -1548,7 +1548,7 @@ HRESULT CDECL wined3d_device_set_light_enable(struct wined3d_device *device, UIN return WINED3D_OK; }
-HRESULT CDECL wined3d_device_set_clip_plane(struct wined3d_device *device, +static HRESULT wined3d_device_set_clip_plane(struct wined3d_device *device, UINT plane_idx, const struct wined3d_vec4 *plane) { TRACE("device %p, plane_idx %u, plane %p.\n", device, plane_idx, plane); @@ -1594,7 +1594,7 @@ HRESULT CDECL wined3d_device_get_clip_status(const struct wined3d_device *device return WINED3D_OK; }
-void CDECL wined3d_device_set_material(struct wined3d_device *device, const struct wined3d_material *material) +static void wined3d_device_set_material(struct wined3d_device *device, const struct wined3d_material *material) { TRACE("device %p, material %p.\n", device, material);
@@ -1793,7 +1793,7 @@ DWORD CDECL wined3d_device_get_render_state(const struct wined3d_device *device, return device->state.render_states[state]; }
-void CDECL wined3d_device_set_sampler_state(struct wined3d_device *device, +static void wined3d_device_set_sampler_state(struct wined3d_device *device, UINT sampler_idx, enum wined3d_sampler_state state, DWORD value) { TRACE("device %p, sampler_idx %u, state %s, value %#x.\n", @@ -2060,7 +2060,7 @@ struct wined3d_sampler * CDECL wined3d_device_get_vs_sampler(const struct wined3 return wined3d_device_get_sampler(device, WINED3D_SHADER_TYPE_VERTEX, idx); }
-HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device, +static HRESULT wined3d_device_set_vs_consts_b(struct wined3d_device *device, unsigned int start_idx, unsigned int count, const BOOL *constants) { unsigned int i; @@ -2086,7 +2086,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device, return WINED3D_OK; }
-HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device, +static HRESULT wined3d_device_set_vs_consts_i(struct wined3d_device *device, unsigned int start_idx, unsigned int count, const struct wined3d_ivec4 *constants) { unsigned int i; @@ -2112,7 +2112,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device, return WINED3D_OK; }
-HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device, +static HRESULT wined3d_device_set_vs_consts_f(struct wined3d_device *device, unsigned int start_idx, unsigned int count, const struct wined3d_vec4 *constants) { const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info; @@ -2191,7 +2191,7 @@ struct wined3d_sampler * CDECL wined3d_device_get_ps_sampler(const struct wined3 return wined3d_device_get_sampler(device, WINED3D_SHADER_TYPE_PIXEL, idx); }
-HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device, +static HRESULT wined3d_device_set_ps_consts_b(struct wined3d_device *device, unsigned int start_idx, unsigned int count, const BOOL *constants) { unsigned int i; @@ -2217,7 +2217,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device, return WINED3D_OK; }
-HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device, +static HRESULT wined3d_device_set_ps_consts_i(struct wined3d_device *device, unsigned int start_idx, unsigned int count, const struct wined3d_ivec4 *constants) { unsigned int i; @@ -2243,7 +2243,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device, return WINED3D_OK; }
-HRESULT CDECL wined3d_device_set_ps_consts_f(struct wined3d_device *device, +static HRESULT wined3d_device_set_ps_consts_f(struct wined3d_device *device, unsigned int start_idx, unsigned int count, const struct wined3d_vec4 *constants) { const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info; @@ -3512,7 +3512,7 @@ HRESULT CDECL wined3d_device_process_vertices(struct wined3d_device *device, return hr; }
-void CDECL wined3d_device_set_texture_stage_state(struct wined3d_device *device, +static void wined3d_device_set_texture_stage_state(struct wined3d_device *device, UINT stage, enum wined3d_texture_stage_state state, DWORD value) { const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info; @@ -3544,7 +3544,7 @@ void CDECL wined3d_device_set_texture_stage_state(struct wined3d_device *device, wined3d_cs_emit_set_texture_state(device->cs, stage, state, value); }
-void CDECL wined3d_device_set_texture(struct wined3d_device *device, +static void wined3d_device_set_texture(struct wined3d_device *device, UINT stage, struct wined3d_texture *texture) { struct wined3d_texture *prev; diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index c891c44608..05aa53dea0 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -101,7 +101,6 @@ @ cdecl wined3d_device_get_stream_source(ptr long ptr ptr ptr) @ cdecl wined3d_device_get_swapchain(ptr long) @ cdecl wined3d_device_get_swapchain_count(ptr) -@ cdecl wined3d_device_get_transform(ptr long ptr) @ cdecl wined3d_device_get_unordered_access_view(ptr long) @ cdecl wined3d_device_get_vertex_declaration(ptr) @ cdecl wined3d_device_get_vertex_shader(ptr) @@ -116,7 +115,6 @@ @ cdecl wined3d_device_resolve_sub_resource(ptr ptr long ptr long long) @ cdecl wined3d_device_set_base_vertex_index(ptr long) @ cdecl wined3d_device_set_blend_state(ptr ptr ptr) -@ cdecl wined3d_device_set_clip_plane(ptr long ptr) @ cdecl wined3d_device_set_clip_status(ptr ptr) @ cdecl wined3d_device_set_compute_shader(ptr ptr) @ cdecl wined3d_device_set_constant_buffer(ptr long long ptr) @@ -138,39 +136,25 @@ @ cdecl wined3d_device_set_hs_sampler(ptr long ptr) @ cdecl wined3d_device_set_hull_shader(ptr ptr) @ cdecl wined3d_device_set_index_buffer(ptr ptr long long) -@ cdecl wined3d_device_set_light(ptr long ptr) -@ cdecl wined3d_device_set_light_enable(ptr long long) -@ cdecl wined3d_device_set_material(ptr ptr) @ cdecl wined3d_device_set_max_frame_latency(ptr long) @ cdecl wined3d_device_set_multithreaded(ptr) @ cdecl wined3d_device_set_npatch_mode(ptr float) @ cdecl wined3d_device_set_pixel_shader(ptr ptr) @ cdecl wined3d_device_set_predication(ptr ptr long) @ cdecl wined3d_device_set_primitive_type(ptr long long) -@ cdecl wined3d_device_set_ps_consts_b(ptr long long ptr) -@ cdecl wined3d_device_set_ps_consts_f(ptr long long ptr) -@ cdecl wined3d_device_set_ps_consts_i(ptr long long ptr) @ cdecl wined3d_device_set_ps_resource_view(ptr long ptr) @ cdecl wined3d_device_set_ps_sampler(ptr long ptr) @ cdecl wined3d_device_set_rasterizer_state(ptr ptr) @ cdecl wined3d_device_set_render_state(ptr long long) @ cdecl wined3d_device_set_rendertarget_view(ptr long ptr long) -@ cdecl wined3d_device_set_sampler_state(ptr long long long) @ cdecl wined3d_device_set_scissor_rects(ptr long ptr) @ cdecl wined3d_device_set_software_vertex_processing(ptr long) @ cdecl wined3d_device_set_stream_output(ptr long ptr long) @ cdecl wined3d_device_set_stream_source(ptr long ptr long long) -@ cdecl wined3d_device_set_stream_source_freq(ptr long long) -@ cdecl wined3d_device_set_texture(ptr long ptr) -@ cdecl wined3d_device_set_texture_stage_state(ptr long long long) -@ cdecl wined3d_device_set_transform(ptr long ptr) @ cdecl wined3d_device_set_unordered_access_view(ptr long ptr long) @ cdecl wined3d_device_set_vertex_declaration(ptr ptr) @ cdecl wined3d_device_set_vertex_shader(ptr ptr) @ cdecl wined3d_device_set_viewports(ptr long ptr) -@ cdecl wined3d_device_set_vs_consts_b(ptr long long ptr) -@ cdecl wined3d_device_set_vs_consts_f(ptr long long ptr) -@ cdecl wined3d_device_set_vs_consts_i(ptr long long ptr) @ cdecl wined3d_device_set_vs_resource_view(ptr long ptr) @ cdecl wined3d_device_set_vs_sampler(ptr long ptr) @ cdecl wined3d_device_show_cursor(ptr long) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index b724424bce..a2a5fb8191 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2398,8 +2398,6 @@ HRESULT __cdecl wined3d_device_get_stream_source(const struct wined3d_device *de struct wined3d_swapchain * __cdecl wined3d_device_get_swapchain(const struct wined3d_device *device, UINT swapchain_idx); UINT __cdecl wined3d_device_get_swapchain_count(const struct wined3d_device *device); -void __cdecl wined3d_device_get_transform(const struct wined3d_device *device, - enum wined3d_transform_state state, struct wined3d_matrix *matrix); struct wined3d_unordered_access_view * __cdecl wined3d_device_get_unordered_access_view( const struct wined3d_device *device, unsigned int idx); struct wined3d_vertex_declaration * __cdecl wined3d_device_get_vertex_declaration(const struct wined3d_device *device); @@ -2425,8 +2423,6 @@ void __cdecl wined3d_device_resolve_sub_resource(struct wined3d_device *device, void __cdecl wined3d_device_set_base_vertex_index(struct wined3d_device *device, INT base_index); void __cdecl wined3d_device_set_blend_state(struct wined3d_device *device, struct wined3d_blend_state *blend_state, const struct wined3d_color *blend_factor); -HRESULT __cdecl wined3d_device_set_clip_plane(struct wined3d_device *device, - UINT plane_idx, const struct wined3d_vec4 *plane); HRESULT __cdecl wined3d_device_set_clip_status(struct wined3d_device *device, const struct wined3d_clip_status *clip_status); void __cdecl wined3d_device_set_compute_shader(struct wined3d_device *device, struct wined3d_shader *shader); @@ -2463,10 +2459,6 @@ void __cdecl wined3d_device_set_hs_sampler(struct wined3d_device *device, void __cdecl wined3d_device_set_hull_shader(struct wined3d_device *device, struct wined3d_shader *shader); void __cdecl wined3d_device_set_index_buffer(struct wined3d_device *device, struct wined3d_buffer *index_buffer, enum wined3d_format_id format_id, unsigned int offset); -HRESULT __cdecl wined3d_device_set_light(struct wined3d_device *device, - UINT light_idx, const struct wined3d_light *light); -HRESULT __cdecl wined3d_device_set_light_enable(struct wined3d_device *device, UINT light_idx, BOOL enable); -void __cdecl wined3d_device_set_material(struct wined3d_device *device, const struct wined3d_material *material); void __cdecl wined3d_device_set_max_frame_latency(struct wined3d_device *device, unsigned int max_frame_latency); void __cdecl wined3d_device_set_multithreaded(struct wined3d_device *device); HRESULT __cdecl wined3d_device_set_npatch_mode(struct wined3d_device *device, float segments); @@ -2475,12 +2467,6 @@ void __cdecl wined3d_device_set_predication(struct wined3d_device *device, struct wined3d_query *predicate, BOOL value); void __cdecl wined3d_device_set_primitive_type(struct wined3d_device *device, enum wined3d_primitive_type primitive_topology, unsigned int patch_vertex_count); -HRESULT __cdecl wined3d_device_set_ps_consts_b(struct wined3d_device *device, - unsigned int start_idx, unsigned int count, const BOOL *constants); -HRESULT __cdecl wined3d_device_set_ps_consts_f(struct wined3d_device *device, - unsigned int start_idx, unsigned int count, const struct wined3d_vec4 *constants); -HRESULT __cdecl wined3d_device_set_ps_consts_i(struct wined3d_device *device, - unsigned int start_idx, unsigned int count, const struct wined3d_ivec4 *constants); void __cdecl wined3d_device_set_ps_resource_view(struct wined3d_device *device, UINT idx, struct wined3d_shader_resource_view *view); void __cdecl wined3d_device_set_ps_sampler(struct wined3d_device *device, UINT idx, struct wined3d_sampler *sampler); @@ -2490,8 +2476,6 @@ void __cdecl wined3d_device_set_render_state(struct wined3d_device *device, enum wined3d_render_state state, DWORD value); HRESULT __cdecl wined3d_device_set_rendertarget_view(struct wined3d_device *device, unsigned int view_idx, struct wined3d_rendertarget_view *view, BOOL set_viewport); -void __cdecl wined3d_device_set_sampler_state(struct wined3d_device *device, - UINT sampler_idx, enum wined3d_sampler_state state, DWORD value); void __cdecl wined3d_device_set_scissor_rects(struct wined3d_device *device, unsigned int rect_count, const RECT *rect); void __cdecl wined3d_device_set_software_vertex_processing(struct wined3d_device *device, BOOL software); @@ -2499,12 +2483,6 @@ void __cdecl wined3d_device_set_stream_output(struct wined3d_device *device, UIN struct wined3d_buffer *buffer, UINT offset); HRESULT __cdecl wined3d_device_set_stream_source(struct wined3d_device *device, UINT stream_idx, struct wined3d_buffer *buffer, UINT offset, UINT stride); -HRESULT __cdecl wined3d_device_set_stream_source_freq(struct wined3d_device *device, UINT stream_idx, UINT divider); -void __cdecl wined3d_device_set_texture(struct wined3d_device *device, UINT stage, struct wined3d_texture *texture); -void __cdecl wined3d_device_set_texture_stage_state(struct wined3d_device *device, - UINT stage, enum wined3d_texture_stage_state state, DWORD value); -void __cdecl wined3d_device_set_transform(struct wined3d_device *device, - enum wined3d_transform_state state, const struct wined3d_matrix *matrix); void __cdecl wined3d_device_set_unordered_access_view(struct wined3d_device *device, unsigned int idx, struct wined3d_unordered_access_view *uav, unsigned int initial_count); void __cdecl wined3d_device_set_vertex_declaration(struct wined3d_device *device, @@ -2512,12 +2490,6 @@ void __cdecl wined3d_device_set_vertex_declaration(struct wined3d_device *device void __cdecl wined3d_device_set_vertex_shader(struct wined3d_device *device, struct wined3d_shader *shader); void __cdecl wined3d_device_set_viewports(struct wined3d_device *device, unsigned int viewport_count, const struct wined3d_viewport *viewports); -HRESULT __cdecl wined3d_device_set_vs_consts_b(struct wined3d_device *device, - unsigned int start_idx, unsigned int count, const BOOL *constants); -HRESULT __cdecl wined3d_device_set_vs_consts_f(struct wined3d_device *device, - unsigned int start_idx, unsigned int count, const struct wined3d_vec4 *constants); -HRESULT __cdecl wined3d_device_set_vs_consts_i(struct wined3d_device *device, - unsigned int start_idx, unsigned int count, const struct wined3d_ivec4 *constants); void __cdecl wined3d_device_set_vs_resource_view(struct wined3d_device *device, UINT idx, struct wined3d_shader_resource_view *view); void __cdecl wined3d_device_set_vs_sampler(struct wined3d_device *device, UINT idx, struct wined3d_sampler *sampler);
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/wined3d/device.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 43505e6ad3..f58552a53d 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1314,30 +1314,13 @@ HRESULT CDECL wined3d_device_get_stream_source(const struct wined3d_device *devi return WINED3D_OK; }
-static HRESULT wined3d_device_set_stream_source_freq(struct wined3d_device *device, UINT stream_idx, UINT divider) +static void wined3d_device_set_stream_source_freq(struct wined3d_device *device, UINT stream_idx, UINT divider) { struct wined3d_stream_state *stream; UINT old_flags, old_freq;
TRACE("device %p, stream_idx %u, divider %#x.\n", device, stream_idx, divider);
- /* Verify input. At least in d3d9 this is invalid. */ - if ((divider & WINED3DSTREAMSOURCE_INSTANCEDATA) && (divider & WINED3DSTREAMSOURCE_INDEXEDDATA)) - { - WARN("INSTANCEDATA and INDEXEDDATA were set, returning D3DERR_INVALIDCALL.\n"); - return WINED3DERR_INVALIDCALL; - } - if ((divider & WINED3DSTREAMSOURCE_INSTANCEDATA) && !stream_idx) - { - WARN("INSTANCEDATA used on stream 0, returning D3DERR_INVALIDCALL.\n"); - return WINED3DERR_INVALIDCALL; - } - if (!divider) - { - WARN("Divider is 0, returning D3DERR_INVALIDCALL.\n"); - return WINED3DERR_INVALIDCALL; - } - stream = &device->state.streams[stream_idx]; old_flags = stream->flags; old_freq = stream->frequency; @@ -1346,8 +1329,6 @@ static HRESULT wined3d_device_set_stream_source_freq(struct wined3d_device *devi stream->frequency = divider & 0x7fffff; if (stream->frequency != old_freq || stream->flags != old_flags) wined3d_cs_emit_set_stream_source_freq(device->cs, stream_idx, stream->frequency, stream->flags); - - return WINED3D_OK; }
static void wined3d_device_set_transform(struct wined3d_device *device,
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/wined3d/device.c | 38 +++----------------------------------- 1 file changed, 3 insertions(+), 35 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index f58552a53d..567c2e8e64 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1372,46 +1372,16 @@ static void wined3d_device_get_transform(const struct wined3d_device *device, * stateblock problems. When capturing the state block, I duplicate the * hashmap, but when recording, just build a chain pretty much of commands to * be replayed. */ -static HRESULT wined3d_device_set_light(struct wined3d_device *device, +static void wined3d_device_set_light(struct wined3d_device *device, UINT light_idx, const struct wined3d_light *light) { struct wined3d_light_info *object = NULL; - HRESULT hr; float rho;
TRACE("device %p, light_idx %u, light %p.\n", device, light_idx, light);
- /* Check the parameter range. Need for speed most wanted sets junk lights - * which confuse the GL driver. */ - if (!light) - return WINED3DERR_INVALIDCALL; - - switch (light->type) - { - case WINED3D_LIGHT_POINT: - case WINED3D_LIGHT_SPOT: - case WINED3D_LIGHT_GLSPOT: - /* Incorrect attenuation values can cause the gl driver to crash. - * Happens with Need for speed most wanted. */ - if (light->attenuation0 < 0.0f || light->attenuation1 < 0.0f || light->attenuation2 < 0.0f) - { - WARN("Attenuation is negative, returning WINED3DERR_INVALIDCALL.\n"); - return WINED3DERR_INVALIDCALL; - } - break; - - case WINED3D_LIGHT_DIRECTIONAL: - case WINED3D_LIGHT_PARALLELPOINT: - /* Ignores attenuation */ - break; - - default: - WARN("Light type out of range, returning WINED3DERR_INVALIDCALL\n"); - return WINED3DERR_INVALIDCALL; - } - - if (FAILED(hr = wined3d_light_state_set_light(&device->state.light_state, light_idx, light, &object))) - return hr; + if (FAILED(wined3d_light_state_set_light(&device->state.light_state, light_idx, light, &object))) + return;
/* Initialize the object. */ TRACE("Light %u setting to type %#x, diffuse %s, specular %s, ambient %s, " @@ -1500,8 +1470,6 @@ static HRESULT wined3d_device_set_light(struct wined3d_device *device, }
wined3d_cs_emit_set_light(device->cs, object); - - return WINED3D_OK; }
static HRESULT wined3d_device_set_light_enable(struct wined3d_device *device, UINT light_idx, BOOL enable)
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/wined3d/device.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 567c2e8e64..4224472df5 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1472,7 +1472,7 @@ static void wined3d_device_set_light(struct wined3d_device *device, wined3d_cs_emit_set_light(device->cs, object); }
-static HRESULT wined3d_device_set_light_enable(struct wined3d_device *device, UINT light_idx, BOOL enable) +static void wined3d_device_set_light_enable(struct wined3d_device *device, UINT light_idx, BOOL enable) { struct wined3d_light_info *light_info;
@@ -1487,14 +1487,12 @@ static HRESULT wined3d_device_set_light_enable(struct wined3d_device *device, UI if (!(light_info = wined3d_light_state_get_light(&device->state.light_state, light_idx))) { FIXME("Adding default lights has failed dismally\n"); - return WINED3DERR_INVALIDCALL; + return; } }
wined3d_light_state_enable_light(&device->state.light_state, &device->adapter->d3d_info, light_info, enable); wined3d_cs_emit_set_light_enable(device->cs, light_idx, enable); - - return WINED3D_OK; }
static HRESULT wined3d_device_set_clip_plane(struct wined3d_device *device,
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/wined3d/device.c | 6 ------ 1 file changed, 6 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 4224472df5..768f4bfed5 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1749,12 +1749,6 @@ static void wined3d_device_set_sampler_state(struct wined3d_device *device, if (sampler_idx >= WINED3DVERTEXTEXTURESAMPLER0 && sampler_idx <= WINED3DVERTEXTEXTURESAMPLER3) sampler_idx -= (WINED3DVERTEXTEXTURESAMPLER0 - WINED3D_MAX_FRAGMENT_SAMPLERS);
- if (sampler_idx >= ARRAY_SIZE(device->state.sampler_states)) - { - WARN("Invalid sampler %u.\n", sampler_idx); - return; /* Windows accepts overflowing this array ... we do not. */ - } - if (value == device->state.sampler_states[sampler_idx][state]) { TRACE("Application is setting the old value over, nothing to do.\n");
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com