Signed-off-by: José Fonseca <jfonseca@vmware.com>
*/
unsigned indirect_textures:1;
+ /*
+ * Whether any immediate values are outside the range of 0 and 1
+ */
+ unsigned unclamped_immediates:1;
+
/*
* Texture opcode description. Aimed at detecting and described direct
* texture opcodes.
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;
}