Commit Graph

28657 Commits

Author SHA1 Message Date
Erik Faye-Lund dd2bd68fa6 zink: use general-layout when blitting to/from same resource
This avoids a validator warning when for instance generating mipmaps.

Fixes: d2bb63c8d4 ("zink: Use optimal layout instead of general. Reduces valid layer warnings. Fixes RADV image noise.")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5199>
2020-05-27 09:01:17 +00:00
Jonathan Marek da409fb7b8 freedreno/layout: add explicit offset/pitch argument to fdl6_layout
fdl6_layout will return false when the explicit pitch is not valid.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4596>
2020-05-27 04:02:58 +00:00
Vinson Lee 755c040060 freedreno: Add missing va_end.
Fix warning reported by Coverity Scan.

Missing varargs init or cleanup (VARARGS)
missing_va_end: va_end was not called for ap.

Fixes: a0ca1462f3 ("freedreno: add logging infrastructure")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5221>
2020-05-27 00:12:38 +00:00
Alyssa Rosenzweig a621235720 nouveau: Use SATURATE
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5100>
2020-05-26 22:31:31 +00:00
Alyssa Rosenzweig 9e53562980 etnaviv: Use SATURATE
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5100>
2020-05-26 22:31:31 +00:00
Alyssa Rosenzweig bb5e10af24 iris: Use SATURATE
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5100>
2020-05-26 22:31:31 +00:00
Alyssa Rosenzweig 7ea2ad0b39 softpipe: Use SATURATE
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5100>
2020-05-26 22:31:31 +00:00
Alyssa Rosenzweig 9983c4cd68 panfrost: Use SATURATE
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5100>
2020-05-26 22:31:31 +00:00
Rob Clark 6aa3004d60 freedreno/gmem: split out helper to calc # of bins
Gets the `nbins_x`/`y` local vars out of the main layout function,
to prevent any confusion like what was fixed in the previous patch
from sneaking back in.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5189>
2020-05-26 19:29:34 +00:00
Rob Clark fcecdcd822 freedreno/gmem: fix nbins_x/y mismatch
`layout_gmem()` recalculates the # of bins in x/y dimensions after
aligning the bin width/height to required dimensions.  Because of this,
the resulting gmem config could have fewer bins in either dimension.
But the tile/bin layout and the pipe assignment logic were still using
the original values.  Which could result in extraneous bins with a
width and/or height of zero.

Because the gmem rendering code uses `gmem->bin_w`/`h` to determine
the number of bins, this could result in some zero size bins being
executed, while later valid bins are skipped.  Which can leave un-
rendered portions of the screen (generally lower-right).

To fix this, be sure to use `gmem->bin_w`/`h` rather than the local
variables.

Fixes: 1bd38746d5 ("freedreno/gmem: rework gmem layout algo")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5189>
2020-05-26 19:29:34 +00:00
Rob Clark 9b91d88b33 freedreno/gmem: add some asserts
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5189>
2020-05-26 19:29:34 +00:00
Rob Clark 1679efe927 freedreno/gmemtool: add verbose mode
And real getopt arg parsing.. now that we have one.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5189>
2020-05-26 19:29:34 +00:00
Rob Clark 9c6693f0e4 freedreno/gmemtool: add a405
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5189>
2020-05-26 19:29:34 +00:00
Rob Clark b20663c5ba freedreno/gmemtool: make GMEM alignment per-gen
`gmem_page_align` is generation specific (with the exception of a2xx
which has a different value for fast-clear).  So we should override the
value from the captured gmem_key according to the gpu we are emulating
for the purposes of calculating gmem config.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5189>
2020-05-26 19:29:34 +00:00
Rob Clark fec8288081 freedreno/gmem: make noscis debug actually do something on a6xx
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5188>
2020-05-26 19:14:22 +00:00
Rob Clark 3024d00900 freedreno: handle PIPE_TRANSFER_MAP_DIRECTLY
Just something I noticed in the process of debugging the issue fixed in
the previous commit.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5188>
2020-05-26 19:14:22 +00:00
Rob Clark 8728c42031 freedreno: clear last_fence after resource tracking
The resource tracking in the clear/draw_vbo/blit paths could itself
trigger a flush.  Which would update last_fence.  So we need to clear
last_fence *after* all the dependency tracking.

Fixes: ddb7fadaf8 ("freedreno: avoid no-op flushes by re-using last-fence")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2992
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5188>
2020-05-26 19:14:22 +00:00
Rob Clark 4c97a716a6 freedreno: add batch debugging
Something I cooked up in the process of debugging the issue fixed in the
next commit.  Might come in useful again in the future.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5188>
2020-05-26 19:14:22 +00:00
Kristian H. Kristensen e369b8931c freedreno: Use explicit *_NONE enum for undefined formats
This adds RB, VFMT and TFMT NONE values for a3xx-a5xx and FMT6_NONE
for a6xx.  Use those values instead of open coded (enum xxx) ~0 or
sometimes even ~0, which triggers out-of-enum range warnings.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5173>
2020-05-26 18:35:03 +00:00
Eric Anholt 4f02b48071 freedreno/a6xx: Fix the size of buffer image views.
We were using the size of the underlying buffer (in R8 elements), while we
need to be using the size of the image view (which may be a subset of the
underlying buffer, and may be in a different format from R8).

This fix means less dereferencing off of the end of shader image views for
buffer images, but more importantly is needed to get the right answer from
resinfo if we are to switch to that.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3501>
2020-05-26 18:17:46 +00:00
Marek Olšák 38a4b86145 radeonsi/gfx10: implement most performance counters
PAL has all of them.

GE perf counters don't work - no idea why.
I only tested the few that I like to use.

There is no documentation, though most of the enums had already been
in the headers.

Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5184>
2020-05-26 06:00:54 -04:00
Marek Olšák 2a3806ffa3 amd: replace SH -> SA (shader array) in comments
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5184>
2020-05-26 06:00:54 -04:00
Marek Olšák 2cf46f2e3d ac/gpu_info: replace num_good_cu_per_sh with min/max_good_cu_per_sa
Perf counters use the new max number.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5184>
2020-05-26 06:00:54 -04:00
Marek Olšák 8c3fe285c9 radeonsi: don't hardcode most perf counter block counts
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5184>
2020-05-26 06:00:54 -04:00
Erik Faye-Lund cd1639cbe3 zink: expose PIPE_CAP_TEXTURE_MULTISAMPLE
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5159>
2020-05-26 07:55:17 +00:00
Erik Faye-Lund 4f90e818c8 zink: implement nir_texop_txf_ms
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5159>
2020-05-26 07:55:17 +00:00
Gert Wollny caa83e4d79 r600/sfn: remove debug output leftover
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5187>
2020-05-26 06:17:42 +00:00
Gert Wollny cead23cb8a r600/sfn: Correctly update the number of literals when forcing a new
group

When forcing a new instruction group by adding a ALU_OP_NOP, the
literals for the instruction that triggered this must be taken into
account for the next group, so update the number of literals
accordingly.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5187>
2020-05-26 06:17:42 +00:00
Gert Wollny 12381a0410 r600/sfn: use modern c++ in printing LDS read instruction
Closes #3021

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5187>
2020-05-26 06:17:42 +00:00
Gert Wollny eccf939b6f r600/sfn: Fix mapping for f32tof64 and f64tof32
We define the mapping based on the vector unit opcode.

Closes #3013

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5187>
2020-05-26 06:17:42 +00:00
Gert Wollny 901793d558 r600: Fix duplicated subexpression in r600_asm.c
Fixes: 4422ce1b04
    r600: force new CF with TEX only if any texture value is written

Closes #3012

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5187>
2020-05-26 06:17:42 +00:00
Vinson Lee 1241f8cb4c r600/sfn: Use correct setter method.
Fix warning reported by Coverity Scan.

Useless call (USELESS_CALL)
side_effect_free: Calling v->pin_to_channel() is only useful for its
return value, which is ignored.

Fixes: 5d10e3ec60 ("r600/nir: Pin interpolation results to channel")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5197>
2020-05-25 20:34:36 +00:00
Erik Faye-Lund ed1fd7bcc6 zink: pass batch instead of context for queries
This makes things a bit more consistent IMO.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5141>
2020-05-25 20:20:49 +00:00
Erik Faye-Lund 43c691b5b0 zink: do not dig into resource for nr_samples
The pipe_surface also know this, so no point in digging so deep.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5141>
2020-05-25 20:20:49 +00:00
Erik Faye-Lund e38513e828 zink: use samples from state
There's no reason to compute this, when it's already passed in.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5141>
2020-05-25 20:20:49 +00:00
Dmitriy Nester bf4d652f3f zink: replace fnv1a hash function with xxhash
xxhash is faster than fnv1a in almost all circumstances, so we're
switching to it globally.

Signed-off-by: Dmytro Nester <dmytro.nester@globallogic.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4020>
2020-05-25 19:41:09 +00:00
Dmitriy Nester 33fd35e2d3 r600: replace fnv1a hash function with xxhash
xxhash is faster than fnv1a in almost all circumstances, so we're
switching to it globally.

Signed-off-by: Dmytro Nester <dmytro.nester@globallogic.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4020>
2020-05-25 19:41:09 +00:00
Dmitriy Nester edd62619a1 freedreno: replace fnv1a hash function with xxhash
xxhash is faster than fnv1a in almost all circumstances, so we're
switching to it globally.

Signed-off-by: Dmytro Nester <dmytro.nester@globallogic.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4020>
2020-05-25 19:41:09 +00:00
Alyssa Rosenzweig 1d647b1c48 panfrost: Only run batch debug when specifically asked
It's expensive and in a hot path; even for general debug builds we won't
need this, only if we're specifically hacking on batch code.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5202>
2020-05-25 16:01:18 +00:00
Alyssa Rosenzweig 4c5d1e2860 panfrost: Add debug print before query flushes
Just so we know if they're happening.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5202>
2020-05-25 16:01:18 +00:00
Christopher Egert c130a3402e r600: Use TRUNC_COORD on samplers
As per d573d1d825 the same should be done
here. It seems like TRUNCATE_COORD not available on r600, so this is
limited to evergreen.

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5078>
2020-05-24 01:40:50 +02:00
Vinson Lee 4174a13459 panfrost: Ensure final.no_colour is initialized.
Fix warning reported by Coverity Scan.

Uninitialized scalar variable (UNINIT)
uninit_use: Using uninitialized value final. Field final.no_colour is
uninitialized.

Fixes: 3e4e849e6a ("panfrost: Disable tib read/write when colourmask = 0x0")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5183>
2020-05-23 21:00:52 +00:00
Vinson Lee 73c0f60d8c r600/sfn: Initialize VertexStageExportForGS m_num_clip_dist member variable.
Fix warning reported by Coverity Scan.

Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member m_num_clip_dist is not
initialized in this constructor nor in any functions that it calls.

Fixes: f7df2c57a2 ("r600/sfn: extract class to handle the VS export to different stages")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5180>
2020-05-23 20:47:07 +00:00
Vinson Lee 76a2aeeef3 llvmpipe: Fix variable name.
Fix warning reported by Coverity Scan.

Unused value (UNUSED_VALUE)
assigned_value: Assigning value from res->nr_samples to
jit_tex->sample_stride here, but that stored value is overwritten before
it can be used.

Fixes: 2e5cddacf7 ("llvmpipe: add num_samples/sample_stride support to jit textures")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3022
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5179>
2020-05-23 20:30:15 +00:00
Eric Engestrom 444138d6d9 tree-wide: fix deprecated GitLab URLs
They will stop working in the next GitLab release, so let's update them
ASAP to make sure things are propagated to everyone by then.

See:
https://about.gitlab.com/releases/2020/05/06/gitlab-com-13-0-breaking-changes/#removal-of-deprecated-project-paths

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5111>
2020-05-23 15:33:50 +00:00
Marek Olšák 9375e72d8d radeonsi/gfx8: enable TC-compatible HTILE from the beginning as before
Fixes: 0d83e7f4b9 - radeonsi: enable TC-compatible HTILE on demand for best Z/S performance
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2921
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2967

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5095>
2020-05-23 03:45:07 -04:00
Marek Olšák d30e1e486d radeonsi: don't enable TC-compatible HTILE for stencil if stencil doesn't use it
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5095>
2020-05-23 03:45:09 -04:00
Marek Olšák caeb44aa24 radeonsi: split si_all_descriptors_begin_new_cs and rename functions
A future commit will extend it.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5095>
2020-05-23 03:45:07 -04:00
Marek Olšák 7b6b35c6b5 radeonsi: move resetting tracked registers into a new function
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5095>
2020-05-23 03:45:07 -04:00
Marek Olšák 3509d3bd53 ac: update register and packet definitions for preemption
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5095>
2020-05-23 03:45:07 -04:00