Also remove some trailing whitespace, while we're in here.
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
check is more practical than distcheck since it doesn't
remove logs after the face, which allows us to always
keep logs. Even for non-failures.
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
When the CI is run locally, the results directory has
to be cleared between runs in order to no exit early
or contain junk.
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Apart from just doing a local run, this script enables
a local mesa repository to be used for the CI run.
For this to work the mesa repository is assumed to
be located in a directory next to the virgilrenderer.
$ ls -la
.
..
mesa
virgilrenderer
$ virgilrenderer/ci/run_ci_locally.sh
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
The only reason for wanting this is to lower the chance
of being unable to used a cached image incase of
changes to the Dockerfile.
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
The selected subsets only contains tests that are currently passing with
a softpipe GL/GLES host.
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
- rename options
- switch to softpipe since it supports up to GLES 3.1
- force host GL version 4.4 because otherwise we don't get GLES 3.1 in the
guest
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Let's be a little less conservative then QEMU -- fence only
on draw calls and possible fence creations.
Can we do even better, and fence only when Gallium requests
VIRGL_BIND_CUSTOM? Someone should look into this, but let's
get this landed to unblock the CQ.
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Include stdint.h in virgl_hw.h, since it uses uint32_t.
Remove now duplicate structure virgl_box in vtest_renderer.c
Reviewed-by: Jakob Bornecrantz <jakob@collabora.com>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
The buffer size is not an vector, and consequently we can't add a swizzle
operator. (This was probably the reason why the write mask was only emmited
when the it was larger then 1 before).
v2: Also handle 1D and Shadow1D textures (Dave)
Fixes: 70dedae465
shader: TXQ: also emit a write mask if only one bit is set.
Tested-by: Jakob Bornecrantz <jakob@collabora.com>
Reviewed-by: Jakob Bornecrantz <jakob@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
The sub-context holds a pointer to the last shader program used and this
is de-referenced , e.g. in vrend_vbo_draw. However, the guest may destroy
the program without notifying the sub-context, and as a result the pointer
becomes stale and may ber used after free.
As a solution add a pointer to the owning context when a program is
referenced and if the program gets destroyed, clean the pointer in the sub-context.
Closes: #52
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
0x1 << 31 is undefined behavior based on C99 rules. (see ...)
Use unsigned syntax as an alternative to disable the warning.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
In the shaders the uniforms are allocated as arrays, and they are also
passed from the guest as arrays, so let's also upload them to the host
driver as arrays.
Performance improvement (both measurements used Gurchetan's mesa/virgl
patches to improve transfers):
Measurements on r600 (AMD 6870 HD)
Unigine Valley (1024x768, Q:High, AA:2x)
Unigine Heaven (1024x768, Q:High, Tess: Disabled, AA:2x)
Unigine Valley Unigine Heaven
without 20.2 26.1
with this patch 22.0 31.5
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Also use memcpy to copy the constats. These two things might shave of some
cycles but the measureable performance benefit is marginal.
v2: Avoid the memcpy that ralloc does when increasing the size, the data
is overwritten anyway.
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
glReadPixels, glReadnPixelsKHR and glReadnPixelsARB use *width and *height.
Thos could be null.
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Elie Tournier <elie.tournier@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
The following leaks can be triggered by running this test series:
dEQP-GLES31.functional.tessellation_geometry_interaction.feedback.*
Direct leak of 56 byte(s) in 8 object(s) allocated from:
in __interceptor_strdup (/usr/lib64/gcc/x86_64-pc-linux-gnu/7.3.0/
libasan.so+0x761c8)
in emit_so_movs ../../../../virgl-gitlab/src/vrend_shader.c:1623
in iter_instruction ../../../../virgl-gitlab/src/vrend_shader.c:3873
in tgsi_iterate_shader ../../../../../../virgl-gitlab/src/gallium/
auxiliary/tgsi/tgsi_iterate.c:53
in vrend_convert_shader ../../../../virgl-gitlab/src/vrend_shader.c:
5131
...
Direct leak of 56 byte(s) in 7 object(s) allocated from:
in __interceptor_calloc (/usr/lib64/gcc/x86_64-pc-linux-gnu/7.3.0/libasan.so+0xdba68)
in vrend_convert_shader ../../../../virgl-gitlab/src/vrend_shader.c:5109
in vrend_shader_create ../../../../virgl-gitlab/src/vrend_renderer.c:2906
in vrend_shader_select ../../../../virgl-gitlab/src/vrend_renderer.c:2958
...
Closes: #55
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
It is nice to know why things go wrong.
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>