[Mesa-dev] [RFC] New gallium flags for using different contexts in several threads
Nicolai Hähnle
nhaehnle at gmail.com
Sun Dec 18 17:43:07 UTC 2016
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
More information about the mesa-dev
mailing list