aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_tgsi_emit.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/svga/svga_tgsi_emit.h')
-rw-r--r--src/gallium/drivers/svga/svga_tgsi_emit.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_tgsi_emit.h b/src/gallium/drivers/svga/svga_tgsi_emit.h
index 0141d71568e..1a9731ffde8 100644
--- a/src/gallium/drivers/svga/svga_tgsi_emit.h
+++ b/src/gallium/drivers/svga/svga_tgsi_emit.h
@@ -206,6 +206,23 @@ inst_token_predicated(unsigned opcode)
/**
+ * 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;
+}
+
+
+/**
* Create an instance of a SVGA3dShaderDestToken.
* Note that this function is used to create tokens for output registers,
* temp registers AND constants (see emit_def_const()).