Merge remote-tracking branch 'mesa-public/master' into vulkan
[mesa.git] / src / glsl / nir / nir_intrinsics.h
index 49bf3b22aed2031c3727540f0137d53ebae0ab6b..68a18b9c11a8a7ec2258d95d9db5c18b7e70cd0d 100644 (file)
@@ -208,8 +208,9 @@ SYSTEM_VALUE(num_work_groups, 3, 0)
  * the first index is the base address and the second index is an offset that
  * should be added to the base address.  (This way you can determine in the
  * back-end which variable is being accessed even in an array.)  For inputs,
- * the one and only index corresponds to the attribute slot.  UBO loads also
- * have a single index which is the base address to load from.
+ * the one and only index corresponds to the attribute slot.  UBO loads
+ * have two indices the first of which is the descriptor set and the second
+ * is the base address to load from.
  *
  * UBO loads have a (possibly constant) source which is the UBO buffer index.
  * For each type of load, the _indirect variant has one additional source
@@ -233,6 +234,9 @@ LOAD(input, 0, 1, NIR_INTRINSIC_CAN_ELIMINATE | NIR_INTRINSIC_CAN_REORDER)
 LOAD(per_vertex_input, 1, 1, NIR_INTRINSIC_CAN_ELIMINATE | NIR_INTRINSIC_CAN_REORDER)
 LOAD(ssbo, 1, 1, NIR_INTRINSIC_CAN_ELIMINATE)
 
+LOAD(ubo_vk, 1, 3, NIR_INTRINSIC_CAN_ELIMINATE | NIR_INTRINSIC_CAN_REORDER)
+LOAD(ssbo_vk, 1, 3, NIR_INTRINSIC_CAN_ELIMINATE | NIR_INTRINSIC_CAN_REORDER)
+
 /*
  * Stores work the same way as loads, except now the first register input is
  * the value or array to store and the optional second input is the indirect
@@ -251,4 +255,6 @@ LOAD(ssbo, 1, 1, NIR_INTRINSIC_CAN_ELIMINATE)
 STORE(output, 0, 0, 0, 0)
 STORE(ssbo, 1, 1, 1, 0)
 
-LAST_INTRINSIC(store_ssbo_indirect)
+STORE(ssbo_vk, 1, 1, 3, 0)
+
+LAST_INTRINSIC(store_ssbo_vk_indirect)