diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index dddc4e63faa..ea7d60f73c4 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2887,12 +2887,12 @@ void CDECL wined3d_device_set_compute_shader(struct wined3d_device *device, stru TRACE("device %p, shader %p.\n", device, shader); - prev = device->update_state->shader[WINED3D_SHADER_TYPE_COMPUTE]; - if (device->recording || shader == prev) + prev = device->state.shader[WINED3D_SHADER_TYPE_COMPUTE]; + if (shader == prev) return; if (shader) wined3d_shader_incref(shader); - device->update_state->shader[WINED3D_SHADER_TYPE_COMPUTE] = shader; + device->state.shader[WINED3D_SHADER_TYPE_COMPUTE] = shader; wined3d_cs_emit_set_shader(device->cs, WINED3D_SHADER_TYPE_COMPUTE, shader); if (prev) wined3d_shader_decref(prev);