diff options
author | José Fonseca <[email protected]> | 2009-09-09 21:46:18 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2009-09-09 21:48:50 +0100 |
commit | 4139bc8f4375c1f8961b281b6303bccaab24367a (patch) | |
tree | e17e5d707427b5866f7843fd8abb93385b3105a2 /src/gallium/drivers/llvmpipe | |
parent | b0b131b023ed3d31fa77cfcd5f9b82f2997c78c7 (diff) |
llvmpipe: Quick hack for 1D textures.
Diffstat (limited to 'src/gallium/drivers/llvmpipe')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_bld_sample.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_bld_sample_soa.c | 3 |
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 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, ""); |