Clang detects that a signed character can't be >= 128. Instead,
we should just explicitly check for the 8th bit via bitmask compare.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>
Clang warns for passing one enum type where another was expected.
This was just a copy/paste bug, and had no real impact since the
enum was just used as an integer in this function.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>
Clang warns that the second instance overrides array entry
initialization, so remove the copy/pasted line. UNORM entries
are already initialized above (with alpha explicitly, and
NO_ALPHA used for the others), so this was just a duplicate and
had no real impact.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>
Clang warns that errorString is uninitialized if printBlobUtf8
is null, meaning GetBlobAsUtf8 failed, but then we go ahead and
access it (and printBlobUtf8) after the if. Expand the if to
encompass the printing.
Fixes: 2ea15cd6 ("d3d12: introduce d3d12 gallium driver")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>
Missed these last time through, not sure how. I couldn't find a
reason for the nested loop in d3d12_enable_fake_so_buffers to go
backwards, which would require signed, so I switched it to forward.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>
In case the stencil is modified, it is also enabled. That was the
behavior of the original code, which was also the correct behavior,
so reinstate the behavior.
Fixes dEQP-GLES2.functional.fragment_ops.depth_stencil.* on STM32MP1 GC400T.
Fixes: b29fe26d43 ("etnaviv: rework ZSA into a derived state")
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8174>
These bring a whole lot of new coverage to these drivers, since dEQP is
bad at desktop GL feature coverage around early GL 3.x. piglit also gets
at a lot of MSAA, fast clearing, and texture layout issues that dEQP
doesn't do much with.
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7370>
I've set it up in the gitlab-runer config on all the freedreno boards.
This means that for piglit, where the run.sh always choose either this
variable or 4 threads otherwise, we'll have the right number of parallel
tasks.
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7370>
The .baremetal_test sets DEQP_PARALLEL: 0 (number of CPUs), so existing
DEQP tasks should already be auto-configured. This means we can drop
a530's single-threaded overrides, since it's non-SMP.
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7370>
ARM64 had it for traces only, upgrade it to a full build so we can test
a630. We also add it for armhf, as we'll want it on both rpi and etnaviv.
Bumped the LAVA tag as well, since the script changes a bit and it does
impact the final image (even if we aren't pulling in full piglit there
yet). Note I also had to drop the "v" on the tarring of their rootfs, as
the verbosity on baremetal was exceeding job log size.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7370>
With the extension specification merged in and the last query now
supported, the extension can be advertised.
v2: Fix indentation (Dave Airlie)
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2078>
v2: Remove clCreateProgramWithIL from api/invalid.cpp
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2078>
v2:
* Change the code to avoid the macro (Karol Herbst, Francisco Jerez);
* Update the code to add a `cl_name_version`.
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2078>
v2: Move `supported_il_versions_as_string()` from `device` to an
anonymous namespace, and remove the static storage of the results
(Francisco Jerez)
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2078>
v2: Use the same storage for OpenCL C sources and ILs representations
(Karol Herbst, Francisco Jerez)
v3:
* Remove `program::has_source` and instead add a value to
`program::il_type` for sources. (Francisco Jerez)
* Use `std::move()` on sources.
* Replace `CL_MAKE_VERSION(99999999u, 0u, 0u)` with
`std::numeric_limits<uint32_t>::max()` (Francisco Jerez)
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2078>
v2:
* Change the existing method to return a `std::vector<cl_name_version`;
* Add a string function that uses the previous method but returns a
`std::string`.
v3:
* Remove `supported_il_versions_as_string()` (Francisco Jerez)
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2078>
v2: Explicitly construct the cl_name_version object.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2078>
An OpenCL implementation advertising a certain version of the API does
not have to support all existing version: some versions are mandatory
but not all. For example, the OpenCL 2.1 Specification mentions that
conforming implementations have to support SPIR-V 1.0, but only might
support higher versions.
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2078>
clover::program stores IL representations using a std::string, so change
the API to also use std::string to avoid copies and additional
allocations.
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2078>
v2: Change API to take a std::string
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2078>
SPIR-V and OpenCL encodes differently version numbers and since SPIR-V
version numbers are reported in OpenCL, there is a need for utilities to
convert back and forth.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2078>
Conditional rendering bumps us to big GL 3.0 on Midgard, but broken
texture buffer handling keeps us from GL 3.1. That should be fixed
shortly, I hope.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8292>
Enables OpenGL 3.0 by default on t760+:
$ PAN_MESA_DEBUG= glxinfo | grep "GL version"
OpenGL version string: 3.0 Mesa 20.3.0-devel
Inverted conditional rendering is also enabled as the conditional
rendering code handles that case.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8292>
Similar to shared memory load/store, except giving a different memory
type to the hardware.
Add nir->scratch_size to ctx->tls_size to allocate the memory.
Tested with the Piglit OpenCL test i32-stack-array.cl.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8264>
There are now more intrinsics for which nir_type_uint is forced than
where the destination type is used to find the intrinsic type, so
invert the conditional so that nir_type_uint is the default case when
nothing more specific is given.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8264>
We want to add support for more memory types, so replace the is_shared
bool with an integer that is directly stored to load_store.arg_1.
The new memory type values are off by 0x40, as that bit now comes from
the index type.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8264>
mir_args_ssa asserted that the given number of arguments to use is
greater than or equal to the actual number, but this is not checked by
callers, so instead of crashing return false to mark failure.
Fixes the local memory atomics OpenCL tests in Piglit.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8264>
The index type is actually a two-bit field, with support for both sign
and zero extension.
What was previously labelled as `zext` actually does sign-extension,
but we want that in most cases anyway.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8264>