Lines Matching refs:value
586 * This makes no assumptions about the high bits of the value and will
601 * This assumes and asserts that the value fits into `width` bits.
649 * Align a value up to an alignment value
651 * If \c value is not already aligned to the requested alignment value, it
654 * \param value Value to be rounded
655 * \param alignment Alignment value to be used. This must be a power of two.
664 ALIGN(uintptr_t value, int32_t alignment)
667 return (((value) + (alignment) - 1) & ~((alignment) - 1));
674 ALIGN_NPOT(uintptr_t value, int32_t alignment)
677 return (value + alignment - 1) / alignment * alignment;
681 * Align a value down to an alignment value
683 * If \c value is not already aligned to the requested alignment value, it
686 * \param value Value to be rounded
687 * \param alignment Alignment value to be used. This must be a power of two.
692 ROUND_DOWN_TO(uint64_t value, int32_t alignment)
695 return ((value) & ~(alignment - 1));
699 * Align a value, only works pot alignemnts.
702 align(int value, int alignment)
704 return (value + alignment - 1) & ~(alignment - 1);
708 align64(uint64_t value, unsigned alignment)
710 return (value + alignment - 1) & ~((uint64_t)alignment - 1);
717 util_align_npot(size_t value, size_t alignment)
719 if (value % alignment)
720 return value + (alignment - (value % alignment));
721 return value;
725 u_minify(unsigned value, unsigned levels)
727 return MAX2(1, value >> levels);
758 util_unsigned_fixed(float value, unsigned frac_bits)
760 return value < 0 ? 0 : (uint32_t)(value * (1<<frac_bits));
764 util_signed_fixed(float value, unsigned frac_bits)
766 return (int32_t)(value * (1<<frac_bits));
798 /* Quantize the lod bias value to reduce the number of sampler state