summaryrefslogtreecommitdiff
path: root/cube-tex.c
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Multiple GL_ TRIANGLE_ STRIP draw merge."Kristian H. Kristensen2021-02-071-1/+6
| | | This reverts commit 2418cfe7e7af581698b85f51e849d20c876b17e3
* Multiple GL_ TRIANGLE_ STRIP draw merge.Fang Tan2021-02-071-6/+1
|
* add shadertoy modeRob Clark2020-03-071-2/+1
| | | | | | Doesn't handle shadertoy shaders which use textures for inputs. That probably wouldn't be straightforward without using the web API to fetch and introspect the shader. But that sounds like a lot more work.
* fix build errorRob Clark2020-03-071-1/+1
| | | | /usr/bin/ld: kmscube@exe/cube-tex.c.o:/home/robclark/src/kmscube/debug/../cube-tex.c:47: multiple definition of `gl'; kmscube@exe/cube-smooth.c.o:/home/robclark/src/kmscube/debug/../cube-smooth.c:40: first defined here
* De-duplicate ARRAY_SIZE macroRob Clark2019-01-101-2/+0
|
* add missing headerEric Engestrom2018-10-191-0/+1
|
* cube-tex: close the fd after EGLImage creation.Dongseong Hwang2018-08-131-0/+5
| | | | EGLImage takes the fd ownership.
* add MSAARob Clark2018-06-191-2/+2
| | | | | Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* cube-tex: make use of modifiersChristian Gmeiner2018-04-031-12/+84
| | | | | | | | | | | | | | | | Fixes rendering issues with mode rgba on etnaviv. I have applied the same change for nv12 variants but they are not supported on etnaviv. v1 -> v2: - check if EGL_EXT_image_dma_buf_import_modifiers is supported - use weak function trick for gbm_bo_get_modifier(..) v2 -> v3: - check if modifier != DRM_FORMAT_MOD_INVALID Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
* helper to check for egl entrypointsRob Clark2017-05-081-3/+3
| | | | | | | | | | | | Remove some boilerplate and check more specifically for all the entry- points that different modules need. Ok, I guess it isn't likely for a driver to expose eglCreateImageKHR but not eglDeleteImageKHR.. but otoh kmscube is useful for bringing up drivers. Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
* Fix GBM image formats v2Thomas Hellstrom2017-04-051-7/+5
| | | | | | | | | | | | | | When the GBM BOs are created, they are created using a bo with a correct memory requirement but with an incorrect channel layout. This makes drivers that are picky about matching formats (svga/vmwgfx) complain. Use the correct GBM formats and require GBM >= 13.0 to make sure they are available. v2: Remove a couple of stale comments Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* add video cubeRob Clark2017-03-271-2/+3
| | | | | | | | | | | | | | Uses gstreamer for a simple decoder. If decoder can give us dma-buf's directly, we'll directly use that as a texture (zero copy), otherwise memcpy into a buffer from gbm. This should work with both hw and sw decoders. Probably room for improvement. And the interface between gl and the decoder is pretty simple so I suppose other decoders would be possible. (But hopefully they could already be supported via gstreamer.) Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* cube-tex: make a couple things staticRob Clark2017-03-271-2/+2
| | | | | | | (otherwise there will be symbol conflicts in the next patch.. also these should be const) Signed-off-by: Rob Clark <robdclark@gmail.com>
* cube-tex: Handle SMOOTH switch caseFabio Estevam2017-03-181-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | In kmscube.c there is the following logic: if (mode == SMOOTH) { egl = init_cube_smooth(gbm); } else { egl = init_cube_tex(gbm, mode); } ,which makes init_cube_tex() to be never called on the SMOOTH case. Handle the SMOOTH switch case inside init_tex() to fix the following build warning: cube-tex.c: In function 'init_tex': cube-tex.c:438:2: warning: enumeration value 'SMOOTH' not handled in switch [-Wswitch] switch (mode) { ^ Signed-off-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> [Eric: add assert()] Signed-off-by: Eric Engestrom <eric@engestrom.ch>
* cube-tex.c: fix signed comparisonEric Engestrom2017-03-151-3/+3
| | | | | Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* add yuv/rgb tex modeRob Clark2017-02-211-0/+572