mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-30 03:32:55 +00:00
Opcode : add STR/SFL and fix KIL (discard)
This commit is contained in:
parent
c1594255a7
commit
13d68cbeeb
@ -278,22 +278,23 @@ void GLFragmentDecompilerThread::Task()
|
||||
|
||||
case 0x10: AddCode("fract(" + GetSRC(src0) + ")"); break; // FRC
|
||||
case 0x11: AddCode("floor(" + GetSRC(src0) + ")"); break; // FLR
|
||||
case 0x12: AddCode("if (" + GetSRC(src0) + " < 0 ) exit()"); break; // KIL (kill fragment (if (A<0) exit())
|
||||
case 0x12: AddCode("if (" + GetSRC(src0) + " < 0 ) discard"); break; // KIL (kill fragment)
|
||||
//case 0x13: break; // PK4 (pack four signed 8-bit values)
|
||||
//case 0x14: break; // UP4 (unpack four signed 8-bit values)
|
||||
case 0x15: AddCode("dFdx(" + GetSRC(src0) + ")"); break; // DDX
|
||||
case 0x16: AddCode("dFdy(" + GetSRC(src0) + ")"); break; // DDY
|
||||
case 0x17: AddCode("texture(" + AddTex() + ", " + GetSRC(src0) + ".xy)"); break; // TEX (texture lookup)
|
||||
//case 0x18: break; // TXP (projective texture lookup)
|
||||
//case 0x19: break; // TXD (texture lookup w/partials)
|
||||
//case 0x19: break; // TXD (texture lookup with derivatives)
|
||||
case 0x1a: AddCode("1 / (" + GetSRC(src0) + ")"); break; // RCP
|
||||
case 0x1b: AddCode("inversesqrt(" + GetSRC(src0) + ")"); break; // RSQ
|
||||
case 0x1c: AddCode("exp2(" + GetSRC(src0) + ")"); break; // EX2
|
||||
case 0x1d: AddCode("log2(" + GetSRC(src0) + ")"); break; // LG2
|
||||
//case 0x1e: break; // LIT (compute light coefficients)
|
||||
case 0x1f: AddCode("(" + GetSRC(src0) + " * (" + GetSRC(src1) + " - " + GetSRC(src2) + ") +" + GetSRC(src2) + ")"); break; // LRP (linear interpolation)
|
||||
//case 0x20: break; // STR (set on true)
|
||||
//case 0x21: break; // SFL (set on false)
|
||||
|
||||
case 0x20: AddCode("vec4(1.0)"); break; // STR (set on true)
|
||||
case 0x21: AddCode("vec4(0.0)"); break; // SFL (set on false)
|
||||
case 0x22: AddCode("cos(" + GetSRC(src0) + ")"); break; // COS
|
||||
case 0x23: AddCode("sin(" + GetSRC(src0) + ")"); break; // SIN
|
||||
//case 0x24: break; // PK2 (pack two 16-bit floats)
|
||||
@ -306,14 +307,15 @@ void GLFragmentDecompilerThread::Task()
|
||||
//case 0x2b: break; // BEM
|
||||
//case 0x2c: break; // PKG
|
||||
//case 0x2d: break; // UPG
|
||||
//case 0x2e: break; // DP2A
|
||||
//case 0x2f: break; // TXL
|
||||
|
||||
//case 0x31: break; // TXB
|
||||
//case 0x2e: break; // DP2A (2-component dot product and add)
|
||||
//case 0x2f: break; // TXL (texture lookup with LOD)
|
||||
|
||||
//case 0x30: break;
|
||||
//case 0x31: break; // TXB (texture lookup with bias)
|
||||
//case 0x33: break; // TEXBEM
|
||||
//case 0x34: break; // TXPBEM
|
||||
//case 0x35: break; // BEMLUM
|
||||
//case 0x36: break; // REFL
|
||||
//case 0x36: break; // RFL (reflection vector)
|
||||
//case 0x37: break; // TIMESWTEX
|
||||
case 0x38: AddCode("vec2(dot(" + GetSRC(src0) + ".xy, " + GetSRC(src1) + ".xy)).xxxx"); break; // DP2
|
||||
case 0x39: AddCode("normalize(" + GetSRC(src0) + ".xyz)"); break; // NRM
|
||||
|
Loading…
x
Reference in New Issue
Block a user