This is needed for modern games that require more than 16 samplers.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: John Bates <jbates@chromium.org>
This prevents the creation of src/gallium/auxiliary/util/__pycache__/
which is untracked in git.
The directory in question could be added to .gitignore instead, but
since the script is only executed once, it doesn't seem worthwhile to
write bytecode to disk anyway.
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
By removing some code from cso_cache.h, u_format.c, and u_inlines.h, we
can remove p_context.h, p_screen.h, and u_surface.h as well.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
v2: u_box.h, u_pack_color.h and u_rect.h became unused as well
The removed files have no user.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
v2: u_bitmask.* is unused as well
uif is now defined. util_is_power_of_two is replaced by other variants.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
This requires u_string.h to be updated as well. There is no more string
functions prefixed by util_. pipe_debug_message is removed as well.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
Elements is replaced by ARRAY_SIZE.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
No visible API change.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
No visible API change.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
MAYBE_UNUSED is replaced by ASSERTED. CLAMP in u_math.h is updated to
avoid a compile error.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
v2: cherry pick virglrenderer-specirfic e1e6d3cb ("Include sys/types.h
in p_compiler.h")
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
v2: keep u_double_list.h for the moment
PIPE_ARCH_*_ENDIAN is replaced by UTIL_ARCH_*_ENDIAN. We also differ
from Mesa in how arch and endianness are detected.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
No visible API change.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
Fuzzer detected a Use-of-uninitialized-value in p_atomic_dec_zero(),
which uses inline assembly on some platforms. MSAN's documentation claims
unreliable results when instrumenting functions with inline assembly. In
this case, `unsigned char c` is write-only and it's initial value isn't
important, just disable MSAN for p_atomic_dec_zero().
Signed-off-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: John Bates <jbates@chromium.org>
p_compiler.h includes stdlib.h which, when compiling against glibc,
transitively includes sys/types.h. The rest of the build relies on this
include in order to provide the uint typedef. Musl's stdlib.h does not
include sys/types.h, causing a missing definition of uint. Include
sys/types.h directly in p_compiler.h.
Signed-off-by: Colin Cross <ccross@android.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
This part has been removed from Mesa since commit 3a8a5e77e8f992aaa3539e060885138c2fcddad1
as the patent expired in 2017.
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
If the shader had too many BARRIERs, we'd overflow our preallocated
token buffer and fail to parse the command stream.
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
On 64-bit builds, we can store uint64_t keys in pointers directly and
there is no need to malloc/free.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
util_hash_table_u64 is a wrapper to util_hash_table with uint64_t
keys. This is similar to hash_table_u64 in mesa.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
v2: - Add root build dir and src to include path (Gert)
- fix gallium includes (Gert)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Acked-by: Rohan Garg <rohan.garg@collabora.com>
Autotools is deprecated since debb6e6ac4
It's now time to drop it definitively.
Signed-off-by: Elie Tournier <elie.tournier@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
These formats are supported and required by GLES3. Without these
formats, guest MESA uses uncompressed formats to emulate them
while formats like GL_R16 are not available on GPU like MALI.
Signed-off-by: Lepton Wu <lepton@chromium.org>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Using testing will need continued updates of the basic build scripts and
sometimes packages might even not be available, so lets switch to buster
and buster-backports.
v2: Fix include directory declaration
Closes: #147
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
In order to keep the changes limited and not go out of sync with Gallium
too much the old PIPE_FORMAT* are replaced with defines to their
VIRGL_FORMAT* counterparts and pipe_format becomes a typedef
of "enum virgl_formats".
v2: Add 'src' to includes in meson.build
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
For this introduce a NDEBUG_UNUSED macro
v2: Replace NDEBUG_UNUSED with MAYBE_UNUSED (Emil)
Silence unused warnings only if NDEBUG is defined
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
This patch adds the meson build system as alternative to the
autotools build system.
v2: Thanks to Alexandros for his comments that lead to the following changes:
- Fix logic for platforms so that the ones selected by 'auto' don't
fail if the dependencies are missing, but fail when explicitely
requested
- declare project version differently
- set a minimun meson version
- clean up some braces
- reformat some code
- squesh remaining separate patches
v3: require meson 0.46 (Gurchetan)
v4: set minimum gbm version to 18.0.0
v5: - fix gbm version requirement (Gurchetan)
- don't duplicate glx files (Gurchetan)
Fixes: #129
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
That helps the code checker to see whether all switch cases are used.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
There's no poin t in keeping u_format_pack.py around just to declare
this one function. Let's move it into where it's used.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This makes this code a bit simpler to follow.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This code never gets called from anywhere, so let's get rid of it.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
We already removed the high-level format-conversion code from our
gallium sources, so there's no point in keeping this code around.
It's not included nor compiled, so it's just cruft right now.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
These functions was removed years ago, keeping the prototypes just leads
to confusion. Let's rip them out as well.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>