Commit Graph

126850 Commits

Author SHA1 Message Date
Kristian H. Kristensen 7dfeae1a45 turnip: Collapse some tu_drm wrappers
These are all internal to tu_drm.c, we can skip a couple of
abstraction layers now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5999>
2020-08-05 01:19:22 +00:00
Kristian H. Kristensen 59e5f95bdc turnip: Move tu_bo functions to tu_drm.c
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5999>
2020-08-05 01:19:22 +00:00
Kristian H. Kristensen 270599cc1e turnip: Move device enumeration and feature discovery to tu_drm.c
These steps are all drm specific.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5999>
2020-08-05 01:19:22 +00:00
Iván Briano d33f46e08b anv: fix allocation of custom border color pool
Turns out that respecting the order of parameters is important.

Reported-by: Michael Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Fixes: 5425968d2e ("anv: Implement VK_EXT_custom_border_color")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6175>
2020-08-04 15:30:33 -07:00
Rhys Perry fea3e498c3 aco: replace MADs in isel with FMA on GFX10.3
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5546>
2020-08-04 20:39:33 +01:00
Rhys Perry 41c901b7df aco: disable SMEM stores on GFX10.3
These are removed in GFX10.3

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5546>
2020-08-04 20:39:33 +01:00
Rhys Perry b811b1d083 aco: update aco_opcodes.py for GFX10.3
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5546>
2020-08-04 20:39:33 +01:00
Rhys Perry 07250a92da aco: implement subgroup shader_clock on GFX10.3
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5546>
2020-08-04 20:39:33 +01:00
Rhys Perry a5303a3cbe aco: update vgpr_alloc_granule for GFX10.3
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5546>
2020-08-04 20:39:33 +01:00
Rhys Perry 37988b5b8e aco: fix max_waves_per_simd on Polaris, VegaM and GFX10.3
fossil-db (Polaris):
Totals from 20263 (14.75% of 137414) affected shaders:
SGPRs: 871407 -> 871679 (+0.03%); split: -0.00%, +0.03%
VGPRs: 513828 -> 550028 (+7.05%); split: -1.68%, +8.72%
CodeSize: 18869680 -> 18828148 (-0.22%); split: -0.23%, +0.01%
MaxWaves: 162012 -> 162030 (+0.01%); split: +0.01%, -0.00%
Instrs: 3629172 -> 3618817 (-0.29%); split: -0.30%, +0.02%
Cycles: 15682244 -> 15638244 (-0.28%); split: -0.30%, +0.02%
VMEM: 10675942 -> 10673344 (-0.02%); split: +0.18%, -0.21%
SMEM: 1209717 -> 1206088 (-0.30%); split: +0.03%, -0.33%
VClause: 81780 -> 81227 (-0.68%); split: -0.73%, +0.06%
SClause: 231724 -> 231561 (-0.07%); split: -0.07%, +0.00%
Copies: 187126 -> 180831 (-3.36%); split: -3.62%, +0.26%
Branches: 26841 -> 26837 (-0.01%); split: -0.03%, +0.01%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5546>
2020-08-04 20:39:33 +01:00
Rhys Perry c68fba9bba aco: update bug workarounds for GFX10_3
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5546>
2020-08-04 20:39:33 +01:00
Rhys Perry 4f1242a4d8 aco: don't create v_mad_f32 on GFX10.3
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5546>
2020-08-04 20:39:33 +01:00
Rhys Perry 5718f7c8a7 aco: fix waitcnt insertion on GFX10.3
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5546>
2020-08-04 20:39:32 +01:00
Alyssa Rosenzweig b75427cc31 panfrost: Implement EXT_multisampled_render_to_texture
Significantly helps WebGL performance with Chromium's OpenGL ES backend.
Also update docs/features.txt

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6161>
2020-08-04 18:39:24 +00:00
Alyssa Rosenzweig 2c47993b69 panfrost: Add MSAA mode selection field
This field enables MSAA, either writing samples to separate surfaces, to
a single large-bpp surface, or implicitly resolved and to a single
surface.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6161>
2020-08-04 18:39:24 +00:00
Alyssa Rosenzweig 7973b6c1e0 docs/features: Add GL_EXT_multisampled_render_to_texture
Currently only a6xx, panfrost added later in series.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6161>
2020-08-04 18:39:24 +00:00
Samuel Pitoiset 0c569e22d1 radv: print warnings for famous RADV_PERFTEST options that no longer exist
RADV_PERFTEST=aco no longer exists, ACO is the default compiler.
RADV_PERFTEST=llvm is deprecated, use RADV_DEBUG=llvm instead.

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/5662>
2020-08-04 19:09:57 +02:00
SureshGuttula 65d23e7fb1 radeon/vcn: Corrected vp9 ref associated data incase of target->codec is NULL
This patch fixes the case where less number of reference surfaces created and destoyed
on need basis. The problem comes when we are refereing old assoiciated data for newly
created target buffer with same address. Here old target buffer destroyed as that
surface is no more used as reference for next frames and when we create a new surface
for the next frame to process we will get the surfaceid and same target address
of destroyed surface.

When new surface/surface->buffer/target ,target->codec is null as we cleared when we
destroy this surface, but per ref_mapping logic, it was taking null associated data
i.e.0 as curr_ref_idx. Hence total reference mapping table goes wrong with wrong data.
Beacuse of this, we have seen corrupted vp9 decoded frames.

Signed-off-by: SureshGuttula <suresh.guttula@amd.corp-partner.google.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5452>
2020-08-04 17:01:20 +00:00
Caio Marcelo de Oliveira Filho b98dd70489 spirv: Propagate explicit layout only in types that need it
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5511>
2020-08-04 07:53:37 -07:00
Roman Stratiienko 9a9b35a3bb lima: Fix lima_screen_query_dmabuf_modifiers()
Incorrect implementation has been found during code surfing.
v3d implementation used for reference.

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Icenowy Zheng <icenowy@aosc.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6076>
2020-08-04 13:58:33 +00:00
Connor Abbott ee2c58dde4 tu: Implement VK_EXT_conditional_rendering
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6009>
2020-08-04 15:38:17 +02:00
Connor Abbott f226b198f5 tu: Reset has_tess after renderpass
Don't force sysmem for render passes after the one that uses
tessellation.

Also, move this into tu_cmd_state as that's where it belongs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6009>
2020-08-04 15:37:51 +02:00
Connor Abbott 06332ef60e freedreno: Document draw predication packets
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6009>
2020-08-04 15:37:51 +02:00
Connor Abbott 9e48e31fa5 tu: Fix DST_INCOHERENT_FLUSH copy/paste error
This was meant to handle incoherent accesses by always flushing them,
but it accidentally checked for the coherent variant instead. As a
result e.g. a vkCmdClearImage() followed by a renderpass using the image
didn't get any flushes, resulting in the same sort of corruption seen
with sysmem renderpass clears. This happened to be exposed via some
tests that used multiview.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6009>
2020-08-04 15:37:51 +02:00
Jonathan Marek 95db96d75b turnip: implement VK_EXT_4444_formats
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6164>
2020-08-04 13:15:23 +00:00
Jonathan Marek 036ff53143 util/format: translate A4R4G4B4_UNORM and A4B4G4R4_UNORM vulkan formats
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6164>
2020-08-04 13:15:23 +00:00
Jonathan Marek 35f8f355f3 turnip: rework extended formats to allow more extended formats
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6164>
2020-08-04 13:15:23 +00:00
Tomeu Vizoso 0b2478381f ci: Actually upload trace artifacts to MinIO for baremetal
Baremetal jobs filter the variables they get from .gitlab-ci.yml, and
TRACIE_UPLOAD_TO_MINIO and others weren't being let through.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Fixes: d4ca45eca2 ("ci: Upload traces' reference and actual images to MinIO")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6171>
2020-08-04 12:58:56 +00:00
Jonathan Marek 67b1163f9f turnip: add support for D32_SFLOAT_S8_UINT
Add support for D32_SFLOAT_S8_UINT, which requires special handling because
it is actually two images.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5537>
2020-08-04 11:40:18 +00:00
Tomeu Vizoso a133f7d288 ci: Remove kernel module build that slipped in
Some changes unintendedly slipped into an unrelated commit before it was
merged.

This caused kernel modules to be built and installed in the ramdisk,
which caused some devices to fail to boot due to the ramdisk size limit
being surpassed.

These changes weren't in effect until a subsequent commit triggered a
rebuild of the ramdisks.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Fixes: a9560939e0 ("ci: Build-test Panfrost tools")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6167>
2020-08-04 12:57:31 +02:00
Tomeu Vizoso 7633037441 ci: Download traces from MinIO in baremetal runs
Now that we have MinIO, we can distribute traces better than by direct
downloads from git.

With a caching MinIO instance local to the DUT, total run times should
be noticeably impacted.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6136>
2020-08-04 08:18:55 +02:00
Tomeu Vizoso d4ca45eca2 ci: Upload traces' reference and actual images to MinIO
Now that the devices have sane dates, we can upload to MinIO.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6136>
2020-08-04 08:18:51 +02:00
Jason Ekstrand 4816f6f8d8 spirv: Do more complex unwrapping in get_nir_type
The OpenGL flavor of SPIR-V allows for samplers inside structs.  This
means that our simple array-of-array handling isn't sufficient and we
need something substantially more complex for generating NIR types.

Fixes: 14a12b771d "spirv: Rework our handling of images and samplers"
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6065>
2020-08-04 03:05:34 +00:00
Jason Ekstrand 140a5492e0 compiler/types: Add a struct_type_is_packed wrapper
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6065>
2020-08-04 03:05:34 +00:00
Eric Anholt 66d8bbd822 freedreno: Fix "Offset of packed bitfield changed" warnings:
Example:

../src/freedreno/ir2/instr-a2xx.h:384:1: note: offset of packed bit-field
‘const_index’ has changed in GCC 4.4
  384 | } instr_fetch_vtx_t;

It's apparently due to bitfields that would cross the width of their type.
Just expand the types of the affected fields so that the compiler quiets
down.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6165>
2020-08-03 23:28:49 +00:00
Jonathan Marek ba6cdb275c turnip: delete tu_clear_sysmem_attachments_2d
2D path is using the same hardware as the 3D path, with the advantage of
separate register state, but here it requires WFI and extra cache flushing
and invalidating, so it should be better to just use the 3D path. There are
also some cases where the 3D path would be much faster, since it can clear
multiple attachments at once.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5775>
2020-08-03 22:38:22 +00:00
Jonathan Marek 9b6486bd3d turnip: fix sysmem CmdClearAttachments 3D fallback breaking GMEM path flush
It was clearing the flush bits, which are used by both GMEM/SYSMEM paths,
but emitting the flushes inside the cond_exec, where they would only run
for the sysmem path.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5775>
2020-08-03 22:38:22 +00:00
Jason Ekstrand 611f654fcf nir/deref: Don't try to compare derefs containing casts
One day, we may want copy_prop_vars or other passes to be able to see
through certain types of casts such as when someone casts a uint64_t to
a uvec2.  However, for now we should just avoid casts all together.

Fixes: d8e3edb784 "nir/deref: Support casts and ptr_as_array in..."
Tested-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6072>
2020-08-03 21:49:25 +00:00
Eric Anholt ee2f21b10d nir: Remove the old nir_opt_shrink_load.
The old pass only handled intrinsic load_constant, while the new
nir_opt_shrink_vectors handles ALU ops, nir load_consts, along with all
the load intrinsics.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6050>
2020-08-03 21:26:45 +00:00
Eric Anholt d8c2f896db amd: Swap from nir_opt_shrink_load() to nir_opt_shrink_vectors().
This should do much more trimming than shrink_load, and is a win on i965's
vec4 and nir-to-tgsi.  For scalar backends like this that don't need ALU
shrinking, it still gets more load intrinsics covered.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6050>
2020-08-03 21:26:45 +00:00
Eric Anholt 023e6669cc i965: Enable vector shrinking in the vec4 backend.
This manages to make some extra vec operations that would turn into movs
go away.

brw shader-db:
total instructions in shared programs: 3895037 -> 3893221 (-0.05%)
total cycles in shared programs: 113832759 -> 113792154 (-0.04%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6050>
2020-08-03 21:26:45 +00:00
Eric Anholt 1c9906d5ff nir: Add a pass to cut the trailing ends of vectors.
Ideally we'd also handle unused middles of vectors and reswizzle ALU-only
uses of it so we could write fewer channels, but that's future work/

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6050>
2020-08-03 21:26:45 +00:00
Jonathan Marek 5afaec3741 turnip: workaround for a630 d24_unorm_s8_uint fails
A630 doesn't have the HW format we use to sample stencil, so it needs a
workaround. It also has a bug around the AS_R8G8B8A8 format, which doesn't
work when UBWC is disabled, so use 8_8_8_8_UNORM instead when UBWC is
disabled (using AS_R8G8B8A8 or 8_8_8_8_UNORM should only matter with UBWC)

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5438>
2020-08-03 21:07:30 +00:00
Christian Gmeiner 6fc52739bb etnaviv: fix nir validation problem
Fixes the following validation problem:
  error: nir_intrinsic_align_offset(instr) < nir_intrinsic_align_mul(instr)

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Tested-by: Lukas F. Hartmann <lukas@mntmn.com>
Acked-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6127>
2020-08-03 20:05:20 +00:00
Rob Clark caa107cb8d freedreno/decode: move dependencies up a level
This is mainly for the benefit of automated syncing of changes from mesa
back to envytools, where the same subdir meson.build's are used, but the
toplevel meson.build is different.  In the envytools case, we want these
depenendencies to be required.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6154>
2020-08-03 19:46:49 +00:00
Rob Clark 9c33c53898 freedreno/registers: install gzip'd register database
The decode tools aren't too useful to install without the xml.  But
since libxml2 can read compressed xml, we'll gzip them for installation.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6154>
2020-08-03 19:46:49 +00:00
Rob Clark 62ebd342e6 freedreno/registers: split header build into subdirs
Instead of building the adreno/foo.xml headers from the toplevel, split
out a subdir().  This fits better with how meson likes things to be
structured.  But it does require fixing a bit about how gen_header.py
resolves imports, ie. it cannot assume the src file is at the root of
the $RNN_PATH.

This is needed for the next patch, to add support for installing the
register database for use with installed tools.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6154>
2020-08-03 19:46:49 +00:00
Rob Clark e59b241213 freedreno/registers: add .gitignore
Testing headergen2 will create .xml.h in the same location as the .xml.
But we don't want this to get accidentially committed.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6154>
2020-08-03 19:46:49 +00:00
Rob Clark 24f55eb6e8 freedreno/rnn: rework RNN_DEF_PATH construction
No need for rnn_path.h, just construct the whole thing in meson and pass
via c_args.  Also move where the path is constructed up one level.  This
will be needed for syncing back to envytools, where the path will be
different.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6154>
2020-08-03 19:46:49 +00:00
Rob Clark bf425b7e51 freedreno/rnn: also look for .xml.gz
libxml2 can load gzip compressed files, so lets look for these too.
This will be useful for installing the register database so that an
installed cffdump/crashdec can use them.  But it isn't too useful
to be able to edit the installed register database, so we can gzip
them to use less disk space.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6154>
2020-08-03 19:46:49 +00:00