[Mesa-dev] [PATCH 1/2] radeonsi: support constants as TEX coordinates

Tom Stellard tom at stellard.net
Tue Feb 5 06:46:53 PST 2013


On Mon, Feb 04, 2013 at 05:56:32PM +0100, Christian König wrote:
> From: Christian König <christian.koenig at amd.com>
> 

For both patches.

Reviewed-by: Tom Stellard <thomas.stellard at amd.com>

> Signed-off-by: Christian König <christian.koenig at amd.com>
> ---
>  src/gallium/drivers/radeonsi/radeonsi_shader.c |    9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.c b/src/gallium/drivers/radeonsi/radeonsi_shader.c
> index f398e6c..06b5a19 100644
> --- a/src/gallium/drivers/radeonsi/radeonsi_shader.c
> +++ b/src/gallium/drivers/radeonsi/radeonsi_shader.c
> @@ -433,6 +433,15 @@ static LLVMValueRef fetch_constant(
>  	LLVMValueRef offset;
>  	LLVMValueRef load;
>  
> +	if (swizzle == LP_CHAN_ALL) {
> +		unsigned chan;
> +		LLVMValueRef values[4];
> +		for (chan = 0; chan < TGSI_NUM_CHANNELS; ++chan)
> +			values[chan] = fetch_constant(bld_base, reg, type, chan);
> +
> +		return lp_build_gather_values(bld_base->base.gallivm, values, 4);
> +	}
> +
>  	/* currently not supported */
>  	if (reg->Register.Indirect) {
>  		assert(0);
> -- 
> 1.7.9.5
> 
> _______________________________________________
> 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