Age | Commit message (Collapse) | Author | Files | Lines |
|
When importing an egl image from a linux dma buf fd, we need to pass
the proper image attributes to eglCreateImageKHR. The modifier check
here should not ignore DRM_FORMAT_MOD_LINEAR when setting
EGL_DMA_BUF_PLANE0_MODIFIER_LO/HI_EXT else the ordering of
samples within a plane will be incorrect, resulting in
incorrect/garbled pixels being presented.
v2: Update code changes to set EGL_DMA_BUF_PLANE0_MODIFIER_LO/HI
whenever an extension exposes modifiers so that INVALID modifiers are
accepted (Daniel Stone)
|
|
Use gears mode with -g or --gears to render gears on each cube face.
Renders gears to texture once and then renders the texture on each face.
Based on cube-tex.c and of course, gears.
|
|
- Add esInvert() function
- Add esTranspose() function
- Rewrite esRotate() function
- Set identity matrix at beginning of esFrustum()
|
|
|
|
This reverts commit f296635648ba31454bfe6a9ff7495f6b28af26ec
|
|
Kmscube currently selects the first connector that has a link status of
connected. Add a command line option to use a specific connector if
more than one connector has a connected link status.
Signed-off-by: Ralph Campbell <ralphcampbell1@gmail.com>
|
|
It is useful to be able to render the kube without touching the KMS. For
example, this allows us to utilise DRM render devices or to measure the
performance without waiting for vblank.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
|
|
Signed-off-by: Eric Engestrom <eric@igalia.com>
|
|
Signed-off-by: Eric Engestrom <eric@igalia.com>
|
|
Signed-off-by: Eric Engestrom <eric@igalia.com>
|
|
Because 0.47 is not compatible with python 3.10 that debian now ships.
Signed-off-by: Eric Engestrom <eric@igalia.com>
|
|
debian's python is now also marked as EXTERNALLY-MANAGED (see PEP 668),
which means that if we still want to install packages through pip we
need to either create a venv (overkill here), or add
`--break-system-packages`.
Signed-off-by: Eric Engestrom <eric@igalia.com>
|
|
Signed-off-by: Eric Engestrom <eric@igalia.com>
|
|
This is not needed to build, and the functionality is also
compatible with GLES2 only.
Fixes build in environment with only GLES2 headers.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
|
|
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")
|
|
found by codespell
|
|
|
|
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
|
|
find_crtc_for_encoder()
They return -1 on error, so it needs to be signed.
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
|
|
This means that `shadertoy` & `texturator` might not be supported in a given build.
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
|
|
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
|
|
|
|
Prior to kernel 5.19 this was a soft failure, but 5.19
adds checks that result in a hard syscall fail.
|
|
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>
|
|
find_crtc_for_connector returns -1 if no crtc found, not 0
|
|
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
|
|
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>
|
|
This reverts commit 2418cfe7e7af581698b85f51e849d20c876b17e3
|
|
|
|
Multiplanar formats can have different BOs for each plane, so call the
correct GBM function to get the handle for a specific plane.
|
|
|
|
|
|
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>
|
|
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>
|
|
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>
|
|
Only wired up for shadertoy mode, other modes aren't likely to be
interesting.
|
|
|
|
|
|
|
|
Similar to what legacy kms backend does.
|
|
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.
|
|
|
|
/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
|
|
We've had meson for a while. And too lazy to update autotools build.
So lets just drop it.
|
|
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|