Timur Kristóf
ecfabfd606
aco: Add wave-specific opcode for s_lshl and s_flbit.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964 >
2020-10-09 15:26:14 +02:00
Timur Kristóf
57d8799284
aco: Optimize thread_id_in_threadgroup when there is just one wave.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964 >
2020-10-09 15:26:14 +02:00
Timur Kristóf
5e31fb49a3
aco: Use thread_id_in_threadgroup helper for ES outputs.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964 >
2020-10-09 15:26:14 +02:00
Timur Kristóf
924f816fe1
aco: Extract thread_id_in_threadgroup to a separate function.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964 >
2020-10-09 15:26:14 +02:00
Timur Kristóf
b1964ad4d6
aco: Extract lanecount_to_mask to a separate function.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964 >
2020-10-09 15:26:14 +02:00
Timur Kristóf
0b8e7be083
aco: Clarify missing export error message in assembler.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964 >
2020-10-09 15:26:14 +02:00
Rhys Perry
c1d11bb92c
aco: Add loop creation helpers.
...
Will be useful for NGG GS and probably testing. The helpers take care of
divergence but not creating correct phis.
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/6964 >
2020-10-09 15:26:14 +02:00
Timur Kristóf
17ad2ade82
radv/aco: Use new GS lowering options for ACO with NGG GS.
...
This makes it easier for ACO to implement NGG GS:
1. No need to keep track of vertex and primitive counts.
2. No need to discard incomplete primitives.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964 >
2020-10-09 15:26:14 +02:00
Timur Kristóf
f11f4a2a4d
nir: Add ability to count primitives per stream.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964 >
2020-10-09 15:26:14 +02:00
Timur Kristóf
aac5adc3c2
nir: Count vertices per stream.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964 >
2020-10-09 15:26:14 +02:00
Timur Kristóf
70b94adddb
nir: Add ability to overwrite incomplete GS primitives.
...
After each end_primitive and at the end of the shader before emitting
set_vertex_and_primitive_count, we check if the primitive that is being
emitted has enough vertices or not, and we adjust the vertex and
primitive counters accordingly.
As a result, if the backend uses this option, the backend compiler
will not have to worry about discarding the unneeded vertices
and primitives.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964 >
2020-10-09 15:26:14 +02:00
Timur Kristóf
c977c369d3
nir: Add ability to count emitted GS vertices per primitive.
...
Add an option to nir_lower_gs_intrinsics so that it can also track
the number of emitted vertices per primitive, not just the total
vertex count.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964 >
2020-10-09 15:26:14 +02:00
Timur Kristóf
2be99012e9
nir: Add ability to count emitted GS primitives.
...
Add an option to nir_lower_gs_intrinsics which tells it to track
the number of emitted primitives, not just vertices. Additionally,
also make it per-stream.
Also rename the set_vertex_count intrinsic to
set_vertex_and_primitive_count.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964 >
2020-10-09 15:26:14 +02:00
Greg V
73dd86c421
radv,anv: use CLOCK_MONOTONIC_FAST when CLOCK_MONOTONIC_RAW is undefined
...
CLOCK_MONOTONIC_FAST is a similar clock from FreeBSD.
Acked-by: Eric Engestrom <eric.engestrom@intel.com >
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6995 >
2020-10-09 09:49:20 +00:00
Emmanuel Vadot
fe894dc0b3
util/os_misc: os_get_available_system_memory() for FreeBSD
...
Based on the OpenBSD variant.
The only difference between those two system is the sysctl mib.
Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org >
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6995 >
2020-10-09 09:49:20 +00:00
Samuel Pitoiset
9aa5c7ce72
radv: use the same NIR compiler options for both compiler backends
...
No changes, they are already similar.
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/6938 >
2020-10-09 11:06:36 +02:00
Samuel Pitoiset
63049b0444
radv/llvm: do not lower sub
...
To match ACO.
Totals from 268 (0.20% of 136420) affected shaders:
CodeSize: 1214060 -> 1214096 (+0.00%); split: -0.05%, +0.06%
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/6938 >
2020-10-09 11:06:34 +02:00
Andreas Baierl
abce2718d6
lima/parser: Fix varyings decoding in RSW
...
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7044 >
2020-10-09 06:51:07 +00:00
Samuel Pitoiset
6db3df5c2f
aco: dump the program if the disassembler failed
...
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/6979 >
2020-10-09 08:19:46 +02:00
Dave Airlie
a7d3be78ce
clover: don't call validate spirv at all if not needed
...
Suggested on irc seems like a good plan.
Reviewed-by: Pierre Moreau <dev@pmoreau.org >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7051 >
2020-10-09 13:53:38 +10:00
Timothy Arceri
91ace074d2
util/disk_cache: remove unused function param
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7059 >
2020-10-08 22:26:24 +00:00
Vinson Lee
5931d783c8
swr/rasterizer: Remove BuilderGfxMem member mpTrackMemAccessFuncTy.
...
mpTrackMemAccessFuncTy is not used anywhere.
Fix defect reported by Coverity Scan.
Uninitialized pointer field (UNINIT_CTOR)
uninit_member: Non-static class member mpTrackMemAccessFuncTy is not
initialized in this constructor nor in any functions that it calls.
Suggested-by: Jan Zielinski <jan.zielinski@intel.com >
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Jan Zielinski <jan.zielinski@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6930 >
2020-10-08 22:01:14 +00:00
Vinson Lee
4b513136b1
meson: Use more portable compiler option -std.
...
GCC and Clang support --std and -std options but Intel C++
Compiler only supports -std.
icpc: command line warning #10159 : invalid argument for option '--std'
Fixes: 8a05d6ffc6 ("driconf: Make the driver's declarations be structs instead of XML.")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7020 >
2020-10-08 14:39:38 -07:00
Eric Anholt
3a1f22c38b
turnip: Add support for GetSwapchainGrallocUsage2ANDROID().
...
This is lifted straight from anv, which seems like a reasonable way to go.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7015 >
2020-10-08 21:04:01 +00:00
Eric Anholt
5a595cd3af
turnip: Detect Qualcomm gralloc and its UBWC flag on gralloc surfaces.
...
And document where to find information on qcom gralloc's private handle
layout. I chose not to #include the gralloc_priv because it seems that
there's not much we need yet, and I'm hoping we can avoid the build-time
dependency on the specific platform.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7015 >
2020-10-08 21:04:01 +00:00
Eric Anholt
9a14e74752
turnip/kgsl: Add support for importing dma-bufs.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7015 >
2020-10-08 21:04:01 +00:00
Eric Anholt
b732e4f274
turnip/kgsl: Fix last minute breakage of the build.
...
Need to land KGSL in CI!
Fixes: 8163c818e3 ("turnip: implement timestamp fences/semaphores for kgsl backend")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7015 >
2020-10-08 21:04:01 +00:00
Nanley Chery
290f3fe897
Revert "anv: Add driconf option to disable compression for 16bpp format"
...
This reverts commit bcfec61d1e .
The previous patch fixed the underlying issue that the above commit was
actually working around. It turns out that the previously observed
performance regression was due to invalid aux-map entries for
multi-layer HiZ+CCS buffers.
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7046 >
2020-10-08 20:47:24 +00:00
Nanley Chery
cce6fc3b5c
anv: Enable multi-layer aux-map init for HIZ+CCS
...
Fixes rendering corruption in the shadowmappingcascade Sascha Willems
Vulkan demo. To see the corruption, I adjusted the demo options as
follows:
1. Enable "Display depth map"
2. Set "Split lambda" to 0.100
3. Make "Cascade" non-zero.
Fixes: 80ffbe915f ("anv: Add support for HiZ+CCS")
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7046 >
2020-10-08 20:47:24 +00:00
Eric Anholt
624a2aad66
freedreno/ir3: Don't leave holes the UBO upload plan.
...
Shaders may not use a particular region of a UBO in a given shader (think
UBOs shared between stages, or between shaders), and by just always
extending the existing range for a given UBO, we'd waste bandwidth
uploading it, and also waste our precious const space in storing the
unused data.
Instead, only upload exactly the ranges we can use, and merge ranges when
they're neighbors. We may end up with more upload packets, but the
bandwidth savings is surely going to be worth it (and if find we want a
distance threshold for merging with nearby uploads, that would be easy to
add).
total instructions in shared programs: 9266114 -> 9255092 (-0.12%)
total full in shared programs: 343162 -> 341709 (-0.42%)
total constlen in shared programs: 1454368 -> 1275236 (-12.32%)
total cat6 in shared programs: 93073 -> 82589 (-11.26%)
total (ss) in shared programs: 212402 -> 206404 (-2.82%)
total (sy) in shared programs: 122905 -> 114007 (-7.24%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7036 >
2020-10-08 20:29:02 +00:00
Eric Anholt
ddf468f96f
freedreno/ir3: Clean up the UBO upload plan setup.
...
No more start > end for signaling that the slot isn't used, no more funny
setup of num_enabled.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7036 >
2020-10-08 20:29:02 +00:00
Eric Anholt
330c68d3c2
ci/softpipe: Add another flaky GS test to the skips list.
...
We've seen the new GS flake once or twice a week for a long time.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7070 >
2020-10-08 19:01:00 +00:00
Mike Blumenkrantz
0b96b7bf10
util/hash_table: add function for reserving size in a hash table
...
rehashing a populated hash table is very expensive, so for the case where
the maximum/likely table size is already known, this function allows for
pre-sizing the table to avoid ever needing a rehash
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7037 >
2020-10-08 18:21:48 +00:00
Jason Ekstrand
06a5edf247
nir/opt_deref: Fix the vector bitcast optimization
...
It assumes the parent is a vector or scalar so we need to fail if it
isn't.
Fixes: 9190f82d57 "nir/opt_deref: Add an optimization for bitcasts"
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7064 >
2020-10-08 12:22:45 -05:00
Jason Ekstrand
54eae33558
clover: Stop leaking NIR shaders
...
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7068 >
2020-10-08 16:01:38 +00:00
Andrii Simiklit
cc00d57a3c
util/xmlconfig: eliminate memory leak
...
It fixes coverity issue: CID 1467703: (RESOURCE_LEAK):
`Variable "cp" going out of scope leaks the storage it points to.`
Fixes: 23c3eb1fe1 ("driconf: Delete disjoint range support")
Reviewed-by: Eric Anholt <eric@anholt.net >
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7021 >
2020-10-08 15:43:52 +00:00
Samuel Pitoiset
11389849a4
radv/llvm: remove dead code for 64-bit GS inputs
...
64-bit IO are lowered with NIR.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7008 >
2020-10-08 13:03:24 +00:00
Samuel Pitoiset
a41bed243e
radv/llvm: do not lower nir_op_fsat
...
To match ACO.
fossilds-db (Navi10):
Totals from 20869 (15.30% of 136420) affected shaders:
SGPRs: 1851128 -> 1851920 (+0.04%); split: -0.41%, +0.46%
VGPRs: 1607360 -> 1608212 (+0.05%); split: -0.20%, +0.25%
SpillSGPRs: 267331 -> 261350 (-2.24%); split: -3.67%, +1.43%
CodeSize: 155460104 -> 155303508 (-0.10%); split: -0.21%, +0.11%
MaxWaves: 179156 -> 178928 (-0.13%); split: +0.48%, -0.60%
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6932 >
2020-10-08 12:38:04 +00:00
Samuel Pitoiset
31a0574b96
ac/nir: implement nir_op_fsat
...
With fmed3 if available, otherwise fallback to fmin/fmax.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6932 >
2020-10-08 12:38:04 +00:00
Tomeu Vizoso
0747f21bb6
ci: Disable pm_runtime and max clocks in LAVA jobs
...
To get more consistent performance and results, use the performance
devfreq governor and disable PM runtime.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7011 >
2020-10-08 12:14:59 +02:00
Tomeu Vizoso
7cae9f0ef1
ci: Test Panfrost on Khadas VIM3 boards
...
For testing Panfrost on Bifrost GPUs, add a job for dEQP GLES2 testing.
Right now almost all tests are skipped, but as we make progress and
things show stable, we'll be running more and more tests.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7011 >
2020-10-08 12:14:59 +02:00
Tomeu Vizoso
b74cfa7861
ci: Update kernel for LAVA
...
Update to v5.9-rc5-based drm-misc-for-next, so we can run jobs on
machines with Bifrost GPUs.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7011 >
2020-10-08 12:14:59 +02:00
Kristian H. Kristensen
981464356c
freedreno/a6xx: Support PIPE_FORMAT_R8_G8B8_420_UNORM for texturing
...
This makes freedreno advertise support for
PIPE_FORMAT_R8_G8B8_420_UNORM on a6xx, which enables lowering NV12 to
this format.
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6693 >
2020-10-08 09:37:14 +00:00
Kristian H. Kristensen
11563da8fa
freedreno/a6xx: Generalize pointers in struct fd6_pipe_sampler_view
...
Add resource pointers ptr1 and ptr2 and offsets offset1 and offset2,
and just emit relocs if the pointers are non-NULL. This lets us move
a little more logic to the CSO building.
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6693 >
2020-10-08 09:37:14 +00:00
Kristian H. Kristensen
826a10255f
st/mesa: Add NV12 lowering to PIPE_FORMAT_R8_G8B8_420_UNORM
...
Some GPUs can sample biplanar formats like NV12 natively, returning
the YUV values. Add a lowering type that uses that for sampling and
relies on existing colorspace conversions.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6693 >
2020-10-08 09:37:14 +00:00
Kristian H. Kristensen
e23bcb69c3
util/formats: Add PIPE_FORMAT_R8_G8B8_420_UNORM
...
This is a planar, subsampled format. It's basically NV12, but without
colorspace conversion.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6693 >
2020-10-08 09:37:14 +00:00
Jason Ekstrand
3b784370c3
iris: Use the data cache for indirect UBO pulls
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3932 >
2020-10-08 01:17:11 -05:00
Jason Ekstrand
b54d37a867
anv: Use the data cache for indirect UBO pulls on Gen8+
...
On Gen7, the data cache is pretty terrible so we'd rather avoid it
there. On Gen8+, it should be fine and is less likely to conflict with
texturing so we should get less cache thrashing there.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3932 >
2020-10-08 01:17:11 -05:00
Jason Ekstrand
89f3d116a8
anv: Plumb the device into *bits_for_access_flags
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3932 >
2020-10-08 01:17:11 -05:00
Jason Ekstrand
3a33560681
anv: Use format_for_descriptor_type for descriptor buffers
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3932 >
2020-10-08 01:17:11 -05:00