This adds a HAVE_COMPRESSION macro, which is undefined if neither zlib
nor zstd are present, and is used to no-op compress.h/c. This also has
a side effect of fixing SCons, since it won't define this macro.
Fixes: d7ecbd5bf8 ("util: create some standalone compression helpers")
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9689>
This is the race condition: thread 1 check reference count of resource
and then find out out it's zero and then it begin to destroy it. Around
the same time, thread 2 gets the lock and get the resource from the hash
table and plan to use it. Then this resource gets destroyed while it's
still in use.
Signed-off-by: Lepton Wu <lepton@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9701>
When we encounter a situation when we need to swizzle, which the CB can't
resolve in one pass, swap the channel order on the next clear, so that we
don't have to swizzle.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9615>
One, only applegl needs this. Two, this isn't a function of the context
in any way so it doesn't belong in the context vtable. Just special-case
applegl for now, we can revisit applegl's dispatch later.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9690>
The client-side implementation of this operates entirely in terms of the
GL and X client APIs. There's nothing DRI-specific about it, evidenced
by apple and windows using it unchanged. Save a little code size by
handling the direct/indirect difference directly.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9690>
When the compositor advertises a render node, we don't need to
perform DRM authentication. Skip the unnecessary roundtrip in this
case.
Signed-off-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9704>
When I initially started writing these lists, I expected the lists to be
much less uniform in what bits were required. Turns out I was wrong, and
this ended up really neat and orderly.
I'm sure we're missing some defacto requirements here and there,
especially for the early versions. This list is based on what we check
for in version.c, and it's better than nothing.
Suggested by Mike Blumenkrantz.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9602>
Triple backticks doesn't mean anything in RST, so this becomes quoted
strings containing backticks. That's not what I meant here...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9602>
It used to be that this intrinsic was never created and texture
instructions were always used.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes: 50881d59e6 ("compiler/spirv: fix image sample queries")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9686>
valgrind returns exit code 126 if it can't write to the file passed to
--log-file. Hopefully it'll be the same for any other invalid valgrind
command line parameters or internal errors as well.
Using a different exit code (31) for this was hiding the fact that the
valgrind test wasn't actually working.
v2:
* Use exit code 126; can't treat any non-0 exit code as failure because
glcpp is expected to exit with non-0 for some of the input we feed it
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com> # v1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>
Use pipes for direct communication between child & parent process.
Using tempfiles sometimes resulted in hitting the meson timeout if there
was high filesystem pressure (I saw a single unlink system call take as
long as 4 seconds; attempts to re-use a single tempfile just shifted the
delays to truncate/close systems calls).
As a bonus, this gets the valgrind test actually working as intended.
It wasn't working because the tempfile passed to --log-file didn't exist
(due to the earlier os.close(fd)?).
v2:
* Wrap .read() in "with open()" (Dylan Baker)
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>
Once it's actually working as intended again, it may need that much
time.
v2:
* Bump to 240 seconds, still hit timeouts with 180.
* Don't change test priority.
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com> # v1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>
Once the glcpp valgrind test works as intended again, it would delay
the dependent test jobs by ~1-4 minutes.
The meson-clover job would run the glcpp valgrind test multiple times
and take more than 10 minutes to finish.
valgrind can't work in the meson-android job, would need an ARM backend.
v2:
* Disable in meson-clover as well.
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com> # v1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>
valgrind flagged members of gl_ctx->Extensions being used uninitialized:
==23417== Conditional jump or move depends on uninitialised value(s)
==23417== at 0x112642: _glcpp_parser_handle_version_declaration.part.0 (glcpp-parse.y:2493)
==23417== by 0x11A515: glcpp_lex_update_state_per_token (glcpp-lex.l:132)
==23417== by 0x11A515: glcpp_lex (glcpp-lex.l:547)
==23417== by 0x114D46: glcpp_parser_lex (glcpp-parse.y:2302)
==23417== by 0x114D46: glcpp_parser_parse (glcpp-parse.c:1871)
==23417== by 0x11ADC6: glcpp_preprocess (pp.c:238)
==23417== by 0x111384: main (glcpp.c:174)
==23417== Uninitialised value was created by a stack allocation
==23417== at 0x111295: main (glcpp.c:136)
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>
Instead of using tempfiles to communicate between child & parent
process. The latter sometimes resulted in hitting the meson timeout if
there was high filesystem pressure.
Fixes: ccaa5b034f "intel/tools: rewrite run-test.sh in python"
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>
this flushes any pending updates and avoids trying to access constant buffers
which have been unset (and are also potentially deleted)
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9692>
llvmpipe has some crazy dependency ordering with constant buffers that
I don't want to mess with, so instead this ensures that descriptors are
always updated as early in the command stream as possible, avoiding any
use-after-free scenarios which might result from lavapipe freeing memory
in a still-bound descriptor that's pending an update
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9692>
These qualifiers were removed in GLSL 4.20 and GLSL ES 3.00. For
desktop GL they are now only allowed if the shader is declared as
a compatibility shader.
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9552>