nir/lower_io: Add support for global scratch addressing
[mesa.git] / src / compiler / nir / nir_intrinsics.py
index 5cc45f64c1b5669cebe1f344b07d7b5a360ce2b8..2fa092d5f715acafd53ef4c86df45817204fe012 100644 (file)
@@ -560,6 +560,7 @@ def system_value(name, dest_comp, indices=[], bit_sizes=[32]):
 
 system_value("frag_coord", 4)
 system_value("point_coord", 2)
+system_value("line_coord", 1)
 system_value("front_face", 1, bit_sizes=[1, 32])
 system_value("vertex_id", 1)
 system_value("vertex_id_zero_base", 1)
@@ -605,6 +606,11 @@ system_value("local_group_size", 3)
 system_value("global_invocation_id", 3, bit_sizes=[32, 64])
 system_value("global_invocation_index", 1, bit_sizes=[32, 64])
 system_value("work_dim", 1)
+system_value("line_width", 1)
+system_value("aa_line_width", 1)
+# BASE=0 for global/shader, BASE=1 for local/function
+system_value("scratch_base_ptr", 0, bit_sizes=[32,64], indices=[BASE])
+
 # Driver-specific viewport scale/offset parameters.
 #
 # VC4 and V3D need to emit a scaled version of the position in the vertex
@@ -863,7 +869,7 @@ intrinsic("bindless_resource_ir3", [1], dest_comp=1, indices=[DESC_SET], flags=[
 # src[] = { value }
 store("raw_output_pan", [], [])
 store("combined_output_pan", [1, 1, 1], [BASE, COMPONENT])
-load("raw_output_pan", [], [], [CAN_ELIMINATE, CAN_REORDER])
+load("raw_output_pan", [1], [BASE], [CAN_ELIMINATE, CAN_REORDER])
 
 # Loads the sampler paramaters <min_lod, max_lod, lod_bias>
 # src[] = { sampler_index }