Commit Graph

127910 Commits

Author SHA1 Message Date
Pierre-Eric Pelloux-Prayer d94bec5c49 mesa/st: introduce PIPE_CAP_NO_CLIP_ON_COPY_TEX
If supported this means that src_x/src_y/width/height parameters of
CopyTex functions will not be clipped using the read framebuffer's dimensions.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6259>
2020-09-02 11:53:16 +02:00
jzielins 54fed1cf95 gallium/swr: Fix compilation TCS/TES compilation issues
Gallvm API changes in TCS/TES, but the compilation worked
for older LLVM APIs. With LLVM 12 update is needed.

Reviewed-by: Krzysztof Raszkowski <krzysztof.raszkowski@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6554>
2020-09-02 11:13:31 +02:00
jzielins 639605e5ba gallium/swr: Fix compilation with LLVM 12
Update to reflect changes in VectorType and ElementCount APIs

Closes: #3457
Reviewed-by: Krzysztof Raszkowski <krzysztof.raszkowski@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6554>
2020-09-02 11:12:21 +02:00
Samuel Pitoiset abbfc5b8db spirv: fix retrieving dest type for OpFragmentMaskFetchAMD
Since the dest type is retrieved from the SPIR-V return type now,
we have to set it manually for OpFragmentMaskFetchAMD. The result
type must be a 32-bit unsigned integer type scalar.

Fix dEQP-VK.pipeline.multisample.shader_fragment_mask.* with RADV.

Fixes: a196f05fc2 ("nir/vtn: Use return type rather than image type for tex ops")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6533>
2020-09-02 08:54:22 +02:00
Jonathan Gray 4500e6e460 vulkan: make VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT conditional
Only advertise VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT if CLOCK_MONOTONIC_RAW
is defined.  Fixes the build on OpenBSD which has CLOCK_MONOTONIC but not
CLOCK_MONOTONIC_RAW.

Fixes: 67a2c1493c ("vulkan: Add VK_EXT_calibrated_timestamps extension (radv and anv) [v5]")
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6517>
2020-09-02 12:15:07 +10:00
Jonathan Gray 7fbeb2623f radv: remove seccomp includes
57c95d2ce2 ("radv: a support for a secure compile fork at device creation")
added includes which were not removed in
7324977e42 ("radv: remove the secure compile support feature")

remove these no longer needed includes to fix the non-linux build

Fixes: 7324977e42 ("radv: remove the secure compile support feature")
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6517>
2020-09-02 12:15:07 +10:00
Jonathan Gray b30bd6fe5f util/os_misc: os_get_available_system_memory() for OpenBSD
Return the smallest value of available non-kernel physical memory and
the static per process data size limit as the amount of available
system memory on OpenBSD.

Fixes: b80930a6fe ("anv: add support for VK_EXT_memory_budget")
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6517>
2020-09-02 12:15:07 +10:00
Jonathan Gray 5b1ed09ff0 anv: use os_get_available_system_memory()
Replace local get_available_system_memory() function with
os_get_available_system_memory().

Fixes: b80930a6fe ("anv: add support for VK_EXT_memory_budget")
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6517>
2020-09-02 12:15:07 +10:00
Jonathan Gray 033dcb2978 util/os_misc: add os_get_available_system_memory()
Add os_get_available_system_memory() derived from
src/intel/vulkan/anv_device.c get_available_system_memory()

Fixes: b80930a6fe ("anv: add support for VK_EXT_memory_budget")
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6517>
2020-09-02 12:14:56 +10:00
Jonathan Gray 81b163fb73 anv: use os_get_total_physical_memory()
Replace non-portable sysinfo() use with Mesa's
os_get_total_physical_memory()

Fixes: 060a6434ec ("anv: Advertise larger heap sizes")
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6517>
2020-09-02 11:40:25 +10:00
Eric Anholt 0369dd9077 freedreno/a6xx: Add ARB_depth_clamp and separate clamp support.
Passes piglit depth_clamp, depth-clamp-range,
amd_depth_clamp_separate_range.  This is part of enabling GL 3.2 (the
other is bumping PIPE_CAP_GLSL_FEATURE_LEVEL, which I'm hoping to do once
we have the KHR-GL* testing in place).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6544>
2020-09-01 23:03:46 +00:00
Eric Anholt 5c0d34cee4 ci: Enable KHR-GL30 CTS testing on freedreno a630.
Since we expose desktop GL, let's get at least a little bit of testing
coverage of it.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6526>
2020-09-01 21:32:46 +00:00
Eric Anholt ef807a52f1 ci: Use the same VK-GL-CTS tree for GL/GLES as VK.
There's no need to have separate build scripts here, just choose what the
DEQP_TARGET is for the particular container being built.  This brings in a
tremendous number of GLES test fixes that haven't made it into a tagged
gles CTS release.

Closes: #2056

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6526>
2020-09-01 21:32:46 +00:00
Eric Anholt eb02b31123 ci: Bump vulkan CTS version to 1.2.3.2, and keep the GL CTS around.
The version bump gets us various testcase fixes, mostly to test
requirements).  While we're rebuilding the container, copy GL CTS stuff
from build-deqp-gl.sh -- we had already included the glcts binary in our
image, but we had unnecessary other binaries and were missing the mustpass
files (container size stays the same overall).  Also pull in all the GLES
mustpass lists, not just the main ones -- Rob wants them to increase our
coverage to match what Android CTS covers.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6526>
2020-09-01 21:32:46 +00:00
Alyssa Rosenzweig b9df3fef4d panfrost: Drop PIPE_CAP_MAX_COMBINED_HW_ATOMIC_COUNTER/BUFFERS
Just leave it at 0 and the frontend will lower for us.

Fixes dEQP-GLES31.functional.atomic_counter.get.1_counter_*

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6439>
2020-09-01 21:04:09 +00:00
Italo Nicola d7b6d2e792 panfrost: add support for atomics
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6439>
2020-09-01 21:04:09 +00:00
Italo Nicola 8e221f58a6 panfrost: add atomic ops infrastructure
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6439>
2020-09-01 21:04:09 +00:00
Italo Nicola 703b03bd45 panfrost: add support for src[3] in LOAD_STORE ops
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6439>
2020-09-01 21:04:09 +00:00
Italo Nicola f61190024e panfrost: introduce LDST_ATOMIC property
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6439>
2020-09-01 21:04:09 +00:00
Italo Nicola 16664fc641 panfrost: add LDST_ADDRESS property to atomic ops
Atomic ops have to encode the address of the variable it's writing to.
This property is used to align the address to 64-bit boundaries.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6439>
2020-09-01 21:04:09 +00:00
Italo Nicola 8e8805b212 panfrost: add atomic_cmpxchg opcode
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6439>
2020-09-01 21:04:09 +00:00
Italo Nicola 11012611d7 panfrost: fix undefined value access on mir_set_intr_mask()
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6439>
2020-09-01 21:04:09 +00:00
Jason Ekstrand 526f356633 clover: Use 64-bit offsets for shader_in on 64-bit GPUs
This really shouldn't matter as inputs should have logical pointers.
However, nir_builder defaults to building derefs based on the pointer
size in the shader_info.  It's easier for now to just be consistent
everywhere.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379>
2020-09-01 20:50:04 +00:00
Jason Ekstrand c93ade93fb nir/lower_explicit_io: Assert that compute address sizes match derefs
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379>
2020-09-01 20:50:04 +00:00
Jason Ekstrand 6678f1e81c spirv: Drop the constant_as_global as option
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379>
2020-09-01 20:50:04 +00:00
Jason Ekstrand 26a4c8f375 clover/nir: Use nir_var_mem_constant for __constant memory
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379>
2020-09-01 20:50:04 +00:00
Jason Ekstrand dfa63f2656 llvmpipe: Add support for load_global_constant
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379>
2020-09-01 20:50:04 +00:00
Jason Ekstrand 4087b5343d nouveau/nir: Implement load_global_constant
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379>
2020-09-01 20:50:04 +00:00
Jason Ekstrand ff2f44d865 intel/fs: Implement nir_intrinsic_load_global_constant
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379>
2020-09-01 20:50:04 +00:00
Jason Ekstrand 1bdf850638 spirv: Use nir_var_mem_constant for UniformConstant data in CL
For now, we leave the constant_as_global option intact and get rid of
the UBO path which no one upstream is using today.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379>
2020-09-01 20:50:04 +00:00
Jason Ekstrand bb8d8ba9c7 nir: Allow opt_large_constants to be run with constant_data_size > 0
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379>
2020-09-01 20:50:04 +00:00
Jason Ekstrand 4360a8a2b3 nir/lower_io: Add support for nir_var_mem_constant
This commit adds support for nir_var_mem_constant various places.  It
also adds a pass similar to nir_lower_vars_to_explicit_types except it
also scrapes out the constants and stuffs them into constant_data.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379>
2020-09-01 20:50:03 +00:00
Jason Ekstrand ef142c68e1 nir/lower_io: Add a build_addr_for_var helper
The new version is more verbose but also more extensible.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379>
2020-09-01 20:50:03 +00:00
Jason Ekstrand 965c268865 nir/lower_io: Use the variable mode for load_scratch_base_ptr checks
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379>
2020-09-01 20:50:03 +00:00
Jason Ekstrand ff124e3fe3 nir: Add a load_global_constant intrinsic
This has the same semantics as load_global except the memory it reads is
known to be constant so load_global_constant intrinsics can be CSEd
rather than relying on more complex copy-propagation.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379>
2020-09-01 20:50:03 +00:00
Jason Ekstrand e4f07f8bdc nir: Add a new nir_var_mem_constant variable mode
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379>
2020-09-01 20:50:03 +00:00
Karol Herbst b9927c8c8d nir/serialize: fix serialization of system values
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6545>
2020-09-01 14:55:05 -05:00
Karol Herbst 5c45eaf9b3 clover/spirv: fix vec3 alignment
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6433>
2020-09-01 18:47:30 +00:00
Karol Herbst 6e52c6dfcc nvc0/cl: hande 64 bit pointers in nvc0_set_global_handle
clover gives us a uint32_t pointer into the kernel input bufffer, but also
for actual 64 bit pointers, so we can just use memcpy instead.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6433>
2020-09-01 18:47:30 +00:00
Karol Herbst 5eacaa95a7 spirv: fix 64 bit atomic inc and dec
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstran.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6433>
2020-09-01 18:47:30 +00:00
Karol Herbst 1c9efcd7a6 nvc0/ir: fix load propagation for sub 4 byte addressing
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6433>
2020-09-01 18:47:30 +00:00
Karol Herbst 036f1c29fc clover/llvm: undefine __IMAGE_SUPPORT__ for devices without image support
libclang seems to define this on its own for SPIR targets, but the CTS
requires it to be not set if the device doesn't support images.

The SPIRV-LLVM-Translator also requires the spir triple to be set so we
can't really do anything else except to undefine.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstran.net>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6433>
2020-09-01 18:47:30 +00:00
Karol Herbst 7dc39838ed clover/nir: use offset for temp memory
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6433>
2020-09-01 18:47:30 +00:00
Karol Herbst d7b65cf7d3 nv50/ir: fix cas lowering for 64 bit
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6433>
2020-09-01 18:47:30 +00:00
Karol Herbst d421af3a99 clover/nir: Lower function_temp to scratch.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6433>
2020-09-01 18:47:30 +00:00
Eric Engestrom 8e259dad4c egl/x11: simplify dri2_initialize_x11()
eglInitialize() already handles the "retry using the software path"
logic, there's no need to repeat it here.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6353>
2020-09-01 18:31:51 +00:00
Eric Engestrom bd385c424b egl/wayland: simplify dri2_initialize_wayland()
eglInitialize() already handles the "retry using the software path"
logic, there's no need to repeat it here.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6353>
2020-09-01 18:31:51 +00:00
Eric Engestrom f7e0cdcf1a egl/surfaceless: simplify dri2_initialize_surfaceless()
eglInitialize() already handles the "retry using the software path"
logic, there's no need to repeat it here.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6353>
2020-09-01 18:31:51 +00:00
Eric Engestrom 83b5c1abc6 egl/android: simplify dri2_initialize_android()
eglInitialize() already handles the "retry using the software path"
logic, there's no need to repeat it here.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6353>
2020-09-01 18:31:51 +00:00
Jason Ekstrand cccb497d3c intel/fs: Fix MOV_INDIRECT and BROADCAST of Q types on Gen11+
The immediate case is pretty uncommon to see but it can happen, in
theory.  BROADCAST is typically used to uniformize values and those are
usually 32-bit.  However, it does come up in some subgroup ops.

Fixes: 49c21802cb "intel/compiler: Split has_64bit_types into float/int"
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6211>
2020-09-01 13:25:20 -05:00