Quantcast
Viewing all articles
Browse latest Browse all 5290

Graphics programming • DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED and DRM_FORMAT_MOD_BROADCOM_UIF into OpenGL

Hello,
I'm trying to improve the performance of the conversion of data read from DRM. I'm currently reading data with drmPrimeHandleToFD + mmap and I then convert DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED with C code. My conversion is still not completely OK, but I already see it is very slow. I still do not know how to handle DRM_FORMAT_MOD_BROADCOM_UIF.

By reading the forum (for example: viewtopic.php?t=368584), I was wondering if something like this may be possible:
  1. import the dma-buf into OpenGL by using eglCreateImageKHR;
  2. use glEGLImageTargetTexture2DOES to get a texture;
  3. draw the texture to a PBO;
  4. get pixels in some linear format like RGBA from the PBO.
do you think this may be possible? Can OpenGL handle those formats on rpi 3/4/5?
I see something like this was asked already, but no answer: viewtopic.php?t=363499.
Thank you!

Statistics: Posted by luc4 — Mon Sep 16, 2024 8:15 am



Viewing all articles
Browse latest Browse all 5290

Trending Articles