Module: Mesa
Branch: master
Commit: 34b3e1f5121ee532a1eb087e9b08c3d15e16cc9d
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=34b3e1f5121ee532a1eb087e9b08c3d15e16cc9d

Author: Eric Anholt <[email protected]>
Date:   Mon Jan  6 13:55:55 2020 -0800

gallium/tgsi: Add some missing opcodes to tgsi_ureg.

Reviewed-by: Marek Olšák <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6567>

---

 src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h | 32 ++++++++++++++++++++++++++++
 src/gallium/auxiliary/tgsi/tgsi_ureg.h       | 26 ++++++++++++++++++++++
 2 files changed, 58 insertions(+)

diff --git a/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h 
b/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h
index 2ade618db00..1aff513813d 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h
@@ -40,11 +40,14 @@ OP11(ARL)
 OP11(MOV)
 OP11(LIT)
 OP11(RCP)
+OP11(DRCP)
 OP11(RSQ)
+OP11(DRSQ)
 OP11(EXP)
 OP11(LOG)
 OP12(MUL)
 OP12(ADD)
+OP12(DADD)
 OP12(DP3)
 OP12(DP4)
 OP12(DST)
@@ -53,9 +56,11 @@ OP12(MAX)
 OP12(SLT)
 OP12(SGE)
 OP13(MAD)
+OP13(DMAD)
 OP12_TEX(TEX_LZ)
 OP13(LRP)
 OP11(SQRT)
+OP11(DSQRT)
 OP11(FRC)
 OP12_TEX(TXF_LZ)
 OP11(FLR)
@@ -100,6 +105,7 @@ OP01_LBL(UIF)
 OP00_LBL(ELSE)
 OP00(ENDIF)
 OP11(CEIL)
+OP11(DCEIL)
 OP11(I2F)
 OP11(NOT)
 OP11(TRUNC)
@@ -113,6 +119,8 @@ OP12_TEX(TXQ)
 OP00(CONT)
 OP01(EMIT)
 OP01(ENDPRIM)
+OP00(BARRIER)
+OP01(MEMBAR)
 OP00_LBL(BGNLOOP)
 OP00(BGNSUB)
 OP00_LBL(ENDLOOP)
@@ -125,6 +133,10 @@ OP12(FSEQ)
 OP12(FSGE)
 OP12(FSLT)
 OP12(FSNE)
+OP12(DSEQ)
+OP12(DSGE)
+OP12(DSLT)
+OP12(DSNE)
 OP12(IDIV)
 OP12(IMAX)
 OP12(IMIN)
@@ -146,6 +158,12 @@ OP12(USGE)
 OP12(USHR)
 OP12(USLT)
 OP12(USNE)
+OP12(I64SLT)
+OP12(I64SGE)
+OP12(U64SEQ)
+OP12(U64SLT)
+OP12(U64SGE)
+OP12(U64SNE)
 OP01(SWITCH)
 OP01(CASE)
 OP00(DEFAULT)
@@ -165,13 +183,27 @@ OP11(SAMP2HND)
 
 OP12(IMUL_HI)
 OP12(UMUL_HI)
+OP13(IBFE)
 OP13(UBFE)
+OP14(BFI)
+OP11(BREV)
+OP11(POPC)
+OP11(IMSB)
+OP11(UMSB)
+OP11(LSB)
+OP12(LDEXP)
+OP12(DLDEXP)
+
 OP11(F2D)
 OP11(D2F)
 OP11(U2D)
 OP11(D2U)
 OP12(DMUL)
 
+OP11(INTERP_CENTROID)
+OP12(INTERP_SAMPLE)
+OP12(INTERP_OFFSET)
+
 #undef OP00
 #undef OP01
 #undef OP10
diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.h 
b/src/gallium/auxiliary/tgsi/tgsi_ureg.h
index 29a1ec07021..c2bc6d7e2a7 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_ureg.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.h
@@ -814,6 +814,32 @@ static inline void ureg_##op( struct ureg_program *ureg,   
             \
    ureg_fixup_insn_size( ureg, insn.insn_token );                       \
 }
 
+#define OP14( op )                                                      \
+static inline void ureg_##op( struct ureg_program *ureg,                \
+                              struct ureg_dst dst,                      \
+                              struct ureg_src src0,                     \
+                              struct ureg_src src1,                     \
+                              struct ureg_src src2,                     \
+                              struct ureg_src src3 )                    \
+{                                                                       \
+   enum tgsi_opcode 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,                                  \
+                         0,                                             \
+                         1,                                             \
+                         4);                                            \
+   ureg_emit_dst( ureg, dst );                                          \
+   ureg_emit_src( ureg, src0 );                                         \
+   ureg_emit_src( ureg, src1 );                                         \
+   ureg_emit_src( ureg, src2 );                                         \
+   ureg_emit_src( ureg, src3 );                                         \
+   ureg_fixup_insn_size( ureg, insn.insn_token );                       \
+}
+
 #define OP14_TEX( op )                                                  \
 static inline void ureg_##op( struct ureg_program *ureg,                \
                               struct ureg_dst dst,                      \

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to