summaryrefslogtreecommitdiff
path: root/src/mesa/program/prog_execute.c
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-08-17 17:40:20 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-08-24 10:27:14 -0700
commit0eb2026c8767d6e1f68e6b07f35a9aca9ed757c7 (patch)
treef46cae0a852f8e156bb67e9c68f7399a367e5d4e /src/mesa/program/prog_execute.c
parent81137623e55bb003d2479385547028661c71b415 (diff)
prog_execute: Implement OPCODE_TXL
Fixes bugzilla #29628
Diffstat (limited to 'src/mesa/program/prog_execute.c')
-rw-r--r--src/mesa/program/prog_execute.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mesa/program/prog_execute.c b/src/mesa/program/prog_execute.c
index 1222a0f4c8..ff8c20c4cf 100644
--- a/src/mesa/program/prog_execute.c
+++ b/src/mesa/program/prog_execute.c
@@ -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 */
{