return ureg_DECL_immediate_int( ureg, &a, 1 );
}
+/* Where the destination register has a valid file, but an empty
+ * writemask.
+ */
+static INLINE boolean
+ureg_dst_is_empty( struct ureg_dst dst )
+{
+ return dst.File != TGSI_FILE_NULL &&
+ dst.WriteMask == 0;
+}
+
/***********************************************************************
* Functions for patching up labels
*/
{ \
unsigned opcode = TGSI_OPCODE_##op; \
struct ureg_emit_insn_result insn; \
+ if (ureg_dst_is_empty(dst)) \
+ return; \
insn = ureg_emit_insn(ureg, \
opcode, \
dst.Saturate, \
{ \
unsigned opcode = TGSI_OPCODE_##op; \
struct ureg_emit_insn_result insn; \
+ if (ureg_dst_is_empty(dst)) \
+ return; \
insn = ureg_emit_insn(ureg, \
opcode, \
dst.Saturate, \
{ \
unsigned opcode = TGSI_OPCODE_##op; \
struct ureg_emit_insn_result insn; \
+ if (ureg_dst_is_empty(dst)) \
+ return; \
insn = ureg_emit_insn(ureg, \
opcode, \
dst.Saturate, \
{ \
unsigned opcode = TGSI_OPCODE_##op; \
struct ureg_emit_insn_result insn; \
+ if (ureg_dst_is_empty(dst)) \
+ return; \
insn = ureg_emit_insn(ureg, \
opcode, \
dst.Saturate, \
unsigned opcode = TGSI_OPCODE_##op; \
unsigned target = TGSI_TEXTURE_UNKNOWN; \
struct ureg_emit_insn_result insn; \
+ if (ureg_dst_is_empty(dst)) \
+ return; \
insn = ureg_emit_insn(ureg, \
opcode, \
dst.Saturate, \
{ \
unsigned opcode = TGSI_OPCODE_##op; \
struct ureg_emit_insn_result insn; \
+ if (ureg_dst_is_empty(dst)) \
+ return; \
insn = ureg_emit_insn(ureg, \
opcode, \
dst.Saturate, \
unsigned opcode = TGSI_OPCODE_##op; \
unsigned target = TGSI_TEXTURE_UNKNOWN; \
struct ureg_emit_insn_result insn; \
+ if (ureg_dst_is_empty(dst)) \
+ return; \
insn = ureg_emit_insn(ureg, \
opcode, \
dst.Saturate, \
{ \
unsigned opcode = TGSI_OPCODE_##op; \
struct ureg_emit_insn_result insn; \
+ if (ureg_dst_is_empty(dst)) \
+ return; \
insn = ureg_emit_insn(ureg, \
opcode, \
dst.Saturate, \
unsigned opcode = TGSI_OPCODE_##op; \
unsigned target = TGSI_TEXTURE_UNKNOWN; \
struct ureg_emit_insn_result insn; \
+ if (ureg_dst_is_empty(dst)) \
+ return; \
insn = ureg_emit_insn(ureg, \
opcode, \
dst.Saturate, \
{ \
unsigned opcode = TGSI_OPCODE_##op; \
struct ureg_emit_insn_result insn; \
+ if (ureg_dst_is_empty(dst)) \
+ return; \
insn = ureg_emit_insn(ureg, \
opcode, \
dst.Saturate, \
{ \
unsigned opcode = TGSI_OPCODE_##op; \
struct ureg_emit_insn_result insn; \
+ if (ureg_dst_is_empty(dst)) \
+ return; \
insn = ureg_emit_insn(ureg, \
opcode, \
dst.Saturate, \
unsigned opcode = TGSI_OPCODE_##op; \
unsigned target = TGSI_TEXTURE_UNKNOWN; \
struct ureg_emit_insn_result insn; \
+ if (ureg_dst_is_empty(dst)) \
+ return; \
insn = ureg_emit_insn(ureg, \
opcode, \
dst.Saturate, \