prog_execute: Implement OPCODE_TXL
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 18 Aug 2010 00:40:20 +0000 (17:40 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 24 Aug 2010 17:27:14 +0000 (10:27 -0700)
Fixes bugzilla #29628

src/mesa/program/prog_execute.c

index 1222a0f4c8caa950e91b21ac0e2e152134ecf1cc..ff8c20c4cf56c86c74b27fe07ca6bf564904f6a4 100644 (file)
@@ -1679,6 +1679,22 @@ _mesa_execute_program(GLcontext * ctx,
             store_vector4(inst, machine, color);
          }
          break;
+      case OPCODE_TXL:
+         /* Texel lookup with explicit LOD */
+         {
+            GLfloat texcoord[4], color[4], lod;
+
+            fetch_vector4(&inst->SrcReg[0], machine, texcoord);
+
+            /* texcoord[3] is the LOD */
+            lod = texcoord[3];
+
+           machine->FetchTexelLod(ctx, texcoord, lod,
+                                  machine->Samplers[inst->TexSrcUnit], color);
+
+            store_vector4(inst, machine, color);
+         }
+         break;
       case OPCODE_TXP:         /* GL_ARB_fragment_program only */
          /* Texture lookup w/ projective divide */
          {