Module: Mesa
Branch: master
Commit: 4139bc8f4375c1f8961b281b6303bccaab24367a
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4139bc8f4375c1f8961b281b6303bccaab24367a

Author: José Fonseca <[email protected]>
Date:   Wed Sep  9 21:46:18 2009 +0100

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(+), 0 deletions(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_bld_sample.h 
b/src/gallium/drivers/llvmpipe/lp_bld_sample.h
index 5798f19..6f565af 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 25c8d84..bcc9e41 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, 
"");

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to