Advertisement
Guest User

xenos ucode instruction definitions

a guest
Nov 22nd, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 17.14 KB | None | 0 0
  1. using BitArrayExtensions;
  2.  
  3. /* LICENSE
  4. Largely translated from:
  5. https://github.com/benvanik/xenia/blob/master/src/xenia/gpu/ucode.h
  6.  
  7. Copyright (c) 2015, Ben Vanik.
  8. All rights reserved.
  9.  
  10. Redistribution and use in source and binary forms, with or without
  11. modification, are permitted provided that the following conditions are met:
  12.     * Redistributions of source code must retain the above copyright
  13.       notice, this list of conditions and the following disclaimer.
  14.     * Redistributions in binary form must reproduce the above copyright
  15.       notice, this list of conditions and the following disclaimer in the
  16.       documentation and/or other materials provided with the distribution.
  17.     * Neither the name of the project nor the
  18.       names of its contributors may be used to endorse or promote products
  19.       derived from this software without specific prior written permission.
  20.  
  21. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  22. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  23. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  24. DISCLAIMED. IN NO EVENT SHALL BEN VANIK BE LIABLE FOR ANY
  25. DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  26. (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  27. LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  28. ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  29. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  30. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  31. */
  32.  
  33. namespace xps_3_0_INTERPRETER.Freedreno
  34. {
  35.     public class Instruction
  36.     {
  37.  
  38.     }
  39.  
  40.     public class Instruction_CF : Instruction
  41.     {
  42.         public class Exec : Instruction_CF
  43.         {
  44.             [BitField(size = 0x09)] public short address;
  45.             [BitField(size = 0x03)] public byte reserved0;
  46.             [BitField(size = 0x03)] public byte count;
  47.             [BitField(size = 0x01)] public bool yield;
  48.             [BitField(size = 0x0C)] public short serialize;
  49.             [BitField(size = 0x06)] public byte vc; // vertex cache?
  50.             [BitField(size = 0x08)] public byte bool_address;
  51.             [BitField(size = 0x01)] public bool condition;
  52.             [BitField(size = 0x01)] public AddressMode address_mode;
  53.             [BitField(size = 0x04)] public ControlFlowOpcode opc;
  54.         }
  55.         public class Loop : Instruction_CF
  56.         {
  57.             [BitField(size = 0x0A)] public short address;
  58.             [BitField(size = 0x06)] public byte reserved0;
  59.             [BitField(size = 0x05)] public byte loop_id;
  60.             [BitField(size = 0x16)] public int reserved1;
  61.             [BitField(size = 0x01)] public AddressMode address_mode;
  62.             [BitField(size = 0x04)] public ControlFlowOpcode opc;
  63.         }
  64.         public class JumpCall : Instruction_CF
  65.         {
  66.             [BitField(size = 0x0A)] public short address;
  67.             [BitField(size = 0x03)] public byte reserved0;
  68.             [BitField(size = 0x01)] public bool force_call;
  69.             [BitField(size = 0x01)] public bool predicated_jmp;
  70.             [BitField(size = 0x12)] public int reserved1;
  71.             [BitField(size = 0x01)] public byte direction;
  72.             [BitField(size = 0x08)] public byte bool_addr;
  73.             [BitField(size = 0x01)] public byte condition;
  74.             [BitField(size = 0x01)] public AddressMode address_mode;
  75.             [BitField(size = 0x04)] public ControlFlowOpcode opc;
  76.         }
  77.         public class Alloc : Instruction_CF
  78.         {
  79.             [BitField(size = 0x04)] public byte size;
  80.             [BitField(size = 0x24)] public long reserved0;
  81.             [BitField(size = 0x01)] public bool no_serial;
  82.             [BitField(size = 0x02)] public AllocationType buffer_select;
  83.             [BitField(size = 0x04)] public byte alloc_mode;
  84.             [BitField(size = 0x01)] public ControlFlowOpcode opc;
  85.         }
  86.  
  87.         public enum ControlFlowOpcode : byte
  88.         {
  89.             cnop = 0, // No-op - used to fill space.
  90.             exec = 1, // Executes fetch or ALU instructions.
  91.             exece = 2, // Executes fetch or ALU instructions then ends execution.
  92.             cexec = 3, // Conditionally executes based on a bool const.
  93.             cexece = 4, // Conditionally executes based on a bool const then ends execution.
  94.             cexec_pred = 5, // Conditionally executes based on the current predicate.
  95.             cexece_pred = 6, // Conditionally executes based on the current predicate then ends execution.
  96.             loop = 7, // Starts a loop that must be terminated with kLoopEnd.
  97.             endloop = 8, // Continues or breaks out of a loop started with kLoopStart.
  98.             ccall = 9, // Conditionally calls a function.  A return address is pushed to the stack to be used by a kReturn.
  99.             ret = 10, // Returns from the current function as called by kCondCall. This is a no-op if not in a function.
  100.             cjmp = 11, // Conditionally jumps to an arbitrary address based on a bool const.
  101.             alloc = 12, // Allocates output values.
  102.             cexec_pred_clean = 13, // Conditionally executes based on the current predicate. Optionally resets the predicate value.
  103.             cexece_pred_clean = 14, // Conditionally executes based on the current predicate then ends execution. Optionally resets the predicate value.
  104.             vfetche = 15, // Hints that no more vertex fetches will be performed.
  105.         }
  106.         public enum AddressMode : byte
  107.         {
  108.             Relative = 0,
  109.             Absolute = 1,
  110.         }
  111.         public enum AllocationType : byte
  112.         {
  113.             None = 0,
  114.             Position = 1,
  115.             Interpolators = 2,
  116.             Pixel = 2,
  117.             Memory = 3,
  118.         }
  119.     }
  120.  
  121.     public class Instruction_ALU : Instruction
  122.     {
  123.         #region DWORD-0
  124.         [BitField(size = 0x06)] public byte vector_dest;
  125.         [BitField(size = 0x01)] public bool vector_dest_rel;
  126.         [BitField(size = 0x01)] public bool low_precision_16b_fp;
  127.         [BitField(size = 0x06)] public byte scalar_dest;
  128.         [BitField(size = 0x01)] public bool scalar_dest_rel;
  129.         [BitField(size = 0x01)] public bool export_data;
  130.         [BitField(size = 0x04)] public Mask vector_write_mask;
  131.         [BitField(size = 0x04)] public Mask scalar_write_mask;
  132.         [BitField(size = 0x01)] public bool vector_clamp;
  133.         [BitField(size = 0x01)] public bool scalar_clamp;
  134.         [BitField(size = 0x06)] public ScalarOpcode scalar_opc;
  135.         #endregion
  136.  
  137.         #region DWORD-1
  138.         [BitField(size = 0x08)] public Swizzle src3_swiz;
  139.         [BitField(size = 0x08)] public Swizzle src2_swiz;
  140.         [BitField(size = 0x08)] public Swizzle src1_swiz;
  141.         [BitField(size = 0x01)] public bool src3_reg_negate;
  142.         [BitField(size = 0x01)] public bool src2_reg_negate;
  143.         [BitField(size = 0x01)] public bool src1_reg_negate;
  144.         [BitField(size = 0x02)] public Predication pred_select;
  145.         [BitField(size = 0x01)] public bool relative_addr;
  146.         [BitField(size = 0x01)] public bool const_1_rel_abs;
  147.         [BitField(size = 0x01)] public bool const_0_rel_abs;
  148.         #endregion
  149.  
  150.         #region DWORD-2
  151.         [BitField(size = 0x06)] public byte src3_reg;
  152.         [BitField(size = 0x01)] public bool src3_reg_select;
  153.         [BitField(size = 0x01)] public bool src3_reg_abs;
  154.         [BitField(size = 0x06)] public byte src2_reg;
  155.         [BitField(size = 0x01)] public bool src2_reg_select;
  156.         [BitField(size = 0x01)] public bool src2_reg_abs;
  157.         [BitField(size = 0x06)] public byte src1_reg;
  158.         [BitField(size = 0x01)] public bool src1_reg_select;
  159.         [BitField(size = 0x01)] public bool src1_reg_abs;
  160.         [BitField(size = 0x05)] public VectorOpcode vector_opc;
  161.         [BitField(size = 0x01)] public bool src3_sel;
  162.         [BitField(size = 0x01)] public bool src2_sel ;
  163.         [BitField(size = 0x01)] public bool src1_sel;
  164.         #endregion
  165.  
  166.         public enum Mask : byte
  167.         {
  168.             A_Vector = 0x01, // Vector destination mask
  169.             B_Vector = 0x02, // Vector destination mask
  170.             C_Vector = 0x04, // Vector destination mask
  171.             D_Vector = 0x08, // Vector destination mask
  172.         }
  173.         public enum ScalarOpcode : byte
  174.         {
  175.             adds = 0x00,
  176.             adds_prev = 0x04,
  177.             muls = 0x08,
  178.             muls_prev = 0x0C,
  179.             muls_prev2 = 0x10,
  180.             maxs = 0x14,
  181.             mins = 0x18,
  182.             seqs = 0x1C,
  183.             sgts = 0x20,
  184.             sges = 0x24,
  185.             snes = 0x28,
  186.             frcs = 0x2C,
  187.             truncs = 0x30,
  188.             floors = 0x34,
  189.             exp = 0x38,
  190.             logc = 0x3C,
  191.             log = 0x40,
  192.             rcpc = 0x44,
  193.             rcpf = 0x48,
  194.             rcp = 0x4C,
  195.             rsqc = 0x50,
  196.             rsqf = 0x54,
  197.             rsq = 0x58,
  198.             maxas = 0x5C,
  199.             maxasf = 0x60,
  200.             subs = 0x64,
  201.             subs_prev = 0x68,
  202.             setpeq = 0x6C,
  203.             setpne = 0x70,
  204.             setpgt = 0x74,
  205.             setpge = 0x78,
  206.             setpinv = 0x7C,
  207.             setppop = 0x80,
  208.             setpclr = 0x84,
  209.             setprstr = 0x88,
  210.             killseq = 0x8C,
  211.             killsgt = 0x90,
  212.             killsge = 0x94,
  213.             killsne = 0x98,
  214.             killsone = 0x9C,
  215.             sqrt = 0xA0,
  216.             opcode_41 = 0xA4, // disassembler calls it this, probably unused garbage.
  217.             mulsc0 = 0xA8, // same as mulsc.
  218.             mulsc1 = 0xAC, // same as mulsc.
  219.             addsc0 = 0xB0, // same as addsc.
  220.             addsc1 = 0xAC, // same as addsc.
  221.             subsc0 = 0xB8, // same as subsc.
  222.             subsc1 = 0xBC, // same as subsc.
  223.             sin = 0xC0,
  224.             cos = 0xC4,
  225.             retain_prev = 0xC8,
  226.  
  227.             opcode_51 = 0xCC,   // disassembler calls it this, probably unused garbage.
  228.             opcode_52 = 0xD0,   // disassembler calls it this, probably unused garbage.
  229.             opcode_53 = 0xD4,   // disassembler calls it this, probably unused garbage.
  230.             opcode_54 = 0xD8,   // disassembler calls it this, probably unused garbage.
  231.             opcode_55 = 0xDC,   // disassembler calls it this, probably unused garbage.
  232.             opcode_56 = 0xE0,   // disassembler calls it this, probably unused garbage.
  233.             opcode_57 = 0xE4,   // disassembler calls it this, probably unused garbage.
  234.             opcode_58 = 0xE8,   // disassembler calls it this, probably unused garbage.
  235.             opcode_59 = 0xEC,   // disassembler calls it this, probably unused garbage.
  236.             opcode_60 = 0xF0,   // disassembler calls it this, probably unused garbage.
  237.             opcode_61 = 0xF4,   // disassembler calls it this, probably unused garbage.
  238.             opcode_62 = 0xF8,   // disassembler calls it this, probably unused garbage.
  239.             opcode_63 = 0xFC,
  240.         }
  241.         public enum VectorOpcode : byte
  242.         {
  243.             add = 0x00,
  244.             mul = 0x01,
  245.             max = 0x02,
  246.             min = 0x03,
  247.             seq = 0x04,
  248.             sgt = 0x05,
  249.             sge = 0x06,
  250.             sne = 0x07,
  251.             frc = 0x08,
  252.             trunc = 0x09,
  253.             floor = 0x0A,
  254.             mad = 0x0B,
  255.             cndeq = 0x0C,
  256.             cndge = 0x0D,
  257.             cndgt = 0x0E,
  258.             dp4 = 0x0F,
  259.             dp3 = 0x10,
  260.             dp2add = 0x11,
  261.             cube = 0x12,
  262.             max4 = 0x13,
  263.             setp_eq_push = 0x14,
  264.             setp_ne_push = 0x15,
  265.             setp_gt_push = 0x16,
  266.             setp_ge_push = 0x17,
  267.             kill_eq = 0x18,
  268.             kill_gt = 0x19,
  269.             kill_ge = 0x1A,
  270.             kill_ne = 0x1B,
  271.             dst = 0x1C,
  272.             maxa = 0x1D,
  273.             opcode_30 = 0x1E, // disassembler calls it this, probably unused garbage.
  274.             opcode_31 = 0x1F,
  275.         }
  276.         public enum Swizzle : byte
  277.         {
  278.             xyzw = 0x00,
  279.             yyzw = 0x01,
  280.             zyzw = 0x02,
  281.             wyzw = 0x03,
  282.             xzzw = 0x04,
  283.             yzzw = 0x05,
  284.             zzzw = 0x06,
  285.             wzzw = 0x07,
  286.             xwzw = 0x08,
  287.             ywzw = 0x09,
  288.             zwzw = 0x0A,
  289.             wwzw = 0x0B,
  290.             xxzw = 0x0C,
  291.             yxzw = 0x0D,
  292.             zxzw = 0x0E,
  293.             wxzw = 0x0F,
  294.             xyww = 0x10,
  295.             yyww = 0x11,
  296.             zyww = 0x12,
  297.             wyww = 0x13,
  298.             xzww = 0x14,
  299.             yzww = 0x15,
  300.             zzww = 0x16,
  301.             wzww = 0x17,
  302.             xwww = 0x18,
  303.             ywww = 0x19,
  304.             zwww = 0x1A,
  305.             wwww = 0x1B,
  306.             xxww = 0x1C,
  307.             yxww = 0x1D,
  308.             zxww = 0x1E,
  309.             wxww = 0x1F,
  310.             xyxw = 0x20,
  311.             yyxw = 0x21,
  312.             zyxw = 0x22,
  313.             wyxw = 0x23,
  314.             xzxw = 0x24,
  315.             yzxw = 0x25,
  316.             zzxw = 0x26,
  317.             wzxw = 0x27,
  318.             xwxw = 0x28,
  319.             ywxw = 0x29,
  320.             zwxw = 0x2A,
  321.             wwxw = 0x2B,
  322.             xxxw = 0x2C,
  323.             yxxw = 0x2D,
  324.             zxxw = 0x2E,
  325.             wxxw = 0x2F,
  326.             xyyw = 0x30,
  327.             yyyw = 0x31,
  328.             zyyw = 0x32,
  329.             wyyw = 0x33,
  330.             xzyw = 0x34,
  331.             yzyw = 0x35,
  332.             zzyw = 0x36,
  333.             wzyw = 0x37,
  334.             xwyw = 0x38,
  335.             ywyw = 0x39,
  336.             zwyw = 0x3A,
  337.             wwyw = 0x3B,
  338.             xxyw = 0x3C,
  339.             yxyw = 0x3D,
  340.             zxyw = 0x3E,
  341.             wxyw = 0x3F,
  342.             xyzx = 0x40,
  343.             yyzx = 0x41,
  344.             zyzx = 0x42,
  345.             wyzx = 0x43,
  346.             xzzx = 0x44,
  347.             yzzx = 0x45,
  348.             zzzx = 0x46,
  349.             wzzx = 0x47,
  350.             xwzx = 0x48,
  351.             ywzx = 0x49,
  352.             zwzx = 0x4A,
  353.             wwzx = 0x4B,
  354.             xxzx = 0x4C,
  355.             yxzx = 0x4D,
  356.             zxzx = 0x4E,
  357.             wxzx = 0x4F,
  358.             xywx = 0x50,
  359.             yywx = 0x51,
  360.             zywx = 0x52,
  361.             wywx = 0x53,
  362.             xzwx = 0x54,
  363.             yzwx = 0x55,
  364.             zzwx = 0x56,
  365.             wzwx = 0x57,
  366.             xwwx = 0x58,
  367.             ywwx = 0x59,
  368.             zwwx = 0x5A,
  369.             wwwx = 0x5B,
  370.             xxwx = 0x5C,
  371.             yxwx = 0x5D,
  372.             zxwx = 0x5E,
  373.             wxwx = 0x5F,
  374.             xyxx = 0x60,
  375.             yyxx = 0x61,
  376.             zyxx = 0x62,
  377.             wyxx = 0x63,
  378.             xzxx = 0x64,
  379.             yzxx = 0x65,
  380.             zzxx = 0x66,
  381.             wzxx = 0x67,
  382.             xwxx = 0x68,
  383.             ywxx = 0x69,
  384.             zwxx = 0x6A,
  385.             wwxx = 0x6B,
  386.             xxxx = 0x6C,
  387.             yxxx = 0x6D,
  388.             zxxx = 0x6E,
  389.             wxxx = 0x6F,
  390.             xyyx = 0x70,
  391.             yyyx = 0x71,
  392.             zyyx = 0x72,
  393.             wyyx = 0x73,
  394.             xzyx = 0x74,
  395.             yzyx = 0x75,
  396.             zzyx = 0x76,
  397.             wzyx = 0x77,
  398.             xwyx = 0x78,
  399.             ywyx = 0x79,
  400.             zwyx = 0x7A,
  401.             wwyx = 0x7B,
  402.             xxyx = 0x7C,
  403.             yxyx = 0x7D,
  404.             zxyx = 0x7E,
  405.             wxyx = 0x7F,
  406.             xyzy = 0x80,
  407.             yyzy = 0x81,
  408.             zyzy = 0x82,
  409.             wyzy = 0x83,
  410.             xzzy = 0x84,
  411.             yzzy = 0x85,
  412.             zzzy = 0x86,
  413.             wzzy = 0x87,
  414.             xwzy = 0x88,
  415.             ywzy = 0x89,
  416.             zwzy = 0x8A,
  417.             wwzy = 0x8B,
  418.             xxzy = 0x8C,
  419.             yxzy = 0x8D,
  420.             zxzy = 0x8E,
  421.             wxzy = 0x8F,
  422.             xywy = 0x90,
  423.             yywy = 0x91,
  424.             zywy = 0x92,
  425.             wywy = 0x93,
  426.             xzwy = 0x94,
  427.             yzwy = 0x95,
  428.             zzwy = 0x96,
  429.             wzwy = 0x97,
  430.             xwwy = 0x98,
  431.             ywwy = 0x99,
  432.             zwwy = 0x9A,
  433.             wwwy = 0x9B,
  434.             xxwy = 0x9C,
  435.             yxwy = 0x9D,
  436.             zxwy = 0x9E,
  437.             wxwy = 0x9F,
  438.             xyxy = 0xA0,
  439.             yyxy = 0xA1,
  440.             zyxy = 0xA2,
  441.             wyxy = 0xA3,
  442.             xzxy = 0xA4,
  443.             yzxy = 0xA5,
  444.             zzxy = 0xA6,
  445.             wzxy = 0xA7,
  446.             xwxy = 0xA8,
  447.             ywxy = 0xA9,
  448.             zwxy = 0xAA,
  449.             wwxy = 0xAB,
  450.             xxxy = 0xAC,
  451.             yxxy = 0xAD,
  452.             zxxy = 0xAE,
  453.             wxxy = 0xAF,
  454.             xyyy = 0xB0,
  455.             yyyy = 0xB1,
  456.             zyyy = 0xB2,
  457.             wyyy = 0xB3,
  458.             xzyy = 0xB4,
  459.             yzyy = 0xB5,
  460.             zzyy = 0xB6,
  461.             wzyy = 0xB7,
  462.             xwyy = 0xB8,
  463.             ywyy = 0xB9,
  464.             zwyy = 0xBA,
  465.             wwyy = 0xBB,
  466.             xxyy = 0xBC,
  467.             yxyy = 0xBD,
  468.             zxyy = 0xBE,
  469.             wxyy = 0xBF,
  470.             xyzz = 0xC0,
  471.             yyzz = 0xC1,
  472.             zyzz = 0xC2,
  473.             wyzz = 0xC3,
  474.             xzzz = 0xC4,
  475.             yzzz = 0xC5,
  476.             zzzz = 0xC6,
  477.             wzzz = 0xC7,
  478.             xwzz = 0xC8,
  479.             ywzz = 0xC9,
  480.             zwzz = 0xCA,
  481.             wwzz = 0xCB,
  482.             xxzz = 0xCC,
  483.             yxzz = 0xCD,
  484.             zxzz = 0xCE,
  485.             wxzz = 0xCF,
  486.             xywz = 0xD0,
  487.             yywz = 0xD1,
  488.             zywz = 0xD2,
  489.             wywz = 0xD3,
  490.             xzwz = 0xD4,
  491.             yzwz = 0xD5,
  492.             zzwz = 0xD6,
  493.             wzwz = 0xD7,
  494.             xwwz = 0xD8,
  495.             ywwz = 0xD9,
  496.             zwwz = 0xDA,
  497.             wwwz = 0xDB,
  498.             xxwz = 0xDC,
  499.             yxwz = 0xDD,
  500.             zxwz = 0xDE,
  501.             wxwz = 0xDF,
  502.             xyxz = 0xE0,
  503.             yyxz = 0xE1,
  504.             zyxz = 0xE2,
  505.             wyxz = 0xE3,
  506.             xzxz = 0xE4,
  507.             yzxz = 0xE5,
  508.             zzxz = 0xE6,
  509.             wzxz = 0xE7,
  510.             xwxz = 0xE8,
  511.             ywxz = 0xE9,
  512.             zwxz = 0xEA,
  513.             wwxz = 0xEB,
  514.             xxxz = 0xEC,
  515.             yxxz = 0xED,
  516.             zxxz = 0xEE,
  517.             wxxz = 0xEF,
  518.             xyyz = 0xF0,
  519.             yyyz = 0xF1,
  520.             zyyz = 0xF2,
  521.             wyyz = 0xF3,
  522.             xzyz = 0xF4,
  523.             yzyz = 0xF5,
  524.             zzyz = 0xF6,
  525.             wzyz = 0xF7,
  526.             xwyz = 0xF8,
  527.             ywyz = 0xF9,
  528.             zwyz = 0xFA,
  529.             wwyz = 0xFB,
  530.             xxyz = 0xFC,
  531.             yxyz = 0xFD,
  532.             zxyz = 0xFE,
  533.             wxyz = 0xFF,
  534.         }
  535.         public enum Predication : byte
  536.         {
  537.             False = 1,
  538.             True = 2
  539.         }
  540.     }
  541.  
  542.     public class Instruction_Fetch : Instruction
  543.     {
  544.  
  545.         public enum FetchOpCode
  546.         {
  547.             vfetch = 0,
  548.             tfetch = 1,
  549.             getBCF = 16,
  550.             getCompTexLOD = 17,
  551.             getGradients = 18,
  552.             getWeights = 19,
  553.             setTexLOD = 24,
  554.             setGradientH = 25,
  555.             setGradientV = 26,
  556.             kUnknownTextureOp = 27,
  557.         }
  558.         public enum TextureFilter
  559.         {
  560.             TEX_FILTER_POINT = 0,
  561.             TEX_FILTER_LINEAR = 1,
  562.             TEX_FILTER_BASEMAP = 2,            /* only applicable for mip-filter */
  563.             TEX_FILTER_USE_FETCH_CONST = 3,
  564.         }
  565.         public enum AnisoFilter
  566.         {
  567.             ANISO_FILTER_DISABLED = 0,
  568.             ANISO_FILTER_MAX_1_1 = 1,
  569.             ANISO_FILTER_MAX_2_1 = 2,
  570.             ANISO_FILTER_MAX_4_1 = 3,
  571.             ANISO_FILTER_MAX_8_1 = 4,
  572.             ANISO_FILTER_MAX_16_1 = 5,
  573.             ANISO_FILTER_USE_FETCH_CONST = 7,
  574.         }
  575.         public enum ArbitraryFilter
  576.         {
  577.             ARBITRARY_FILTER_2X4_SYM = 0,
  578.             ARBITRARY_FILTER_2X4_ASYM = 1,
  579.             ARBITRARY_FILTER_4X2_SYM = 2,
  580.             ARBITRARY_FILTER_4X2_ASYM = 3,
  581.             ARBITRARY_FILTER_4X4_SYM = 4,
  582.             ARBITRARY_FILTER_4X4_ASYM = 5,
  583.             ARBITRARY_FILTER_USE_FETCH_CONST = 7,
  584.         }
  585.         public enum SampleLocation
  586.         {
  587.             SAMPLE_CENTROID = 0,
  588.             SAMPLE_CENTER = 1,
  589.         }
  590.         public enum SurfaceFormat
  591.         {
  592.             FMT_1_REVERSE = 0,
  593.             FMT_1 = 1,
  594.             FMT_8 = 2,
  595.             FMT_1_5_5_5 = 3,
  596.             FMT_5_6_5 = 4,
  597.             FMT_6_5_5 = 5,
  598.             FMT_8_8_8_8 = 6,
  599.             FMT_2_10_10_10 = 7,
  600.             FMT_8_A = 8,
  601.             FMT_8_B = 9,
  602.             FMT_8_8 = 10,
  603.             FMT_Cr_Y1_Cb_Y0 = 11,
  604.             FMT_Y1_Cr_Y0_Cb = 12,
  605.             FMT_5_5_5_1 = 13,
  606.             FMT_8_8_8_8_A = 14,
  607.             FMT_4_4_4_4 = 15,
  608.             FMT_10_11_11 = 16,
  609.             FMT_11_11_10 = 17,
  610.             FMT_DXT1 = 18,
  611.             FMT_DXT2_3 = 19,
  612.             FMT_DXT4_5 = 20,
  613.             FMT_24_8 = 22,
  614.             FMT_24_8_FLOAT = 23,
  615.             FMT_16 = 24,
  616.             FMT_16_16 = 25,
  617.             FMT_16_16_16_16 = 26,
  618.             FMT_16_EXPAND = 27,
  619.             FMT_16_16_EXPAND = 28,
  620.             FMT_16_16_16_16_EXPAND = 29,
  621.             FMT_16_FLOAT = 30,
  622.             FMT_16_16_FLOAT = 31,
  623.             FMT_16_16_16_16_FLOAT = 32,
  624.             FMT_32 = 33,
  625.             FMT_32_32 = 34,
  626.             FMT_32_32_32_32 = 35,
  627.             FMT_32_FLOAT = 36,
  628.             FMT_32_32_FLOAT = 37,
  629.             FMT_32_32_32_32_FLOAT = 38,
  630.             FMT_32_AS_8 = 39,
  631.             FMT_32_AS_8_8 = 40,
  632.             FMT_16_MPEG = 41,
  633.             FMT_16_16_MPEG = 42,
  634.             FMT_8_INTERLACED = 43,
  635.             FMT_32_AS_8_INTERLACED = 44,
  636.             FMT_32_AS_8_8_INTERLACED = 45,
  637.             FMT_16_INTERLACED = 46,
  638.             FMT_16_MPEG_INTERLACED = 47,
  639.             FMT_16_16_MPEG_INTERLACED = 48,
  640.             FMT_DXN = 49,
  641.             FMT_8_8_8_8_AS_16_16_16_16 = 50,
  642.             FMT_DXT1_AS_16_16_16_16 = 51,
  643.             FMT_DXT2_3_AS_16_16_16_16 = 52,
  644.             FMT_DXT4_5_AS_16_16_16_16 = 53,
  645.             FMT_2_10_10_10_AS_16_16_16_16 = 54,
  646.             FMT_10_11_11_AS_16_16_16_16 = 55,
  647.             FMT_11_11_10_AS_16_16_16_16 = 56,
  648.             FMT_32_32_32_FLOAT = 57,
  649.             FMT_DXT3A = 58,
  650.             FMT_DXT5A = 59,
  651.             FMT_CTX1 = 60,
  652.             FMT_DXT3A_AS_1_1_1_1 = 61,
  653.         }
  654.     }
  655. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement