Signed-off-by: Paul Gofman gofmanp@gmail.com --- dlls/wined3d/device.c | 2 +- dlls/wined3d/wined3d_private.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 8405643741..7473b3118e 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3942,7 +3942,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device,
for (i = 0; i < ARRAY_SIZE(state->rs); ++i) { - if (stateblock->changed.renderState[i >> 5] & (1u << (i & 0x1f))) + if (wined3d_stateblock_rs_changed(stateblock, i)) { if (i == WINED3D_RS_BLENDFACTOR) { diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 0e1e55d52b..d0564eecbd 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -5327,6 +5327,11 @@ static inline void wined3d_viewport_get_z_range(const struct wined3d_viewport *v *max_z = max(vp->max_z, vp->min_z + 0.001f); }
+static inline BOOL wined3d_stateblock_rs_changed(const struct wined3d_stateblock *stateblock, DWORD state_id) +{ + return stateblock->changed.renderState[state_id >> 5] & (1u << (state_id & 0x1f)); +} + /* The WNDCLASS-Name for the fake window which we use to retrieve the GL capabilities */ #define WINED3D_OPENGL_WINDOW_CLASS_NAME "WineD3D_OpenGL"