On 18.12.2016 17:40, Axel Davy wrote:
On 18/12/2016 16:57, Nicolai Hähnle wrote:


I'm happy to be convinced otherwise if I missed something, but using
multiple contexts from different threads, or using Map/UnmapBuffer
from one context but sourcing the buffer from draw calls in another
context are all perfectly supported OpenGL use cases.
There is also the case of having persistent coherent buffer mapped with
one context, and used with another one.
If implementation of coherent requires driver flushes the range at draw
calls, I guess it may not work as is with the multi context scenerio
(looking at nouveau, it seems to check if the buffer is mapped in
current context for example, not for all possible contexts)

That sounds like a bug in nouveau, if true. The mapping state of a buffer object is per-buffer object, not per-context, at least in OpenGL.

Come to think of it, OpenGL probably allows unmapping a buffer from a different context than it was mapped from, and it seems like we may have a mismatch there with the Gallium API.

Nicolai
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to