We represent vectors as packed anyway so all these ops are just data
motion that we already know how to do. Calling into NIR for these
doesn't really help. It also avoids potential optimization loops in NIR
where pack op lowering conflicts with itself. It's simpler just to
handle it all in the back-end and trust our prmt optimization and copy
propagation to clean it all up.
Reviewed-by: Mel Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34849>
The vdrm_vpipe_connect() prototype defined in vdrm.c doesn't match
vdrm_vpipe_connect() defined in vdrm_vpipe.c. This leads to a compilation
warning about the wrong proto when Mesa linked with enabled LTO. Fix the
vdrm_vpipe_connect() definition.
Fixes: bf0e3d6274 ("virtio/vdrm: Add vtest backend")
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34819>
When copying between buffers, find the biggest possible block size usable
for all copy regions. A common block size is used since using different
block sizes can require additional flushing between different blocks.
Besides the single-byte and 4-byte block sizes, also allow for 16-byte
block size and the appropriate corresponding format. Using bigger block
size when possible helps potentially reduce the number of required
CP_BLIT operations. Tested on the Crucible benchmarks, especially for
larger copy regions this can improve throughput up to 3x.
Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34587>
Will be useful if app doesn't specify depth direction correctly.
E.g. the capture of "Sons of The Forest" I have has a shader
where `gl_FragDepth` has `layout(depth_less)`, but the output for different
fragments is actually sometimes less, sometimes more than the original depth
by a tiny margin.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34423>
Specifying depth write direction in shader may help us. E.g.
If depth test is GREATER and FS specifies FRAG_DEPTH_LAYOUT_LESS
it means that LRZ won't kill any fragment that shouldn't be killed,
in other words, FS can only reduce the depth value which could
make fragment to NOT pass with GREATER depth test. We just have to
enable late Z test.
There is the same concept in D3D11 and it is seen e.g. in "Stray" game.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34423>
Add a debug option which checks the status of a command buffer, if
it has completed execution on the GPU, before it's reset or
destroyed.
This works by getting the GPU to write to a specific memory address
on vkBeginCommandBuffer and vkEndCommandBuffer, so the CPU can check
that the GPU has written the TU_CMD_BUFFER_STATUS_IDLE to the slot
before actually resetting or freeing the command buffer.
This can to help in debugging sync issues within the driver.
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34383>
This is getting complicated and depends on some inter-linked details for
safety such as values being in-range. It's safer if the rest of the IR
is forced to use public interfaces.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34794>
SSABuilder::alloc_ssa() is now only for scalars. We intoduce
SSABuilder::alloc_ssa_vec() which handles the vector case the way
alloc_ssa previously did. This matches the split used in SSAValueAllocator
We're about to drop Copy from SSARef, which makes it a lot more annoying
to deal with. SSAValue will remain Copy though, so we want to start
using it instead of SSARef where possible.
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34794>
Required extensions to support wsi have been relaxed earlier for sw blit
path. So the renderer extensions enablement is fixed to be passive based
on the renderer side correspondingly.
Test: emulate to drop dma-buf and modifier support from host anv driver,
and confirm wsi via venus works with sw blit fallback and device
creation no longer returns VK_ERROR_FEATURE_NOT_PRESENT.
Fixes: 06f5d1a105 ("venus: expose WSI on renderer without dma-buf support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34827>
Without a type, we can't really interpret the data. Currently, it just
returns None in the presence of modifiers so it's okay. Also, all of
the callers of this helper today do so on the source of an OpPrmt which
doesn't support source modifiers.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34818>