From: Zebediah Figura zfigura@codeweavers.com
--- dlls/wined3d/stateblock.c | 3 +++ dlls/wined3d/wined3d_private.h | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index 6ce17311595..3972ba0abba 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -2207,6 +2207,9 @@ HRESULT CDECL wined3d_stateblock_create(struct wined3d_device *device, const str return hr; }
+ if (type == WINED3D_SBT_PRIMARY) + device->primary_stateblock = object; + TRACE("Created stateblock %p.\n", object); *stateblock = object;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 0b72bf298e2..3d75660ad05 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3005,11 +3005,12 @@ struct wined3d_device struct wined3d_sampler *default_sampler; struct wined3d_sampler *null_sampler;
- /* Command stream */ struct wined3d_cs *cs;
struct wined3d_buffer *push_constants[WINED3D_PUSH_CONSTANTS_COUNT];
+ struct wined3d_stateblock *primary_stateblock; + /* Context management */ struct wined3d_context **contexts; UINT context_count;