Commit Graph

132850 Commits

Author SHA1 Message Date
Jesse Natalie 72d7e173e3 microsoft/resource_state_manager: Remove unused private variable
Clang detects that this variable is unused. We can re-add it if
we end up needing it but for now let's just remove it.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>
2021-01-03 23:07:21 +00:00
Jesse Natalie c11f2f5de8 microsoft/compiler: Fix tautological comparison
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>
2021-01-03 23:07:21 +00:00
Jesse Natalie f0eda8fbf8 microsoft/compile: Fix incorrect enum type in function signature
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>
2021-01-03 23:07:21 +00:00
Jesse Natalie e3ca385f3d d3d12: Remove copy/pasted line of array initialization
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>
2021-01-03 23:07:21 +00:00
Jesse Natalie ca5df4273e d3d12: Fix uninitialized variable referenced in error case
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>
2021-01-03 23:07:21 +00:00
Jesse Natalie 9252f947e5 d3d12: Fix clang warnings from {0} in C++ code
There's no reason for the 0 here since C++ supports {},
and clang doesn't like it, so drop it.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>
2021-01-03 23:07:21 +00:00
Jesse Natalie cda9d44bae microsoft/resoure_state_manager: Silence GCC invalid offsetof warning
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>
2021-01-03 23:07:21 +00:00
Jesse Natalie 1fb192d5b2 d3d12: Fix implicit fallthrough warnings
Changes comments to use FALLTHROUGH macro, to silence warnings
from both GCC and clang.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>
2021-01-03 23:07:21 +00:00
Jesse Natalie 54dd7b1d35 d3d12: Fix unused local variable warning in release build
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>
2021-01-03 23:07:21 +00:00
Jesse Natalie 28f1f6fe56 d3d12: Signed/unsigned comparison warning fixes
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>
2021-01-03 23:07:21 +00:00
Jesse Natalie 7319cabfb5 d3d12: Unused variable warning indicated bug in bo_unmap
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>
2021-01-03 23:07:21 +00:00
Jesse Natalie bd97f401dc microsoft/compiler: Fix incorrect size passed to strncpy
GCC correctly detects/warns that this was the wrong size

Fixes: b9c61379 ("microsoft/compiler: translate nir to dxil")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>
2021-01-03 23:07:21 +00:00
Jesse Natalie bb6a1f5b1e microsoft/compiler: Fix warnings produced by GCC in release mode
Inline some variables/functions that are only used for asserts.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>
2021-01-03 23:07:21 +00:00
Marek Vasut 33a6c01e12 etnaviv: Fix rework ZSA into a derived state
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>
2021-01-03 08:46:06 +01:00
Vinson Lee 8bec23a91a softpipe: Fix typos.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8279>
2021-01-02 16:39:22 -08:00
Eric Anholt 9ef2c44ce6 ci: Add a530 and a630 piglit runs.
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>
2021-01-02 02:43:21 +00:00
Eric Anholt cab48ba9f5 ci/bare-metal: Pass through FDO_CI_CONCURRENT on bare-metal runners.
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>
2021-01-02 02:43:21 +00:00
Eric Anholt 4d810df996 ci/bare-metal: Drop extra DEQP_PARALLEL settings.
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>
2021-01-02 02:43:21 +00:00
Christian Gmeiner 6e093a4493 ci/bare-metal: pass thorugh PIGLIT env vars
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>
2021-01-02 02:43:21 +00:00
Christian Gmeiner b020feb4d1 ci/fastboot: exclude either deqp or piglit
Keep the generated initramfs image as small as possible.

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>
2021-01-02 02:43:21 +00:00
Christian Gmeiner 12647ac193 ci/bare-metal: build full piglit for baremetal ARM targets.
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>
2021-01-02 02:43:21 +00:00
Christian Gmeiner 886a555e80 ci: build mesa with gbm
We need gbm support for piglit.

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>
2021-01-02 02:43:21 +00:00
Christian Gmeiner ea764c9c51 ci: build ARM mesa with X11 OpenGL support
I want to run piglit with baremetal ci and for this opengl support
is needed.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7370>
2021-01-02 02:43:21 +00:00
Pierre Moreau 8bb001313b clover: Expose cl_khr_extended_versioning
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>
2021-01-01 21:56:59 +01:00
Pierre Moreau 44b8e8b98d clover: Implement clCreateProgramWithIL from OpenCL 2.1
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>
2021-01-01 21:56:59 +01:00
Pierre Moreau af09db6e58 clover: Advertise cl_khr_il_program
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>
2021-01-01 21:56:58 +01:00
Pierre Moreau 31ce49e6b2 clover/api: Implement CL_DEVICE_IL_VERSION
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>
2021-01-01 21:56:58 +01:00
Pierre Moreau 4028911ccb clover: Handle CL_PROGRAM_IL in clGetProgramInfo
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>
2021-01-01 21:56:58 +01:00
Pierre Moreau a92afdea58 clover: Implement clCreateProgramWithILKHR
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>
2021-01-01 21:56:58 +01:00
Pierre Moreau 7b1659173a clover: List supported ILs versions
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>
2021-01-01 21:56:58 +01:00
Pierre Moreau c0d4d21ff5 clover/spirv: Use cl_version for SPIR-V versions (v2)
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>
2021-01-01 21:56:57 +01:00
Pierre Moreau 42fe80896b clover/spirv: Add function checking the SPIR-V version
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>
2021-01-01 21:56:30 +01:00
Pierre Moreau 7005cadbc9 clover/spirv: Change API to use std::string binaries
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>
2021-01-01 21:56:29 +01:00
Pierre Moreau a1db84be7a clover/spirv: Add function checking whether a binary contains SPIR-V
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>
2021-01-01 21:56:29 +01:00
Pierre Moreau 47feba98f3 clover/spirv: Add version conversion utilities
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>
2021-01-01 21:56:29 +01:00
Marek Olšák 7de1468932 st/mesa: skip glDrawPixels if it's totally clipped for all codepaths
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7720>
2021-01-01 11:34:19 -05:00
Marek Olšák 004c92096c st/mesa: relax requirements for doing glCopyPixels via blit
glCopyPixels doesn't use a vertex shader, so ignore it.
The rest should be obvious.

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7720>
2021-01-01 11:34:19 -05:00
Marek Olšák 8848114345 st/mesa: don't do glCopyPixels via blit if depth bounds test is enabled
Fixes: 36a6f848bb - st/mesa: add EXT_depth_bounds_test

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7720>
2021-01-01 11:34:19 -05:00
Marek Olšák 767f70dfe1 gallium/util: fix util_can_blit_via_copy_region for conditional rendering
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7720>
2021-01-01 11:34:19 -05:00
Alyssa Rosenzweig bd697652a7 docs: Document extensions exposing GL3.0
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>
2021-01-01 00:08:58 -05:00
Icecream95 a5c81450ad panfrost: Set conditional render cap
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>
2021-01-01 00:08:52 -05:00
Alyssa Rosenzweig 9f1bbf9efb panfrost: Respect the render condition
Clears, draws, and blits should check. All from freedreno.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8292>
2021-01-01 00:08:51 -05:00
Alyssa Rosenzweig f2b6c49b33 panfrost: Import render condition check from fd
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8292>
2021-01-01 00:08:51 -05:00
Icecream95 7ba4c5450c panfrost: Stub out panfrost_render_condition
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8292>
2021-01-01 00:08:41 -05:00
Icecream95 152bc5d15e pan/mdg: Support loads and stores to scratch memory
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>
2021-01-01 02:58:49 +00:00
Icecream95 684e5aa5b8 pan/mdg: Invert the type conditional for load intrinsics
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>
2021-01-01 02:58:49 +00:00
Icecream95 3665855c2e pan/mdg: Pass the memory type to mir_set_offset directly
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>
2021-01-01 02:58:49 +00:00
Icecream95 b504602370 pan/mdg: Add i2i64 to mir_match_offset
Similar to the existing u2u64 function, but with a different type.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8264>
2021-01-01 02:58:49 +00:00
Icecream95 b7f2619798 pan/mdg: Return false instead of asserting in mir_args_ssa
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>
2021-01-01 02:58:49 +00:00
Icecream95 e5e8a628c2 pan/mdg: Replace zext with a type enum
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>
2021-01-01 02:58:49 +00:00