summaryrefslogtreecommitdiff
path: root/common.h
Commit message (Collapse)AuthorAgeFilesLines
* make GLES3 optionalEric Engestrom2022-09-021-0/+11
| | | | | | This means that `shadertoy` & `texturator` might not be supported in a given build. Signed-off-by: Eric Engestrom <eric@engestrom.ch>
* surfaceless supportRob Clark2020-09-021-1/+10
|
* kmscube: add AMD_performance_monitor supportRob Clark2020-03-071-0/+19
| | | | | Only wired up for shadertoy mode, other modes aren't likely to be interesting.
* add fps reportingRob Clark2020-03-071-0/+6
|
* add shadertoy modeRob Clark2020-03-071-0/+2
| | | | | | 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.
* common: Re-support EGL 1.4 by using EGLImageKHR when neededAndrew F. Davis2019-09-181-0/+4
| | | | | | | | | | | | EGLImage was added to core EGL in version 1.5, but was available as an extension in 1.4 as EGLImageKHR, all of the rest of kmscube is EGL 1.4 compatible except this typedef. Allow kmscube to be EGL 1.4 compatible again by checking for EGL 1.5 and if not available falling back to the old typedef name. Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* kmscube: make fb/gl config format settable on cmdlineIlia Mirkin2019-08-301-1/+1
| | | | | | | | Instead of changing the code each time, allow the fourcc to be passed in as an argument. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Rob Clark <robdclark@gmail.com>
* Add texturatorRob Clark2019-05-041-0/+14
| | | | | | | | A utility for testing layouts of various types of textures in various formats. Not really too much related to kms or kmscube, other than re-using kmscube's kms/gbm code and egl helper.
* De-duplicate ARRAY_SIZE macroRob Clark2019-01-101-0/+2
|
* add MSAARob Clark2018-06-191-6/+6
| | | | | 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-0/+19
| | | | | | | | | | | | | | | | 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>
* Use weak functions to handle lack of gbm modifiersEmil Velikov2018-04-021-0/+2
| | | | | | | | | | | | | | Add weak function declaration and check if they're valid prior to calling the functions. This allows us to remove conditional compilation, yet allowing the modifiers codepath to work if API is available. Cc: Christian Gmeiner <christian.gmeiner@gmail.com> Cc: Rob Clark <robdclark@gmail.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Rob Clark <robdclark@gmail.com>
* formats: use weston's egl config matching logic, centralize formatIlia Mirkin2018-02-161-0/+1
| | | | | | | | | | The GBM surface format has to match the DRM mode. Both are used in a couple of places, so unify it so that it's only set in one place. Note that the GBM and DRM formats are identical. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
* helper to check for egl entrypointsRob Clark2017-05-081-0/+11
| | | | | | | | | | | | 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>
* atomic: Use CPU-side KMS fence synchronisationDaniel Stone2017-05-021-0/+1
| | | | | | | | | | | | | | Atomic does not let us have multiple requests in flight at once; if we don't synchronise with the request completion on the CPU side, we can get -EBUSY from the atomic commit. We already have everything required to do this, namely the out-fence from the last commit. Block on that with a CPU-side wait before we call atomic commit, to make sure we'll never attempt to queue an atomic commit before the previous one has completed. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* common: Give cmdline parameter for forcing modifiersBen Widawsky2017-04-141-1/+9
| | | | | Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* add video cubeRob Clark2017-03-271-0/+20
| | | | | | | | | | | | | | 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>
* fix compile break with old EGL headersRob Clark2017-03-131-0/+17
| | | | | | We would fall-back to eglGetDisplay() if EGL_EXT_platform_base is not supported, but that still required at least compiling against recent EGL headers.
* Remove unneeded GL_GLEXT_PROTOTYPES defineEmil Velikov2017-03-131-1/+0
| | | | | | | | | The define itself is sort of a hack for cases where one wants to static link against extensions. Instead one should be calling {egl,glX}GetProcAddress as clearly documented. Since our code is sane enough to not depend on the static link, simply drop the quirky define. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* Remove hacky "drm/" prefix in include pathEmil Velikov2017-03-131-1/+1
| | | | | | | | | | The file is provided by the libdrm which knows about the location. Since we already honour the Cflags provided by libdrm, any potential build issues are most likely due to broken package shipped by the distro. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* add atomic kms supportRob Clark2017-02-251-0/+4
| | | | Based mostly on original atomic conversion from Gustavo Padovan.
* split out legacy (pageflip) kmsRob Clark2017-02-221-6/+0
| | | | Preping to add new atomic alternative path.
* add yuv/rgb tex modeRob Clark2017-02-211-0/+11
|
* split out smooth-shaded cubeRob Clark2017-02-211-0/+22
|
* split out get_program() helperRob Clark2017-02-211-0/+10
|
* split gbm outRob Clark2017-02-211-0/+36