+/**
+ * Generate a SVGA3dShaderInstToken for the given SVGA3D shader opcode
+ * with the predication flag set.
+ */
+static inline SVGA3dShaderInstToken
+inst_token_predicated(unsigned opcode)
+{
+ SVGA3dShaderInstToken inst;
+
+ inst.value = 0;
+ inst.op = opcode;
+ inst.predicated = 1;
+
+ return inst;
+}
+
+
+/**
+ * Generate a SVGA3dShaderInstToken for a SETP instruction (set predicate)
+ * using the given comparison operator (one of SVGA3DOPCOMP_xx).
+ */
+static inline SVGA3dShaderInstToken
+inst_token_setp(unsigned operator)
+{
+ SVGA3dShaderInstToken inst;
+
+ inst.value = 0;
+ inst.op = SVGA3DOP_SETP;
+ inst.control = operator;
+
+ return inst;
+}
+
+