tgsi: add docs for some existing pack opcodes
authorMarek Olšák <marek.olsak@amd.com>
Mon, 2 Oct 2017 20:28:46 +0000 (22:28 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 6 Oct 2017 00:56:11 +0000 (02:56 +0200)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/docs/source/tgsi.rst

index 551e9dd379f035ae54c3b322f102b0b02f7a4866..1a51fe987b89c0fd6f1af2444ae7623ca7cdd510 100644 (file)
@@ -417,17 +417,35 @@ This instruction replicates its result.
 
 .. opcode:: PK2US - Pack Two Unsigned 16-bit Scalars
 
-  TBD
+This instruction replicates its result.
+
+.. math::
+
+  dst = f32\_to\_unorm16(src.x) | f32\_to\_unorm16(src.y) << 16
 
 
 .. opcode:: PK4B - Pack Four Signed 8-bit Scalars
 
-  TBD
+This instruction replicates its result.
+
+.. math::
+
+  dst = f32\_to\_snorm8(src.x) |
+        (f32\_to\_snorm8(src.y) << 8) |
+        (f32\_to\_snorm8(src.z) << 16) |
+        (f32\_to\_snorm8(src.w) << 24)
 
 
 .. opcode:: PK4UB - Pack Four Unsigned 8-bit Scalars
 
-  TBD
+This instruction replicates its result.
+
+.. math::
+
+  dst = f32\_to\_unorm8(src.x) |
+        (f32\_to\_unorm8(src.y) << 8) |
+        (f32\_to\_unorm8(src.z) << 16) |
+        (f32\_to\_unorm8(src.w) << 24)
 
 
 .. opcode:: SEQ - Set On Equal