Buffers that are not dedicated can also be used for CCS mapped images,
so they need to be aligned to the AUX-TT requirements.
GTK+ is running into such case where it creates an image with a CCS
modifier. When requesting the alignment through
vkGetImageMemoryRequirements() the 64KB/1MB alignment is returned, but
the binding fails with an assert because the VkDeviceMemory has not
been aligned to the AUX-TT requirement and we cannot disable CCS since
the modifier requires it.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 4cdd3178fb ("anv: Meet CCS alignment reqs with dedicated allocs")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10433
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27258>
The HW can't do comparison opcodes in the FS, so the old way was to
lower all to ADD and CMP in the backend. However, the comparison bool
result is used either in if (where we can encode the comparions in the
aluresults calculation) or is uses in another bcsel. Therefore, we now
end with two CMPs, one from the original bcsel and one from the lowered
comparison.
This patch fixes it by doing the comparison lowering early for some nice
shader-db gains. Similarly to vertex shaders, we need some special
passes for this, because we can't nir_lower_bool_to_float too early, so
we just manually lower the most common patterns in the main opt loop and
than clean up the rest later.
Shader-db RV530:
total instructions in shared programs: 130797 -> 130400 (-0.30%)
instructions in affected programs: 34591 -> 34194 (-1.15%)
helped: 203
HURT: 133
total presub in shared programs: 8175 -> 8220 (0.55%)
presub in affected programs: 1738 -> 1783 (2.59%)
helped: 62
HURT: 53
total omod in shared programs: 414 -> 412 (-0.48%)
omod in affected programs: 4 -> 2 (-50.00%)
helped: 2
HURT: 0
total temps in shared programs: 17570 -> 17566 (-0.02%)
temps in affected programs: 1122 -> 1118 (-0.36%)
helped: 41
HURT: 43
total consts in shared programs: 94362 -> 94359 (<.01%)
consts in affected programs: 381 -> 378 (-0.79%)
helped: 13
HURT: 10
total lits in shared programs: 2951 -> 2961 (0.34%)
lits in affected programs: 104 -> 114 (9.62%)
helped: 3
HURT: 9
total cycles in shared programs: 198965 -> 198744 (-0.11%)
cycles in affected programs: 55784 -> 55563 (-0.40%)
helped: 177
HURT: 144
LOST: 0
GAINED: 1
Shader-db RV380:
total instructions in shared programs: 84224 -> 84109 (-0.14%)
instructions in affected programs: 6039 -> 5924 (-1.90%)
helped: 106
HURT: 38
total presub in shared programs: 1401 -> 1372 (-2.07%)
presub in affected programs: 113 -> 84 (-25.66%)
helped: 27
HURT: 10
total temps in shared programs: 13231 -> 13224 (-0.05%)
temps in affected programs: 303 -> 296 (-2.31%)
helped: 22
HURT: 12
total consts in shared programs: 82484 -> 82505 (0.03%)
consts in affected programs: 271 -> 292 (7.75%)
helped: 4
HURT: 25
total cycles in shared programs: 132957 -> 132840 (-0.09%)
cycles in affected programs: 12696 -> 12579 (-0.92%)
helped: 101
HURT: 43
LOST: 0
GAINED: 1
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27089>
This is slightly different from the stock is_only_used_as_float since
that one will return false when called for uses of bcsel if any of the
uses actually uses uint, like vec or another bcsel. This version will
recursivelly go further in such cases and return false only if it sees
any instructions specifically neededing bools or ints.
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27089>
When updating an AFBC-packed resource, we need to make sure it is
legalized before blitting the staging resource to it. We can't rely
on the blit to properly convert the resource as it will result in
blit recursion and a crash.
If the whole texture is updated however, there is no need to unpack
as the content can be discarded. Just create a new BO with the right
format.
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: 33b48a5585 ("panfrost: Add debug flag to force packing of AFBC textures on upload")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27208>
There might be a more efficient path when legalizing a resource if
we don't need to worry about its content. For example, it doesn't
make sense to copy the resource content when converting the modifier
if the resource content is discarded anyway.
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: 33b48a5585 ("panfrost: Add debug flag to force packing of AFBC textures on upload")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27208>
Fix an issue in `ci_run_n_monitor.py` where the token was not
being correctly propagated to the GitlabGQL abstraction. This addresses
misbehavior in scenarios like running pipelines in a private fork,
ensuring proper functionality.
Also document `find_dependencies` function.
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27206>
The hardware uses the lane index for per-vertex TCS output reads rather
than the vertex index. Fortunately, it's a pretty easy calculation to
go from one to the other.
Fixes: abe9c1fea2 ("nak: Add NIR lowering for attribute I/O")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27284>