summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2013-01-09 14:38:14 -0800
committerRoland Scheidegger <[email protected]>2013-01-10 18:02:01 -0800
commit5785f22d230bc7249dfcd91bbbaa4e77816128e4 (patch)
treee3c993679fbd5511b5baa3de5a52964ca779b693 /src/gallium/auxiliary
parent31884946b5d00ba7e2678ed6641a4ba0d48e3951 (diff)
gallivm: fix border color for integer textures
Need to bitcast the float border color (luckily we already get the color as int just disguised as float). Fixes piglit texwrap GL_EXT_texture_integer bordercolor. Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
index 57298a47ffa..918dd36fbf5 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
@@ -190,6 +190,11 @@ lp_build_sample_texel_soa(struct lp_build_sample_context *bld,
lp_build_const_int32(bld->gallivm, chan));
LLVMValueRef border_chan_vec =
lp_build_broadcast_scalar(&bld->float_vec_bld, border_chan);
+
+ if (!bld->texel_type.floating) {
+ border_chan_vec = LLVMBuildBitCast(builder, border_chan_vec,
+ bld->texel_bld.vec_type, "");
+ }
texel_out[chan] = lp_build_select(&bld->texel_bld, use_border,
border_chan_vec, texel_out[chan]);
}