Commit Graph

129004 Commits

Author SHA1 Message Date
Eric Engestrom 00d87db89b docs: add release notes for 20.1.9
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6943>
2020-09-30 20:20:40 +00:00
Eric Anholt 49ec863e83 freedreno/ir3: Enable the i/o vectorizer on UBOs.
This will merge loads of UBO components together into vec4 loads.  At the
same time, it improves the alignment information on our loads, fixing the
regression from the vec3 loads fix.

shader-db results:
total instructions in shared programs: 12829370 -> 8755851 (-31.75%)
total cat6 in shared programs: 145840 -> 97027 (-33.47%)

Overall results from before the vec3 fix:
total instructions in shared programs: 8019997 -> 8755851 (9.18%)
total cat6 in shared programs: 87683 -> 97027 (10.66%)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6612>
2020-09-30 19:53:43 +00:00
Eric Anholt e3f4655805 nir: Make nir_lower_ubo_vec4() handle non-vec4-aligned loads.
It turns out I had missed a case in my enumeration of why everything
currently was vec4-aligned.

Fixes a simple testcase of loading from a vec3[2] array in freedreno with
IR3_SHADER_DEBUG=nouboopt.

Initial shader-db results look devastating:

total instructions in shared programs: 8019997 -> 12829370 (59.97%)
total cat6 in shared programs: 87683 -> 145840 (66.33%)

Hopefully this will recover once we introduce the i/o vectorizer, but that
was blocked on getting the vec3 case fixed.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6612>
2020-09-30 19:53:43 +00:00
Eric Anholt 618556a8cb nir: Drop the high_offset argument to the load_store_vectorizer filter.
Nothing uses it, and it's not clear to me what it provides over
alignment/num_components/bit_size.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6612>
2020-09-30 19:53:43 +00:00
Eric Anholt 5f757bb95c nir: Make the load_store_vectorizer provide align_mul + align_offset.
It was passing an encoding of the two that wasn't good for ensuring "Don't
combine loads that would make us straddle a vec4 boundary" for
nir_lower_ubo_vec4.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6612>
2020-09-30 19:53:43 +00:00
Eric Anholt 9c5a793dc7 nir/gl_nir_lower_buffers: Set up align_mul/offset on UBOs.
nir_lower_to_explicit_io will give us good alignments if we have the
cast's alignment information known, and it's trivial: Just the offset of
the UBO variable that is at the base of the deref.  Otherwise, explicit io
assumes the load is aligned just to the size of a scalar value in it.

The change in freedreno is in the noise.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6612>
2020-09-30 19:53:43 +00:00
Eric Anholt ffbfc1ec0e nir/nir_lower_uniforms_to_ubo: Set better alignments on our new instructions.
The change on freedreno is in the noise.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6612>
2020-09-30 19:53:43 +00:00
Eric Anholt c88c89ff3e nir: Print the alignment information on casts.
I wanted it for debugging GL alignment.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6612>
2020-09-30 19:53:43 +00:00
Eric Anholt 6c1c571440 nir: Document a bit about how align_mul/offset work.
Introduces a #define for the maximum valid align_mul that's used in the
load_store_vectorizer tests (currently, though it will be used more soon).

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6612>
2020-09-30 19:53:43 +00:00
Eric Anholt bd60e31c83 freedreno/ir3: Make sure we run the opt loop after lowering UBOs to vec4.
The lowering pass may introduce vector bcsels that we need to scalarize
back out.  It's unusual to have UBOs and not get any lowered to push
constants, so the flag was usually set anyway.

Fixes: 2b25240993 ("freedreno/ir3: Replace our custom vec4 UBO intrinsic
with the shared lowering.")

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6612>
2020-09-30 19:53:43 +00:00
Jonathan Marek 8dc8922af2 turnip: implement legacy API functions separately
Move legacy API functions to a separate file, and implement them by calling
the new API functions, like tu_CreateRenderPass was already doing.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6920>
2020-09-30 17:02:55 +00:00
Jason Ekstrand 25ebd7f90f Revert "nir/lower_goto_if: Add a route::outside set"
This reverts commit d57573dcd4.  The
actual bug was an issue with prev_frontiers which has been properly
fixed in the previous commit.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6750>
2020-09-30 16:46:11 +00:00
Jason Ekstrand 57c9fc3cba nir/lower_goto_ifs: Always include level dom_frontiers in prev_frontier
When we come in from some other level or from the parent, we need to
ensure that the reach set is in prev_frontier but we also need to
consider the dominance frontier of our level.  Otherwise, we may end up
leaving out possible blocks when computing the reach of a level.

Acked-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6750>
2020-09-30 16:46:11 +00:00
Jason Ekstrand 7749983658 nir/lower_goto_ifs: Add asserts for SSA forks
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6750>
2020-09-30 16:46:11 +00:00
Jason Ekstrand dc010cb74e nir/lower_goto_ifs: Use rzalloc
In particular, SSA forks weren't always getting properly initialized
which was causing asserts to fail.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6750>
2020-09-30 16:46:11 +00:00
Jason Ekstrand fa3c38ceb3 spirv: Only run repair_ssa if structured
We shouldn't need it if we're unstructured and the pass assumes
structure so attempting to run it will assert-fail.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6750>
2020-09-30 16:46:11 +00:00
Jason Ekstrand 719c68016a nir/dominance: Use _mesa_set_clear instead ofhand-rolling it
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6750>
2020-09-30 16:46:11 +00:00
Jason Ekstrand b6a4172f10 nir/lower_goto_ifs: Don't destroy SSA form in the process
There are two issues here:

 1. If there are any phi nodes, we'll make complete hash of them.  This
    isn't likely actually a problem because spirv_to_nir doesn't
    generate any actual phi nodes today.  However, if we start doing any
    other passes before this, we may have a problem.

 2. Even without phi nodes, we may still break SSA form.  This can
    happen if we ever have to stick a block inside a conditional to
    satisfy weird CFG constraints.  Doing so can cause it to no longer
    look like it dominates some of its uses even though, at runtime,
    it's guaranteed to be run first.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6750>
2020-09-30 16:46:11 +00:00
Jason Ekstrand 6f134a622b nir/validate: Improve the validation of blocks
This commit adds a number of new validation checks:

 1. We now check that every block pointer in the IR points to a block
    that actually exists in a block list that's reachable from the
    nir_function_impl.

 2. We assert that nir_function_impl::body is non-empty

 3. We assert that the start block has no predecessors.  This is
    important because we tend to put run-once code there.

 4. We now validate some stuff on the end block.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6750>
2020-09-30 16:46:11 +00:00
Marek Olšák 4fb2eddfdf gallium/util: remove empty file u_half.h
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6774>
2020-09-30 16:28:24 +00:00
Marek Olšák 7a1deb16f8 gallium/util: remove redundant util_float_to_half_rtz
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6774>
2020-09-30 16:28:24 +00:00
Marek Olšák 2b6a172343 util: remove util_float_to_half and util_half_to_float wrappers
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6774>
2020-09-30 16:28:24 +00:00
Marek Olšák 5af81393e4 util: move util_half_to_float code into _mesa_half_to_float_slow
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6774>
2020-09-30 16:28:24 +00:00
Marek Olšák 87900afe5b util: implement f16c - fast half<->float conversions
This also happens to fix bptc-float-modes on llvmpipe.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6774>
2020-09-30 16:28:24 +00:00
Jason Ekstrand 7dbb1f7462 nir/cf: Better handle intra-block splits
In the case where end was a instruction-based cursor, we would mix up
our blocks and end up with block_begin pointing after the second split.
This causes a segfault as the cf_node list walk at the end of the
function never terminates properly.  There's also a possibility of
mix-up if begin is an instruction-based cursor which was found by
inspection.

Fixes: fc7f2d2364 "nir/cf: add new control modification API's"
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Acked-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6866>
2020-09-30 15:47:51 +00:00
Jason Ekstrand 5e2e882270 nir: Disallow goto and goto_if in clone and [de]serialize
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6866>
2020-09-30 15:47:51 +00:00
Jason Ekstrand 9a48ed84ec nir/copy_propagate: Copy-prop into jump conditions
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6866>
2020-09-30 15:47:51 +00:00
Connor Abbott 7f0cd6f153 nir/opt_if: Use early returns in opt_if_merge()
We would've had to add yet another level of indentation, or duplicated
finding the if conditions in the next commit. Refactor this function to
use early returns like our other optimizations, so that this isn't an
issue.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6866>
2020-09-30 15:47:51 +00:00
Connor Abbott 656e428ff4 nir/opt_if: Remove open-coded nir_ssa_def_rewrite_uses()
So that we don't have to change these two places later.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6866>
2020-09-30 15:47:51 +00:00
Connor Abbott c6f871b62e nir/lower_returns: Use nir control flow insertion helpers
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6866>
2020-09-30 15:47:51 +00:00
Connor Abbott f103bded0b ttn: Use nir control flow insertion helpers
As a side effect, we can delete the whole control flow stack thing.

v2 (Jason Ekstrand):
 - Drop the ttn_if helper and just inline it in the two uses

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6866>
2020-09-30 15:47:51 +00:00
Connor Abbott f504eb683d radv: Use nir control flow insertion helpers
v2 (Jason Ekstrand):
 - Rebased and tweaked a few cases
 - Use the helpers in build_timestamp_query_shader

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6866>
2020-09-30 15:47:51 +00:00
Connor Abbott b2ede6280c intel/nir: Use nir control flow helpers
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6866>
2020-09-30 15:47:51 +00:00
Bas Nieuwenhuizen 55e2b3424d radeonsi: Fix imports with displayable DCC.
Otherwise we reset the displayable DCC on import.

Fixes: c6c1fa9a26 "radeonsi: Put retile map in separate buffers."
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3577
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6918>
2020-09-30 11:39:03 +00:00
Eric Engestrom 636f770233 bin/gen_release_notes.py: escape special rST characters
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6869>
2020-09-30 09:29:00 +00:00
Erik Faye-Lund ae7975ecd4 docs: cpu -> CPU
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>
2020-09-30 08:18:21 +00:00
Erik Faye-Lund 5fe6124661 docs: Sandybridge -> Sandy Bridge
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>
2020-09-30 08:18:21 +00:00
Erik Faye-Lund 302fc31847 docs: vmware -> VMWare
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>
2020-09-30 08:18:21 +00:00
Erik Faye-Lund 37bb6ddcc2 docs: ubuntu -> Ubuntu
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>
2020-09-30 08:18:21 +00:00
Erik Faye-Lund 0c90662dfb docs: scons -> SCons
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>
2020-09-30 08:18:21 +00:00
Erik Faye-Lund 7f4f441465 docs: quote "git log"
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>
2020-09-30 08:18:21 +00:00
Erik Faye-Lund 50e26e5376 docs: git -> Git
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>
2020-09-30 08:18:21 +00:00
Erik Faye-Lund 24e8e53bac docs: android -> Android
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>
2020-09-30 08:18:21 +00:00
Erik Faye-Lund ca613a5a7e docs: drm -> DRM
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>
2020-09-30 08:18:21 +00:00
Erik Faye-Lund 9f59b19ad0 docs: wayland -> Wayland
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>
2020-09-30 08:18:21 +00:00
Erik Faye-Lund 8d2090e79d docs: x11 -> X11
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>
2020-09-30 08:18:21 +00:00
Erik Faye-Lund 0db015294e docs: cmake -> CMake
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>
2020-09-30 08:18:21 +00:00
Erik Faye-Lund b8b0e5ece0 docs: gpu -> GPU
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>
2020-09-30 08:18:21 +00:00
Erik Faye-Lund 12d925dc8d docs: visual studio -> Visual Studio
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>
2020-09-30 08:18:21 +00:00
Erik Faye-Lund 0e9d87eacc docs: windows -> Windows
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6915>
2020-09-30 08:18:21 +00:00