nir: Add a load_global_constant intrinsic
This has the same semantics as load_global except the memory it reads is known to be constant so load_global_constant intrinsics can be CSEd rather than relying on more complex copy-propagation. Reviewed-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379>
This commit is contained in:

committed by
Marge Bot

parent
e4f07f8bdc
commit
ff124e3fe3
@@ -768,6 +768,9 @@ load("constant", [1], [BASE, RANGE, ALIGN_MUL, ALIGN_OFFSET],
|
||||
# src[] = { address }.
|
||||
load("global", [1], [ACCESS, ALIGN_MUL, ALIGN_OFFSET], [CAN_ELIMINATE])
|
||||
# src[] = { address }.
|
||||
load("global_constant", [1], [ACCESS, ALIGN_MUL, ALIGN_OFFSET],
|
||||
[CAN_ELIMINATE, CAN_REORDER])
|
||||
# src[] = { address }.
|
||||
load("kernel_input", [1], [BASE, RANGE, ALIGN_MUL, ALIGN_OFFSET], [CAN_ELIMINATE, CAN_REORDER])
|
||||
# src[] = { offset }.
|
||||
load("scratch", [1], [ALIGN_MUL, ALIGN_OFFSET], [CAN_ELIMINATE])
|
||||
|
Reference in New Issue
Block a user