@@ -477,7 +477,7 @@ def populate_categories_and_models(self):
477477 self .name_idx [i ].category = "Dot"
478478 for (
479479 i
480- ) in "CreateHandle,CBufferLoad,CBufferLoadLegacy,TextureLoad,TextureStore,TextureStoreSample,BufferLoad,BufferStore,BufferUpdateCounter,CheckAccessFullyMapped,GetDimensions,RawBufferLoad,RawBufferStore" .split (
480+ ) in "CreateHandle,CBufferLoad,CBufferLoadLegacy,TextureLoad,TextureStore,TextureStoreSample,BufferLoad,BufferStore,BufferUpdateCounter,CheckAccessFullyMapped,GetDimensions,RawBufferLoad,RawBufferStore,RawBufferVectorLoad,RawBufferVectorStore " .split (
481481 ","
482482 ):
483483 self .name_idx [i ].category = "Resources"
@@ -604,6 +604,8 @@ def populate_categories_and_models(self):
604604 for i in "RawBufferLoad,RawBufferStore" .split ("," ):
605605 self .name_idx [i ].shader_model = 6 , 2
606606 self .name_idx [i ].shader_model_translated = 6 , 0
607+ for i in "RawBufferVectorLoad,RawBufferVectorStore" .split ("," ):
608+ self .name_idx [i ].shader_model = 6 , 9
607609 for i in "DispatchRaysIndex,DispatchRaysDimensions" .split ("," ):
608610 self .name_idx [i ].category = "Ray Dispatch Arguments"
609611 self .name_idx [i ].shader_model = 6 , 3
@@ -5776,6 +5778,83 @@ def UFI(name, **mappings):
57765778 # Reserved block C
57775779 next_op_idx = self .reserve_dxil_op_range ("ReservedC" , next_op_idx , 10 )
57785780
5781+ # Long Vectors
5782+ self .add_dxil_op (
5783+ "RawBufferVectorLoad" ,
5784+ next_op_idx ,
5785+ "RawBufferVectorLoad" ,
5786+ "reads from a raw buffer and structured buffer" ,
5787+ "hfwidl<" ,
5788+ "ro" ,
5789+ [
5790+ db_dxil_param (0 , "$r" , "" , "the loaded value" ),
5791+ db_dxil_param (2 , "res" , "buf" , "handle of Raw Buffer to load from" ),
5792+ db_dxil_param (
5793+ 3 ,
5794+ "i32" ,
5795+ "index" ,
5796+ "element index for StructuredBuffer, or byte offset for ByteAddressBuffer" ,
5797+ ),
5798+ db_dxil_param (
5799+ 4 ,
5800+ "i32" ,
5801+ "elementOffset" ,
5802+ "offset into element for StructuredBuffer, or undef for ByteAddressBuffer" ,
5803+ ),
5804+ db_dxil_param (
5805+ 5 ,
5806+ "i32" ,
5807+ "alignment" ,
5808+ "relative load access alignment" ,
5809+ is_const = True ,
5810+ ),
5811+ ],
5812+ counters = ("tex_load" ,),
5813+ )
5814+ next_op_idx += 1
5815+
5816+ self .add_dxil_op (
5817+ "RawBufferVectorStore" ,
5818+ next_op_idx ,
5819+ "RawBufferVectorStore" ,
5820+ "writes to a RWByteAddressBuffer or RWStructuredBuffer" ,
5821+ "hfwidl<" ,
5822+ "" ,
5823+ [
5824+ db_dxil_param (0 , "v" , "" , "" ),
5825+ db_dxil_param (2 , "res" , "uav" , "handle of UAV to store to" ),
5826+ db_dxil_param (
5827+ 3 ,
5828+ "i32" ,
5829+ "index" ,
5830+ "element index for StructuredBuffer, or byte offset for ByteAddressBuffer" ,
5831+ ),
5832+ db_dxil_param (
5833+ 4 ,
5834+ "i32" ,
5835+ "elementOffset" ,
5836+ "offset into element for StructuredBuffer, or undef for ByteAddressBuffer" ,
5837+ ),
5838+ db_dxil_param (5 , "$o" , "value0" , "value" ),
5839+ db_dxil_param (
5840+ 6 ,
5841+ "i32" ,
5842+ "alignment" ,
5843+ "relative store access alignment" ,
5844+ is_const = True ,
5845+ ),
5846+ ],
5847+ counters = ("tex_store" ,),
5848+ )
5849+ next_op_idx += 1
5850+
5851+ # End of DXIL 1.9 opcodes.
5852+ self .set_op_count_for_version (1 , 9 , next_op_idx )
5853+ assert next_op_idx == 305 , (
5854+ "305 is expected next operation index but encountered %d and thus opcodes are broken"
5855+ % next_op_idx
5856+ )
5857+
57795858 # Set interesting properties.
57805859 self .build_indices ()
57815860 for (
0 commit comments