<div dir="ltr"><br><div>Hi and thanks for your replies!</div><div><br></div><div>Note though that I want to get hold of the image/pixels after they have been processed by shader(s).</div><div>So not the raw texture being fed in.</div><div><br></div><div>So maybe it would be the contents of a FBO or similar.</div><div><br></div><div>Cheers</div><div>Fred</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 15, 2021 at 3:59 AM Christian König <<a href="mailto:ckoenig.leichtzumerken@gmail.com">ckoenig.leichtzumerken@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Am 15.01.21 um 11:26 schrieb Michel Dänzer:<br>
> On 2021-01-14 8:02 p.m., Blueroom wrote:<br>
>><br>
>> Hi Everyone!<br>
>><br>
>> I have a program that’s using dmabuf’s to create a zero copy <br>
>> camera->GL texture pipeline and it’s working great on my RPi4.<br>
>><br>
>> Now as a last step I want to access the pixels that Iv’e processed in <br>
>> gl with shaders, on the cpu.<br>
>><br>
>> Iv’e been told that on the Raspberry Pi OpenGL is sharing the same <br>
>> memory as the cpu so I’m hoping it would be possible to do something <br>
>> like a dmabuf on the ‘way out’ too?<br>
>><br>
>> Does anyone have any pointers in how this could work?<br>
><br>
> I'd recommend using glGetTexImage or other similar GL APIs for getting <br>
> the data out of the GL texture.<br>
><br>
> While mmap of a dma-buf file descriptor works in theory, direct CPU <br>
> reads from GPU accessible memory can be very slow on some platforms.<br>
><br>
<br>
Yeah, agree. Additional to that you don't know the format of the DMA-buf <br>
of the texture.<br>
<br>
The input image is most likely linear, but the output might be tiled.<br>
<br>
Christian.<br>
</blockquote></div>