From 4139bc8f4375c1f8961b281b6303bccaab24367a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Wed, 9 Sep 2009 21:46:18 +0100 Subject: [PATCH] llvmpipe: Quick hack for 1D textures. --- src/gallium/drivers/llvmpipe/lp_bld_sample.h | 1 + src/gallium/drivers/llvmpipe/lp_bld_sample_soa.c | 3 +++ 2 files changed, 4 insertions(+) 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, ""); -- 2.30.2