radeonsi: Handle TGSI TXL opcode.
authorMichel Dänzer <michel.daenzer@amd.com>
Tue, 6 Nov 2012 16:41:50 +0000 (17:41 +0100)
committerMichel Dänzer <michel@daenzer.net>
Wed, 14 Nov 2012 11:08:19 +0000 (12:08 +0100)
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
src/gallium/drivers/radeonsi/radeonsi_shader.c

index a5dddfbc9216e57af96e13726f2bcb254a07cb5c..21e9018f2e0417df2f3d11abbe8d5a1723ca3906 100644 (file)
@@ -792,6 +792,12 @@ static const struct lp_build_tgsi_action txb_action = {
        .intr_name = "llvm.SI.sample.bias"
 };
 
+static const struct lp_build_tgsi_action txl_action = {
+       .fetch_args = tex_fetch_args,
+       .emit = lp_build_tgsi_intrinsic,
+       .intr_name = "llvm.SI.sample.lod"
+};
+
 
 int si_pipe_shader_create(
        struct pipe_context *ctx,
@@ -829,6 +835,7 @@ int si_pipe_shader_create(
 
        bld_base->op_actions[TGSI_OPCODE_TEX] = tex_action;
        bld_base->op_actions[TGSI_OPCODE_TXB] = txb_action;
+       bld_base->op_actions[TGSI_OPCODE_TXL] = txl_action;
        bld_base->op_actions[TGSI_OPCODE_TXP] = tex_action;
 
        si_shader_ctx.radeon_bld.load_input = declare_input;