summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-09-09 21:46:18 +0100
committerJosé Fonseca <jfonseca@vmware.com>2009-09-09 21:48:50 +0100
commit4139bc8f4375c1f8961b281b6303bccaab24367a (patch)
treee17e5d707427b5866f7843fd8abb93385b3105a2 /src/gallium
parentb0b131b023ed3d31fa77cfcd5f9b82f2997c78c7 (diff)
llvmpipe: Quick hack for 1D textures.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_bld_sample.h1
-rw-r--r--src/gallium/drivers/llvmpipe/lp_bld_sample_soa.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_sample.h b/src/gallium/drivers/llvmpipe/lp_bld_sample.h
index 5798f191fe..6f565af76d 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 25c8d84501..bcc9e41c50 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, "");