From: José Fonseca Date: Wed, 9 Sep 2009 20:46:18 +0000 (+0100) Subject: llvmpipe: Quick hack for 1D textures. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4139bc8f4375c1f8961b281b6303bccaab24367a;p=mesa.git llvmpipe: Quick hack for 1D textures. --- diff --git a/src/gallium/drivers/llvmpipe/lp_bld_sample.h b/src/gallium/drivers/llvmpipe/lp_bld_sample.h index 5798f191fea..6f565af76d1 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_sample.h +++ b/src/gallium/drivers/llvmpipe/lp_bld_sample.h @@ -53,6 +53,7 @@ struct lp_sampler_static_state { /* pipe_texture's state */ enum pipe_format format; + unsigned target:2; unsigned pot_width:1; unsigned pot_height:1; unsigned pot_depth:1; diff --git a/src/gallium/drivers/llvmpipe/lp_bld_sample_soa.c b/src/gallium/drivers/llvmpipe/lp_bld_sample_soa.c index 25c8d845010..bcc9e41c50f 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_sample_soa.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_sample_soa.c @@ -322,6 +322,9 @@ lp_build_sample_soa(LLVMBuilderRef builder, height = lp_build_broadcast_scalar(&bld.int_coord_bld, height); stride = lp_build_broadcast_scalar(&bld.int_coord_bld, stride); + if(static_state->target == PIPE_TEXTURE_1D) + t = bld.coord_bld.zero; + if(static_state->normalized_coords) { LLVMTypeRef coord_vec_type = lp_build_vec_type(bld.coord_type); LLVMValueRef fp_width = LLVMBuildSIToFP(builder, width, coord_vec_type, "");