Christian Gmeiner
172f5db20d
ci: include etnaviv support in ARMHF container.
...
Build the kernel with CONFIG_DRM_ETNAVIV=y and include
imx6q-cubox-i.dtb.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12852 >
2021-09-17 17:54:39 +00:00
Rhys Perry
a1af902531
nir/algebraic: distribute fmul(fadd(a, b), c) when b and c are constants
...
This allows for more MAD/FMA instructions to be created.
fossil-db (Sienna Cichlid):
Totals from 50134 (33.46% of 149839) affected shaders:
VGPRs: 2436536 -> 2436000 (-0.02%); split: -0.05%, +0.03%
SpillSGPRs: 13136 -> 13135 (-0.01%); split: -0.02%, +0.02%
CodeSize: 206621424 -> 206278292 (-0.17%); split: -0.23%, +0.07%
MaxWaves: 1116804 -> 1117448 (+0.06%); split: +0.07%, -0.01%
Instrs: 38977460 -> 38862886 (-0.29%); split: -0.33%, +0.04%
Latency: 832425389 -> 827432260 (-0.60%); split: -0.63%, +0.03%
InvThroughput: 184193457 -> 183563350 (-0.34%); split: -0.37%, +0.03%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7458 >
2021-09-17 17:28:26 +00:00
Emma Anholt
63cc1fe71f
freedreno: Remove dead fd_batch_reset().
...
Unused since 58f5605124
("freedreno: Handle full blit discards by
invalidating the resource.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11511 >
2021-09-17 17:07:43 +00:00
Emma Anholt
3ade94df86
freedreno: Use a BO bitset for faster checks for resource referenced.
...
When moving the batch cache to the context, I added hash table lookups
from batch to rsc for "is this resource in use" because we could no longer
store data in the rsc bo under the batch cache's lock.
We can save that cost by tracking a bitfield of resources referenced by
the batch, which gives us very cheap checks in the draw path at a minor
cost in memory. We can just use the GEM BO handle, since it's a nice
small integer already (we can't use the TC buffer ID, because the frontend
changes that, and we're in the driver thread).
This required moving the !pending() assert up in resource shadowing, since
the BO swap meant we were checking pending on the wrong resource.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11511 >
2021-09-17 17:07:43 +00:00
Emma Anholt
22486ffa51
freedreno: Remove the submit lock locking.
...
I think the whole submit lock thing should be possible to remove now, but
just getting rid of the lock since we're no longer sharing batches between
ctxes means another several percent draw overhead improvement.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11511 >
2021-09-17 17:07:43 +00:00
Emma Anholt
b2349a4671
freedreno: Move the batch cache to the context.
...
Our draw call rate was significantly limited by the atomics we had to do
to manage access to the batch cache.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11511 >
2021-09-17 17:07:43 +00:00
Emma Anholt
c3d6493122
freedreno: Use TC's flag for whether get_query is in the driver thread.
...
In moving batch cache to the context, the check for whether there's
pending work being done to this resources ends up accessing the context,
so we can't do it outside of the fd_context_access_begin(). This flag
lets us do the driver-thread asserts before we've decided whether we need
to flush.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11511 >
2021-09-17 17:07:43 +00:00
Emma Anholt
cbbe3e7641
freedreno: Precompute resource pointer hash values.
...
It was around half a percent of the CPU in the fd-bc-ctx branch, and adds
4b to our 472b struct.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11511 >
2021-09-17 17:07:43 +00:00
Rhys Perry
f24f62f4ad
aco/nops: fix handle_raw_hazard_internal when visiting the current block
...
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/12720 >
2021-09-17 16:43:00 +00:00
Rhys Perry
a8cc911aaf
aco/nops: add State
...
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/12720 >
2021-09-17 16:43:00 +00:00
Rhys Perry
bdf7eed045
aco/nops: create handle_raw_hazard_instr helper
...
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/12720 >
2021-09-17 16:43:00 +00:00
Rhys Perry
bd07118b56
aco/nops: use up-to-date mask_size
...
fossil-db (Pitcairn):
Totals from 6 (0.00% of 129702) affected shaders:
CodeSize: 8760 -> 8736 (-0.27%)
Instrs: 1714 -> 1708 (-0.35%)
Latency: 12325 -> 12302 (-0.19%)
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/12720 >
2021-09-17 16:43:00 +00:00
Connor Abbott
dfe432d829
ir3: Make trig replacement expression exact
...
This prevents other optimizations from associating the inner multiply,
which can add inaccuracies that can lead to discontinuities around the
boundary of the ffract. We should use exactly the sequence that the blob
uses to avoid problems.
Since fadd + fmul cannot be combined to ffma when exact is specified, we
have to use ffma ourselves.
Fixes artifacts in PixMark Volplosion with !7458 .
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12912 >
2021-09-17 15:45:29 +00:00
Rhys Perry
6ed18749de
aco: allow live-range splits of linear vgprs in top-level blocks
...
Fixes dEQP-VK.ssbo.phys.layout.random.8bit.all_per_block_buffers.46 on
GFX8.
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/12172 >
2021-09-17 14:36:03 +00:00
Rhys Perry
8d50385bbd
aco: implement linear vgpr copies
...
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/12172 >
2021-09-17 14:36:03 +00:00
Rhys Perry
b1e4794f0f
aco/tests: add regalloc.scratch_sgpr.create_vector
...
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/12172 >
2021-09-17 14:36:03 +00:00
Rhys Perry
f41200d289
aco/tests: fix finish_ra_test()
...
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/12172 >
2021-09-17 14:36:03 +00:00
Rhys Perry
207b2cd434
aco: find scratch reg for sub-dword psuedo instructions which read sgprs
...
If there's a sgpr operand before a sub-dword operand, a scratch register
will not be found on GFX6/7.
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/12172 >
2021-09-17 14:36:03 +00:00
Rhys Perry
f2a48f4eae
aco: find a scratch register for sub-dword copies on GFX7 if scc is empty
...
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/12172 >
2021-09-17 14:36:03 +00:00
Rhys Perry
da74e0f012
aco: rewrite print_reg_class()
...
Make it work for any regclass, and print linear VGPRs differently from
logical ones.
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/12172 >
2021-09-17 14:36:03 +00:00
Rhys Perry
e2b77e6cd4
aco: add and use RegClass::resize helper
...
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/12172 >
2021-09-17 14:36:03 +00:00
Rhys Perry
783609a849
aco: add RegClass::is_linear_vgpr helper
...
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/12172 >
2021-09-17 14:36:03 +00:00
Rhys Perry
dfa8ef723b
radv: fix pipeline caching with robust buffer access
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12900 >
2021-09-17 13:49:46 +00:00
Mike Blumenkrantz
5eb59a03ec
util/tc: rename tc_replace_buffer_storage_func::num_rebinds and document
...
this parameter is only a hint, as tc provides no method for tracking cases
when a buffer is bound multiple times to the same site (e.g., multiple vertex
buffer slots will be counted as 1 bind), so rename to "minimum" to be more clear
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12898 >
2021-09-17 12:32:29 +00:00
Mike Blumenkrantz
85305b2d61
features: fix listing for GL_ARB_parallel_shader_compile
...
this isn't actually all drivers
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12909 >
2021-09-17 12:27:15 +00:00
Samuel Pitoiset
c952655693
ac/rgp, radv: report wave size for shaders
...
Fills the "Wave mode" in "Pipelines" for GPUs that supports Wave32.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12896 >
2021-09-17 08:05:36 +00:00
Samuel Pitoiset
d29c381c64
ac/rgp, radv: report scratch memory size for shaders
...
Fills the "Scatch Mem" with "Yes/No" in "Pipelines", this requires
instruction timing to be enabled.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12896 >
2021-09-17 08:05:36 +00:00
Pierre-Eric Pelloux-Prayer
57c63d7204
Revert "ci/v3d: add piglit flake"
...
This reverts commit 7d5aea9edf
.
The test isn't flaky: now that the regression is fixed we can
remove it from the flakes list.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12849 >
2021-09-17 09:42:19 +02:00
Pierre-Eric Pelloux-Prayer
4c0b8254a2
vbo/dlist: reallocate the vertex buffer on vertex upgrade
...
upgrade_vertex copies save->copied.nr vertices to the vertex buffer,
so we need to make sure it has enough space to accomodate them.
This commit also drops the usage of COPY_CLEAN_4V_TYPE_AS_UNION in
this function because it always writes 4-components for all attributes,
but our buffer might be smaller. Instead, only write the needed
components.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5353
Fixes: cc57156dce
("vbo/dlist: rework vertex_store management")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12849 >
2021-09-17 09:42:19 +02:00
Filip Gawin
beb7ed2b89
r300: assert that array in translate_vertex_program is initialized
...
Problematic usage is in case RC_OPCODE_ENDLOOP, at line
ret_addr = loops[--loop_depth];
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12880 >
2021-09-17 07:19:24 +00:00
Timothy Arceri
81c8c7d998
util/cache: run basic cache tests on the single file cache
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12745 >
2021-09-17 01:25:46 +00:00
Marek Vasut
6da2727174
freedreno: Handle timeout == PIPE_TIMEOUT_INFINITE and rollover
...
The fd_fence_finish() may be passed a special timeout value PIPE_TIMEOUT_INFINITE.
This gets propagated all the way to get_abs_timeout(), where it gets converted to
a huge timeout value and passed down to the kernel. At least on iMX53, the kernel
may complain about this value being too large and emit a backtrace. The relevant
piece of information there is the following:
schedule_timeout: wrong timeout value bf94984b
Per suggestion by Rob Clark, fix this in get_abs_timeout() by picking the same
rollover implementation present in etnaviv. This fixes one part of the problem
where the tv_nsec becomes larger than NSEC_PER_SEC, which is invalid.
However, the PIPE_TIMEOUT_INFINITE is sufficiently large to make tv_secs larger
than KTIME_SEC_MAX, which makes kernel-side ktime_set() return KTIME_MAX and
that in turn triggers the above "wrong timeout value N" message. Fix this by
setting the timeout to large enough value in case of PIPE_TIMEOUT_INFINITE.
While the timeout is not truly infinite, the timeout is long enough as anything
longer than a few seconds means the GPU got hung.
The "util/timespec.h" is added so we can use NSEC_PER_SEC instead of ad-hoc
constant 1000000000 . The "pipe/p_defines.h" is needed for PIPE_TIMEOUT_INFINITE.
This problem can be reliably triggered on iMX53 using Qt5 with EGLFS support,
using the qtbase examples, as follows:
/usr/share/examples/opengl/qopenglwidget/qopenglwidget -platform eglfs
Fixes: f3cc0d2747
("freedreno: import libdrm_freedreno + redesign submit")
Signed-off-by: Marek Vasut <marex@denx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12886 >
2021-09-17 00:46:57 +00:00
Mike Blumenkrantz
eb3fa25150
zink: zero VkImageCreateInfo::queueFamilyIndexCount on creation
...
this explodes gfxreconstruct
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12905 >
2021-09-17 00:24:49 +00:00
Emma Anholt
e2ba454180
ci/freedreno: Drop minetest from a3xx trace testing.
...
It's been flaking approximately weekly since the end of June.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12906 >
2021-09-16 22:46:48 +00:00
Neha Bhende
f2b08decf7
auxiliary/indices: convert primitive type PIPE_PRIM_PATCHES
...
Few tessellation related piglit test are crashing. This patch
fixes unhandled case
Tested with piglit
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
(cherry picked from commit 0e1c962cc105a9330caf22266e1962b049c13454)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12882 >
2021-09-16 21:45:43 +00:00
Dave Airlie
86399c1b1f
lavapipe: enable KHR_spirv_1_4
...
One test fails but I think it's a missing barrier in the test
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12888 >
2021-09-17 05:38:29 +10:00
Marijn Suijten
07e1233c61
freedreno: Enable Adreno 508, 509 and 512
...
These GPUs attained kernel support in:
https://git.kernel.org/torvalds/c/1d832ab30ce64abe30571bc12931a296a8a27c4d
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12874 >
2021-09-16 18:51:40 +00:00
Nanley Chery
69242f188c
iris: Finish aux import in iris_resource_from_handle
...
This allows us to delete iris_resource_unfinished_aux_import, which
incorrectly assumed that a CCS-enabled resource needs an aux BO.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12795 >
2021-09-16 18:07:23 +00:00
Nanley Chery
8510d17ff4
iris: Add and use get_num_planes
...
This function counts the number of objects in a pipe_resource linked list.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12795 >
2021-09-16 18:07:23 +00:00
Nanley Chery
a16d6bc179
iris: Don't add a clear color BO for MC_CCS
...
It's unusable because ISL_AUX_USAGE_MC doesn't support fast clears.
Instead of performing this change in the if-ladder, replace the
if-ladder with a switch statement to make it clear what's going on.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12795 >
2021-09-16 18:07:23 +00:00
Nanley Chery
c7a61bbf13
iris: Allow NULL aux BOs in aux-state functions
...
XeHP can use CCS_E without an aux BO.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12795 >
2021-09-16 18:07:23 +00:00
Nanley Chery
d32a4cdab9
iris: Simplify an iris_use_pinned_bo call
...
Avoid using a helper function to get the resource BO. This fits in
better with the previous iris_use_pinned_bo calls.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12795 >
2021-09-16 18:07:23 +00:00
Nanley Chery
89319a0dfd
iris: Split clear color and aux BO checks
...
CCS_E-enabled resources on XeHP have a clear color without an aux BO.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12795 >
2021-09-16 18:07:23 +00:00
Nanley Chery
d25515fbf1
iris: Support NULL aux BOs in fill_surface_state
...
XeHP can use CCS_E without an aux BO.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12795 >
2021-09-16 18:07:23 +00:00
Nanley Chery
08edf0f7fc
iris: Delete iris_resource_get_clear_color
...
This helper simply is a wrapper to the clear color fields in the
iris_resource struct. We choose to delete it for two reasons:
1) It incorrectly asserts that the resource argument has an aux BO.
This doesn't hold for CCS_E on XeHP.
2) The majority of functions ignore the helper anyway and access these
fields directly.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12795 >
2021-09-16 18:07:23 +00:00
Jesse Natalie
107c200537
CI/windows: Build shared-glapi, EGL, gles2
...
Acked-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12881 >
2021-09-16 17:38:58 +00:00
Jesse Natalie
ccb5cf8b4b
meson: Set /Zc:__cplusplus for MSVC
...
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12881 >
2021-09-16 17:38:58 +00:00
Jesse Natalie
e7a1eebbb2
egl: Update Windows .def to include missing exports
...
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12881 >
2021-09-16 17:38:58 +00:00
Jesse Natalie
29e3094d1e
symbols-check: Fix symbol demangling for Windows
...
Only strip leading underscores if there's also a trailing @
Fixes shared-glapi symbol check for x64
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12881 >
2021-09-16 17:38:58 +00:00
Mike Blumenkrantz
ed794207b5
zink: pass all modifiers through to image creation
...
let the driver figure these out after zink guarantees that at least one of them
will work
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12857 >
2021-09-16 12:36:20 -04:00