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
Mike Blumenkrantz
095b8ad8b1
zink: don't track sampler states onto buffer sampler sets
...
this should always just be a null pointer to reduce overhead
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
208e34e110
zink: update samplerview descriptor layouts when image binds are set
...
for this case it's important to match the GENERAL layout in sampler bindings
if the resource is also being used as a shader image
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
4c7d951b76
zink: track bind counts for descriptors
...
* for samplers this is a per-stage slot mask that will be used for fast layout updates
* images get a count for gfx and compute usage
* any writable descriptor bind gets its own gfx/compute counter
* all descriptor binds are now counted
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
27a4ba52db
zink: unify resource rebinding
...
this improves handling for shader images
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
42634824f8
zink: add context-based descriptor info tracking infrastructure
...
this maintains the exact structs needed to update descriptor states
it's incomplete at this moment due to lacking shader image rebinds, but
it's also not yet being used
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
a8e80b3344
zink: stop invalidating descriptor sets on pool destroy
...
this was debug code I was using for testing pool validity, but it
stopped being useful and just crashes sometimes now
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
Yiwei Zhang
47eabd0e6b
virgl: do not use winsys info for guest storage of classic resource
...
winsys_stride is the stride of the host storage of the classic resource,
and using that breaks the readback on the guest storage.
v2: move the scrubbing to virgl_resource_from_handle
The returned modifier also points directly to the host driver's real
modifier but not a virtualized one. Leave plane_offset as zero here
matches the prior behavior before introducing winsys info.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org > (v1)
Reviewed-by: Chia-I Wu <olvaffe@gmail.com > (v2)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10757 >
2021-05-11 23:51:42 +00:00
Mark Janes
494255c821
iris: Use const uploader for user index data
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10759 >
2021-05-11 16:03:22 -07:00
Mark Janes
cdadb84e41
iris: Use const uploader for draw parameters
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10759 >
2021-05-11 16:03:21 -07:00
Mark Janes
19ea0974da
iris: Use const uploader for blorp vertex data
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10759 >
2021-05-11 16:03:20 -07:00
Mark Janes
beceb392d7
iris: Use const_uploader for iris_create_stream_output_target
...
This data is written and read by the GPU, and does not need to be in
system memory.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10759 >
2021-05-11 16:03:20 -07:00