util: trim trailing space for files src/util/**/*

Using the following bash script doing that
```
cd src/util
find . -type f -print0 | xargs -0 -n1 sed -i 's/[ \t]*$//'
```

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15093>
This commit is contained in:
Yonggang Luo 2022-03-18 13:14:55 +08:00 committed by Marge Bot
parent da82358a52
commit d9c3601e29
43 changed files with 338 additions and 338 deletions

View File

@ -28,7 +28,7 @@
/**
* @file
* CRC32 implementation.
*
*
* @author Jose Fonseca
*/
@ -39,71 +39,71 @@
#include "crc32.h"
static const uint32_t
static const uint32_t
util_crc32_table[256] = {
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba,
0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3,
0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91,
0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec,
0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5,
0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940,
0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116,
0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f,
0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d,
0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a,
0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818,
0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457,
0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c,
0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb,
0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,
0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9,
0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086,
0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4,
0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad,
0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,
0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683,
0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe,
0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7,
0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,
0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252,
0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60,
0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79,
0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f,
0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04,
0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a,
0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,
0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21,
0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e,
0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45,
0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,
0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db,
0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0,
0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6,
0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf,
0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba,
0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3,
0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91,
0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec,
0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5,
0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940,
0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116,
0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f,
0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d,
0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a,
0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818,
0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457,
0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c,
0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb,
0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,
0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9,
0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086,
0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4,
0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad,
0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,
0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683,
0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe,
0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7,
0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,
0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252,
0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60,
0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79,
0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f,
0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04,
0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a,
0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,
0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21,
0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e,
0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45,
0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,
0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db,
0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0,
0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6,
0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf,
0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
};
@ -116,7 +116,7 @@ util_hash_crc32(const void *data, size_t size)
{
const uint8_t *p = data;
uint32_t crc = 0xffffffff;
#ifdef HAVE_ZLIB
/* Prefer zlib's implementation for better performance.
* zlib's uInt is always "unsigned int" while size_t can be 64bit.
@ -129,6 +129,6 @@ util_hash_crc32(const void *data, size_t size)
while (size--)
crc = util_crc32_table[(crc ^ *p++) & 0xff] ^ (crc >> 8);
return crc;
}

View File

@ -28,7 +28,7 @@
/**
* @file
* CRC32 function.
*
*
* @author Jose Fonseca <jfonseca@vmware.com>
*/
@ -43,7 +43,7 @@
extern "C" {
#endif
uint32_t
util_hash_crc32(const void *data, size_t size);

View File

@ -15,11 +15,11 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* FELIX KUEHLING, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* FELIX KUEHLING, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
*/
/**
* \file driconf.h

View File

@ -105,7 +105,7 @@ struct util_format_block
{
/** Block width in pixels */
unsigned width;
/** Block height in pixels */
unsigned height;
@ -483,7 +483,7 @@ util_format_is_plain(enum pipe_format format)
return desc->layout == UTIL_FORMAT_LAYOUT_PLAIN ? TRUE : FALSE;
}
static inline boolean
static inline boolean
util_format_is_compressed(enum pipe_format format)
{
const struct util_format_description *desc = util_format_description(format);
@ -508,7 +508,7 @@ util_format_is_compressed(enum pipe_format format)
}
}
static inline boolean
static inline boolean
util_format_is_s3tc(enum pipe_format format)
{
const struct util_format_description *desc = util_format_description(format);
@ -534,7 +534,7 @@ util_format_is_etc(enum pipe_format format)
return desc->layout == UTIL_FORMAT_LAYOUT_ETC ? TRUE : FALSE;
}
static inline boolean
static inline boolean
util_format_is_srgb(enum pipe_format format)
{
const struct util_format_description *desc = util_format_description(format);
@ -1592,14 +1592,14 @@ util_format_write_4(enum pipe_format format,
void
util_format_read_4ub(enum pipe_format format,
uint8_t *dst, unsigned dst_stride,
const void *src, unsigned src_stride,
uint8_t *dst, unsigned dst_stride,
const void *src, unsigned src_stride,
unsigned x, unsigned y, unsigned w, unsigned h);
void
util_format_write_4ub(enum pipe_format format,
const uint8_t *src, unsigned src_stride,
void *dst, unsigned dst_stride,
const uint8_t *src, unsigned src_stride,
void *dst, unsigned dst_stride,
unsigned x, unsigned y, unsigned w, unsigned h);
void

View File

@ -70,7 +70,7 @@ def generate_format_type(format):
'''Generate a structure that describes the format.'''
assert format.layout == PLAIN
def generate_bitfields(channels, swizzles):
for channel in channels:
if channel.type == VOID:
@ -127,7 +127,7 @@ def generate_format_type(format):
def is_format_supported(format):
'''Determines whether we actually have the plumbing necessary to generate the
'''Determines whether we actually have the plumbing necessary to generate the
to read/write to/from this format.'''
# FIXME: Ideally we would support any format combination here.
@ -276,7 +276,7 @@ def clamp_expr(src_channel, dst_channel, dst_native_type, value):
src_max = src_channel.max()
dst_min = dst_channel.min()
dst_max = dst_channel.max()
# Translate the destination range to the src native value
dst_min_native = native_to_constant(src_channel, value_to_native(src_channel, dst_min))
dst_max_native = native_to_constant(src_channel, value_to_native(src_channel, dst_max))
@ -286,18 +286,18 @@ def clamp_expr(src_channel, dst_channel, dst_native_type, value):
if src_max > dst_max:
return 'MIN2(%s, %s)' % (value, dst_max_native)
if src_min < dst_min:
return 'MAX2(%s, %s)' % (value, dst_min_native)
return value
def conversion_expr(src_channel,
dst_channel, dst_native_type,
value,
clamp=True,
src_colorspace = RGB,
def conversion_expr(src_channel,
dst_channel, dst_native_type,
value,
clamp=True,
src_colorspace = RGB,
dst_colorspace = RGB):
'''Generate the expression to convert a value between two types.'''
@ -436,14 +436,14 @@ def generate_unpack_kernel(format, dst_channel, dst_native_type):
if not is_format_supported(format):
return
assert format.layout == PLAIN
def unpack_from_bitmask(channels, swizzles):
depth = format.block_size()
print(' uint%u_t value = *(const uint%u_t *)src;' % (depth, depth))
print(' uint%u_t value = *(const uint%u_t *)src;' % (depth, depth))
# Compute the intermediate unshifted values
# Compute the intermediate unshifted values
for i in range(format.nr_channels()):
src_channel = channels[i]
value = 'value'
@ -479,8 +479,8 @@ def generate_unpack_kernel(format, dst_channel, dst_native_type):
# Alpha channel is linear
src_colorspace = RGB
value = src_channel.name
value = conversion_expr(src_channel,
dst_channel, dst_native_type,
value = conversion_expr(src_channel,
dst_channel, dst_native_type,
value,
src_colorspace = src_colorspace)
elif swizzle == SWIZZLE_0:
@ -492,11 +492,11 @@ def generate_unpack_kernel(format, dst_channel, dst_native_type):
else:
assert False
print(' dst[%u] = %s; /* %s */' % (i, value, 'rgba'[i]))
def unpack_from_struct(channels, swizzles):
print(' struct util_format_%s pixel;' % format.short_name())
print(' memcpy(&pixel, src, sizeof pixel);')
for i in range(4):
swizzle = swizzles[i]
if swizzle < 4:
@ -506,8 +506,8 @@ def generate_unpack_kernel(format, dst_channel, dst_native_type):
# Alpha channel is linear
src_colorspace = RGB
value = 'pixel.%s' % src_channel.name
value = conversion_expr(src_channel,
dst_channel, dst_native_type,
value = conversion_expr(src_channel,
dst_channel, dst_native_type,
value,
src_colorspace = src_colorspace)
elif swizzle == SWIZZLE_0:
@ -519,7 +519,7 @@ def generate_unpack_kernel(format, dst_channel, dst_native_type):
else:
assert False
print(' dst[%u] = %s; /* %s */' % (i, value, 'rgba'[i]))
if format.is_bitmask():
print_channels(format, unpack_from_bitmask)
else:
@ -530,7 +530,7 @@ def generate_pack_kernel(format, src_channel, src_native_type):
if not is_format_supported(format):
return
dst_native_type = native_type(format)
assert format.layout == PLAIN
@ -539,7 +539,7 @@ def generate_pack_kernel(format, src_channel, src_native_type):
inv_swizzle = inv_swizzles(swizzles)
depth = format.block_size()
print(' uint%u_t value = 0;' % depth)
print(' uint%u_t value = 0;' % depth)
for i in range(4):
dst_channel = channels[i]
@ -550,8 +550,8 @@ def generate_pack_kernel(format, src_channel, src_native_type):
if dst_colorspace == SRGB and inv_swizzle[i] == 3:
# Alpha channel is linear
dst_colorspace = RGB
value = conversion_expr(src_channel,
dst_channel, dst_native_type,
value = conversion_expr(src_channel,
dst_channel, dst_native_type,
value,
dst_colorspace = dst_colorspace)
if dst_channel.type in (UNSIGNED, SIGNED):
@ -566,14 +566,14 @@ def generate_pack_kernel(format, src_channel, src_native_type):
value = None
if value is not None:
print(' value |= %s;' % (value))
print(' *(uint%u_t *)dst = value;' % depth)
print(' *(uint%u_t *)dst = value;' % depth)
def pack_into_struct(channels, swizzles):
inv_swizzle = inv_swizzles(swizzles)
print(' struct util_format_%s pixel = {0};' % format.short_name())
for i in range(4):
dst_channel = channels[i]
width = dst_channel.size
@ -584,14 +584,14 @@ def generate_pack_kernel(format, src_channel, src_native_type):
# Alpha channel is linear
dst_colorspace = RGB
value ='src[%u]' % inv_swizzle[i]
value = conversion_expr(src_channel,
dst_channel, dst_native_type,
value,
value = conversion_expr(src_channel,
dst_channel, dst_native_type,
value,
dst_colorspace = dst_colorspace)
print(' pixel.%s = %s;' % (dst_channel.name, value))
print(' memcpy(dst, &pixel, sizeof pixel);')
if format.is_bitmask():
print_channels(format, pack_into_bitmask)
else:
@ -620,16 +620,16 @@ def generate_format_unpack(format, dst_channel, dst_native_type, dst_suffix):
print(' %s *dst = dst_row;' % (dst_native_type))
print(
' for (unsigned x = 0; x < width; x += %u) {' % (format.block_width,))
generate_unpack_kernel(format, dst_channel, dst_native_type)
print(' src += %u;' % (format.block_size() / 8,))
print(' dst += 4;')
print(' }')
print('}')
print()
def generate_format_pack(format, src_channel, src_native_type, src_suffix):
'''Generate the function to pack pixels to a particular format'''
@ -643,26 +643,26 @@ def generate_format_pack(format, src_channel, src_native_type, src_suffix):
print('void util_format_%s_pack_%s(uint8_t *restrict dst_row, unsigned dst_stride, const %s *restrict src_row, unsigned src_stride, unsigned width, unsigned height);' %
(name, src_suffix, src_native_type), file=sys.stdout2)
if is_format_supported(format):
print(' unsigned x, y;')
print(' for(y = 0; y < height; y += %u) {' % (format.block_height,))
print(' const %s *src = src_row;' % (src_native_type))
print(' uint8_t *dst = dst_row;')
print(' for(x = 0; x < width; x += %u) {' % (format.block_width,))
generate_pack_kernel(format, src_channel, src_native_type)
print(' src += 4;')
print(' dst += %u;' % (format.block_size() / 8,))
print(' }')
print(' dst_row += dst_stride;')
print(' src_row += src_stride/sizeof(*src_row);')
print(' }')
print('}')
print()
def generate_format_fetch(format, dst_channel, dst_native_type):
'''Generate the function to unpack pixels from a particular format'''
@ -705,7 +705,7 @@ def generate(formats):
for format in formats:
if not is_format_hand_written(format):
if is_format_supported(format) and not format.is_bitmask():
generate_format_type(format)
@ -721,20 +721,20 @@ def generate(formats):
channel = Channel(SIGNED, False, True, 32)
native_type = 'int'
suffix = 'signed'
generate_format_pack(format, channel, native_type, suffix)
generate_format_pack(format, channel, native_type, suffix)
elif format.is_pure_signed():
native_type = 'int'
suffix = 'signed'
channel = Channel(SIGNED, False, True, 32)
generate_format_unpack(format, channel, native_type, suffix)
generate_format_pack(format, channel, native_type, suffix)
generate_format_pack(format, channel, native_type, suffix)
generate_format_fetch(format, channel, native_type)
native_type = 'unsigned'
suffix = 'unsigned'
channel = Channel(UNSIGNED, False, True, 32)
generate_format_pack(format, channel, native_type, suffix)
generate_format_pack(format, channel, native_type, suffix)
else:
channel = Channel(FLOAT, False, False, 32)
native_type = 'float'

View File

@ -63,7 +63,7 @@ util_format_rgtc1_unorm_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned d
}
void
util_format_rgtc1_unorm_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row,
util_format_rgtc1_unorm_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row,
unsigned src_stride, unsigned width, unsigned height)
{
const unsigned bw = 4, bh = 4, bytes_per_block = 8;

View File

@ -140,9 +140,9 @@ def write_format_table(formats):
print()
write_format_table_header(sys.stdout2)
u_format_pack.generate(formats)
def do_channel_array(channels, swizzles):
print(" {")
for i in range(4):

View File

@ -68,9 +68,9 @@ util_format_rgb_float_to_yuv(float r, float g, float b,
const int _u = scale * (-(0.148f * _r) - (0.291f * _g) + (0.439f * _b));
const int _v = scale * ( (0.439f * _r) - (0.368f * _g) - (0.071f * _b));
*y = _y + 16;
*u = _u + 128;
*v = _v + 128;
*y = _y + 16;
*u = _u + 128;
*v = _v + 128;
}

View File

@ -34,7 +34,7 @@ static void translate_memcpy_ushort( const void *in,
{
memcpy(out, &((short *)in)[start], out_nr*sizeof(short));
}
static void translate_memcpy_uint( const void *in,
unsigned start,
unsigned in_nr,
@ -254,9 +254,9 @@ u_index_generator(unsigned hw_mask,
*out_prim = u_index_prim_type_convert(hw_mask, prim, in_pv == out_pv);
*out_nr = u_index_count_converted_indices(hw_mask, in_pv == out_pv, prim, nr);
if ((hw_mask & (1<<prim)) &&
if ((hw_mask & (1<<prim)) &&
(in_pv == out_pv)) {
*out_generate = generate[out_idx][in_pv][out_pv][PIPE_PRIM_POINTS];
return U_GENERATE_LINEAR;
}

View File

@ -32,30 +32,30 @@ INTYPES = (GENERATE, UBYTE, USHORT, UINT)
OUTTYPES = (USHORT, UINT)
PVS=(FIRST, LAST)
PRS=(PRDISABLE, PRENABLE)
PRIMS=('points',
'lines',
'linestrip',
'lineloop',
'tris',
'trifan',
'tristrip',
'quads',
'quadstrip',
PRIMS=('points',
'lines',
'linestrip',
'lineloop',
'tris',
'trifan',
'tristrip',
'quads',
'quadstrip',
'polygon',
'linesadj',
'linestripadj',
'trisadj',
'tristripadj')
LONGPRIMS=('PIPE_PRIM_POINTS',
'PIPE_PRIM_LINES',
'PIPE_PRIM_LINE_STRIP',
'PIPE_PRIM_LINE_LOOP',
'PIPE_PRIM_TRIANGLES',
'PIPE_PRIM_TRIANGLE_FAN',
'PIPE_PRIM_TRIANGLE_STRIP',
'PIPE_PRIM_QUADS',
'PIPE_PRIM_QUAD_STRIP',
LONGPRIMS=('PIPE_PRIM_POINTS',
'PIPE_PRIM_LINES',
'PIPE_PRIM_LINE_STRIP',
'PIPE_PRIM_LINE_LOOP',
'PIPE_PRIM_TRIANGLES',
'PIPE_PRIM_TRIANGLE_FAN',
'PIPE_PRIM_TRIANGLE_STRIP',
'PIPE_PRIM_QUADS',
'PIPE_PRIM_QUAD_STRIP',
'PIPE_PRIM_POLYGON',
'PIPE_PRIM_LINES_ADJACENCY',
'PIPE_PRIM_LINE_STRIP_ADJACENCY',
@ -153,7 +153,7 @@ def do_line( intype, outtype, ptr, v0, v1, inpv, outpv ):
def do_tri( intype, outtype, ptr, v0, v1, v2, inpv, outpv ):
if inpv == outpv:
tri( intype, outtype, ptr, v0, v1, v2 )
else:
else:
if inpv == FIRST:
tri( intype, outtype, ptr, v1, v2, v0 )
else:
@ -409,20 +409,20 @@ def emit_funcs():
def init(intype, outtype, inpv, outpv, pr, prim):
if intype == GENERATE:
print ('generate[' +
outtype_idx[outtype] +
'][' + pv_idx[inpv] +
'][' + pv_idx[outpv] +
'][' + longprim[prim] +
print ('generate[' +
outtype_idx[outtype] +
'][' + pv_idx[inpv] +
'][' + pv_idx[outpv] +
'][' + longprim[prim] +
'] = ' + name( intype, outtype, inpv, outpv, pr, prim ) + ';')
else:
print ('translate[' +
intype_idx[intype] +
'][' + outtype_idx[outtype] +
'][' + pv_idx[inpv] +
print ('translate[' +
intype_idx[intype] +
'][' + outtype_idx[outtype] +
'][' + pv_idx[inpv] +
'][' + pv_idx[outpv] +
'][' + pr_idx[pr] +
'][' + longprim[prim] +
'][' + pr_idx[pr] +
'][' + longprim[prim] +
'] = ' + name( intype, outtype, inpv, outpv, pr, prim ) + ';')
@ -445,7 +445,7 @@ def emit_init():
print('}')
def epilog():
print('#include "indices/u_indices.c"')

View File

@ -29,20 +29,20 @@ FIRST, LAST = 'first', 'last'
INTYPES = (GENERATE, UBYTE, USHORT, UINT)
OUTTYPES = (USHORT, UINT)
PRIMS=('tris',
'trifan',
'tristrip',
'quads',
'quadstrip',
PRIMS=('tris',
'trifan',
'tristrip',
'quads',
'quadstrip',
'polygon',
'trisadj',
'tristripadj')
LONGPRIMS=('PIPE_PRIM_TRIANGLES',
'PIPE_PRIM_TRIANGLE_FAN',
'PIPE_PRIM_TRIANGLE_STRIP',
'PIPE_PRIM_QUADS',
'PIPE_PRIM_QUAD_STRIP',
LONGPRIMS=('PIPE_PRIM_TRIANGLES',
'PIPE_PRIM_TRIANGLE_FAN',
'PIPE_PRIM_TRIANGLE_STRIP',
'PIPE_PRIM_QUADS',
'PIPE_PRIM_QUAD_STRIP',
'PIPE_PRIM_POLYGON',
'PIPE_PRIM_TRIANGLES_ADJACENCY',
'PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY')
@ -108,7 +108,7 @@ def line( intype, outtype, ptr, v0, v1 ):
# XXX: have the opportunity here to avoid over-drawing shared lines in
# tristrips, fans, etc, by integrating this into the calling functions
# and only emitting each line at most once.
#
#
def do_tri( intype, outtype, ptr, v0, v1, v2 ):
line( intype, outtype, ptr, v0, v1 )
line( intype, outtype, ptr + '+2', v1, v2 )
@ -227,15 +227,15 @@ def emit_funcs():
def init(intype, outtype, prim):
if intype == GENERATE:
print(('generate_line[' +
outtype_idx[outtype] +
'][' + longprim[prim] +
print(('generate_line[' +
outtype_idx[outtype] +
'][' + longprim[prim] +
'] = ' + name( intype, outtype, prim ) + ';'))
else:
print(('translate_line[' +
intype_idx[intype] +
'][' + outtype_idx[outtype] +
'][' + longprim[prim] +
print(('translate_line[' +
intype_idx[intype] +
'][' + outtype_idx[outtype] +
'][' + longprim[prim] +
'] = ' + name( intype, outtype, prim ) + ';'))
@ -255,7 +255,7 @@ def emit_init():
print('}')
def epilog():
print('#include "indices/u_unfilled_indices.c"')

View File

@ -1,8 +1,8 @@
/**************************************************************************
*
*
* Copyright 2008-2010 VMware, Inc.
* All Rights Reserved.
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
**************************************************************************/

View File

@ -1,8 +1,8 @@
/**************************************************************************
*
*
* Copyright 2008-2010 VMware, Inc.
* All Rights Reserved.
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
**************************************************************************/
@ -69,7 +69,7 @@ debug_memory_tag(void *ptr, unsigned tag);
void
debug_memory_check_block(void *ptr);
void
void
debug_memory_check(void);

View File

@ -1,8 +1,8 @@
/**************************************************************************
*
*
* Copyright 2021 Snap Inc.
* SPDX-License-Identifier: MIT
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@ -10,10 +10,10 @@
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@ -21,7 +21,7 @@
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
**************************************************************************/
/*

View File

@ -1,8 +1,8 @@
/**************************************************************************
*
*
* Copyright 2021 Snap Inc.
* SPDX-License-Identifier: MIT
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@ -10,10 +10,10 @@
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@ -21,7 +21,7 @@
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
**************************************************************************/

View File

@ -1,8 +1,8 @@
/**************************************************************************
*
*
* Copyright 2008-2010 VMware, Inc.
* All Rights Reserved.
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
**************************************************************************/

View File

@ -28,7 +28,7 @@
/**
* @file
* OS independent time-manipulation functions.
*
*
* @author Jose Fonseca <jfonseca@vmware.com>
*/

View File

@ -28,7 +28,7 @@
/**
* @file
* OS independent time-manipulation functions.
*
*
* @author Jose Fonseca <jfonseca@vmware.com>
*/

View File

@ -19,7 +19,7 @@
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
*
* Authors:
* Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
*/

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2011 Red Hat Inc.
*
*
* block compression parts are:
* Copyright (C) 2004 Roland Scheidegger All Rights Reserved.
*

View File

@ -25,7 +25,7 @@ http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/include/sha1.h?rev=HEAD
Notes:
- The files should not have any local changes. If there are any they should be
clearly documented below and one should aim to upstream them where possible.
- Files will be periodically syncronised with the respective upstream sources.
Updates will be made regularly, but since the code is _not_ aimed as a
cryptography solution any issues found should not be considered security ones.

View File

@ -4,7 +4,7 @@
*
* Intended to work with a list sentinal which is created as an empty
* list. Insert & delete are O(1).
*
*
* \author
* (C) 1997, Keith Whitwell
*/
@ -159,19 +159,19 @@ do { \
/**
* Test whether element is at end of the list.
*
*
* \param list list.
* \param elem element.
*
*
* \return non-zero if element is at end of list, or zero otherwise.
*/
#define at_end(list, elem) ((elem) == (list))
/**
* Test if a list is empty.
*
*
* \param list list.
*
*
* \return non-zero if list empty, or zero otherwise.
*/
#define is_empty_list(list) ((list)->next == (list))
@ -193,7 +193,7 @@ do { \
*
* Same as #foreach but lets you unlink the current value during a list
* traversal. Useful for freeing a list, element by element.
*
*
* \param ptr pointer to the current element.
* \param t temporary pointer.
* \param list list.

View File

@ -46,7 +46,7 @@ TEST(u_qsort_test, qsort_test)
util_qsort_r(data, GTEST_ARRAY_SIZE_(data),
sizeof(data[0]), cmp_func,
reinterpret_cast<void *>(&ctx));
for (size_t i = 0; i < GTEST_ARRAY_SIZE_(data); ++i) {
EXPECT_EQ(data[i], i + 1);
}

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2011 Red Hat Inc.
*
*
* block compression parts are:
* Copyright (C) 2004 Roland Scheidegger All Rights Reserved.
*

View File

@ -82,7 +82,7 @@
/* Unlocked version for single threaded environments, such as some
* windows kernel modules.
*/
#if defined(PIPE_ATOMIC_OS_UNLOCKED)
#if defined(PIPE_ATOMIC_OS_UNLOCKED)
#define PIPE_ATOMIC "Unlocked"

View File

@ -1,5 +1,5 @@
/**************************************************************************
*
*
* Copyright 2008 Dennis Smit
* All Rights Reserved.
*
@ -21,7 +21,7 @@
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
**************************************************************************/
/**

View File

@ -1,5 +1,5 @@
/**************************************************************************
*
*
* Copyright 2008 Dennis Smit
* All Rights Reserved.
*

View File

@ -1,8 +1,8 @@
/**************************************************************************
*
*
* Copyright 2008 VMware, Inc.
* All Rights Reserved.
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@ -22,16 +22,16 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
**************************************************************************/
/**
* @file
* Cross-platform debugging helpers.
*
* For now it just has assert and printf replacements, but it might be extended
* with stack trace reports and more advanced logging in the near future.
*
*
* For now it just has assert and printf replacements, but it might be extended
* with stack trace reports and more advanced logging in the near future.
*
* @author Jose Fonseca <jfonseca@vmware.com>
*/
@ -62,7 +62,7 @@ extern "C" {
#define _util_printf_format(fmt, list) PRINTFLIKE(fmt, list)
void _debug_vprintf(const char *format, va_list ap);
static inline void
_debug_printf(const char *format, ...)
@ -164,9 +164,9 @@ debug_get_version_option(const char *name, unsigned *major, unsigned *minor);
#ifdef _MSC_VER
__declspec(noreturn)
#endif
void _debug_assert_fail(const char *expr,
const char *file,
unsigned line,
void _debug_assert_fail(const char *expr,
const char *file,
unsigned line,
const char *function)
#if defined(__GNUC__) && !defined(DEBUG)
__attribute__((noreturn))
@ -174,10 +174,10 @@ void _debug_assert_fail(const char *expr,
;
/**
/**
* Assert macro
*
* Do not expect that the assert call terminates -- errors must be handled
*
* Do not expect that the assert call terminates -- errors must be handled
* regardless of assert behavior.
*
* For non debug builds the assert macro will expand to a no-op, so do not
@ -205,7 +205,7 @@ void _debug_assert_fail(const char *expr,
_debug_printf("%s\n", __FUNCTION__)
#else
#define debug_checkpoint() \
((void)0)
((void)0)
#endif
@ -217,7 +217,7 @@ void _debug_assert_fail(const char *expr,
_debug_printf("%s:%u:%s\n", __FILE__, __LINE__, __FUNCTION__)
#else
#define debug_checkpoint_full() \
((void)0)
((void)0)
#endif
@ -229,7 +229,7 @@ void _debug_assert_fail(const char *expr,
_debug_printf("%s:%u:%s: warning: %s\n", __FILE__, __LINE__, __FUNCTION__, __msg)
#else
#define debug_warning(__msg) \
((void)0)
((void)0)
#endif
@ -248,7 +248,7 @@ void _debug_assert_fail(const char *expr,
} while (0)
#else
#define debug_warn_once(__msg) \
((void)0)
((void)0)
#endif
@ -257,7 +257,7 @@ void _debug_assert_fail(const char *expr,
*/
#ifdef DEBUG
#define debug_error(__msg) \
_debug_printf("%s:%u:%s: error: %s\n", __FILE__, __LINE__, __FUNCTION__, __msg)
_debug_printf("%s:%u:%s: error: %s\n", __FILE__, __LINE__, __FUNCTION__, __msg)
#else
#define debug_error(__msg) \
_debug_printf("error: %s\n", __msg)
@ -298,7 +298,7 @@ struct debug_named_value
/**
* Some C pre-processor magic to simplify creating named values.
*
*
* Example:
* @code
* static const debug_named_value my_names[] = {
@ -307,9 +307,9 @@ struct debug_named_value
* DEBUG_NAMED_VALUE(MY_ENUM_VALUE_Z),
* DEBUG_NAMED_VALUE_END
* };
*
*
* ...
* debug_printf("%s = %s\n",
* debug_printf("%s = %s\n",
* name,
* debug_dump_enum(my_names, my_value));
* ...
@ -324,11 +324,11 @@ struct debug_named_value
* Convert a enum value to a string.
*/
const char *
debug_dump_enum(const struct debug_named_value *names,
debug_dump_enum(const struct debug_named_value *names,
unsigned long value);
const char *
debug_dump_enum_noprefix(const struct debug_named_value *names,
debug_dump_enum_noprefix(const struct debug_named_value *names,
const char *prefix,
unsigned long value);
@ -337,7 +337,7 @@ debug_dump_enum_noprefix(const struct debug_named_value *names,
* Convert binary flags value to a string.
*/
const char *
debug_dump_flags(const struct debug_named_value *names,
debug_dump_flags(const struct debug_named_value *names,
unsigned long value);
@ -380,14 +380,14 @@ void debug_funclog_enter_exit(const char* f, const int line, const char* file);
/**
* Get option.
*
* It is an alias for getenv on Linux.
*
* On Windows it reads C:\gallium.cfg, which is a text file with CR+LF line
*
* It is an alias for getenv on Linux.
*
* On Windows it reads C:\gallium.cfg, which is a text file with CR+LF line
* endings with one option per line as
*
*
* NAME=value
*
*
* This file must be terminated with an extra empty line.
*/
const char *
@ -400,7 +400,7 @@ long
debug_get_num_option(const char *name, long dfault);
uint64_t
debug_get_flags_option(const char *name,
debug_get_flags_option(const char *name,
const struct debug_named_value *flags,
uint64_t dfault);

View File

@ -1,5 +1,5 @@
/**************************************************************************
*
*
* Copyright 2009 VMware, Inc.
* All Rights Reserved.
*
@ -75,7 +75,7 @@ symbol_name_cached(unw_cursor_t *cursor, unw_proc_info_t *pip)
procname[1] = 0;
}
if (asprintf(&name, "%s%s", procname, ret == -UNW_ENOMEM ? "..." : "") == -1)
if (asprintf(&name, "%s%s", procname, ret == -UNW_ENOMEM ? "..." : "") == -1)
name = "??";
entry = _mesa_hash_table_insert(symbols_hash, addr, (void*)name);
}

View File

@ -1,8 +1,8 @@
/**************************************************************************
*
*
* Copyright 2009 VMware, Inc.
* All Rights Reserved.
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
**************************************************************************/
#ifndef U_DEBUG_STACK_H_
@ -38,7 +38,7 @@
/**
* @file
* Stack backtracing.
*
*
* @author Jose Fonseca <jfonseca@vmware.com>
*/
@ -57,7 +57,7 @@ extern "C" {
*
* TODO: This should be refactored as a void * typedef.
*/
struct debug_stack_frame
struct debug_stack_frame
{
#if defined(HAVE_ANDROID_PLATFORM) || defined(HAVE_LIBUNWIND)
const char *procname;
@ -73,11 +73,11 @@ struct debug_stack_frame
void
debug_backtrace_capture(struct debug_stack_frame *backtrace,
unsigned start_frame,
unsigned start_frame,
unsigned nr_frames);
void
debug_backtrace_dump(const struct debug_stack_frame *backtrace,
debug_backtrace_dump(const struct debug_stack_frame *backtrace,
unsigned nr_frames);
void

View File

@ -1,8 +1,8 @@
/**************************************************************************
*
*
* Copyright 2009 VMware, Inc.
* All Rights Reserved.
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@ -22,13 +22,13 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
**************************************************************************/
/**
* @file
* Symbol lookup.
*
*
* @author Jose Fonseca <jfonseca@vmware.com>
*/
@ -42,7 +42,7 @@
#if defined(PIPE_OS_WINDOWS)
#include <windows.h>
#include <stddef.h>

View File

@ -1,8 +1,8 @@
/**************************************************************************
*
*
* Copyright 2009 VMware, Inc.
* All Rights Reserved.
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
**************************************************************************/
#ifndef U_DEBUG_SYMBOL_H_
@ -32,7 +32,7 @@
/**
* @file
* Symbol lookup.
*
*
* @author Jose Fonseca <jfonseca@vmware.com>
*/

View File

@ -1,8 +1,8 @@
/**************************************************************************
*
*
* Copyright 2007-2008 VMware, Inc.
* All Rights Reserved.
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
**************************************************************************/
#ifndef U_ENDIAN_H
#define U_ENDIAN_H

View File

@ -1,8 +1,8 @@
/**************************************************************************
*
*
* Copyright 2008 VMware, Inc.
* All Rights Reserved.
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
**************************************************************************/
@ -45,7 +45,7 @@
float log2_table[LOG2_TABLE_SIZE];
static void
static void
init_log2_table(void)
{
unsigned i;

View File

@ -1,8 +1,8 @@
/**************************************************************************
*
*
* Copyright 2008 VMware, Inc.
* All Rights Reserved.
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
**************************************************************************/
@ -156,7 +156,7 @@ util_ifloor(float f)
static inline int
util_iround(float f)
{
#if defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86)
#if defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86)
int r;
__asm__ ("fistpl %0" : "=m" (r) : "t" (f) : "st");
return r;

View File

@ -1,8 +1,8 @@
/**************************************************************************
*
*
* Copyright 2008 VMware, Inc.
* All Rights Reserved.
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
**************************************************************************/

View File

@ -15,9 +15,9 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* WITTAWAT YAMWONG, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* WITTAWAT YAMWONG, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
**************************************************************************/
@ -70,14 +70,14 @@ struct mem_block *
u_mmInit(int ofs, int size)
{
struct mem_block *heap, *block;
if (size <= 0)
if (size <= 0)
return NULL;
heap = CALLOC_STRUCT(mem_block);
if (!heap)
if (!heap)
return NULL;
block = CALLOC_STRUCT(mem_block);
if (!block) {
FREE(heap);
@ -104,8 +104,8 @@ u_mmInit(int ofs, int size)
static struct mem_block *
SliceBlock(struct mem_block *p,
int startofs, int size,
SliceBlock(struct mem_block *p,
int startofs, int size,
int reserved, UNUSED int alignment)
{
struct mem_block *newblock;
@ -153,14 +153,14 @@ SliceBlock(struct mem_block *p,
newblock->prev_free = p;
p->next_free->prev_free = newblock;
p->next_free = newblock;
p->size = size;
}
/* p = middle block */
p->free = 0;
/* Remove p from the free list:
/* Remove p from the free list:
*/
p->next_free->prev_free = p->prev_free;
p->prev_free->next_free = p->next_free;
@ -203,7 +203,7 @@ u_mmAllocMem(struct mem_block *heap, int size, int align2, int startSearch)
break;
}
if (p == heap)
if (p == heap)
return NULL;
assert(p->free);
@ -219,7 +219,7 @@ u_mmFindBlock(struct mem_block *heap, int start)
struct mem_block *p;
for (p = heap->next; p != heap; p = p->next) {
if (p->ofs == start)
if (p->ofs == start)
return p;
}
@ -243,9 +243,9 @@ Join2Blocks(struct mem_block *p)
p->next = q->next;
q->next->prev = p;
q->next_free->prev_free = q->prev_free;
q->next_free->prev_free = q->prev_free;
q->prev_free->next_free = q->next_free;
FREE(q);
return 1;
}

View File

@ -15,9 +15,9 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* KEITH WHITWELL, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* KEITH WHITWELL, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
**************************************************************************/
@ -45,7 +45,7 @@ struct mem_block {
/**
/**
* input: total size in bytes
* return: a heap pointer if OK, NULL if error
*/
@ -61,7 +61,7 @@ extern struct mem_block *u_mmInit(int ofs, int size);
* startSearch = linear offset from start of heap to begin search
* return: pointer to the allocated block, 0 if error
*/
extern struct mem_block *u_mmAllocMem(struct mem_block *heap, int size, int align2,
extern struct mem_block *u_mmAllocMem(struct mem_block *heap, int size, int align2,
int startSearch);
/**

View File

@ -46,7 +46,7 @@ util_tls_qsort_r(void *base, size_t nmemb, size_t size,
int
util_qsort_adapter(void *ctx, const void *elem1, const void *elem2)
{
util_qsort_adapter_data *data =
util_qsort_adapter_data *data =
reinterpret_cast<util_qsort_adapter_data*>(ctx);
return data->compar(elem1, elem2, data->args);
}

View File

@ -1,9 +1,9 @@
/**************************************************************************
*
*
* Copyright 1999-2006 Brian Paul
* Copyright 2008 VMware, Inc.
* All Rights Reserved.
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation

View File

@ -21,7 +21,7 @@
* IN THE SOFTWARE.
*/
/*
/*
* u_vector is a vector based queue for storing arbitrary
* sized arrays of objects without using a linked list.
*/

View File

@ -15,11 +15,11 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* FELIX KUEHLING, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* FELIX KUEHLING, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
*/
/**
* \file xmlconfig.c

View File

@ -15,11 +15,11 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* FELIX KUEHLING, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* FELIX KUEHLING, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
*/
/**
* \file xmlconfig.h