glsl: lower mediump partial derivatives
[mesa.git] / src / mesa / main / glthread.c
index b8e04c9f771893f415bced0c4cf8fe717d8edc37..dd557a026ccdd8f4079d548319af080abadcdc24 100644 (file)
@@ -89,6 +89,8 @@ _mesa_glthread_init(struct gl_context *ctx)
       util_queue_destroy(&glthread->queue);
       return;
    }
+
+   _mesa_glthread_reset_vao(&glthread->DefaultVAO);
    glthread->CurrentVAO = &glthread->DefaultVAO;
 
    ctx->MarshalExec = _mesa_create_marshal_table(ctx);
@@ -106,6 +108,18 @@ _mesa_glthread_init(struct gl_context *ctx)
 
    glthread->enabled = true;
    glthread->stats.queue = &glthread->queue;
+
+   glthread->SupportsBufferUploads =
+      ctx->Const.BufferCreateMapUnsynchronizedThreadSafe &&
+      ctx->Const.AllowMappedBuffersDuringExecution;
+
+   /* If the draw start index is non-zero, glthread can upload to offset 0,
+    * which means the attrib offset has to be -(first * stride).
+    * So require signed vertex buffer offsets.
+    */
+   glthread->SupportsNonVBOUploads = glthread->SupportsBufferUploads &&
+                                     ctx->Const.VertexBufferOffsetIsInt32;
+
    ctx->CurrentClientDispatch = ctx->MarshalExec;
 
    /* Execute the thread initialization function in the thread. */