You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Late stage analysis such as #114130 require the ability to decern if handles are referencing the same resource. Infrastructure should be added to generate a value/key that is unique per resource given a llvm::Value to the ident.
Tex's notes:
optionally drill through an AnnotateHandle (depending on shader target)
value should be a CreateHandle of one kind or another. There are four types, depending on target and whether it's a dynamic resource.
CreateHandle - bound resource on non-lib SM 6.5 and below:
use resourceClass, rangeId (index into metadata for the resource range), and the index to uniquely identify as a bound resource.
CreateHandleFromBinding - bound resource on non-lib SM 6.6 and above:
Use resbind and index to uniquely identify as a bound resource.
CreateHandleFromHeap - dynamic resource or sampler from heap (SM 6.6+):
Use samplerHeap to determine whether sampler or other resource
Use index value to uniquely identify resource.
CreateHandleForLib - create handle for library targets
Use input obj loaded from global variable to uniquely identify resource (GV may be indexed with GEP)
In each case, index may be dynamic, in which case, if it's not the same Value*, you can't tell if it's the same resource as another value. For CreateHandleForLib the potential GEP from GV may have the dynamic index, so the combination of the GV and GEP indices are the key. There is also the nonUniformIndex flag which might require some special consideration.
AC:
Unit tests verify that same resource handles map to an identical key while different handles don't.
The text was updated successfully, but these errors were encountered:
Late stage analysis such as #114130 require the ability to decern if handles are referencing the same resource. Infrastructure should be added to generate a value/key that is unique per resource given a
llvm::Value
to the ident.Tex's notes:
CreateHandle
- bound resource on non-lib SM 6.5 and below:use
resourceClass
,rangeId
(index into metadata for the resource range), and theindex
to uniquely identify as a bound resource.CreateHandleFromBinding
- bound resource on non-lib SM 6.6 and above:Use
resbind
andindex
to uniquely identify as a bound resource.CreateHandleFromHeap
- dynamic resource or sampler from heap (SM 6.6+):Use
samplerHeap
to determine whether sampler or other resourceUse
index
value to uniquely identify resource.CreateHandleForLib
- create handle for library targetsUse input
obj
loaded from global variable to uniquely identify resource (GV may be indexed with GEP)In each case,
index
may be dynamic, in which case, if it's not the sameValue*
, you can't tell if it's the same resource as another value. ForCreateHandleForLib
the potential GEP from GV may have the dynamic index, so the combination of the GV and GEP indices are the key. There is also thenonUniformIndex
flag which might require some special consideration.AC:
The text was updated successfully, but these errors were encountered: