These variables don't support swizzling, but are accessed as
arrays.
v2: Fix copy-paste error (David Riley)
Closes: #230
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: David Riley <davidriley@chromium.org>
__lsan_default_suppressions is only defined if -fsanitize=address, but
leak suppression is still needed when the LeakSanitizer is used without
the AddressSanitizer (-fsanitize=fuzzer for example, since LeakSanitizer
is enabled by default on linux).
Signed-off-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: David Riley davidriley@chromium.org
Compute shader don't have in- or outputs, so don't try to
sync the interfaces with the shaders that are still bound.
This fixes a state leak where non-compute shaders are still
bound when a compute shader is compiled.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Lepton Wu <lepton@chromium.org>
As suggested by Lepton
Fixes 57a4e9498a
vrend: get rid of glShaderStorageBlockBinding
Closes: #229
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Lepton Wu <lepton@chromium.org>
align expects 32-bit integers while size_t can be 64-bit. Also move
aligning to after size is checked against
VKR_CS_DECODER_TEMP_POOL_MAX_SIZE.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Add VKR_CS_DECODER_TEMP_POOL_MAX_SIZE and set it to 64MiB.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
We could also let the decoder check for them because vk.xml has
"optional" attribute that is used to specify whether a pointer can be
NULL or not. For now, do it manually.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
The flag allows fence callback to be executed directly from the
fence polling thread. It requires the `write_fence` callback
provided by the user to be thread-safe.
The `virgl_renderer_poll()` method no longer needs to be called
by the user if that flag is used.
v2: set VKR_RENDERER_ASYNC_FENCE_CB as well (by olv)
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com> (v1)
It indicates that fences should be retired directly from the
sync thread when enabled.
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Once we retire fences directly in the sync thread, we will also need
to check queries in the same loop as virgl_renderer_poll() will no
longer be called.
In order to do that safely, we need to lock around operations on
the query waiting list. We also need to keep track of the current
context for the sync thread given we need to update it before
checking query status.
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
It indicates that virgl_context::retire_fence should be called from the
sync threads.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
This fixes all piglits from:
spec@arb_texture_query_levels
v2: use tgsi_proc_to_prefix
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Acked-by: Rohan Garg <rohan.garg@collabora.com>
Since GLES doesn't support QueryTextureLevels in shaders we have
to collect this info and pass it as uniform to the shader.
v2: use pipe_shader_to_prefix
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
v2: switch to C and atexit (suggested by Gert)
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> (v1)
Reviewed-by: Ryan Neph <ryanneph@google.com> (v1)
This is needed to reduce the size occupied by these fields.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
Seperate more elements into the shader stages that they are used in
and evaluate them only for the stage they are relevant for.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
There is no reason why this value should be obtained using a return
parameter. Also fix the version to return zero when the version string
doesn't follow the standard.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
Mesa clamps the number of cbufs to eight, so we can use uint8_t bitmask for
cbufs states. Be save for the future by only reporting support for
at most eight cbufs.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
Compress the structure so that it fits into a 64 bit value.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
In addition combine values into a bitfield so that the compiler can use a
64 bit move instead of individual moves.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
Keeping all the information in one place might come in handy when we
want to further refactor this. On the way also compress the structure.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
The info should not be overwritten by other outputs.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
Use a bitfield to declare vrend_interp_info and make it a fixed size array.
One one hand this avoids all the hassles with allocating and freeing memory,
and it will make it possible to shrink the size of the data that is passed
from the sinfo to the shader key.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
- don't write zeros, the memory is initialized to zero anyway
- reorder evaluation to check whether it is a FS only once.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
The property doesn't change. so it doesn't make sense to set it in the
shader key.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
Caught by fuzzer. surf[0]->texture cannot be assumed to be a valid
pointer.
Signed-off-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
For texture arrays, the layer is stored at blit.{src,dst}.box.z.
In those cases, we need to go through the same path as we already do for
GL_TEXTURE_CUBE_MAP.
Fixes piglit's spec@ext_texture_array@copyteximage {1d_array,2d_array}.
Tested on both GLES and GL backends.
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
On GLES it is not supported, and on GL it seems to be irrelevant,
because the guest already handles this.
Update the test expectation accordingly.
Fixes#201
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Italo Nicola <italonicola@collabora.com>