Re: Does gbm_bo_map() implicitly synchronise?

2024-06-15 Thread Pierre Ossman

On 15/06/2024 07:54, Marek Olšák wrote:

gbm_bo_map synchronizes if it needs to move memory to make the buffer
readable by the CPU or if the buffer is being used/written by the GPU.



Great, thanks! That means I need to look elsewhere for the source of my 
issue.


I was concerned that since I was accessing the data using gbm_bo_map(), 
rather than using OpenGL, I was missing out on some synchronisation step 
and getting data before the GPU had finished any queued rendering.


Regards
--
Pierre Ossman   Software Development
Cendio AB   http://cendio.com
Teknikringen 8  http://twitter.com/ThinLinc
583 30 Linköpinghttp://facebook.com/ThinLinc
Phone: +46-13-214600

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?



Re: Does gbm_bo_map() implicitly synchronise?

2024-06-15 Thread Marek Olšák
It's probably driver-specific. Some drivers might need glFlush before
you use gbm_bo_map because gbm might only wait for work that has been
flushed.

Marek

On Sat, Jun 15, 2024 at 4:29 AM Pierre Ossman  wrote:
>
> On 15/06/2024 07:54, Marek Olšák wrote:
> > gbm_bo_map synchronizes if it needs to move memory to make the buffer
> > readable by the CPU or if the buffer is being used/written by the GPU.
> >
>
> Great, thanks! That means I need to look elsewhere for the source of my
> issue.
>
> I was concerned that since I was accessing the data using gbm_bo_map(),
> rather than using OpenGL, I was missing out on some synchronisation step
> and getting data before the GPU had finished any queued rendering.
>
> Regards
> --
> Pierre Ossman   Software Development
> Cendio AB   http://cendio.com
> Teknikringen 8  http://twitter.com/ThinLinc
> 583 30 Linköpinghttp://facebook.com/ThinLinc
> Phone: +46-13-214600
>
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
>