[Mesa-dev] [PATCH] r600g: separate resource_id and sampler_id tex info in tgsi-to-llvm

Tom Stellard tom at stellard.net
Tue Nov 27 06:29:22 PST 2012


On Fri, Nov 23, 2012 at 10:31:37PM +0100, Vincent Lejeune wrote:
> ---
>  src/gallium/drivers/r600/r600_llvm.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/src/gallium/drivers/r600/r600_llvm.c b/src/gallium/drivers/r600/r600_llvm.c
> index b3d4e6b..2f243a2 100644
> --- a/src/gallium/drivers/r600/r600_llvm.c
> +++ b/src/gallium/drivers/r600/r600_llvm.c
> @@ -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,10 @@ static void llvm_emit_tex(
>  
>  	sampler_src = emit_data->inst->Instruction.NumSrcRegs-1;
>  
> +	// XXX: Resource ID offset is R600_MAX_CONST_BUFFERS but LLVM already adds 2
> +	// to the generated machine resource id

Is this comment still relevant?

> +	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,
> -- 
> 1.7.11.7
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list