aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c
diff options
context:
space:
mode:
authorJames Benton <[email protected]>2012-04-25 11:19:06 +0100
committerJosé Fonseca <[email protected]>2012-05-02 10:23:21 +0100
commit9bc58d941ac32d10c6b4c601e0c4c6e00876d738 (patch)
treed2c5ff06d44ff6163184d54e152631f2766c6c94 /src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c
parentc426e63aa064debc23f9819c3862f357f1726bce (diff)
llvmpipe: Check when a shader does not satisfy 0 < imm < 1.
Signed-off-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c
index 3373ed4426d..ab393ed942a 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c
@@ -442,8 +442,12 @@ lp_build_tgsi_info(const struct tgsi_token *tokens,
assert(size <= 4);
if (ctx.num_imms < Elements(ctx.imm)) {
for (chan = 0; chan < size; ++chan) {
- ctx.imm[ctx.num_imms][chan] =
- parse.FullToken.FullImmediate.u[chan].Float;
+ float value = parse.FullToken.FullImmediate.u[chan].Float;
+ ctx.imm[ctx.num_imms][chan] = value;
+
+ if (value < 0.0f || value > 1.0f) {
+ info->unclamped_immediates = TRUE;
+ }
}
++ctx.num_imms;
}