summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* meson: check GLES3 header within GLESv2 include dirsHEADmasterJan Beich2023-04-131-1/+1
| | | | | | | | Run-time dependency glesv2 found: YES 3.2 Check usable header "GLES3/gl3.h" : NO meson.build:65: WARNING: GLES3 not supported; shadertoy & texturator are NOT included in this build Fixes: 61fb902a021e ("meson: replace gles version check with a header presence check")
* fix typosHarri Nieminen2023-03-282-3/+3
| | | | found by codespell
* meson: upgrade the "GLES3 not supported" message into a warningEric Engestrom2022-11-101-1/+1
|
* meson: replace gles version check with a header presence checkEric Engestrom2022-11-101-3/+4
| | | | | | | | As explained in #8, there are GLES implementations out there that report bogus version numbers for the GLESv2 lib, so we can't actually use that version number reliably. Closes: https://gitlab.freedesktop.org/mesa/kmscube/-/issues/8
* drm-common: fix return type of find_crtc_for_connector() & ↵Eric Engestrom2022-09-021-4/+4
| | | | | | | | find_crtc_for_encoder() They return -1 on error, so it needs to be signed. Signed-off-by: Eric Engestrom <eric@engestrom.ch>
* make GLES3 optionalEric Engestrom2022-09-022-10/+30
| | | | | | This means that `shadertoy` & `texturator` might not be supported in a given build. Signed-off-by: Eric Engestrom <eric@engestrom.ch>
* texturator: Use correct GL extension headerDamian Hobson-Garcia2022-09-021-1/+1
| | | | | | | | gl2ext.h is the extenstion header for OpenGL ES 2.0 and all later versions according to the Khronos documentation [1]. gl3ext.h is either an empty stub, or may not even exist on some platforms. [1]: https://www.khronos.org/registry/OpenGL/index_es.php#headers
* Returns -1 when shaders creation failsFang Tan2022-09-021-2/+9
|
* drm-common.c: do not use invalid modifierAlexander Kanavin2022-09-021-1/+1
| | | | | Prior to kernel 5.19 this was a soft failure, but 5.19 adds checks that result in a hard syscall fail.
* kmscube: check return value when creating GBM deviceAdrián Larumbe2022-09-021-1/+4
| | | | | | | In the off-chance that gbm_create_device fails and returns a NULL value, further down the line a segfault will be triggered when dereferencing gbm.dev. Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
* drm: fix crtc not found conditionalTom Stokes2022-09-021-1/+1
| | | | find_crtc_for_connector returns -1 if no crtc found, not 0
* ci/latest: use image with base-devel pre-installedEric Engestrom2022-09-021-2/+1
| | | | Signed-off-by: Eric Engestrom <eric@engestrom.ch>
* ci/latest: fix build as dockerhub image was renamedEric Engestrom2022-09-021-1/+1
| | | | | | | This should've been done a year and a half ago, but I didn't look at this repo... Signed-off-by: Eric Engestrom <eric@engestrom.ch>
* 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
|
* drm: grab correct handle for plane != 0Lucas Stach2020-10-281-3/+7
| | | | | Multiplanar formats can have different BOs for each plane, so call the correct GBM function to get the handle for a specific plane.
* surfaceless supportRob Clark2020-09-026-20/+205
|
* gbm: split out helper to initialize surfaceRob Clark2020-09-021-8/+15
|
* texturator: Fix float to bool conversion warningFabio Estevam2020-03-311-1/+1
| | | | | | | | | | | | The following build warning is seen: ../texturator.c:603:45: warning: '*' in boolean context, suggest '&&' instead [-Wint-in-bool-context] *complemented = (((float)rgba[2]) / 255.0) / 0.25; Fix it by using the != 0.0f construction to properly convert from float to bool. Signed-off-by: Fabio Estevam <festevam@gmail.com>
* texturator: Only define png variable when libpng is presentFabio Estevam2020-03-311-0/+2
| | | | | | | | | | | When libpng is not present the following build warning is seen: ../texturator.c:98:13: warning: 'png' defined but not used [-Wunused-variable] static bool png; Fix it by only defining the png variable when HAVE_LIBPNG is defined. Signed-off-by: Fabio Estevam <festevam@gmail.com>
* meson.build: Change c_std to gnu99Fabio Estevam2020-03-311-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Since commit 301a556b8ece ("add fps reporting") the <time.h> header is included, which causes build failures with c99 extension on ARM32: ../common.c: In function 'get_time_ns': ../common.c:376:18: error: storage size of 'tv' isn't known struct timespec tv; ^~ ../common.c:377:16: error: 'CLOCK_MONOTONIC' undeclared (first use in this function) clock_gettime(CLOCK_MONOTONIC, &tv); Change c_std to gnu99 to fix the build error as explained at: https://gcc-help.gcc.gnu.narkive.com/8xCaKI6r/problem-with-struct-timespec-and-c99-standard c99 has been used since commit 6cbd03ab9406 ("Makefile.am: Add -std=c99 to CFLAGS") to fix the following mips64el build failure: "cube-tex.c:230:2: note: use option -std=c99 or -std=gnu99 to compile your code" Use c_std=gnu99 to make both mips64el and ARM32 happy. Signed-off-by: Fabio Estevam <festevam@gmail.com>
* kmscube: add AMD_performance_monitor supportRob Clark2020-03-078-2/+542
| | | | | Only wired up for shadertoy mode, other modes aren't likely to be interesting.
* kmscube: also print final fps stat at exitRob Clark2020-03-072-0/+12
|
* kmscube: add option to run for specified # of framesRob Clark2020-03-076-14/+27
|
* add fps reportingRob Clark2020-03-074-0/+54
|
* atomic: allow user input to trigger exitRob Clark2020-03-071-0/+12
| | | | Similar to what legacy kms backend does.
* add shadertoy modeRob Clark2020-03-075-4/+469
| | | | | | 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.
* clean up arg parsingRob Clark2020-03-071-3/+3
|
* fix build errorRob Clark2020-03-073-3/+3
| | | | /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
* remove autotools buildRob Clark2020-03-074-199/+0
| | | | | We've had meson for a while. And too lazy to update autotools build. So lets just drop it.
* texturator: Fix skipping of tests when partially offscreen.Eric Anholt2020-02-271-1/+1
|
* 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-304-5/+23
| | | | | | | | 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>
* drm: Find a proper modeset device, is none is providedEzequiel Garcia2019-07-302-4/+58
| | | | | | | | | | | | | | | | Instead of having a fixed /dev/dri/card0 default, iterate over primary devices until one with modeset capabilities is found. This is quite useful when a render-only driver (such as lima or panfrost) was registered before the modeset driver, taking over /dev/dri/card0. While here, add a warning for devices explicitly set via -D, by checking if they look like a modeset device. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* texturator: add command-line selection of video modeAntonio Borneo2019-07-231-3/+23
| | | | | | | | Extend also to texturator the command line flag to select the video mode. Signed-off-by: Antonio Borneo <antonio.borneo@st.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* kmscube: add command-line selection of video modeAntonio Borneo2019-07-236-24/+62
| | | | | | | | | | | | | | The mode of type "DRM_MODE_TYPE_PREFERED" can be miss-configured, making kmscube not working. Plus, user could need to test the other available video modes at the connector. Add a command line flag to specify the video mode. If the mode is not present, print an informative message and fall-back to the default behaviour (preferred mode or highest resolution mode). Signed-off-by: Antonio Borneo <antonio.borneo@st.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* texturator: capture the screen to a png imageKhaled Emara2019-07-173-1/+73
| | | | | Signed-off-by: Khaled Emara <ekhaled1836@gmail.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
* texturator: add a linear pattern to texturesKhaled Emara2019-07-171-27/+53
|
* meson: drop `break`Eric Engestrom2019-07-091-1/+0
| | | | | Fixes #2 Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
* Use first preferred modeRob Clark2019-06-101-0/+1
| | | | | | | Otherwise we would pick a higher resolution mode that follows the preferred mode. It seems there are some monitors that will accept higher resolutions than their native resolution and scale. Presumably to support 1080p video on a lower resolution panel.
* gitlab-ci: fix archlinux buildsEric Engestrom2019-05-051-2/+2
| | | | base/archlinux has been replaced with archlinux/base, which is maintained directly by the archlinux community.
* Add texturatorRob Clark2019-05-044-1/+899
| | | | | | | | 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.
* drm-atomic: fix allocation sizeEric Engestrom2019-01-231-1/+1
| | | | | | | | `props_info` happens to be of type `drmModePropertyRes **` so `sizeof(props_info) == sizeof(*props_info)`, so we didn't notice, but the compiler did. Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
* De-duplicate ARRAY_SIZE macroRob Clark2019-01-103-4/+2
|
* gitlab-ci: add missing build dependencyEric Engestrom2018-12-111-0/+2
| | | | | Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* gitlab-ci: add meson buildEric Engestrom2018-12-111-0/+52
| | | | | Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* meson: use `feature` option to simplify the codeEric Engestrom2018-12-112-36/+25
| | | | | Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* meson: specify minimum supported meson versionEric Engestrom2018-12-111-0/+1
| | | | | | | Picking 0.47 allows us to use `feature` options, simplifying some of the code. Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* meson: no need to turn elements into lists when adding them to listsEric Engestrom2018-12-111-2/+2
| | | | | Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* meson: `required: true` is already the defaultEric Engestrom2018-12-111-5/+5
| | | | | Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com>