author | Nikhil Devshatwar <nikhil.nd@ti.com> | |
Wed, 3 Sep 2014 07:17:31 +0000 (12:47 +0530) | ||
committer | Nikhil Devshatwar <nikhil.nd@ti.com> | |
Wed, 1 Oct 2014 08:38:31 +0000 (14:08 +0530) | ||
commit | 41c81342d5fc6b43989030e24b3511643e6517e9 | |
tree | 1f73dfd23ca2386a2c4368c1787dfc907f0e9d0e | tree | snapshot (tar.xz tar.gz zip) |
parent | 04da689692ec7cd3ef0f315c9c00d9051cefdd10 | commit | diff |
display-kmscube: Render multiple videos on cube faces
Earlier implementation renders only one video on all the 6 faces of cube.
This patch enhances the library by adding support for:
* Using multiple textures
- Create an egl image and a texture once for every buffer object
- Extend buffer_kmscube to store the texture name and the associated face.
- All buffers allocated by one call to disp_get_vid_buffers are grouped
for one face
* Multithreaded post_vid_buffer
- As the buffers would be posted by multiple threads asynchronously,
post_vid_buffer would just update the buffer to be used for next
rendereing and wait
- Extend display_kmscube to store the current buffer for each face
- If the video threads are less than 6, then the textures are repeated
on the multiple faces.
- Also, the post_vid_buffer waits till the buffer is being used by the
GPU for texturing the face.
* Render thread
- disp_open starts a render thread which initializes gbm and gl
- The same thread will continue in a loop, where it reads from the
current buffers array and updates the textures accordingly.
- The textures are created from this thread if the buffer is being
rendered first time (it won't have valid texture name)
- This ensures that all the gl calls are called from a single thread
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Earlier implementation renders only one video on all the 6 faces of cube.
This patch enhances the library by adding support for:
* Using multiple textures
- Create an egl image and a texture once for every buffer object
- Extend buffer_kmscube to store the texture name and the associated face.
- All buffers allocated by one call to disp_get_vid_buffers are grouped
for one face
* Multithreaded post_vid_buffer
- As the buffers would be posted by multiple threads asynchronously,
post_vid_buffer would just update the buffer to be used for next
rendereing and wait
- Extend display_kmscube to store the current buffer for each face
- If the video threads are less than 6, then the textures are repeated
on the multiple faces.
- Also, the post_vid_buffer waits till the buffer is being used by the
GPU for texturing the face.
* Render thread
- disp_open starts a render thread which initializes gbm and gl
- The same thread will continue in a loop, where it reads from the
current buffers array and updates the textures accordingly.
- The textures are created from this thread if the buffer is being
rendered first time (it won't have valid texture name)
- This ensures that all the gl calls are called from a single thread
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
util/display-kmscube.c | diff | blob | history |