mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-19 21:00:40 +02:00
nir: add a nir_get_ubo_size intrinsic
This is the same as nir_get_buffer_size but geared towards UBOs instead of SSBOs. The new intrinsic is useful in Vulkan backends that need to add bound checks on buffer accesses to honor the robust buffer access feature. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
This commit is contained in:
parent
4823313587
commit
f4c754bcd1
1 changed files with 2 additions and 0 deletions
|
|
@ -209,6 +209,8 @@ intrinsic("deref_buffer_array_length", src_comp=[-1], dest_comp=1,
|
|||
# as source.
|
||||
intrinsic("get_ssbo_size", src_comp=[-1], dest_comp=1,
|
||||
flags=[CAN_ELIMINATE, CAN_REORDER])
|
||||
intrinsic("get_ubo_size", src_comp=[-1], dest_comp=1,
|
||||
flags=[CAN_ELIMINATE, CAN_REORDER])
|
||||
|
||||
# a barrier is an intrinsic with no inputs/outputs but which can't be moved
|
||||
# around/optimized in general
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue