Fixes the mem leak:
Direct leak of 8 byte(s) in 1 object(s) allocated from:
#0 0x7f49a7733c60 in realloc (/usr/lib64/gcc/x86_64-pc-linux-gnu/7.3.0/libasan.so+0xdbc60)
#1 0x7f49a713100a in add_sampler_array ../../../../virgl-gitlab/src/vrend_shader.c:619
#2 0x7f49a71318cb in add_samplers ../../../../virgl-gitlab/src/vrend_shader.c:677
#3 0x7f49a713a780 in iter_declaration ../../../../virgl-gitlab/src/vrend_shader.c:1213
#4 0x7f49a7194c37 in tgsi_iterate_shader ../../../../../../virgl-gitlab/src/gallium/auxiliary/tgsi/tgsi_iterate.c:59
#5 0x7f49a7169a24 in vrend_convert_shader ../../../../virgl-gitlab/src/vrend_shader.c:5012
Closes: #85
[airlied: v2: free image arrays as well]
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This is helpful to get the name of the guest program that may trigger a
memory leak. One can also pass a custom string as program name by setting
the environment variable GALLIUM_PROCESS_NAME in the guest accordingly.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Since this adds a new function to the library interface this also needs
a bump in the library version number.
Closes: #80
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: David Riley <davidriley@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This way all output originating from virglrenderer will be redirected.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: David Riley <davidriley@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This patch adds the infrastructure and replaces the debug calls to fprintf
by calls to vrend_printf that internally may be redirected.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: David Riley <davidriley@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This is needed for guest GL >= 3.0 on GLES.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: <Gurchetan Singh gurchetansingh@chromium.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
We need to dirty the compute shader if we bind a new non-compute program,
this fixes a bug in the qbo tests when qbo is merged.
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
emit_ios handles all the shader types so that it is difficult to
follow what is emitted for which shader type. Start refactoring by
moving the common initialization into a separate function.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
There's no point in keeping updating all the constant buffers for every
draw; we only need to update those who has changed since last draw.
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
This allows us to allocate UBO ids based on the linked result, rather
than the currently bound UBOs. This gives us a per-program stable
result, which means we don't need to keep updating them.
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
We already track samplers, images and ssbos using bitmasks, so this is a
bit more familiar to the rest of the code.
Also, this is going to enable some other nifty optimizations later on.
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
To try this out, start a run like using multiple `--test`
arguments.
ci/run_test_suite.sh \
--deqp \
--host-gles \
--backend vtest-gpu \
--backend gpu \
--test TEST1 \
--test TEST2
Signed-off-by: Robert Foss <robert.foss@collabora.com>
This patch cleans up the CI path handling, and
allows for external path variables to be used.
Environment variables are now respected for MESA_PATH,
VIRGL_PATH and CTS_PATH.
Additionally these variables can be picked up from a
config file `~/.virgl-ci.conf`
$ cat ~/.virgl-ci.conf
MESA_PATH=/opt/virgl/mesa
VIRGL_PATH=/opt/virgl/virglrenderer
Or given as a local environment variable like below.
CTS_PATH=/opt/virgl/ ci/run_test_suite.sh --piglit --gles3 --backend softpipe
Signed-off-by: Robert Foss <robert.foss@collabora.com>
gdc-6 is currently not in testing and gdc will pull in the default version
(currently gdc-8) which should work.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
This fixes build failures with musl C library
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
No functional change other then better option parsing.
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
This reason for wanting to split them up is just to
provide a faster overview of what is failing and
what isn't.
This may be a small amount slower than running them
together, but the impact should be low.
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Make the script names easier to remember by harmonizing the names
to use underscores instead of hyphens.
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
These lists are no longer used, and should be pulled
in from the CTS directly either way.
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
This commit introduces a few new parts:
- A new deqp & piglit runner
- New lists of previous results
- New ignore lists for unreliable tests
- A switch to using CTS provided test-list for deqp
The new runner supports a few different modes:
- Running a single test using the '-t' flag
- Comparing tests using the same driver with and without vtest using '--compare-backends'
- Running piglit or deqp suites using '--piglit' or '--deqp'
- Running suites of piglit or deqp tests using, '--gles2'/'--gles3','--gles31'
- Selecting a specific backend to use for example, '-b vtest-softpipe' or '-b softpipe'
For example:
# Run piglit gles2 tests using gpu&softpipe drivers through vtest
$ ci/run_test_suite.sh --piglit --gles2 --backend vtest-gpu --backend vtest-softpipe
# Run ignored&unreliable CTS gles3 tests using the softpipe driver
$ ci/run_test_suite.sh --deqp --gles3 --backend softpipe --unreliable
# Run CTS GLES2 using softpipe driver, and then compare results with results
# stored in ci/previous_results/, while ignoring known unreliable tests.
$ ci/run_test_suite.sh --piglit --gles2 --backend softpipe --compare-previous
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>