Alyssa Rosenzweig
55959da24a
panfrost: Don't translate compare funcs
...
Matches Gallium.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10774 >
2021-05-12 19:46:59 +00:00
Alyssa Rosenzweig
65a00b5199
panfrost: Hide CAP_INT16 behind is_deqp
...
The GLSL precision lowering is still buggy (see !10729 ), no other driver
enables all the CAPs yet. I don't know enough GLSL IR to be the one to
fix this. In the mean time, this is a hotfix to expose the same set of
CAPs that radeonsi does.
By keeping it with is_deqp, we still get CI coverage of int16.
Closes : #4759
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10777 >
2021-05-12 19:31:34 +00:00
Rob Clark
6c530ebf40
freedreno/ir3: Don't force RTNE if rounding mode is undefined
...
Forcing round-to-nearest-even results in loss of opportunities for
conversion folding, causing a regression in gfxbench gl_alu2.
Fixes: de195671bd
("ir3: nir_op_f2f16 should round to even")
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10773 >
2021-05-12 19:05:27 +00:00
Leo Liu
052335a180
frontends/va: fix multi planes for external memeory type
...
For the multi planes case, only the first plane is required with the
template buffer formats, and shouldn't fail for other planes.
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: James Zhu <James.Zhu@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10751 >
2021-05-12 18:55:35 +00:00
Rob Clark
57c8164389
gallium/u_threaded: Add call logging
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10753 >
2021-05-12 16:09:51 +00:00
Rob Clark
3b69cbe06c
gallium/u_threaded: Add to_call() helper
...
Add helper for casting the call, which when asserts are enabled will
sanity check the call size to detect corruption.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10753 >
2021-05-12 16:09:51 +00:00
Erik Faye-Lund
e8640fef90
ci: Uprev piglit to 3351e8952 ("max-texture-size: report merged results")
...
This pulls in a fix for the max-texture-size test using piglit-runner,
among other things.
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10749 >
2021-05-12 15:47:35 +00:00
Marek Olšák
5818380f86
gallium/u_threaded: fix 32-bit breakage due to incorrect pointer arithmetic
...
Fixes: 1233c90ab4
- gallium/u_threaded: rewrite slot layout to reduce wasted space
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4755
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4758
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10746 >
2021-05-12 15:25:46 +00:00
Daniel Schürmann
989e9867a6
aco: fix additional register requirements for spilling
...
It could happen that VGPR spilling without SGPR spilling
calculated a negative spills_to_vgpr number and then
increasing the VGPR target demand above the limit.
Cc: mesa-stable
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10756 >
2021-05-12 14:13:24 +00:00
Timur Kristóf
bb127c2130
radv: Use new NIR lowering of NGG GS when ACO is used.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10740 >
2021-05-12 13:47:04 +00:00
Timur Kristóf
60ac5dda82
ac: Add NIR lowering for NGG GS.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10740 >
2021-05-12 13:47:04 +00:00
Timur Kristóf
9732881729
radv: Use new NGG NIR lowering for VS/TES when ACO is used.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10740 >
2021-05-12 13:47:04 +00:00
Timur Kristóf
3d589b8b46
ac: Add new NIR pass to lower NGG VS/TES.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10740 >
2021-05-12 13:47:04 +00:00
Timur Kristóf
89a76ff786
aco: Implement new NGG specific NIR intrinsics.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10740 >
2021-05-12 13:47:04 +00:00
Timur Kristóf
33e29f8f9b
radv: Gather NGG info sooner.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10740 >
2021-05-12 13:47:04 +00:00
Timur Kristóf
1630ec96d3
radv: Fill shader info earlier.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10740 >
2021-05-12 13:47:04 +00:00
Timur Kristóf
75a002f809
aco: Split ngg_emit_sendmsg_gs_alloc_req from the wave0 check.
...
This allows us to emit the gs_alloc_req independently of the
wave ID check, which is what the NIR lowering will need.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10740 >
2021-05-12 13:47:04 +00:00
Timur Kristóf
ad8dd39bd3
aco: Fixup the NIR metadata after sanitize_cf_list.
...
sanitize_cf_list can in fact invalidate the dominance metadata,
which we need to use eg. nir_unsigned_upper_bound.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10740 >
2021-05-12 13:47:04 +00:00
Timur Kristóf
00fd087f0a
aco: Allow workgroup barrier and shared scope for NGG shaders.
...
NGG already needs to use workgroup barriers, but this commit allows
them to come from NIR as opposed to just emitting it in ACO
instruction selection.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10740 >
2021-05-12 13:47:04 +00:00
Timur Kristóf
0d6b6c850f
nir: Add AMD specific intrinsics for merged shaders and NGG.
...
These intrinsics represent what the hardware can actually do.
Lowering our shaders to use these intrinsics will allow us to
deal with mapping the classic VS, TES, GS (and the future MS)
stages to the hardware capabilities using NIR, which makes our
backend compilers simpler.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10740 >
2021-05-12 13:47:04 +00:00
Timur Kristóf
641707a807
nir: Allow load_primitive_id in VS in nir_divergence_analysis.
...
The lowered NIR code of NGG VS shaders uses this intrinsic
when the VS has to export the primitive ID.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10740 >
2021-05-12 13:47:04 +00:00
Timur Kristóf
e905e0938a
nir: Support upper bound of unsigned bit size conversions.
...
These allow us to generate slightly better code in some cases,
eg. multiplications in ACO.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10740 >
2021-05-12 13:47:04 +00:00
Timur Kristóf
9a2ffe1abb
nir: Support upper bound of subgroup_id/num_subgroups for non-compute.
...
These intrinsics will be used when lowering NGG shaders, including
currently supported stages like VS, TES, GS and also by mesh shaders
in the future.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10740 >
2021-05-12 13:47:04 +00:00
Alyssa Rosenzweig
ac5ba2dfad
panfrost: Implement framebuffer invalidation
...
The strategy is lifted from Freedreno. The trick is to remove buffers
from the resolve set, rather than add buffers to a discard set (as you
would naively try). The latter is wrong -- draws after the
glInvalidateFramebuffer() still need to be respected.
glmark2 -btexture on-screen with sway on Mali T860 from 1393fps to
1998fps
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Closes : #2407
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6295 >
2021-05-12 12:47:53 +00:00
Alyssa Rosenzweig
c8161bf05d
panfrost: Set discard based on the resolve set
...
This is a bit simpler and will allow resolve to be disabled
independently.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6295 >
2021-05-12 12:47:53 +00:00
Alyssa Rosenzweig
bff8c7e611
panfrost: Track buffers needing resolve
...
This is a subset of the buffers cleared or drawed.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6295 >
2021-05-12 12:47:53 +00:00
Marcin Ślusarz
2c3e2d69bd
nir: handle float atomics in nir_lower_memory_model
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Fixes: 2adb337256
("nir,radv/aco: add and use pass to lower make available/visible barriers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10766 >
2021-05-12 11:09:07 +00:00
Marcin Ślusarz
27073b59bc
nir: handle float atomics in nir_gather_info
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10766 >
2021-05-12 11:09:07 +00:00
Erik Faye-Lund
8166e41e1f
translate: assert that nr_elements is in range
...
This just ensures that we don't end up reading/writing outside of the
space reserved in the key. This would have made it easier to to track
down the issue in the previous commit faster.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10730 >
2021-05-12 11:26:54 +02:00
Erik Faye-Lund
100c4dbd9c
translate: reserve more vertex-shader outputs
...
It's not just position that's special here, we also need space for
other special vertex-shader outputs.
This fixes a crash with Zink on Lavapipe, because Zink always emits
psize to avoid some shader-keys. While this might not be ideal, it's not
illegal. So we need to handle it.
But it seems we're missing more, and this list is taken from
compute_vertex_info() in lp_state_derived.c.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10730 >
2021-05-12 11:26:54 +02:00
Erik Faye-Lund
790b9a5872
lavapipe: correct reported number of UBOs
...
When emitting the state we add one to the UBO index, so we have to
subtract one from the number of UBOs that we support. This is still
fine, because Vulkan only requires 14 UBOs to be supported, and LLVMpipe
supports 16.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10731 >
2021-05-12 10:52:36 +02:00
Boris Brezillon
7db79fa677
panfrost: Flag indirect draw/dispatch shaders as internal
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10417 >
2021-05-12 07:03:51 +00:00
Boris Brezillon
ec2b46a1ce
panfrost: Expose the DRAW_PARAMETERS cap on Bifrost
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10417 >
2021-05-12 07:03:51 +00:00
Boris Brezillon
a5ba2e2045
pan/bi: Add support for gl_DrawID
...
We simply pass the drawid as a sysval.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10417 >
2021-05-12 07:03:51 +00:00
Boris Brezillon
7cc4c8c5e5
pan/bi: Add support for gl_{BaseVertex,BaseInstance}
...
Extend the VERTEX_INSTANCE_OFFSETS sysval to pass
BaseVertex/BaseInstance information to the shader.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10417 >
2021-05-12 07:03:51 +00:00
Alyssa Rosenzweig
69d81edaf8
pan/bi: Add first_vertex to vertex ID
...
Apparently r61 is zero based.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Tested-by: Boris Brezillon <boris.brezillon@collabora.com >
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10417 >
2021-05-12 07:03:51 +00:00
Boris Brezillon
0e74598e36
panfrost: Split the indexed and !indexed indirect draw info structs
...
Some fields are overlapping, so let's just split those structs to
avoid confusion.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10417 >
2021-05-12 07:03:51 +00:00
Gustavo Padovan
5d6608ef78
iris/ci: enable intel devices automatically in MR pipelines
...
After a period of stabilization it is now time to move them
to be part of the MR pipelines. We will still watch the
behavior and look for any issue that arises.
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com >
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10550 >
2021-05-12 08:21:38 +02:00
Gustavo Padovan
12f0b14e2d
iris/ci: disable failing gimark test for now
...
In order to enable the intel devices to automatically be part of
Marge pipelines we need it to be fully passing all tests. We will
remove the gimark tests temporaly to achieve that.
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com >
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10550 >
2021-05-12 08:21:38 +02:00
Vinson Lee
fe1378dcb6
nv50/ir: Initialize GCRA::RIG_Node members.
...
Fix defects reported by Coverity Scan.
uninit_member: Non-static class member degree is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member degreeLimit is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member maxReg is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member f is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member reg is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member weight is not initialized in this constructor nor in any functions that it calls.
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10714 >
2021-05-12 05:32:19 +00:00
Hyunjun Ko
3f229e34c9
turnip: Implement VK_KHR_timeline_semaphore.
...
Implements non-shareable timelines using legacy syncobjs,
inspired by anv/radv implementation.
v1. Avoid memcpy in/out_syncobjs and fix some mistakes.
v2.
- Handle vkQueueWaitIdle.
- Add enum tu_semaphore_type.
- Fix to handle VK_SEMAPHORE_WAIT_ANY_BIT_KHR correctly.
- Fix a crash of dEQP-VK.synchronization.timeline_semaphore.device_host.misc.max_difference_value.
v3. Avoid indefinite waiting in vkQueueWaitIdle by calling
tu_device_submit_deferred_locked itself.
Signed-off-by: Hyunjun Ko <zzoon@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10126 >
2021-05-12 05:07:44 +00:00
Hyunjun Ko
daefc6e2a4
turnip: prep work for timeline semaphore support
...
Small refactor to classify semphore types, currently only binary
syncobj is being used though.
v1. Fix a crash of dEQP-VK.api.null_handle.destroy_semaphore
Signed-off-by: Hyunjun Ko <zzoon@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10126 >
2021-05-12 05:07:44 +00:00
Mike Blumenkrantz
73a9dbce6b
zink: pop descriptor refs when invalidating sets
...
this avoids memory ballooning, mainly for samplers, when a descriptorset
component has refs for a very, very large number of sets
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10699 >
2021-05-11 22:39:50 -04:00
Mike Blumenkrantz
e3933548c2
zink: remove screen param from zink_descriptors_update()
...
this was redundant
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10699 >
2021-05-11 22:39:50 -04:00
Mike Blumenkrantz
987b0eb638
zink: make zink_context_update_descriptor_states() static
...
this is no longer used externally
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10699 >
2021-05-11 22:39:50 -04:00
Mike Blumenkrantz
21868216c9
zink: call invalidate on invalid descriptor sets during recycle
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10699 >
2021-05-11 22:39:50 -04:00
Mike Blumenkrantz
d2ff25c708
zink: use better iterating for buffer rebinds
...
now that the number of descriptors for a given type is known, we can iterate
over all bound descriptors for the type instead of relying on shader usage
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10699 >
2021-05-11 22:39:50 -04:00
Mike Blumenkrantz
7cc47e59c8
zink: add slot params to zink_context_invalidate_descriptor_state
...
allow more precision with invalidation
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10699 >
2021-05-11 22:39:50 -04:00
Mike Blumenkrantz
402eaa0795
zink: track number of tbos in shader data
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10699 >
2021-05-11 22:39:50 -04:00
Mike Blumenkrantz
1082dc5f4a
zink: track max slot idx for descriptor types
...
this will be useful when restoring states across renderpasses
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10699 >
2021-05-11 22:39:50 -04:00