Age | Commit message (Collapse) | Author | Files | Lines |
|
../tests/test_virgl_strbuf.c:180:23: error: 'sb.external_buffer' may be used uninitialized [-Werror=maybe-uninitialized]
180 | ck_assert_int_eq(sb.external_buffer, false);
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1103>
|
|
../tests/test_virgl_resource.c:302:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
302 | ck_assert_int_eq((unsigned long)priv, 0xabab);
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1103>
|
|
It's becoming commonplace that DRM drivers make use of 'modifiers'
that alter the in-memory representation of a texture, which means that
when importing a texture the same exact 'modifiers' must be specified
along with the other usual parameters.
Introduce a new structure, virgl_renderer_resource_info_ext, that
extends upon the original virgl_renderer_resource_info with the
'planes' and 'modifiers' fields, and add a new function,
virgl_renderer_resource_get_info_ext() that performs the same actions
as virgl_renderer_resource_get_info() but using the new extended
structure.
Signed-off-by: Sergio Lopez <slp@redhat.com>
Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1024>
|
|
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1030>
|
|
Move the test to a new test suite without fixture, as it conflicts with
the context created for the test.
Direct leak of 16 byte(s) in 1 object(s) allocated from:
#0 0x7f4d50cba097 in calloc (/lib64/libasan.so.8+0xba097)
#1 0x4116cf in testvirgl_init_ctx_cmdbuf ../tests/testvirgl.c:157
#2 0x40ec0e in test_vrend_host_backed_memory_no_data_leak_fn ../tests/test_virgl_transfer.c:962
#3 0x7f4d513e1d42 in srunner_run_tagged (/lib64/libcheck.so.0+0x8d42)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1030>
|
|
Update the context fencing API to match virtio-gpu's multi-ring
per-context fencing support. Virtio-GPU supports 64 fencing rings per
context, but uint32_t is used to maintain compatability with other
potential users that require more.
Signed-off-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/982>
|
|
The existing venus fuzzer is fuzzing against the venus cmd decoder which
has been hidden behind render server in production. By enabling render
server config in venus fuzzer, it then starts fuzzing against submit_cmd
in proxy_context, which ends up fuzzing the standard socket part and is
not quite meaningful since the socket part is not sensitive to what the
cmd content is. This change just disables venus fuzzer since we have
settled down with process isolation.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/974>
|
|
Signed-off-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/806>
|
|
Signed-off-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/806>
|
|
This can be run on hw other than what the drm native context supports
using mesa's drm-shim. Ie. to fuzz the msm backend, you can LD_PRELOAD
libfreedreno_noop_drm_shim.so from mesa built with freedreno enabled
and -Dtools=drm-shim enable.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/795>
|
|
In order to be able to use the strbuf functions also in cases where we
want to create small buffers, like dest and source strings, it is better
to write directly to the target string, so let's make it possible to use
these pre-allocated buffers as strbuf.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/766>
|
|
For Percetto builds that don't install to a distributions standard
location, percetto.h cannot be found while building tests or the render
server. Pkgconfig provides the right -I / -L args if meson dependencies
are explicitly provided.
Signed-off-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: John Bates <jbates@chromium.org>
Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/775>
|
|
There are many combinations of invalid arguments for OpenGL functions
and it is impractical to cover all of them.
Even if nothing is wrong with the user, GL_CONTEXT_LOST and
GL_OUT_OF_MEMORY can also occur in many GL functions due to hardware
problems. They can leave the context in an invalid state which can
result in a reliability or security issue.
Check GL errors after an operation completes and prevent from using the
GL context after a GL error occurred.
spec@!opengl 1.5@draw-vertices, spec@!opengl 1.5@draw-vertices-user,
and spec@!opengl 2.0@gl-2.0-vertexattribpointer are marked as crash in
.gitlab-ci/expectations/host/piglit-virgl-gles-fails.txt because they
require GL_DOUBLE specification for glVertexAttribPointer, which is
not supported by OpenGL ES. Avoiding the crashes requires capability
checks on the guest, which this change does not implement.
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/715>
|
|
Also add a test to check the integer underflow.
Closes: #251
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
|
|
v2: Also check that no depth != 1 has been send when none is due
Closes: #250
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
|
|
Closes: #249
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
|
|
Add a new command associated to glLinkProgram. With this we should be
able to compile and link shaders when requested by the user.
Together with the command we expect an array of shader handles attached
to the program, where each position of the array corresponds to a pipe
shader type.
Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
|
|
No visible API change.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
|
|
PIPE_ARCH_*_ENDIAN is replaced by UTIL_ARCH_*_ENDIAN. We also differ
from Mesa in how arch and endianness are detected.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
|
|
__lsan_default_suppressions is only defined if -fsanitize=address, but
leak suppression is still needed when the LeakSanitizer is used without
the AddressSanitizer (-fsanitize=fuzzer for example, since LeakSanitizer
is enabled by default on linux).
Signed-off-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: David Riley davidriley@chromium.org
|
|
v2: switch to C and atexit (suggested by Gert)
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> (v1)
Reviewed-by: Ryan Neph <ryanneph@google.com> (v1)
|
|
It tests nothing on release builds because virgl_renderer_context_create
is not called and virgl_renderer_submit_cmd fails immediately.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-By: David Riley <davidriley@chromium.org>
|
|
Signed-off-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
|
|
Basic tests for fence create/poll/export. Note that export tests
require VRENDTEST_USE_EGL_GLES to be set.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
|
|
When VRENDTEST_USE_EGL_GLES is set, use GLES.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
|
|
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
|
|
Rename them to vrend_winsys_{egl,gbm}*.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
|
|
Autotools is deprecated since debb6e6ac43
It's now time to drop it definitively.
Signed-off-by: Elie Tournier <elie.tournier@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
|
|
Fix void* arithmetic and extra semicolon. -Wno-overlength-strings
is for large_frag in large_shader.h.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
|
|
Related #160
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Lepton Wu <lepton@chromium.org>
|
|
"-fsanitize=address" which pulls in asan does not work with other
sanitizers like msan/tsan etc.
Based on original change by manojgupta@chromium.org.
Signed-off-by: David Riley <davidriley@chromium.org>
Reviewed-by: Lepton Wu <lepton@chromium.org>
|
|
This fixes missing symbols when linking
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Lepton Wu <lepton@chromium.org>
|
|
Test whether submitting command 0x25 (CS shader execution) without
submitting a CS shader before is handled well.
Related #155
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
|
|
Related #154
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
|
|
On big endian the byte ordering is reverse, and so should be the
uint32_t test value.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Tested-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
|
|
Since vtest_server and the tests make use of private interfaces we must
mirror the autotoosl build that keeps the private interfaces in a static
library so that these functions can be called by the test code. The main
library that get installed then uses this static library and adds the
exported interface.
Closes #152
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
|
|
Related #140
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
|
|
Related #138
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
|
|
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
|
|
Otherwise the underlying hardware might not be able to handle the tests.
v2: Split patch to remove chunk that changes the verbosity (Emil)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
|
|
tests
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
|
|
should pass
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
|
|
Related #139 #141 #142 #143 #144 #146
v2: - fix autotools link order for the fuzzer tests
- use a local name for egl
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
|
|
This patch adds the meson build system as alternative to the
autotools build system.
v2: Thanks to Alexandros for his comments that lead to the following changes:
- Fix logic for platforms so that the ones selected by 'auto' don't
fail if the dependencies are missing, but fail when explicitely
requested
- declare project version differently
- set a minimun meson version
- clean up some braces
- reformat some code
- squesh remaining separate patches
v3: require meson 0.46 (Gurchetan)
v4: set minimum gbm version to 18.0.0
v5: - fix gbm version requirement (Gurchetan)
- don't duplicate glx files (Gurchetan)
Fixes: #129
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
|
|
These formats can be allocated by gbm implementations.
v2: fix test (not needed on i965, maybe on softpipe)
Reviewed-by: David Riley <davidriley@chromium.org>
Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org>
|
|
If nr_samples is 1 we allocate textures as MULTISAMPLE, so we also need to handle
the textures in later use as a multisample texture. In addition, on GLES blits to
a multisample texture are not allowed as target, and we must use the GL blit
fallback for all texture types.
v2: Correct more checks including the one in check_resource_valid (Gurchetan)
v3: Also update the tests to use only 0 for no samples and >= 1 for samples
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
|
|
The variables are already explicitly initialized.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
|
|
Transfer strides are either set internally or coming from
virgl_renderer_transfer_{write,read}_iov. As far as I can tell,
Mesa always passes sane values. We also expect sane values in
places like vrend_renderer_transfer_write_iov,
vrend_transfer_send_readpixels, and vrend_transfer_send_getteximage
already. Let's reject bad strides.
This fixes, for example, transfers to 1D array (thus box->height is
1) with non-default stride.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
|
|
sed -i "s/[[:space:]]*$//g" */*.[ch]
Note: there's a handful more in src/gallium, although that's left as-is
to minimise merge conflicts as we have to port things from Mesa.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
|
|
This commit improves bound checking by more accurately calculating
the expected transfer size. This improvement is achieved in two ways:
1. Using the image level (layer_)stride when the (layer_)stride is 0,
which matches the interpretation we use for performing the actual
read/write.
2. Calculating the transfer size by using the exact end offset in
the image, instead of using multiples of whole image rows.
The increased accuracy increases safety, and also allows us to support
some transfers with explicit strides that were previously rejected (see
added test).
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
|