Since GLES 3.1 supports IO arrays of arrays but D-GL only as of 4.3 and
D-GL supports interface blocks since 3.1 we prefer not emitting blocks
for GLES, with the exception of the TCS->TES out->in, where arrays of
arrays can't be used and for FS out where usually no array of array will
be created anyway.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Having this code overwrite whatever was done before is a gotcha waiting
to happen.
Signed-Off: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
The range is needed to identify indirectly addresses IO values.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Set the pre stage correctly when the TCS shader is missing on OpenGL and
warn about it when on OpenGL ES.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
We already have a helper for this, let's use it.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
When calling vrend_renderer_transfer_write_iov through
vrend_renderer_transfer_iov, we sometimes come down these
code-paths with the context 0 active, but the non-zero context being
passed as the context-pointer. Trying to do any caching based on this
will only lead to incorrect behavior.
There's little point in trying to fixup the caching in the ctx0 for
this call-site, as there's no other code-path using ctx0 that tries
to play ball with the cache.
So let's get rid ot the context-argument when possible, and pass a
NULL-pointer when it can come either from ctx0 or a rendering-context.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Without this, the next patch gets trickier, because we try to
*avoid* passing down the wrong data rather than trying to react to it.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
This argument is unused, and the function is not a part of the external
API, so there's little point in passing it just to discard it again.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Context name length was being ignored and strncpy does not enforce
null termination but the destination was being used as a null terminated
string.
Change-Id: I715394b364130578a1a6a319dc16927261523d71
Signed-off-by: David Riley <davidriley@chromium.org>
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
EXT_texture_query_lod on GLES is proposed as extension providing for
GLES what ARB_texture_query_lod provides for D-GL.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
GL_TEXTURE_LOD_BIAS is supported in GLES at least since 3.0,
This also fixes a number of piglits when run on a GLES host.
GL_TEXTURE_SEAMLESS_CUBE_MAP is not supported on the other hand.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
On GLSL ES implicit conversion are not enabled by default. Since here the
evaluations are hard coded, just emit literal values according to the
types they are used with in the operations.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
On GLES *Rect textures are not supported and emulated by using a normal
2D texture. Therefore, the texture coordinates must be normalized for
these cases and the LOD must be set to 0.
Fixes: piglits
textureGather with 2DRECT texture
arb_fragment_program_shadow/tex-shadow2drect
arb_fragment_program_shadow/txp-shadow2drect
glsl-fs-texture2drect -proj3 and -proj4
Related: #81 (some non-shader tests still fail for rect textures)
v2: - Reorder some conditions to make the control flow easier to follow
- correct WS (both Gurchetan)
Remark: For some of these piglits one must currently force GL 3.3 in the
guest, otherwise they fail because of GLSL version 1.50 not being
supported.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: <Gurchetan Singh gurchetansingh@chromium.org>
GLES doesn't support 1D textures, so they are emulated by using 2D
textures and the access has to be fixed by adding the y lookup coordinate.
v2: simplify the code flow (Gurchetan)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: <Gurchetan Singh gurchetansingh@chromium.org>
This GLES extension has been merged into the OpenGL registry, so it may
now become available.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
To avoid that the guest sends mixed color attachments when this is not
supported test this and add an according caps flag.
Related: #88 (a full fix needs a mesa side patch to make use of the
flag sent)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This test also tends to time out sometimes
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reduce the number of test processes run by the CI to 1/8 of the number of
available processors.
Normally only run the build and sanity checks, and only run the test suites
for merge requests.
Also fix some string marker that seems to make problems.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This tracks more accurately what exactly needs to be updated.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
We're going to have to do this anyway, so let's just do it cleanly
right away.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
These settings can't change in the lifetime of the texture-view,
so let's set them up front instead of re-setting them on every re-emit.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
There's no point in changing the texture-binding unless we're going to
do something with the texture-stage.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
This means less needless work per frame, as this binding will never
change.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
The result is the same, we just skip a bit quicker over unused entries.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
This function was added but never used. Let's get rid of it.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: 5d2dde4 ("strings: move to 3 strings, and patch extensions onto end of string 0 (v2)")
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
A transfer won't occur in context zero if the transfer command
comes from submit_cmd. We need to restore prior state.
With the recent framebuffer binding cleanups, we really only need
to worry about the framebuffer.
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
The test requires a framebuffer configuration that softpipe doesn't support
and leads to inconsistent results.
When run directly on softpipe all these tests fail because of the framebuffer
error, but with virglrenderer we don't report this error and the results that
are read back might be random.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Add issue for tracking this set of failures.
https://gitlab.freedesktop.org/virgl/virglrenderer/issues/82
And add a previously unseen flavour of this failure.
dEQP-GLES31.functional.shaders.builtin_functions.precision.frexp.highp_vertex.scalar
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Signed-off-by: Robert Foss <robert.foss@collabora.com>
d9a4be4d0a broke a number of tests
when running on a GLES host because tgsitargettogltarget may
return PIPE_BUFFER which is 0. So, instead of simply reverting the commit
make it more explicit that we check for PIPE_BUFFER to make it clearer
that this condition may actually trigger.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Otherwise, a failure happens with gold linker:
../src/.libs/libvirglrenderer.so: error: undefined reference to 'drmPrimeHandleToFD'
https://errors.yoctoproject.org/Errors/Details/222046/
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>