otherwise samples=0 passes the check, which is invalid.
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Neil Roberts <neil@linux.intel.com>
y_scale = samples * 0.5;
/* We expect only power of 2 samples in source multisample buffer. */
- assert((samples & (samples - 1)) == 0);
+ assert(samples > 0 && (samples & (samples - 1)) == 0);
while (samples >> (shader_offset + 1)) {
shader_offset++;
}
}
/* We expect only power of 2 samples in source multisample buffer. */
- assert((samples & (samples - 1)) == 0);
+ assert(samples > 0 && (samples & (samples - 1)) == 0);
while (samples >> (shader_offset + 1)) {
shader_offset++;
}