With vtest this swizzling is necessary, but with qemu it is not, so make
it a tweak.
v2: Use original blit format to check the format type in blitter
v3: Correct typo (Gurchetan)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
On GLES B8G8R8A8_SRGB is not available and B8G8R8A8_UNORM can not be
created as immutable. In order to have versions of these formats that
can be created immutable on GLES provide the formats R8G8B8A8_SRGB and
_UNORM with swizzling to BGRA that can then be used instead of the BGRA
formats. Since this may break things these swizzled versions will later
be only enabled when the guest requests them.
v2: Check the base swizzled BGRA format only on GL
v3: Correct type in method name (Gurchetan)
v4: Add PREFER_EMULATED_BRGA to according format binding flags (Gurchetan)
v5: Add comment about formats nou to be used in the guest (Gurchetan)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
This is useful for logging a continuation on the same line.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
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>