Caio Marcelo de Oliveira Filho
89eebca057
util: Convert blob_test to use gtest
...
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Acked-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13425 >
2021-10-20 21:40:31 -07:00
Caio Marcelo de Oliveira Filho
d4c536d3d9
util: Convert u_atomic_test to use gtest
...
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Acked-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13425 >
2021-10-20 21:40:31 -07:00
Caio Marcelo de Oliveira Filho
1d78a31bec
util: Move tests in single file directories to tests/
...
Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Acked-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13425 >
2021-10-20 21:40:31 -07:00
Caio Marcelo de Oliveira Filho
2209f5794d
util: Consolidate existing gtests in a single binary
...
Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Acked-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13425 >
2021-10-20 21:40:31 -07:00
Eric Engestrom
60768f4029
docs: update calendar for 21.3.0-rc2
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13460 >
2021-10-20 20:51:28 +01:00
Caio Marcelo de Oliveira Filho
662fbc0120
nir: Use a single binary for gtests
...
Less artifacts and less time running linker. The
load_store_vectorizer test is still split since we need to update
gitlab-ci scripts to skip certain tests in certain builds. Added a
TODO with the concrete suggestion.
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13414 >
2021-10-20 18:26:31 +00:00
Caio Marcelo de Oliveira Filho
8cb7d6f81b
spirv: Use a single binary for gtests
...
Less artifacts and less time running linker. Also set the guideline
for future tests to not create new binaries for extra gtests.
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13415 >
2021-10-20 17:55:36 +00:00
Jason Ekstrand
39f2594531
anv: Implement VK_EXT_global_priority_query
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11250 >
2021-10-20 15:51:59 +00:00
Connor Abbott
e7599f09a1
ir3: Use stp/ldp base offset for {load,store}_scratch
...
When we have a series of loads/stores we were creating a constant for
each one, which isn't great. Furthermore, because the nir pass puts the
offset constant at the top of the shader, it resulted in extra register
pressure and spilling when that happened inside a loop. Fix this by
using the base/offset form of stp and ldp.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13307 >
2021-10-20 15:19:15 +00:00
Connor Abbott
7deb0d296d
ir3/cse: Support mov instructions
...
This doesn't affect shader-db at all, but it will help clean up the
mov's emitted in the next commit when there are multiple ldp/stp.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13307 >
2021-10-20 15:19:15 +00:00
Rhys Perry
cd3f0683cd
aco: simplify emit_stream_output()
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13438 >
2021-10-20 15:00:23 +01:00
Alejandro Piñeiro
d50be41f8f
broadcom/compiler: remove unused macro and function definition
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13444 >
2021-10-20 10:08:27 +00:00
Rhys Perry
9bc0fc89c8
aco: disable mul(cndmask(0, 1, b), a) optimization sometimes
...
This optimization doesn't work for SDWA or DPP multiplications and we
can't do it if denormal flushing is required because v_cndmask_b32 doesn't
do that and we can't do it if we can't assume operands are finite because
0.0 * inf is NaN, not 0.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13434 >
2021-10-20 07:35:52 +00:00
Mike Blumenkrantz
86b3d8c66c
zink: rescue surfaces/bufferviews for cache hits during deletion
...
this is a wild race condition, but it's possible for these to get their
final unref, enter their destructor, and then get a cache hit while waiting
on the lock to remove themselves from the cache
in such a scenario, a second, normal check of the refcount will suffice,
as the increment is atomic, and the value will otherwise be zero
fixes crashes in basemark
cc: mesa-stable
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13442 >
2021-10-19 19:43:19 +00:00
Emma Anholt
80d5e40fd1
freedreno/afuc: Disable the disassembler on 32-bit builds.
...
There's an mmap(2 << 32), which armhf can't handle.
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5514
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13421 >
2021-10-19 18:55:07 +00:00
Mykhailo Skorokhodov
5afce85f2b
Revert "iris: add tile cache flush to iris_copy_region"
...
This reverts commit 27534a49cf
Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12979 >
2021-10-19 18:22:31 +00:00
Mykhailo Skorokhodov
0523607ebb
iris: Add missed tile flush flag
...
Without adding `PIPE_CONTROL_TILE_CACHE_FLUSH` into `iris_emit_pipe_control`
gen12+ (UHD 750 in my case) has issues with textures.
Related-to: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5029
Fixes: c85ea824('iris: reduce redundant tile cache flushes')
Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12979 >
2021-10-19 18:22:31 +00:00
Mike Blumenkrantz
8633ce06af
zink: stop leaking descriptor pool references
...
this never really mattered before, but now these need to actually
get freed
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13430 >
2021-10-19 18:07:00 +00:00
Mike Blumenkrantz
7fb8e0b9fb
zink: don't clear descriptor pool cache on context destroy
...
the final ref on pools is owned by their program struct(s), and liveshader
cache can trigger shader deletion after a context is destroyed, so
attempting to prune pools here may end up deleting them before the
last ref is actually removed
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13430 >
2021-10-19 18:07:00 +00:00
Mike Blumenkrantz
6a852e4e06
zink: always invalidate descriptor sets on pool free
...
this used to be bad and only for debugging, but now it's good and useful
for saving memory
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13430 >
2021-10-19 18:07:00 +00:00
Mike Blumenkrantz
94fc6b0875
zink: unref descriptor pools in hybrid mode when they explode
...
these will no longer be used, so unref them so they can be deleted to
free up some vram in the driver
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13430 >
2021-10-19 18:07:00 +00:00
Mike Blumenkrantz
d065294434
zink: remove descriptor pools from hash table on deletion
...
ensure these aren't just sitting around stale
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13430 >
2021-10-19 18:07:00 +00:00
Mike Blumenkrantz
6d93729881
zink: fix descriptor interface param for program_deinit
...
this should match the _init() method and take the context
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13430 >
2021-10-19 18:07:00 +00:00
Mike Blumenkrantz
7a9e0e4fc0
zink: use ctx params for program ref/destroy functions
...
these are context objects, so destroy with the context
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13430 >
2021-10-19 18:07:00 +00:00
Marek Olšák
d29e507adc
radeonsi: don't set inline_uniforms for viewperf because it's enabled by default
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13400 >
2021-10-19 16:53:30 +00:00
Marek Olšák
c5f39acb33
winsys/amdgpu: set max_ib_size and max_check_space_size later in cs_check_space
...
If there is enough CS space, don't update them. This eliminates some overhead.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13400 >
2021-10-19 16:53:30 +00:00
Marek Olšák
6129db68bf
winsys/amdgpu: remove force_chaining parameter from cs_check_space
...
it's always false
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13400 >
2021-10-19 16:53:30 +00:00
Marek Olšák
9d852a4695
radeonsi: properly destroy buffers on failure
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13400 >
2021-10-19 16:53:29 +00:00
Marek Olšák
0d2dc06761
radeonsi: don't sync before clear_buffer and copy_buffer if the buffer is idle
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13400 >
2021-10-19 16:53:29 +00:00
Marek Olšák
d4cf4b3cee
radeonsi: don't update bind_history for internal buffer clears and copies
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13400 >
2021-10-19 16:53:29 +00:00
Marek Olšák
61ebdcfc29
radeonsi: don't sync PS or CS before (clear|copy)_buffer based on bind history
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13400 >
2021-10-19 16:53:29 +00:00
Marek Olšák
4bc8c2590e
radeonsi: rebind a buffer only in shader stages where it's been bound
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13400 >
2021-10-19 16:53:29 +00:00
Marek Olšák
13b1424e96
radeonsi: change bind_history to track usage in each shader stage
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13400 >
2021-10-19 16:53:29 +00:00
Marek Olšák
9f2a97e9df
radeonsi: add an option to use CPU storage uploads for threaded context
...
It's only enabled for viewperf for now.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13400 >
2021-10-19 16:53:29 +00:00
Marek Olšák
745ea99484
radeonsi: add SI_MAX_VRAM_MAP_SIZE definition
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13400 >
2021-10-19 16:53:29 +00:00
Marek Olšák
03186773a6
mesa: fix crashes in the no_error path of glUniform
...
Fixes: bd2662bfa1
- mesa: add KHR_no_error support to glUniform*() functions
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13417 >
2021-10-19 16:24:31 +00:00
Rob Clark
5948ff4826
freedreno/computerator: Fix mergedregs
...
This was getting set *after* ir3_shader_assemble, which was too late.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13426 >
2021-10-19 16:04:42 +00:00
Rob Clark
22a203aa4c
freedreno/isa: Fix ldg/stg "halfness"
...
Whether the load dst or store src is a half reg is determined by the
type field, similar to cat5.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13426 >
2021-10-19 16:04:42 +00:00
Rob Clark
834e8066c1
freedreno/ir3/tests: Add some 8/16b ldg/stg tests
...
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13426 >
2021-10-19 16:04:42 +00:00
Rob Clark
8657e201d0
freedreno/ir3/tests: Don't skip encode test if decode fails
...
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13426 >
2021-10-19 16:04:42 +00:00
Samuel Pitoiset
572a902566
aco: fix emitting stream outputs when the first component isn't zero
...
Fixes a bunch of XFB piglit tests with Zink.
Cc: 21.3 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13437 >
2021-10-19 15:19:42 +00:00
Samuel Pitoiset
e3cbb0eb6a
aco: fix invalid IR generated for b2f64 when the dest is a VGPR
...
Fixes few 64-bit piglit tests with Zink.
Cc: 21.3 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13435 >
2021-10-19 14:47:32 +00:00
Marek Olšák
3df9d8ed80
gallium/u_threaded: implement pipelined partial buffer uploads using CPU storage
...
This removes resource_copy_region for BufferSubData. Drivers have to opt in
to use this.
See the comment in the header file.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13399 >
2021-10-19 13:12:37 +00:00
Marek Olšák
cc2f3a0168
gallium,vbo: add PIPE_BIND_VERTEX_STATE for display lists
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13399 >
2021-10-19 13:12:37 +00:00
Marek Olšák
5ee2965283
ac/llvm: accept primitives whose face culling determinant is Inf or NaN
...
Based on https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13299/diffs
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13380 >
2021-10-19 12:49:06 +00:00
Marek Olšák
efaab0ec50
ac/llvm: add helper ac_build_is_inf_or_nan
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13380 >
2021-10-19 12:49:06 +00:00
Marek Olšák
5e8f76b713
ac/llvm: use fmac instead of mul+sub in face culling
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13380 >
2021-10-19 12:49:05 +00:00
Samuel Pitoiset
19c91a120d
radv: do not remove PSIZ for streamout shaders
...
It might still be read later from the streamout buffer.
Fixes a regression with
ext_transform_feedback-builtin-varyings gl_PointSize and Zink.
Fixes: 92e1981a80
("radv: Remove PSIZ output when it isn't needed.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13413 >
2021-10-19 12:29:40 +00:00
Jan Beich
60b7c3a0f4
meson: disable -Werror=thread-safety on FreeBSD
...
Annotated <pthread.h> exposes too many errors in Mesa that are
non-trivial to fix and keep working without FreeBSD CI.
Fixes: 0d5fe24c9b
("macros: Add thread-safety annotation macros")
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9168 >
2021-10-19 06:59:32 +00:00
Dave Airlie
37d6ce4ebb
llvmpipe: swizzle image stores for CL BGRA
...
OpenCL requires image stores to BGRA to work, so add the swizzle
code here.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13404 >
2021-10-19 03:11:08 +00:00