Ejemplo n.º 1
0
uint32_t ass_multiply(char** line)
{
  if(strcmp(line[0], "mul") == 0)
  {
    return 0xE0000090 | (REG_D(regToInt(line[1])) 
                      | REG_M(regToInt(line[2])) | REG_S(regToInt(line[3])));
  }
  return 0xE0200090 | (REG_D(regToInt(line[1])) | REG_M(regToInt(line[2])) 
                    | REG_S(regToInt(line[3])) | REG_N(regToInt(line[4])));
}
Ejemplo n.º 2
0
uint32_t multiply_instr(char** line)
{
  uint32_t instr;
  if(strcmp(line[0], "mul") == 0)
  {
    instr = 0xE0000090;
    instr |= (REG_D(regToInt(line[1])) | REG_M(regToInt(line[2])) | REG_S(regToInt(line[3])));
  }
  else
  {
    instr = 0xE0200090;
    instr |= (REG_D(regToInt(line[1])) | REG_M(regToInt(line[2])) 
            | REG_S(regToInt(line[3])) | REG_N(regToInt(line[4])));
  }
  return instr;
}
Ejemplo n.º 3
0
static void enable_texture_blend_replace( i915ContextPtr i915 )
{
   static const GLuint prog[] = {
      _3DSTATE_PIXEL_SHADER_PROGRAM,

      /* Declare the sampler:
       */
      (D0_DCL |
       D0_DECL_REG( REG_S(0) ) |
       D0_SAMPLE_TYPE_2D |
       D0_CHANNEL_NONE),
      D1_MBZ,
      D2_MBZ,

      /* Declare the interpolated texture coordinate:
       */
      (D0_DCL |
       D0_DECL_REG( REG_T_TEX(0) ) |
       D0_CHANNEL_ALL),
      D1_MBZ,
      D2_MBZ,

      /* output-color = texld(sample0, texcoord0) 
       */
      (T0_TEXLD | 
       T0_DEST_REG( REG_OC ) |
       T0_SAMPLER( 0 )),
      T1_ADDRESS_REG(REG_TYPE_T, 0),
      T2_MBZ
   };

   memcpy( i915->meta.Program, prog, sizeof(prog) );
   i915->meta.ProgramSize = sizeof(prog) / sizeof(*prog);
   i915->meta.Program[0] |= i915->meta.ProgramSize - 2;
   i915->meta.emitted &= ~I915_UPLOAD_PROGRAM;
}