Function handles a single instance - drop the S from the name.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
The top level emit_ios() already zeros it, so we can remove the
duplicate (and misleading) one in emit_ios_vs().
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
Use the helper instead of open-coding it.
v2: use callback (Gert)
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
Use the helper instead of open-coding it.
v2: use callback (Gert)
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
Factor out the 'generic' output handling out of emit_ios_geom() into a
helper. We'll use that across the board with later commits.
v2: use callback (Gert)
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
Move the GS stream output handling in a separate loop.
Will allow us to de-duplicate the generic output handling across the
board.
v2: Drop prog_type check (Gert)
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
Bundle all the front/back color handling to a single block. It makes
the code slightly easier to follow.
Plus it will allow us to factor out some code with a later commit.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
v2: keep prefix/auxprefix declarations on separate lines (Gert)
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
v2: use "" to initialize the fixed size char array (Gert)
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
When there is no change to UBOs of a shader stage, we still need to
increment next_ubo_id to match bind_ubo_locs. This was regressed by
commit 2192c92 (renderer: only update dirty constbufs).
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Do not use in/out parameters for sampler_id and ubo_id. They are
easier to get wrong.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
ubo_used_mask is similar to samplers_used_mask but for UBOs.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Allow external users to intercept resource creation based on
shared bind flag.
Signed-off-by: David Riley <davidriley@chromium.org>
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
Introduce a SHADER_REQ_SAMPLER_BUF bit and use it with shader_req_bits.
v2: use bitwise or for the SHADER_REQ_* fields, use next bit in the list
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> (v1)
We do that across the board, plus it makes the code slightly more
comprehensible.
v2: update the is_shad hunk as well.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> (v1)
The function emit_sampler_decl() considers that GLES does not have 1D
textures, but it ignores the fact that we can have a range passed into
the function.
This workaround predates the correct fix in vrend_shader_samplertypeconv()
which returns a "2D" literal as needed.
Drop this partial workaround.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Analogous to previous commit there's a single user that cares about it.
Let that one use amplertype_is_shadow() and drop the function argument.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Only a single user cared about the is_shadow information.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
As pointed out by Erik, this is a rogue-client behaviour which we
generally just ignore.
Suggested-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
GL 4.2 supports depth layouts that make it possible to optimize by
enabling early depth tests and still being able to write a new
z value in the fragment shader under specific circumstances.
Fixes#106
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
The fuzzer series added a few warnings that need to be silenced.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: David Riley <davidriley@chromium.org>
Currently we're using git clone --since=$GIT_DATE + git checkout $SHA
This causes problems when the $SHA is outside the time period.
Technically one can do git fetch origin $SHA, yet it requires a toggle
in git server-side. There is no obvious way to enable that in gitlab.
Alternatively we can (and should) update piglit and deqp on somewhat
regular intervals - just like we do for Mesa.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Currently we use echo "\n\n" which does not even print a couple of new
lines :-\
Fix that and make it slightly more indicative of what's happening.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
Currently we have the exact same code for all the runtime tests. A
simple solution is to write a "generic" one and extend upon it.
This minimises the boilerplate, prevents issues like ones addressed with
earlier patch.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
There is no reason to handle the test separately, at the high-level at
least.
If needed we can make the results stand out better in the [near] future.
Note: this removes the (now dead) --compare-previous. I've considered
keeping it, yet since it doesn't attribute the flip-flopping tests it's
better to remove it for now.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
There is nothing test specific to it, move it outside the piglit/deqp
hunks. The latter of which made a bit clearer with a switch statement.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
Fold the duplicates and kill the unreachable default statement. While
we're here add a comment that we need similar must-pass test files for
piglit.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
We somewhat consistently use the latter anyway.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
There has been no wildcard or driver specifics ever since the code was
introduced.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
Instead of manually looping over the file, pass the file to the runner.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
Move the validation before the tests, since it's completely agnostic.
Any empty lines have already been stripped away.
This effectively removes fairly confusing output such as:
Running unreliable deqp-gl32 on vtest-softpipe: Fail - passed 0/0 tests
It used to happen since we run piglit/deqp with empty list, when we did
not need to run it at all.
Aside: this has uncovered a piglit bug, where it will run all tests,
when the list is empty.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
Update the piglit ignore_tests and sed pattern to use the real format
which is path/to/test, with @ instead of /.
This will allow us to pass the file directly into piglit, just like we
do with deqp ;-)
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
The logs are not neither used, nor accessible - kill them.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
The docker documentation suggests that all the apt-get operations should
be done in a single RUN command.
Additionally it mentions that explicit invocation of apt-get clean is not
needed, and one should rm -rf the local apt cache.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
Destroy resources even if there is a pipe_reference.
Signed-off-by: David Riley <davidriley@chromium.org>
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
A fuzzer which works by fuzzing output that can be captured via vtest
using the VTEST_SAVE env variable for virgl_test_server. That input can
be used as a seed corpus to get better coverage than purely randomly
generating command streams.
Signed-off-by: David Riley <davidriley@chromium.org>
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
Allow input to be changed from reading from a socket.
Signed-off-by: David Riley <davidriley@chromium.org>
Reviewed-By: Gert Wollny <gert.wollny@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>