This is *always* going to be the same, so let's drop it. Even though
it's just a few bytes, it seems silly to store the same prefix over
and over again.
Signed-off-by: Dave Airlie <airlied@redhat.com>
This adds a new api to set/get a private pointer.
v2: add private ptr test
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
If more then one input variable is tagged as requiring winsys_adjust_y then
this variable would be declared more then once and consequently compiling the
shader would fail.
Keep track of whether the variable was already declared to make sure it is emitted
only once.
Closes: #72
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
There's no point in eagerly setting the blend-state, when we need to
also know the framebuffers to get it right.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
In the only codepath that leads here, this exact binding has already
been made, so let's avoid double-work.
This one makes sense on it's own.
Signed-off-by: Dave Airlie <airlied@redhat.com>
This is only updated from one place, and it's usually going to stay
zero. So let's cache it to prevent excessive state emission.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This is always passed as zero, so let's make the code a bit easier to
grok by removing this unused argument. We still need to pass zero to the
externally passed callback, though.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This should help a bit with CPU overhead when running on top of OpenGL 4.4
(or newer).
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Gurchetan Singh [gurchetansingh@chromium.org]
Signed-off-by: Dave Airlie <airlied@redhat.com>
Fixes: tests/spec/arb_compute_shader/execution/basic-local-id-atomic.shader_test
Reviewed-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This fixes rendering in Minecraft (Java Edition), where we would
otherwise incorrectly mark a fog-inputs as flat.
While we're at it, fix a similar issue for auxprefix.
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
When running tests it's easy to lose track the segfaults in the console spam,
very simply just catch the segfault and printf.
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
When changing the from a one-by-one upload to an array upload the test for the
array pointer to the uniform IDs was replaced by testing the uniform array ID
against -1. However, this is not enough, because when the context is allocated
all is cleared to zero, and apparently the structure is re-used in different
invocations of shader programs. Here, one shader might have been removed but
the const field was still allocated resulting in a sigsegv. This happens e.g.
by running
dEQP-GLES31.functional.primitive_bounding_box.wide_points.
global_state.vertex_tessellation_geometry_fragment.fbo_bbox_larger
global_state.vertex_tessellation_geometry_fragment.fbo_bbox_smaller
tessellation_set_per_draw.vertex_tessellation_fragment.default_framebuffer_bbox_equal
tessellation_set_per_draw.vertex_tessellation_fragment.default_framebuffer_bbox_larger
resulting in
AddressSanitizer: SEGV on unknown address 0x00000000001c
The signal is caused by a READ memory access.
Hint: address points to the zero page.
#0 0x7f595b9eb875 in vrend_draw_bind_const_shader src/vrend_renderer.c:3677
#1 0x7f595b9ed37f in vrend_draw_bind_objects src/vrend_renderer.c:3810
Work around this by checking whether the shader type data is allocated.
Fixes: 172c9679b4
vrend/shader: handle uniforms as array
Tested-by: Jakob Bornecrantz <jakob@collabora.com>
Acked-by: Jakob Bornecrantz <jakob@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
It's a pkg-config 0.28 feature and Travis-CI ships with an older version.
Do the trivial task of writing it out manually ;-)
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Elie Tournier <elie.tournier@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
As suggested by libtoolize
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Elie Tournier <elie.tournier@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
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>