r600g: separate resource_id and sampler_id tex info in tgsi-to-llvm
authorVincent Lejeune <vljn@ovi.com>
Tue, 20 Nov 2012 22:22:47 +0000 (23:22 +0100)
committerVincent Lejeune <vljn@ovi.com>
Thu, 29 Nov 2012 21:15:18 +0000 (22:15 +0100)
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
src/gallium/drivers/r600/r600_llvm.c

index b3d4e6bab6886793f2368252460be221d9ad2d22..8f1ed26b4c684ccca8f42420e7b7c6405c3dfa56 100644 (file)
@@ -11,6 +11,7 @@
 #include "r600_asm.h"
 #include "r600_opcodes.h"
 #include "r600_shader.h"
+#include "r600_pipe.h"
 #include "radeon_llvm.h"
 #include "radeon_llvm_emit.h"
 
@@ -324,6 +325,8 @@ static void llvm_emit_tex(
 
        sampler_src = emit_data->inst->Instruction.NumSrcRegs-1;
 
+       args[c++] = lp_build_const_int32(gallivm,
+                                       emit_data->inst->Src[sampler_src].Register.Index + R600_MAX_CONST_BUFFERS);
        args[c++] = lp_build_const_int32(gallivm,
                                        emit_data->inst->Src[sampler_src].Register.Index);
        args[c++] = lp_build_const_int32(gallivm,