struct pipe_screen *screen = st_context(ctx)->pipe->screen;
struct st_sync_object *so = (struct st_sync_object*)obj;
- if (so->fence && screen->fence_finish(screen, so->fence, 0)) {
+ /* If the fence doesn't exist, assume it's signalled. */
+ if (!so->fence) {
+ so->b.StatusFlag = GL_TRUE;
+ return;
+ }
+
+ if (screen->fence_finish(screen, so->fence, 0)) {
screen->fence_reference(screen, &so->fence, NULL);
so->b.StatusFlag = GL_TRUE;
}
struct pipe_screen *screen = st_context(ctx)->pipe->screen;
struct st_sync_object *so = (struct st_sync_object*)obj;
+ /* If the fence doesn't exist, assume it's signalled. */
+ if (!so->fence) {
+ so->b.StatusFlag = GL_TRUE;
+ return;
+ }
+
/* We don't care about GL_SYNC_FLUSH_COMMANDS_BIT, because flush is
* already called when creating a fence. */