Gert Wollny [Mon, 8 Feb 2021 16:32:00 +0000 (17:32 +0100)]
r600/sfn: remove duplicate barriers
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9167>
Gert Wollny [Mon, 8 Feb 2021 08:37:28 +0000 (09:37 +0100)]
r600/sfn: Fix indirect_file flag for IMAGES
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9167>
Gert Wollny [Fri, 5 Feb 2021 16:11:52 +0000 (17:11 +0100)]
r600/sfn: Handle memory_barrier_atomic_counters
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9167>
Mauro Rossi [Sun, 21 Feb 2021 21:16:13 +0000 (22:16 +0100)]
android: util/fossilize_db: add missing sources to Makefile.sources
Fixes the following building errors:
FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/i915_dri_intermediates/LINKED/i915_dri.so
ld.lld: error: undefined symbol: foz_read_entry
>>> referenced by disk_cache_os.c:945 (external/mesa/src/util/disk_cache_os.c:945)
ld.lld: error: undefined symbol: foz_write_entry
>>> referenced by disk_cache_os.c:951 (external/mesa/src/util/disk_cache_os.c:951)
FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/vulkan.anv_intermediates/LINKED/vulkan.anv.so
FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/vulkan.radv_intermediates/LINKED/vulkan.radv.so
ld.lld: error: undefined symbol: foz_destroy
>>> referenced by disk_cache.c:237 (external/mesa/src/util/disk_cache.c:237)
ld.lld: error: undefined symbol: foz_read_entry
>>> referenced by disk_cache_os.c:945 (external/mesa/src/util/disk_cache_os.c:945)
ld.lld: error: undefined symbol: foz_write_entry
>>> referenced by disk_cache_os.c:951 (external/mesa/src/util/disk_cache_os.c:951)
Fixes:
eca6bb9540d8 ("util/fossilize_db: add basic fossilize db util to read/write shader caches")
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Tested-by: Marijn Suijten <marijns95@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9178>
Eric Anholt [Thu, 18 Feb 2021 20:28:27 +0000 (12:28 -0800)]
ci/a5xx: Increase our dEQP GLES3 fraction by 4x.
Now that we've got SMP, we can get a lot more of this test suite covered
in our 10-minute job window.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9144>
Eric Anholt [Thu, 18 Feb 2021 20:25:27 +0000 (12:25 -0800)]
ci/a5xx: Update the piglit expectations.
Now with -j4 in place, we can actually complete a manual piglit job in
less than an hour! (barely)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9144>
Eric Anholt [Fri, 5 Feb 2021 00:42:51 +0000 (16:42 -0800)]
ci/bare-metal: Use an upstream kernel for db820c.
On top of the last kernel tree I added a couple of DT changes for db820c
from the qcom landing tree necessary for bringing up the GPU, and a fix to
my OOB cleanups fro cheza. I also enabled the CPU clock driver for db820c
so we can turn on SMP and not leave jobs stranded on a 19Mhz CPU or whatever.
This causes us to need a bit of updating of our TF expectations since the
order of jobs changes a bit.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9144>
Eric Anholt [Fri, 5 Feb 2021 00:41:43 +0000 (16:41 -0800)]
ci/freedreno: Remove stray BM_DTB definition.
It's unused -- cheza uses an image with kernel+dtb glued together, and
this var does nothing (which is good, given that it was pointing to
db820c.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9144>
Eric Anholt [Fri, 5 Feb 2021 00:06:44 +0000 (16:06 -0800)]
ci/freedreno: Fix a5xx piglit runs.
I missed this regression in the "start using Xorg" branch since the piglit
runs are manual. I made the piglit runs accidentally require a core
context, which a5xx can't do (it's only GL 3.1).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9144>
Alyssa Rosenzweig [Thu, 18 Feb 2021 21:21:43 +0000 (16:21 -0500)]
pan/bi: Do copyprop in linear-time
Per discussion with Daniel Schürmann on IRC about the joys of SSA form
and why you don't actually need use-def chains. Indeed, I didn't. No
shader-db changes, time difference in shader-db is neglible since the
win from this is particularly for large shaders.
Total runtime of
dEQP-GLES31.functional.ssbo.layout.single_struct_array.single_buffer.std430_instance_array
reduced from 1.04s to 0.77s (25%)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164>
Alyssa Rosenzweig [Fri, 19 Feb 2021 15:45:57 +0000 (10:45 -0500)]
pan/bi: Remove unused definitions
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164>
Alyssa Rosenzweig [Thu, 18 Feb 2021 19:58:50 +0000 (14:58 -0500)]
pan/bi: Adapt builder to dest count
If there are no destinations, don't produce a _to version, and let the
bare version return the bi_instr.
If there are multiple destinations, take each in the _to version and
don't produce a bare version.
Both cares are probably what you wanted anyway.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164>
Alyssa Rosenzweig [Thu, 18 Feb 2021 19:15:02 +0000 (14:15 -0500)]
pan/bi: Annotate instructions by destination count
Allows for better builders.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164>
Alyssa Rosenzweig [Fri, 19 Feb 2021 13:56:17 +0000 (08:56 -0500)]
pan/bi: Allow spilling with multiple destinations
Now that we fixed this.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164>
Alyssa Rosenzweig [Thu, 18 Feb 2021 21:56:16 +0000 (16:56 -0500)]
pan/bi: Make bi_writemask take a destination
Assuming it's only the first destination breaks assumptions across the
compiler. Add a destination source and fix up the many corresponding
issues. Nothing to backport as far as I understand since multidest
instruction are new.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164>
Alyssa Rosenzweig [Fri, 19 Feb 2021 14:28:52 +0000 (09:28 -0500)]
pan/bi: Mark DISCARD as having side effects
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164>
Alyssa Rosenzweig [Fri, 19 Feb 2021 14:17:48 +0000 (09:17 -0500)]
pan/bi: Mark branches as having side effects
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164>
Alyssa Rosenzweig [Thu, 18 Feb 2021 21:26:02 +0000 (16:26 -0500)]
pan/bi: Inline `bytemask of read components`
Only used in one place (and should never be used elsewhere -- even this
use is questionable). By inlining we avoid O(N^2) behaviour on the
number of sources in liveness updates.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164>
Alyssa Rosenzweig [Thu, 18 Feb 2021 21:11:38 +0000 (16:11 -0500)]
pan/bi: Reduce liveness calculations in DCE
Forward port of
fc06b8b7 ("pan/mdg: Optimize liveness computation in
DCE")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164>
Alyssa Rosenzweig [Thu, 18 Feb 2021 20:56:43 +0000 (15:56 -0500)]
pan/bi: Use nir_opt_sink/move for constants
Fixes excessive (and failing) spilling in dEQP-GLES31.functional.ssbo.layout.*
shader-db results are a toss up (I suspect we'd see better results if we
tracked register pressure directly):
total instructions in shared programs: 161377 -> 161377 (0.00%)
total nops in shared programs: 121159 -> 121203 (0.04%)
nops in affected programs: 1839 -> 1883 (2.39%)
Nops are HURT.
total clauses in shared programs: 31604 -> 31606 (<.01%)
clauses in affected programs: 38 -> 40 (5.26%)
Inconclusive result (value mean confidence interval includes 0).
total quadwords in shared programs: 130847 -> 130845 (<.01%)
quadwords in affected programs: 1246 -> 1244 (-0.16%)
Inconclusive result (value mean confidence interval includes 0).
total loops in shared programs: 18 -> 18 (0.00%)
total spills in shared programs: 705 -> 705 (0.00%)
total fills in shared programs: 1645 -> 1645 (0.00%)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164>
Alyssa Rosenzweig [Fri, 19 Feb 2021 20:58:16 +0000 (15:58 -0500)]
panfrost: Don't advertise OES_copy_image
We don't support it yet.
Fixes:
61d3ae6e0bd ("panfrost: Initial stub for Panfrost driver")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164>
Alyssa Rosenzweig [Fri, 19 Feb 2021 19:45:39 +0000 (14:45 -0500)]
panfrost: Fix typo in midgard.xml
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164>
Alyssa Rosenzweig [Fri, 19 Feb 2021 19:08:42 +0000 (14:08 -0500)]
panfrost: Reinterpret format for reload blits
Fixes dEQP-GLES31.functional.copy_image.non_compressed.viewclass_32_bits.r32ui_rgb10_a2.texture2d_to_texture2d
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164>
Alyssa Rosenzweig [Fri, 19 Feb 2021 18:38:57 +0000 (13:38 -0500)]
panfrost: Fix UNORM 16 rendering
fp16 loses precision.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164>
Alyssa Rosenzweig [Fri, 19 Feb 2021 17:44:50 +0000 (12:44 -0500)]
panfrost: Hide MSAA 8x/16x support
dEQP-GLES31.functional.texture.multisample.samples_16.sample_position is
failing on Bifrost, and we already weren't advertising on Midgard. Until
someone gets spare cycles to debug all the problems, keep it hidden
behind a debug flag to avoid introducing bugs.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164>
Alyssa Rosenzweig [Fri, 19 Feb 2021 16:51:16 +0000 (11:51 -0500)]
panfrost: Raise TEXTURE_BUFFER_OFFSET_ALIGNMENT
The blob advertises 64 for this, so let's use the same value. Small
alignments are observed to raise an IMPRECISE_FAULT at least on Bifrost.
As a bonus this forces cache line alignment which will help perf. Fixes
dEQP-GLES31.functional.texture.texture_buffer.render.as_vertex_texture.offset_1_alignments
Fixes:
5f7bafa316f ("panfrost: Enable ARB_texture_buffer_object")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164>
Alyssa Rosenzweig [Fri, 19 Feb 2021 14:58:33 +0000 (09:58 -0500)]
panfrost: Fix NULL deref in pan_sfbd
The last of the nr_cbufs audit changes.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164>
Alyssa Rosenzweig [Fri, 19 Feb 2021 14:57:26 +0000 (09:57 -0500)]
panfrost: Fix NULL derefs in pan_cmdstream.c
Auditing nr_cbufs. Note we have to augment the blending logic a bit to
use the same 'no blend' case for missing RTs as we do for depth-only
passes.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164>
Alyssa Rosenzweig [Fri, 19 Feb 2021 14:45:30 +0000 (09:45 -0500)]
panfrost: Fix NULL deref in pan_mfbd.c
Auditing all uses of nr_cbufs
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164>
Alyssa Rosenzweig [Fri, 19 Feb 2021 14:41:15 +0000 (09:41 -0500)]
panfrost: Remove redundant NULL check
Already checked in the callee, no need to check in the caller.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164>
Alyssa Rosenzweig [Fri, 19 Feb 2021 14:39:07 +0000 (09:39 -0500)]
panfrost: Fix NULL dereference adding cbuf to batch
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164>
Alyssa Rosenzweig [Fri, 19 Feb 2021 13:58:02 +0000 (08:58 -0500)]
panfrost: Fix infinite loop spilling
At least this way failed RA will crash (by having no spill node to pick)
instead? Seen in
dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.21 on
Bifrost.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9164>
Alyssa Rosenzweig [Thu, 18 Feb 2021 18:54:30 +0000 (13:54 -0500)]
pan/bi: Fix elimination of repeated branches
How many times can I break such a small pass?
Fixes:
a805d999c0e ("pan/bi: Fix jumps to terminal block again")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9137>
Alyssa Rosenzweig [Thu, 18 Feb 2021 18:53:33 +0000 (13:53 -0500)]
pan/bi: Optimize out redundant jumps to #0x0
If it's the last instruction, that's silly.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9137>
Alyssa Rosenzweig [Thu, 18 Feb 2021 18:46:41 +0000 (13:46 -0500)]
pan/bi: Fix more jumps to terminal blocks
Here's another edge case: there could be instructions in the last block
after NIR->BIR but they could be optimized out by backend DCE, causing
the block to become a terminal block.
Noticed while toying with geometry shaders.
Fixes:
a805d999c0e ("pan/bi: Fix jumps to terminal block again")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9137>
Samuel Pitoiset [Thu, 18 Feb 2021 16:06:11 +0000 (17:06 +0100)]
ac/rgp: fill CPU info by parsing /proc/cpuinfo
The current CPU clock speed can't be retrieved from CPUID, so I think
parsing /proc/cpuinfo for all information is fine.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9133>
Mike Blumenkrantz [Sun, 21 Feb 2021 17:04:20 +0000 (12:04 -0500)]
zink: set conformant ubo/ssbo size limits
these caps correspond to descriptor binding limits provided by vulkan drivers
fixes KHR-GL46.shader_storage_buffer_object.basic-max
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9174>
Mike Blumenkrantz [Mon, 15 Feb 2021 18:19:51 +0000 (13:19 -0500)]
zink: add available|visible masks to all barriers in ntv
we shouldn't need to consider whether these get added since we always want them
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9055>
chenli [Thu, 3 Dec 2020 11:49:56 +0000 (19:49 +0800)]
mesa: update oudated members for debug and check
Signed-off-by: Chen Li <chenli@uniontech.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7896>
Mike Blumenkrantz [Tue, 15 Sep 2020 18:57:45 +0000 (14:57 -0400)]
zink: always set VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT for non-staging resources
this is weird but sometimes gallium makes resources with bind==0, which will
crash later if we don't add this
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9066>
Mike Blumenkrantz [Wed, 16 Sep 2020 18:19:35 +0000 (14:19 -0400)]
zink: remove 'scissors' member of viewport state
this is the vulkan-transformed value, but we can just apply it at draw
time and save ourselves some memory
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9153>
Mike Blumenkrantz [Wed, 16 Sep 2020 18:10:00 +0000 (14:10 -0400)]
zink: handle scissor+viewport states dynamically if extension is available
this is a huge perf win since it means we don't have to create a new pipeline
every time this state changes
also we can now move the viewport state back to zink_context since that's the
real value we're using and the pipeline state value is just for the hash
ref mesa/mesa#3359
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9153>
Mike Blumenkrantz [Thu, 10 Sep 2020 15:30:49 +0000 (11:30 -0400)]
zink: always use 64bit flag for query results
this is just much, much easier to handle, and it also lets us fix some
lingering bugs with query handling that led to inconsistent results
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9152>
Mike Blumenkrantz [Wed, 9 Sep 2020 21:11:00 +0000 (17:11 -0400)]
zink: improve batch flushing for queries when compute batches are involved
we can reduce some flushing here by only doing a flush if we're about to
copy a compute batch resource that has gfx batch access pending
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9152>
Mike Blumenkrantz [Wed, 9 Sep 2020 18:39:47 +0000 (14:39 -0400)]
zink: better handling for availability queries on qbos when query/resource is busy
in this case, we can queue a result copy onto a staging buffer and then queue
a copy from staging onto our real buffer to avoid stalling
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9152>
Mike Blumenkrantz [Wed, 9 Sep 2020 18:38:12 +0000 (14:38 -0400)]
zink: simplify some of the qbo direct buffer write code
no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9152>
Mike Blumenkrantz [Wed, 9 Sep 2020 17:31:49 +0000 (13:31 -0400)]
zink: break out query result buffer copying into util function
we can reuse this a bit
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9152>
Mike Blumenkrantz [Sun, 21 Feb 2021 17:18:09 +0000 (12:18 -0500)]
zink: fix buffer resource usage flags
* VK_BUFFER_USAGE_STORAGE_BUFFER_BIT should be enabled always because we might need it
* VK_FORMAT_FEATURE* flags need to be used for detection
I hate these enums so much.
Fixes:
2bfa998960d ("zink: add more usage bits for buffer types")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9175>
Bas Nieuwenhuizen [Mon, 11 Jan 2021 14:20:40 +0000 (15:20 +0100)]
vulkan/device_select: Stop using device properties 2.
We have to choose between:
1) Stop handling two identical GPUs
2) Stop having crashes with other layers active.
3) Fix the Vulkan Loader.
Since nobody seems to want to spend enough effort to do 3 the
effective choice is between 1 and 2. This is choosing 2, as
two identical GPUs is pretty uncommon since crossfire doesn't
work on Linux anyway.
(And it would only work sporadically as the game needs to enable the
extension)
CC: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3801
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8414>
Bas Nieuwenhuizen [Sun, 21 Feb 2021 20:01:04 +0000 (21:01 +0100)]
radv: Don't use dedicated memory info to indicate sharing.
Can be used without sharing, so if only the dedicated memory info
is set we know it isn't shareable. Use that.
Fixes:
a639d40f133 ("radv: add support for local bos. (v3)")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4330
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9176>
Simon Ser [Fri, 12 Feb 2021 15:56:22 +0000 (16:56 +0100)]
frontends/va: add pipe to DRM format mapping for NV12 and P010
These are used when VA_EXPORT_SURFACE_COMPOSED_LAYERS is specified.
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9015>
Simon Ser [Fri, 12 Feb 2021 15:56:01 +0000 (16:56 +0100)]
frontends/va: add support for VA_EXPORT_SURFACE_COMPOSED_LAYERS
The libva docs say:
> If VA_EXPORT_SURFACE_SEPARATE_LAYERS is specified on export, each
> layer will contain exactly one plane. For example, an NV12
> surface will be exported as two layers, one of DRM_FORMAT_R8 and
> one of DRM_FORMAT_GR88.
> If VA_EXPORT_SURFACE_COMPOSED_LAYERS is specified on export,
> there will be exactly one layer.
VA_EXPORT_SURFACE_COMPOSED_LAYERS is desirable in many scenarios,
for instance when directly importing the DMA-BUFs into APIs such
as GL (as a single EGLImage), KMS or Wayland.
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9015>
Simon Ser [Fri, 12 Feb 2021 15:07:08 +0000 (16:07 +0100)]
frontends/va: extract pipe format to DRM format mapping
This allows the table to be used from multiple call sites, and makes
it a little smaller.
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9015>
Lionel Landwerlin [Fri, 19 Feb 2021 20:10:33 +0000 (22:10 +0200)]
intel/perf: fix roll over PERF_CNT counter accumulation
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
5ba6d9941b5dda ("intel/perf: add mdapi writes for register perf counters")
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9163>
Lionel Landwerlin [Mon, 22 Feb 2021 09:48:09 +0000 (11:48 +0200)]
intel/perf: Add Alderlake metrics
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9186>
Lionel Landwerlin [Mon, 22 Feb 2021 09:47:46 +0000 (11:47 +0200)]
intel/dev: identify alderlake
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9186>
Samuel Pitoiset [Wed, 17 Feb 2021 17:00:14 +0000 (18:00 +0100)]
radv: emit missing subpass resolve marker for SQTT
RGP now shows CmdEndRenderPassResolve() in the Event timing panel.
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/9106>
Samuel Pitoiset [Wed, 17 Feb 2021 16:58:20 +0000 (17:58 +0100)]
radv: rework radv_cmd_buffer_resolve_subpass() a bit
To emit the subpass resolve marker properly.
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/9106>
Vinson Lee [Sun, 14 Feb 2021 04:21:55 +0000 (20:21 -0800)]
aco: Initialize ds_state.front.writeMask.
Fix defect reported by Coverity Scan.
Uninitialized scalar variable (UNINIT)
uninit_use: Using uninitialized value ds_state.front. Field ds_state.front.writeMask is uninitialized.
Fixes:
d488d0fd7ba ("aco: add framework for testing isel and integration tests")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9033>
Timothy Arceri [Thu, 21 Jan 2021 04:38:45 +0000 (15:38 +1100)]
nir: handle negatives in ffma reassociation optimisation
shader-db results Iris (BDW):
total instructions in shared programs:
16632076 ->
16631057 (<.01%)
instructions in affected programs: 48010 -> 46991 (-2.12%)
helped: 47
HURT: 6
total cycles in shared programs:
915266726 ->
915263622 (<.01%)
cycles in affected programs: 1182283 -> 1179179 (-0.26%)
helped: 18
HURT: 27
total loops in shared programs: 4929 -> 4929 (0.00%)
loops in affected programs: 0 -> 0
helped: 0
HURT: 0
total spills in shared programs: 18834 -> 18801 (-0.18%)
spills in affected programs: 525 -> 492 (-6.29%)
helped: 3
HURT: 0
total fills in shared programs: 23008 -> 22981 (-0.12%)
fills in affected programs: 435 -> 408 (-6.21%)
helped: 3
HURT: 0
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8608>
Dave Airlie [Sun, 14 Feb 2021 22:33:08 +0000 (08:33 +1000)]
lavapipe: use clear interface for renderpass clears
For llvmpipe this means clears happen in the raster threads
rather than in the single cpu thread.
This path can't be used for scissored or clears with different
clear colors per mrt.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9041>
Dave Airlie [Sun, 14 Feb 2021 22:26:58 +0000 (08:26 +1000)]
llvmpipe: zs clear use 64-bit memset
Use the newly added memset64 path
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9041>
Dave Airlie [Sun, 14 Feb 2021 21:50:58 +0000 (07:50 +1000)]
u_surface: use optimised memset64
Use the newly added optimised memset64 path
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9041>
Dave Airlie [Sun, 14 Feb 2021 21:50:38 +0000 (07:50 +1000)]
util: add optimised memset64
This just adds a memset64 along the lines of the previously
added memset32.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9041>
Rob Clark [Sun, 21 Feb 2021 22:20:47 +0000 (14:20 -0800)]
util/fossilize_db: Fix compile error with clang
../src/util/fossilize_db.c:178:58: error: use of GNU empty initializer extension [-Werror,-Wgnu-empty-initializer]
char hash_str[FOSSILIZE_BLOB_HASH_LENGTH + 1] = {};
Fixes:
eca6bb9540d ("util/fossilize_db: add basic fossilize db util to read/write shader caches")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9180>
Dave Airlie [Fri, 19 Feb 2021 02:15:05 +0000 (12:15 +1000)]
lavapipe: reset object base on recycled command buffers
The loader_set_dispatch overwrites the magic with the dispatch
pointer, however when cmd buffers get recycled, and the loader
is in debug mode, it asserts that the magic isn't set anymore.
When recycling command buffers, reset the object base.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9145>
Dave Airlie [Fri, 19 Feb 2021 02:15:05 +0000 (12:15 +1000)]
tu: reset object base on recycled command buffers
The loader_set_dispatch overwrites the magic with the dispatch
pointer, however when cmd buffers get recycled, and the loader
is in debug mode, it asserts that the magic isn't set anymore.
When recycling command buffers, reset the object base.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9145>
Dave Airlie [Fri, 19 Feb 2021 02:15:05 +0000 (12:15 +1000)]
radv: reset object base on recycled command buffers
The loader_set_dispatch overwrites the magic with the dispatch
pointer, however when cmd buffers get recycled, and the loader
is in debug mode, it asserts that the magic isn't set anymore.
When recycling command buffers, reset the base object.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9145>
Dave Airlie [Fri, 19 Feb 2021 07:05:52 +0000 (17:05 +1000)]
vulkan/util: add api to reset object magic + private data.
This will be used to for reissuing dispatchable objects like
command buffers.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9145>
Alyssa Rosenzweig [Thu, 18 Feb 2021 00:56:49 +0000 (19:56 -0500)]
gallium/tessellator: Rename D3D11 defines
We're Gallium, c'mon!
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9118>
Alyssa Rosenzweig [Thu, 18 Feb 2021 00:54:50 +0000 (19:54 -0500)]
gallium/tessellator: Remove unused includes
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9118>
Alyssa Rosenzweig [Thu, 18 Feb 2021 00:53:50 +0000 (19:53 -0500)]
gallium/tessellator: Remove XBOX 360 code
Unused.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9118>
Erico Nunes [Sat, 20 Feb 2021 13:24:09 +0000 (14:24 +0100)]
lima: fix max sampler views
If this is not defined, mesa may not deallocate sampler views,
which can result in memory leaks.
Just define it to the same as max texture samplers, like other
mesa drivers do.
Cc: mesa-stable
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9172>
Erico Nunes [Sat, 13 Feb 2021 16:18:43 +0000 (17:18 +0100)]
docs/features: add lima features
This was mostly generated through scripts parsing glxinfo and then some
manual adjustments.
Note that lima is mostly a GLES 2.0 driver so its usefulness on this
list is a bit limited. But there was a long standing user request to
include it here and I guess it's better to be on the radar.
The extension list might not be fully correct, hopefully putting it here
for comparison also helps tracking if something is wrong or missing.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9031>
Timothy Arceri [Thu, 1 Oct 2020 10:02:59 +0000 (20:02 +1000)]
util/disk_cache: make use of single file cache when env var set
When the MESA_DISK_CACHE_SINGLE_FILE environment variable is set
we make use of the new single file shader cache implementation.
The new cache uses the following directory structure based on the
first defined name as follows:
$MESA_GLSL_CACHE_DIR/driver_id/gpu_name/foz_cache.foz
$MESA_GLSL_CACHE_DIR/driver_id/gpu_name/foz_cache_idx.foz
$XDG_CACHE_HOME/mesa_shader_cache_sf/driver_id/gpu_name/foz_cache.foz
$XDG_CACHE_HOME/mesa_shader_cache_sf/driver_id/gpu_name/foz_cache_idx.foz
<pwd.pw_dir>/.cache/mesa_shader_cache_sf/driver_id/gpu_name/foz_cache.foz
<pwd.pw_dir>/.cache/mesa_shader_cache_sf/driver_id/gpu_name/foz_cache_idx.foz
Where foz_cache_idx.foz is a database of offsets pointing to the location of
the shader cache entries in foz_cache.foz
This initial implementation doesn't have any max cache size handling and is
initially intended to be use by applications such as steam that will handle
cache management for us.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7725>
Timothy Arceri [Mon, 19 Oct 2020 03:33:44 +0000 (14:33 +1100)]
util/fossilize_db: add basic fossilize db util to read/write shader caches
My benchmarking shows no significant change in cache load times with a
single shader cache file vs the existing cache implementation of many
small files (tested with my spinning rust HDD).
However this new single file cache implementation does reduce the total
size on disk used by the shader cache. We have a problem with the existing
cache where writing tiny files to disk causes more disk space to be used than
is actually needed for the files due to the minimum size required for a file.
In pratice this tends to inflate the size of the cache on disk to over 3x
larger.
There are other advantages of using a single file for shader cache entries
such as allowing better removal of cache entries once we hit the max cache
size limit (although we don't implement any max cache size handling in this
initial implementation).
The primary reason for implementing a single file cache for now is to allow
better performance and handling by third party applications such as steam
that collect and distribute precompiled cache entries.
For this reason we also implement a new environment variable
MESA_DISK_CACHE_READ_ONLY_FOZ_DBS which allows a user to pass in a path
to a number of external read only shader cache dbs. There is an initial
limit of 8 dbs that can be passed to mesa like so:
MESA_DISK_CACHE_READ_ONLY_FOZ_DBS=/full_path/filename1, ... ,/full_path/filename8
Where the filename represents the cache db and its index file e.g.
filename1.foz and filename1_idx.foz
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7725>
Timothy Arceri [Wed, 10 Feb 2021 06:05:24 +0000 (17:05 +1100)]
util/mesa_sha1: add helper to reconvert sha1 hex strings
Converts the sha1 hex string representation back into its original
more compact format.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7725>
Timothy Arceri [Tue, 22 Sep 2020 00:38:59 +0000 (10:38 +1000)]
util/disk_cache: use a new cache dir for the single file cache feature
This allows us to guarantee the different cache implementations will not
interfere with each other and should make it more clear that the max cache
size limits are applied separately for each cache implementation.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7725>
Timothy Arceri [Mon, 2 Nov 2020 02:31:32 +0000 (13:31 +1100)]
util/disk_cache: move cache path strdup call back into disk_cache.c
This code is already OS agnostic and moving it here enables code
sharing in the following patches.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7725>
Timothy Arceri [Fri, 16 Oct 2020 04:07:34 +0000 (15:07 +1100)]
util/disk_cache: do crc32 check on compressed data for ZSTD
This will be faster and avoids checking for errors with the
compression implementation which we shouldn't need to do. Instead
we trust the compression library does the correct thing and simply
error check the data loaded from disk.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7725>
Mark Janes [Sat, 20 Feb 2021 02:18:43 +0000 (18:18 -0800)]
intel: check setuid before writing output file in INTEL_MEASURE
Without this check, the INTEL_MEASURE environment variable could be
misused to overwrite arbitrary files.
Fixes:
0f4143ec378 ("intel: Print GPU timing data based on INTEL_MEASURE")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9166>
Ian Romanick [Tue, 12 Jan 2021 22:15:46 +0000 (14:15 -0800)]
nir/algebraic: Add some max/min optimizations with 3 variables
Specifically, ARB assembly shaders with code like
SLT r0, r0, c[0].xxxx;
...
KIL r0.xyzx;
can result in this pattern. The other cases (e.g., 'KIL r0.xxxx' and
'KIL r0.xyxx') are handled by existing patterns.
Reviewed-by: Matt Turner <mattst88@gmail.com>
All Intel platforms had similar results. (Tiger Lake shown)
total instructions in shared programs:
21050098 ->
21050065 (<.01%)
instructions in affected programs: 2062 -> 2029 (-1.60%)
helped: 31
HURT: 1
helped stats (abs) min: 1 max: 3 x̄: 1.10 x̃: 1
helped stats (rel) min: 1.14% max: 4.35% x̄: 1.89% x̃: 1.69%
HURT stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel) min: 0.65% max: 0.65% x̄: 0.65% x̃: 0.65%
95% mean confidence interval for instructions value: -1.23 -0.84
95% mean confidence interval for instructions %-change: -2.12% -1.50%
Instructions are helped.
total cycles in shared programs:
855105466 ->
855105055 (<.01%)
cycles in affected programs: 50136 -> 49725 (-0.82%)
helped: 33
HURT: 0
helped stats (abs) min: 3 max: 22 x̄: 12.45 x̃: 12
helped stats (rel) min: 0.13% max: 1.57% x̄: 0.86% x̃: 0.92%
95% mean confidence interval for cycles value: -13.78 -11.13
95% mean confidence interval for cycles %-change: -0.97% -0.76%
Cycles are helped.
No fossil-db changes on any Intel platform.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9122>
Ian Romanick [Tue, 12 Jan 2021 20:51:33 +0000 (12:51 -0800)]
nir/algebraic: Remove some redundant b2f logic-op reduction patterns
There are patterns that will re-write the fmin or fmax part into a form
that other patterns will gradually convert to the same ior or iand. For
example,
fmax(b2f(a), b2f(b)) != 0
b2f(a || b) != 0
a || b
No shader-db or fossil-db changes on any Intel platform.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9122>
Ian Romanick [Tue, 12 Jan 2021 20:23:16 +0000 (12:23 -0800)]
nir/algebraic: Fix some min/max of b2f replacements
fmin(-A, -B) is -fmax(A, B), and fmax(-A, -B) is -fmin(A, B). Therefore
the logic joining A and B should toggle between ior and iand for the
negated versions.
At the very least, a shader from Euro Truck Simulator 2 in shader-db is
affected by this. The KIL instruction in the (ARB assembly) shader ends
up with the wrong logic. This is _probably_ the source of
https://gitlab.freedesktop.org/mesa/mesa/-/issues/1346.
That said, the issue mentions that Mesa 18.0.5 works, but commit
68420d8322c ("nir: Simplify min and max of b2f") was added in 17.3.
Moreover, I was not able to reproduce the error in the ETS2 shader from
shader-db from any Mesa commit near the time the original fd.o bugzilla
was submitted (December 2018). :shrug:
In fact, the current error in that shader starts with
9167324a86b
("nir/algebraic: Mark some logic-joined comparison reductions as
exact"). That's a bit of a red herring as
9167324a86b just sets off a
chain of replacements that eventually leads to the incorrect min/max of
b2f patterns fixed by this commit.
The other affected shaders in the shader-db results are from Cargo
Commander. These are also ARB assembly shaders.
I think any ARB assembly shader that uses the pattern
SLT r0, ...;
...
KIL -r0;
will suffer from issues related to this.
This change fixes the piglit
tests/spec/arb_fragment_program/kil-of-slt.shader_test test added in
https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/454.
shader-db results:
All Gen6+ platforms had similar result. (Ice Lake shown)
total instructions in shared programs:
20034604 ->
20034486 (<.01%)
instructions in affected programs: 3885 -> 3767 (-3.04%)
helped: 47
HURT: 2
helped stats (abs) min: 2 max: 4 x̄: 2.64 x̃: 2
helped stats (rel) min: 2.33% max: 8.33% x̄: 3.48% x̃: 3.39%
HURT stats (abs) min: 3 max: 3 x̄: 3.00 x̃: 3
HURT stats (rel) min: 13.64% max: 16.67% x̄: 15.15% x̃: 15.15%
95% mean confidence interval for instructions value: -2.83 -1.99
95% mean confidence interval for instructions %-change: -3.84% -1.60%
Instructions are helped.
total cycles in shared programs:
979881379 ->
979879406 (<.01%)
cycles in affected programs: 119873 -> 117900 (-1.65%)
helped: 46
HURT: 3
helped stats (abs) min: 10 max: 756 x̄: 45.41 x̃: 26
helped stats (rel) min: 0.53% max: 19.72% x̄: 1.67% x̃: 1.26%
HURT stats (abs) min: 28 max: 56 x̄: 38.67 x̃: 32
HURT stats (rel) min: 1.44% max: 3.54% x̄: 2.75% x̃: 3.27%
95% mean confidence interval for cycles value: -70.83 -9.70
95% mean confidence interval for cycles %-change: -2.23% -0.57%
Cycles are helped.
Iron Lake and GM45 had similar results. (Iron Lake shown)
total instructions in shared programs: 8115098 -> 8115076 (<.01%)
instructions in affected programs: 2592 -> 2570 (-0.85%)
helped: 32
HURT: 2
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 0.88% max: 2.70% x̄: 1.35% x̃: 1.31%
HURT stats (abs) min: 5 max: 5 x̄: 5.00 x̃: 5
HURT stats (rel) min: 17.24% max: 18.52% x̄: 17.88% x̃: 17.88%
95% mean confidence interval for instructions value: -1.15 -0.15
95% mean confidence interval for instructions %-change: -1.83% 1.39%
Inconclusive result (%-change mean confidence interval includes 0).
total cycles in shared programs:
238189718 ->
238189802 (<.01%)
cycles in affected programs: 75076 -> 75160 (0.11%)
helped: 3
HURT: 31
helped stats (abs) min: 2 max: 130 x̄: 44.67 x̃: 2
helped stats (rel) min: 0.18% max: 5.70% x̄: 2.02% x̃: 0.19%
HURT stats (abs) min: 2 max: 70 x̄: 7.03 x̃: 4
HURT stats (rel) min: 0.07% max: 6.41% x̄: 0.53% x̃: 0.15%
95% mean confidence interval for cycles value: -7.27 12.21
95% mean confidence interval for cycles %-change: -0.33% 0.94%
Inconclusive result (value mean confidence interval includes 0).
No fossil-db changes on any Intel platform.
Fixes:
68420d8322c ("nir: Simplify min and max of b2f")
Closes: #1346
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9122>
Rob Clark [Fri, 19 Feb 2021 00:03:28 +0000 (16:03 -0800)]
freedreno/ir3/print: Improve branch printing
Handle the instruction suffix better, and don't try to print src regs in
a generic way, since that doesn't really work out.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9142>
Rob Clark [Thu, 18 Feb 2021 23:28:17 +0000 (15:28 -0800)]
freedreno/ir3/print: More sane ssa src/dst display
Give src/dst a "ssa_%u" name generated from the instruction's unique
serialno.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9142>
Yevhenii Kharchenko [Thu, 4 Feb 2021 10:23:30 +0000 (12:23 +0200)]
st/mesa: fix PBO download for TEXTURE_1D_ARRAY textures
Fixes 'nir_tex_src_coord' param was provided to NIR 'txf' operation as a
vec3 for TEXTURE_1D_ARRAY target, causing an assert.
Only following targets require vec3: TEXTURE_2D_ARRAY, TEXTURE_3D,
TEXTURE_CUBE, TEXTURE_CUBE_ARRAY. The rest must use vec2.
Packing layer value into Y-coordinate the same way it was done in
'create_fs' in commit
2bf6dfac.
Fixes:
a01ad311 ("st/mesa: Add NIR versions of the PBO upload/download
shaders. ")
Signed-off-by: Yevhenii Kharchenko <yevhenii.kharchenko@globallogic.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9014>
Kenneth Graunke [Thu, 18 Feb 2021 22:27:19 +0000 (14:27 -0800)]
iris: Reference the shader variant for last_vue_map as well
We call update_last_vue_map after updating the shaders, which compares
the new and old VUE maps. Except...updating the shaders may have
dropped the last reference to the variant that ice->shaders.last_vue_map
belonged to, leading to a classic use-after-free.
Fix this by taking a reference to the variant for the last VUE stage,
so it stays around until we're done with it.
Fixes:
1afed51445c ("iris: Store a list of shader variants in the shader itself")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4311
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9143>
Danylo Piliaiev [Mon, 15 Feb 2021 11:14:56 +0000 (13:14 +0200)]
turnip,freedreno/a6xx: tell hw the size of shared mem used by CS
Before, we only used 2k of shared memory.
It was found that 5 lower bits of SP_CS_UNKNOWN_A9B1 do control
the available size of shared memory for compute shaders, with
AVAILABLE_SIZE = (SP_CS_UNKNOWN_A9B1_SHARED_SIZE + 1) * 1k
up to 32k. And SP_CS_UNKNOWN_A9B1_SHARED_SIZE being zero enables
all 32k of shared memory.
Fixes tests:
dEQP-VK.rasterization.line_continuity.line-strip
dEQP-VK.memory_model.message_passing.core11.u32.coherent.fence_fence.atomicwrite.workgroup.payload_local.buffer.guard_nonlocal.workgroup.comp
dEQP-VK.memory_model.message_passing.core11.u32.coherent.fence_fence.atomicwrite.workgroup.payload_nonlocal.workgroup.guard_local.buffer.comp
dEQP-VK.memory_model.write_after_read.core11.u32.coherent.fence_fence.atomicwrite.workgroup.payload_local.image.guard_nonlocal.workgroup.comp
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9157>
Eric Anholt [Thu, 18 Feb 2021 19:12:56 +0000 (11:12 -0800)]
ci: Move specific driver testing to separate files in separate dirs.
The top-level gitlab-ci.yml is big and unwieldy when one wants to work on
CI for a single driver. Move the drivers to separate include files for
ease of finding all your driver's tests, and also to pave the way for work
on a single driver's CI to not retest all other drivers.
Reviewed-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9139>
Jesse Natalie [Fri, 19 Feb 2021 16:09:08 +0000 (08:09 -0800)]
microsoft/clc: Add a test with an unused kernel arg
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9160>
Jesse Natalie [Fri, 19 Feb 2021 16:04:23 +0000 (08:04 -0800)]
microsoft/clc: Re-order dead variable removal after uniform vars_to_explicit_types
Since vars_to_explicit_types is now where driver_location/offset is filled out,
we need to make sure that we still have all app-provided kernel arg variables
at that point in time so they all get assigned unique offsets. That means
that we can't have removed dead uniforms yet, which also means we can't have
filled out metadata for inline samplers (since usage of them generates tons
of duplicate uniforms).
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9160>
Danylo Piliaiev [Fri, 19 Feb 2021 14:41:33 +0000 (16:41 +0200)]
turnip: consider tile_max_h when calculating tiling config
Otherwise we may get a tile height exceeding the maximum.
Fixes tests:
dEQP-VK.pipeline.render_to_image.core.2d.huge.height.r8g8b8a8_unorm
dEQP-VK.pipeline.render_to_image.core.2d.huge.height.r8g8b8a8_unorm_d16_unorm
dEQP-VK.pipeline.render_to_image.core.2d.huge.height.r8g8b8a8_unorm_s8_uint
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9159>
Adam Jackson [Thu, 18 Feb 2021 15:39:41 +0000 (10:39 -0500)]
xlib: Fix build regression since
99e25d183d9
Just named the variable wrong. Can't really fault anyone for breaking a
target we don't build in CI...
Fixes:
99e25d183d9 mesa: optimize set_varying_vp_inputs by precomputing the conditions
Acked-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9132>
Yogesh Mohan Marimuthu [Wed, 3 Feb 2021 08:40:11 +0000 (14:10 +0530)]
ac/rgp: set gfxip in elf_hdr.e_flags
This patch will set the gfxip into elf_hdr.e_flags by reading data
from struct rad_info->chip_class instead of hardcoding.
v2: remove unused #define
Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8609>
Yogesh Mohan Marimuthu [Wed, 27 Jan 2021 10:54:48 +0000 (16:24 +0530)]
ac/rgp: dump co, col, pso database to rgp profile file
This patch dumps code object, code object loader events, pso correlation
databses to given rgp profile file. The data to dump is taken from
struct rgp_code_object, struct rgp_loader_events and
struct rgp_pso_correlation.
v2: fix sqtt_file structure name to match existing names in file.
fix checking wrong variable for pso correlation record_count.
remove freeing rgp database here.
Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8609>
Yogesh Mohan Marimuthu [Fri, 29 Jan 2021 10:28:45 +0000 (15:58 +0530)]
ac/rgp,radeonsi,radv: pass struct thread_trace_data to ac_sqtt_dump_data()
struct thread_trace_data holds struct rgp_code_object, struct
rgp_loader_events, struct rgp_pso_correlation data. This data is required
in function ac_sqtt_dump_data(). This patch makes the code changes
required to pass struct thread_trace_data to function ac_sqtt_dump_data().
Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8609>
Yogesh Mohan Marimuthu [Fri, 29 Jan 2021 09:41:42 +0000 (15:11 +0530)]
ac/rgp: expose data structure to populate co, col, pso database
This patch exposes struct rgp_code_object, struct rgp_loader_events and
struct rgp_pso_correlation into struct ac_thread_trace_data. Other modules
can fill in this data structure. The code object, code object loader events,
pso correlation database is written to rgp profile file using data from
these data structure exposed by this patch.
v2: move the data structures to struct ac_thread_trace_data
Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8609>
Yogesh Mohan Marimuthu [Wed, 27 Jan 2021 10:32:22 +0000 (16:02 +0530)]
ac/rgp: add helper function to write rgp elf oject
This patch adds helper function ac_rgp_write_elf_object() which
creates elf object from struct rgp_code_object_record. The elf
object is written to given output rgp profile file.
v2: for newly added files, change copyright year from 2020 to 2021
v3: fix 32bit compilation failure
Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8609>
Yogesh Mohan Marimuthu [Wed, 27 Jan 2021 10:07:03 +0000 (15:37 +0530)]
ac/rgp: add rgp co, col, pso data structures
This patch adds data structures used to collect data for code object,
code object loader event and pso correlation databases present in
a rgp profile.
v2: fix code review comments from Pierre-Eric
v3: Make loader_event_type into enum
Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8609>