cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

lipi
Journeyman III

How to use the memimport_elem(n) in IL?

I would like to have random access to data in the input buffer. I found the MEMIMPORT instruction and according to the IL programming manual it "provides an alternate means to fetching vertex element data using an arbitrary index". This sounds perfect except I couldn't get my IL program compile. I'm trying to use dcl_resource to set up the buffer for memimport.

Is it possible to use memimport_elem with a compute shader at all? Is there an example somewhere? I couldn't find anything in the SDK or on the forum.

Is there any other way to access non-consecutive elements of the input?

 

0 Likes
1 Reply

memimport_elem is used in vertex shaders and not compute or pixel shaders. What you want to use is either uav command or g[] register.
0 Likes