From 69c2a472c25c909c58e387af2bace3d847d51003 Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Wed, 17 Mar 2021 15:05:35 -0700 Subject: [PATCH] u_format: Add restrict to fn pointer and manual format pack/unpack/fetch MSVC warns (loudly) about a mismatch between the generated functions in u_format_table.c and the definition of util_format_[un]pack_description, specifically having 'restrict' in the function but not in the pointer type in the struct. So, add 'restrict' everywhere - to the function types, and to the rest of the implementations that are assigned to those structs. v2: util_format_unpack_description is used in gallium/auxiliary/translate Fixes: 5785fdac ("u_format: Mark the generated pack/unpack src/dst args as restrict.") Reviewed-by: Eric Anholt Part-of: --- .../auxiliary/translate/translate_generic.c | 4 +- src/util/format/u_format.h | 54 ++--- src/util/format/u_format_bptc.c | 72 +++--- src/util/format/u_format_bptc.h | 72 +++--- src/util/format/u_format_etc.c | 14 +- src/util/format/u_format_etc.h | 10 +- src/util/format/u_format_fxt1.c | 46 ++-- src/util/format/u_format_fxt1.h | 24 +- src/util/format/u_format_latc.c | 56 ++--- src/util/format/u_format_latc.h | 48 ++-- src/util/format/u_format_other.c | 54 ++--- src/util/format/u_format_other.h | 54 ++--- src/util/format/u_format_rgtc.c | 60 ++--- src/util/format/u_format_rgtc.h | 52 ++--- src/util/format/u_format_s3tc.c | 136 ++++++------ src/util/format/u_format_s3tc.h | 96 ++++---- src/util/format/u_format_yuv.c | 72 +++--- src/util/format/u_format_yuv.h | 72 +++--- src/util/format/u_format_zs.c | 210 +++++++++--------- src/util/format/u_format_zs.h | 110 ++++----- 20 files changed, 658 insertions(+), 658 deletions(-) diff --git a/src/gallium/auxiliary/translate/translate_generic.c b/src/gallium/auxiliary/translate/translate_generic.c index 3f07a58fc84..123f077386f 100644 --- a/src/gallium/auxiliary/translate/translate_generic.c +++ b/src/gallium/auxiliary/translate/translate_generic.c @@ -50,8 +50,8 @@ struct translate_generic { struct { enum translate_element_type type; - void (*fetch)(void *dst, unsigned dst_stride, - const uint8_t *src, unsigned src_stride, + void (*fetch)(void *restrict dst, unsigned dst_stride, + const uint8_t *restrict src, unsigned src_stride, unsigned width, unsigned height); unsigned buffer; unsigned input_offset; diff --git a/src/util/format/u_format.h b/src/util/format/u_format.h index 250489bcd57..c64d02e43f4 100644 --- a/src/util/format/u_format.h +++ b/src/util/format/u_format.h @@ -250,8 +250,8 @@ struct util_format_pack_description { * Only defined for non-depth-stencil formats. */ void - (*pack_rgba_8unorm)(uint8_t *dst, unsigned dst_stride, - const uint8_t *src, unsigned src_stride, + (*pack_rgba_8unorm)(uint8_t *restrict dst, unsigned dst_stride, + const uint8_t *restrict src, unsigned src_stride, unsigned width, unsigned height); /** @@ -261,8 +261,8 @@ struct util_format_pack_description { * Only defined for non-depth-stencil formats. */ void - (*pack_rgba_float)(uint8_t *dst, unsigned dst_stride, - const float *src, unsigned src_stride, + (*pack_rgba_float)(uint8_t *restrict dst, unsigned dst_stride, + const float *restrict src, unsigned src_stride, unsigned width, unsigned height); /** @@ -272,8 +272,8 @@ struct util_format_pack_description { * Only defined for depth formats. */ void - (*pack_z_32unorm)(uint8_t *dst, unsigned dst_stride, - const uint32_t *src, unsigned src_stride, + (*pack_z_32unorm)(uint8_t *restrict dst, unsigned dst_stride, + const uint32_t *restrict src, unsigned src_stride, unsigned width, unsigned height); /** @@ -283,8 +283,8 @@ struct util_format_pack_description { * Only defined for depth formats. */ void - (*pack_z_float)(uint8_t *dst, unsigned dst_stride, - const float *src, unsigned src_stride, + (*pack_z_float)(uint8_t *restrict dst, unsigned dst_stride, + const float *restrict src, unsigned src_stride, unsigned width, unsigned height); /** @@ -294,18 +294,18 @@ struct util_format_pack_description { * Only defined for stencil formats. */ void - (*pack_s_8uint)(uint8_t *dst, unsigned dst_stride, - const uint8_t *src, unsigned src_stride, + (*pack_s_8uint)(uint8_t *restrict dst, unsigned dst_stride, + const uint8_t *restrict src, unsigned src_stride, unsigned width, unsigned height); void - (*pack_rgba_uint)(uint8_t *dst, unsigned dst_stride, - const uint32_t *src, unsigned src_stride, + (*pack_rgba_uint)(uint8_t *restrict dst, unsigned dst_stride, + const uint32_t *restrict src, unsigned src_stride, unsigned width, unsigned height); void - (*pack_rgba_sint)(uint8_t *dst, unsigned dst_stride, - const int32_t *src, unsigned src_stride, + (*pack_rgba_sint)(uint8_t *restrict dst, unsigned dst_stride, + const int32_t *restrict src, unsigned src_stride, unsigned width, unsigned height); }; @@ -318,8 +318,8 @@ struct util_format_unpack_description { * Only defined for non-depth-stencil formats. */ void - (*unpack_rgba_8unorm)(uint8_t *dst, unsigned dst_stride, - const uint8_t *src, unsigned src_stride, + (*unpack_rgba_8unorm)(uint8_t *restrict dst, unsigned dst_stride, + const uint8_t *restrict src, unsigned src_stride, unsigned width, unsigned height); /** @@ -328,8 +328,8 @@ struct util_format_unpack_description { * XXX: Only defined for a very few select formats. */ void - (*fetch_rgba_8unorm)(uint8_t *dst, - const uint8_t *src, + (*fetch_rgba_8unorm)(uint8_t *restrict dst, + const uint8_t *restrict src, unsigned i, unsigned j); /** @@ -341,8 +341,8 @@ struct util_format_unpack_description { * Only defined for non-depth-stencil formats. */ void - (*unpack_rgba)(void *dst, unsigned dst_stride, - const uint8_t *src, unsigned src_stride, + (*unpack_rgba)(void *restrict dst, unsigned dst_stride, + const uint8_t *restrict src, unsigned src_stride, unsigned width, unsigned height); /** @@ -352,8 +352,8 @@ struct util_format_unpack_description { * Only defined for depth formats. */ void - (*unpack_z_32unorm)(uint32_t *dst, unsigned dst_stride, - const uint8_t *src, unsigned src_stride, + (*unpack_z_32unorm)(uint32_t *restrict dst, unsigned dst_stride, + const uint8_t *restrict src, unsigned src_stride, unsigned width, unsigned height); /** @@ -363,8 +363,8 @@ struct util_format_unpack_description { * Only defined for depth formats. */ void - (*unpack_z_float)(float *dst, unsigned dst_stride, - const uint8_t *src, unsigned src_stride, + (*unpack_z_float)(float *restrict dst, unsigned dst_stride, + const uint8_t *restrict src, unsigned src_stride, unsigned width, unsigned height); /** @@ -374,12 +374,12 @@ struct util_format_unpack_description { * Only defined for stencil formats. */ void - (*unpack_s_8uint)(uint8_t *dst, unsigned dst_stride, - const uint8_t *src, unsigned src_stride, + (*unpack_s_8uint)(uint8_t *restrict dst, unsigned dst_stride, + const uint8_t *restrict src, unsigned src_stride, unsigned width, unsigned height); }; -typedef void (*util_format_fetch_rgba_func_ptr)(void *dst, const uint8_t *src, +typedef void (*util_format_fetch_rgba_func_ptr)(void *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); /* Silence warnings triggered by sharing function/struct names */ diff --git a/src/util/format/u_format_bptc.c b/src/util/format/u_format_bptc.c index 33709746571..7358124dde2 100644 --- a/src/util/format/u_format_bptc.c +++ b/src/util/format/u_format_bptc.c @@ -33,8 +33,8 @@ #include "../../mesa/main/texcompress_bptc_tmp.h" void -util_format_bptc_rgba_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_bptc_rgba_unorm_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { decompress_rgba_unorm(width, height, @@ -43,8 +43,8 @@ util_format_bptc_rgba_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_st } void -util_format_bptc_rgba_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_bptc_rgba_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) { compress_rgba_unorm(width, height, @@ -53,8 +53,8 @@ util_format_bptc_rgba_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stri } void -util_format_bptc_rgba_unorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_bptc_rgba_unorm_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { uint8_t *temp_block; @@ -70,8 +70,8 @@ util_format_bptc_rgba_unorm_unpack_rgba_float(void *dst_row, unsigned dst_stride } void -util_format_bptc_rgba_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, +util_format_bptc_rgba_unorm_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { uint8_t *temp_block; @@ -87,7 +87,7 @@ util_format_bptc_rgba_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_strid } void -util_format_bptc_rgba_unorm_fetch_rgba(void *dst, const uint8_t *src, +util_format_bptc_rgba_unorm_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned width, unsigned height) { uint8_t temp_block[4]; @@ -102,8 +102,8 @@ util_format_bptc_rgba_unorm_fetch_rgba(void *dst, const uint8_t *src, } void -util_format_bptc_srgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_bptc_srgba_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { decompress_rgba_unorm(width, height, @@ -112,8 +112,8 @@ util_format_bptc_srgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, } void -util_format_bptc_srgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_bptc_srgba_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { compress_rgba_unorm(width, height, @@ -122,8 +122,8 @@ util_format_bptc_srgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, } void -util_format_bptc_srgba_unpack_rgba_float(void *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_bptc_srgba_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { uint8_t *temp_block; @@ -139,8 +139,8 @@ util_format_bptc_srgba_unpack_rgba_float(void *dst_row, unsigned dst_stride, } void -util_format_bptc_srgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, +util_format_bptc_srgba_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { compress_rgb_float(width, height, @@ -150,7 +150,7 @@ util_format_bptc_srgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, } void -util_format_bptc_srgba_fetch_rgba(void *dst, const uint8_t *src, +util_format_bptc_srgba_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned width, unsigned height) { uint8_t temp_block[4]; @@ -161,8 +161,8 @@ util_format_bptc_srgba_fetch_rgba(void *dst, const uint8_t *src, } void -util_format_bptc_rgb_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_bptc_rgb_float_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { float *temp_block; @@ -179,8 +179,8 @@ util_format_bptc_rgb_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_str } void -util_format_bptc_rgb_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_bptc_rgb_float_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { compress_rgba_unorm(width, height, @@ -189,8 +189,8 @@ util_format_bptc_rgb_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_strid } void -util_format_bptc_rgb_float_unpack_rgba_float(void *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_bptc_rgb_float_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { decompress_rgb_float(width, height, @@ -200,8 +200,8 @@ util_format_bptc_rgb_float_unpack_rgba_float(void *dst_row, unsigned dst_stride, } void -util_format_bptc_rgb_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, +util_format_bptc_rgb_float_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { compress_rgb_float(width, height, @@ -211,7 +211,7 @@ util_format_bptc_rgb_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride } void -util_format_bptc_rgb_float_fetch_rgba(void *dst, const uint8_t *src, +util_format_bptc_rgb_float_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned width, unsigned height) { fetch_rgb_float_from_block(src + ((width * sizeof(uint8_t)) * (height / 4) + (width / 4)) * 16, @@ -219,8 +219,8 @@ util_format_bptc_rgb_float_fetch_rgba(void *dst, const uint8_t *src, } void -util_format_bptc_rgb_ufloat_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_bptc_rgb_ufloat_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { float *temp_block; @@ -237,8 +237,8 @@ util_format_bptc_rgb_ufloat_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_st } void -util_format_bptc_rgb_ufloat_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_bptc_rgb_ufloat_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { compress_rgba_unorm(width, height, @@ -247,8 +247,8 @@ util_format_bptc_rgb_ufloat_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stri } void -util_format_bptc_rgb_ufloat_unpack_rgba_float(void *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_bptc_rgb_ufloat_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { decompress_rgb_float(width, height, @@ -258,8 +258,8 @@ util_format_bptc_rgb_ufloat_unpack_rgba_float(void *dst_row, unsigned dst_stride } void -util_format_bptc_rgb_ufloat_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, +util_format_bptc_rgb_ufloat_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { compress_rgb_float(width, height, @@ -269,7 +269,7 @@ util_format_bptc_rgb_ufloat_pack_rgba_float(uint8_t *dst_row, unsigned dst_strid } void -util_format_bptc_rgb_ufloat_fetch_rgba(void *dst, const uint8_t *src, +util_format_bptc_rgb_ufloat_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned width, unsigned height) { fetch_rgb_float_from_block(src + ((width * sizeof(uint8_t)) * (height / 4) + (width / 4)) * 16, diff --git a/src/util/format/u_format_bptc.h b/src/util/format/u_format_bptc.h index c98a54e902f..cff18c01ef4 100644 --- a/src/util/format/u_format_bptc.h +++ b/src/util/format/u_format_bptc.h @@ -37,83 +37,83 @@ extern "C" { #endif void -util_format_bptc_rgba_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_bptc_rgba_unorm_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_bptc_rgba_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_bptc_rgba_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); void -util_format_bptc_rgba_unorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_bptc_rgba_unorm_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_bptc_rgba_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, +util_format_bptc_rgba_unorm_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_bptc_rgba_unorm_fetch_rgba(void *dst, const uint8_t *src, +util_format_bptc_rgba_unorm_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned width, unsigned height); void -util_format_bptc_srgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_bptc_srgba_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_bptc_srgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_bptc_srgba_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_bptc_srgba_unpack_rgba_float(void *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_bptc_srgba_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_bptc_srgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, +util_format_bptc_srgba_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_bptc_srgba_fetch_rgba(void *dst, const uint8_t *src, +util_format_bptc_srgba_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned width, unsigned height); void -util_format_bptc_rgb_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_bptc_rgb_float_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_bptc_rgb_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_bptc_rgb_float_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_bptc_rgb_float_unpack_rgba_float(void *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_bptc_rgb_float_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_bptc_rgb_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, +util_format_bptc_rgb_float_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_bptc_rgb_float_fetch_rgba(void *dst, const uint8_t *src, +util_format_bptc_rgb_float_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned width, unsigned height); void -util_format_bptc_rgb_ufloat_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_bptc_rgb_ufloat_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_bptc_rgb_ufloat_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_bptc_rgb_ufloat_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_bptc_rgb_ufloat_unpack_rgba_float(void *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_bptc_rgb_ufloat_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_bptc_rgb_ufloat_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, +util_format_bptc_rgb_ufloat_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_bptc_rgb_ufloat_fetch_rgba(void *dst, const uint8_t *src, +util_format_bptc_rgb_ufloat_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned width, unsigned height); #ifdef __cplusplus } diff --git a/src/util/format/u_format_etc.c b/src/util/format/u_format_etc.c index bde940e3ce2..3ad695518ef 100644 --- a/src/util/format/u_format_etc.c +++ b/src/util/format/u_format_etc.c @@ -11,21 +11,21 @@ #undef UINT8_TYPE void -util_format_etc1_rgb8_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_etc1_rgb8_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { etc1_unpack_rgba8888(dst_row, dst_stride, src_row, src_stride, width, height); } void -util_format_etc1_rgb8_pack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride, - UNUSED const uint8_t *src_row, UNUSED unsigned src_stride, +util_format_etc1_rgb8_pack_rgba_8unorm(UNUSED uint8_t *restrict dst_row, UNUSED unsigned dst_stride, + UNUSED const uint8_t *restrict src_row, UNUSED unsigned src_stride, UNUSED unsigned width, UNUSED unsigned height) { assert(0); } void -util_format_etc1_rgb8_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_etc1_rgb8_unpack_rgba_float(void *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, bs = 8, comps = 4; struct etc1_block block; @@ -59,15 +59,15 @@ util_format_etc1_rgb8_unpack_rgba_float(void *dst_row, unsigned dst_stride, cons } void -util_format_etc1_rgb8_pack_rgba_float(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride, - UNUSED const float *src_row, UNUSED unsigned src_stride, +util_format_etc1_rgb8_pack_rgba_float(UNUSED uint8_t *restrict dst_row, UNUSED unsigned dst_stride, + UNUSED const float *restrict src_row, UNUSED unsigned src_stride, UNUSED unsigned width, UNUSED unsigned height) { assert(0); } void -util_format_etc1_rgb8_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, unsigned j) +util_format_etc1_rgb8_fetch_rgba(void *restrict in_dst, const uint8_t *restrict src, unsigned i, unsigned j) { float *dst = in_dst; struct etc1_block block; diff --git a/src/util/format/u_format_etc.h b/src/util/format/u_format_etc.h index 7093552b581..49c6ac17531 100644 --- a/src/util/format/u_format_etc.h +++ b/src/util/format/u_format_etc.h @@ -29,18 +29,18 @@ #define U_FORMAT_ETC1_H_ void -util_format_etc1_rgb8_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_etc1_rgb8_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_etc1_rgb8_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_etc1_rgb8_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_etc1_rgb8_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_etc1_rgb8_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_etc1_rgb8_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_etc1_rgb8_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_etc1_rgb8_fetch_rgba(void *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_etc1_rgb8_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); #endif /* U_FORMAT_ETC1_H_ */ diff --git a/src/util/format/u_format_fxt1.c b/src/util/format/u_format_fxt1.c index 4c2bba906c6..1beee163034 100644 --- a/src/util/format/u_format_fxt1.c +++ b/src/util/format/u_format_fxt1.c @@ -1508,20 +1508,20 @@ fxt1_decode_1 (const void *texture, int32_t stride, /* in pixels */ */ void -util_format_fxt1_rgb_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) +util_format_fxt1_rgb_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j) { fxt1_decode_1(src, 0, i, j, dst); } void -util_format_fxt1_rgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) +util_format_fxt1_rgba_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j) { fxt1_decode_1(src, 0, i, j, dst); dst[3] = 0xff; } void -util_format_fxt1_rgb_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, unsigned j) +util_format_fxt1_rgb_fetch_rgba(void *restrict in_dst, const uint8_t *restrict src, unsigned i, unsigned j) { float *dst = in_dst; uint8_t tmp[4]; @@ -1533,7 +1533,7 @@ util_format_fxt1_rgb_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, un } void -util_format_fxt1_rgba_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, unsigned j) +util_format_fxt1_rgba_fetch_rgba(void *restrict in_dst, const uint8_t *restrict src, unsigned i, unsigned j) { float *dst = in_dst; uint8_t tmp[4]; @@ -1549,8 +1549,8 @@ util_format_fxt1_rgba_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, u */ static inline void -util_format_fxtn_rgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_fxtn_rgb_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height, boolean rgba) { @@ -1574,8 +1574,8 @@ util_format_fxtn_rgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, } void -util_format_fxt1_rgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_fxt1_rgb_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_fxtn_rgb_unpack_rgba_8unorm(dst_row, dst_stride, @@ -1585,8 +1585,8 @@ util_format_fxt1_rgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, } void -util_format_fxt1_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_fxt1_rgba_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_fxtn_rgb_unpack_rgba_8unorm(dst_row, dst_stride, @@ -1597,7 +1597,7 @@ util_format_fxt1_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, static inline void util_format_fxtn_rgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height, boolean rgba) { @@ -1627,8 +1627,8 @@ util_format_fxtn_rgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, } void -util_format_fxt1_rgb_unpack_rgba_float(void *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_fxt1_rgb_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_fxtn_rgb_unpack_rgba_float(dst_row, dst_stride, @@ -1638,8 +1638,8 @@ util_format_fxt1_rgb_unpack_rgba_float(void *dst_row, unsigned dst_stride, } void -util_format_fxt1_rgba_unpack_rgba_float(void *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_fxt1_rgba_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_fxtn_rgb_unpack_rgba_float(dst_row, dst_stride, @@ -1653,8 +1653,8 @@ util_format_fxt1_rgba_unpack_rgba_float(void *dst_row, unsigned dst_stride, */ void -util_format_fxt1_rgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src, unsigned src_stride, +util_format_fxt1_rgb_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src, unsigned src_stride, unsigned width, unsigned height) { /* The encoder for FXT1_RGB wants 24bpp packed rgb, so make a temporary to do that. @@ -1679,16 +1679,16 @@ util_format_fxt1_rgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, } void -util_format_fxt1_rgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src, unsigned src_stride, +util_format_fxt1_rgba_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src, unsigned src_stride, unsigned width, unsigned height) { fxt1_encode(width, height, 4, src, src_stride, dst_row, dst_stride); } void -util_format_fxt1_rgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src, unsigned src_stride, +util_format_fxt1_rgb_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src, unsigned src_stride, unsigned width, unsigned height) { int temp_stride = width * 4; @@ -1708,8 +1708,8 @@ util_format_fxt1_rgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, } void -util_format_fxt1_rgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src, unsigned src_stride, +util_format_fxt1_rgba_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src, unsigned src_stride, unsigned width, unsigned height) { int temp_stride = width * 4; diff --git a/src/util/format/u_format_fxt1.h b/src/util/format/u_format_fxt1.h index 5aa8d675d8e..2b8cea25b94 100644 --- a/src/util/format/u_format_fxt1.h +++ b/src/util/format/u_format_fxt1.h @@ -37,40 +37,40 @@ extern "C" { #endif void -util_format_fxt1_rgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_fxt1_rgb_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_fxt1_rgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_fxt1_rgb_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_fxt1_rgb_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_fxt1_rgb_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_fxt1_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_fxt1_rgba_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_fxt1_rgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_fxt1_rgba_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_fxt1_rgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_fxt1_rgba_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_fxt1_rgb_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_fxt1_rgb_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_fxt1_rgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_fxt1_rgb_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_fxt1_rgb_fetch_rgba(void *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_fxt1_rgb_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_fxt1_rgba_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_fxt1_rgba_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_fxt1_rgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_fxt1_rgba_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_fxt1_rgba_fetch_rgba(void *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_fxt1_rgba_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); #ifdef __cplusplus } diff --git a/src/util/format/u_format_latc.c b/src/util/format/u_format_latc.c index 7c96c6601bd..f6e6e8263d6 100644 --- a/src/util/format/u_format_latc.c +++ b/src/util/format/u_format_latc.c @@ -30,7 +30,7 @@ #include "util/u_math.h" void -util_format_latc1_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) +util_format_latc1_unorm_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j) { /* Fix warnings here: */ (void) util_format_unsigned_encode_rgtc_ubyte; @@ -43,20 +43,20 @@ util_format_latc1_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsi } void -util_format_latc1_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_latc1_unorm_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_rgtc1_unorm_unpack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, width, height); } void -util_format_latc1_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, +util_format_latc1_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) { util_format_rgtc1_unorm_pack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, width, height); } void -util_format_latc1_unorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_latc1_unorm_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y, i, j; int block_size = 8; @@ -82,13 +82,13 @@ util_format_latc1_unorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, co } void -util_format_latc1_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_latc1_unorm_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_rgtc1_unorm_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height); } void -util_format_latc1_unorm_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, unsigned j) +util_format_latc1_unorm_fetch_rgba(void *restrict in_dst, const uint8_t *restrict src, unsigned i, unsigned j) { float *dst = in_dst; uint8_t tmp_r; @@ -101,36 +101,36 @@ util_format_latc1_unorm_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, } void -util_format_latc1_snorm_fetch_rgba_8unorm(UNUSED uint8_t *dst, UNUSED const uint8_t *src, +util_format_latc1_snorm_fetch_rgba_8unorm(UNUSED uint8_t *restrict dst, UNUSED const uint8_t *restrict src, UNUSED unsigned i, UNUSED unsigned j) { fprintf(stderr,"%s\n", __func__); } void -util_format_latc1_snorm_unpack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride, - UNUSED const uint8_t *src_row, UNUSED unsigned src_stride, +util_format_latc1_snorm_unpack_rgba_8unorm(UNUSED uint8_t *restrict dst_row, UNUSED unsigned dst_stride, + UNUSED const uint8_t *restrict src_row, UNUSED unsigned src_stride, UNUSED unsigned width, UNUSED unsigned height) { fprintf(stderr,"%s\n", __func__); } void -util_format_latc1_snorm_pack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride, - UNUSED const uint8_t *src_row, UNUSED unsigned src_stride, +util_format_latc1_snorm_pack_rgba_8unorm(UNUSED uint8_t *restrict dst_row, UNUSED unsigned dst_stride, + UNUSED const uint8_t *restrict src_row, UNUSED unsigned src_stride, UNUSED unsigned width, UNUSED unsigned height) { fprintf(stderr,"%s\n", __func__); } void -util_format_latc1_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_latc1_snorm_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_rgtc1_snorm_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height); } void -util_format_latc1_snorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_latc1_snorm_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y, i, j; int block_size = 8; @@ -156,7 +156,7 @@ util_format_latc1_snorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, co } void -util_format_latc1_snorm_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, unsigned j) +util_format_latc1_snorm_fetch_rgba(void *restrict in_dst, const uint8_t *restrict src, unsigned i, unsigned j) { float *dst = in_dst; int8_t tmp_r; @@ -170,7 +170,7 @@ util_format_latc1_snorm_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, void -util_format_latc2_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) +util_format_latc2_unorm_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j) { util_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 2); dst[1] = dst[0]; @@ -179,25 +179,25 @@ util_format_latc2_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsi } void -util_format_latc2_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_latc2_unorm_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_rgtc2_unorm_unpack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, width, height); } void -util_format_latc2_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_latc2_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) { util_format_rgtc2_unorm_pack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, width, height); } void -util_format_latc2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_latc2_unorm_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_rxtc2_unorm_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height, 3); } void -util_format_latc2_unorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_latc2_unorm_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y, i, j; int block_size = 16; @@ -224,7 +224,7 @@ util_format_latc2_unorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, co } void -util_format_latc2_unorm_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, unsigned j) +util_format_latc2_unorm_fetch_rgba(void *restrict in_dst, const uint8_t *restrict src, unsigned i, unsigned j) { float *dst = in_dst; uint8_t tmp_r, tmp_g; @@ -239,30 +239,30 @@ util_format_latc2_unorm_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, void -util_format_latc2_snorm_fetch_rgba_8unorm(UNUSED uint8_t *dst, UNUSED const uint8_t *src, +util_format_latc2_snorm_fetch_rgba_8unorm(UNUSED uint8_t *restrict dst, UNUSED const uint8_t *restrict src, UNUSED unsigned i, UNUSED unsigned j) { fprintf(stderr,"%s\n", __func__); } void -util_format_latc2_snorm_unpack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride, - UNUSED const uint8_t *src_row, UNUSED unsigned src_stride, +util_format_latc2_snorm_unpack_rgba_8unorm(UNUSED uint8_t *restrict dst_row, UNUSED unsigned dst_stride, + UNUSED const uint8_t *restrict src_row, UNUSED unsigned src_stride, UNUSED unsigned width, UNUSED unsigned height) { fprintf(stderr,"%s\n", __func__); } void -util_format_latc2_snorm_pack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride, - UNUSED const uint8_t *src_row, UNUSED unsigned src_stride, +util_format_latc2_snorm_pack_rgba_8unorm(UNUSED uint8_t *restrict dst_row, UNUSED unsigned dst_stride, + UNUSED const uint8_t *restrict src_row, UNUSED unsigned src_stride, UNUSED unsigned width, UNUSED unsigned height) { fprintf(stderr,"%s\n", __func__); } void -util_format_latc2_snorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_latc2_snorm_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y, i, j; int block_size = 16; @@ -289,13 +289,13 @@ util_format_latc2_snorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, co } void -util_format_latc2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_latc2_snorm_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_rxtc2_snorm_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height, 3); } void -util_format_latc2_snorm_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, unsigned j) +util_format_latc2_snorm_fetch_rgba(void *restrict in_dst, const uint8_t *restrict src, unsigned i, unsigned j) { float *dst = in_dst; int8_t tmp_r, tmp_g; diff --git a/src/util/format/u_format_latc.h b/src/util/format/u_format_latc.h index d28bb844842..db267daff46 100644 --- a/src/util/format/u_format_latc.h +++ b/src/util/format/u_format_latc.h @@ -29,80 +29,80 @@ #define U_FORMAT_LATC_H_ void -util_format_latc1_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_latc1_unorm_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_latc1_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_latc1_unorm_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_latc1_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_latc1_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); void -util_format_latc1_unorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_latc1_unorm_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_latc1_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_latc1_unorm_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_latc1_unorm_fetch_rgba(void *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_latc1_unorm_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_latc1_snorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_latc1_snorm_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_latc1_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_latc1_snorm_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_latc1_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_latc1_snorm_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_latc1_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_latc1_snorm_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_latc1_snorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_latc1_snorm_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_latc1_snorm_fetch_rgba(void *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_latc1_snorm_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_latc2_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_latc2_unorm_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_latc2_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_latc2_unorm_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_latc2_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_latc2_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); void -util_format_latc2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_latc2_unorm_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_latc2_unorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_latc2_unorm_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_latc2_unorm_fetch_rgba(void *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_latc2_unorm_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_latc2_snorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_latc2_snorm_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_latc2_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_latc2_snorm_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_latc2_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_latc2_snorm_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_latc2_snorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_latc2_snorm_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_latc2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_latc2_snorm_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_latc2_snorm_fetch_rgba(void *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_latc2_snorm_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); #endif diff --git a/src/util/format/u_format_other.c b/src/util/format/u_format_other.c index bd68966a580..795ad8cce29 100644 --- a/src/util/format/u_format_other.c +++ b/src/util/format/u_format_other.c @@ -33,8 +33,8 @@ void -util_format_r9g9b9e5_float_unpack_rgba_float(void *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_r9g9b9e5_float_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -54,8 +54,8 @@ util_format_r9g9b9e5_float_unpack_rgba_float(void *dst_row, unsigned dst_stride, } void -util_format_r9g9b9e5_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, +util_format_r9g9b9e5_float_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -74,7 +74,7 @@ util_format_r9g9b9e5_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride } void -util_format_r9g9b9e5_float_fetch_rgba(void *in_dst, const uint8_t *src, +util_format_r9g9b9e5_float_fetch_rgba(void *restrict in_dst, const uint8_t *restrict src, UNUSED unsigned i, UNUSED unsigned j) { float *dst = in_dst; @@ -85,8 +85,8 @@ util_format_r9g9b9e5_float_fetch_rgba(void *in_dst, const uint8_t *src, void -util_format_r9g9b9e5_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_r9g9b9e5_float_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -111,8 +111,8 @@ util_format_r9g9b9e5_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_str void -util_format_r9g9b9e5_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_r9g9b9e5_float_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -137,8 +137,8 @@ util_format_r9g9b9e5_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_strid void -util_format_r11g11b10_float_unpack_rgba_float(void *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_r11g11b10_float_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -158,8 +158,8 @@ util_format_r11g11b10_float_unpack_rgba_float(void *dst_row, unsigned dst_stride } void -util_format_r11g11b10_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, +util_format_r11g11b10_float_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -178,7 +178,7 @@ util_format_r11g11b10_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_strid } void -util_format_r11g11b10_float_fetch_rgba(void *in_dst, const uint8_t *src, +util_format_r11g11b10_float_fetch_rgba(void *restrict in_dst, const uint8_t *restrict src, UNUSED unsigned i, UNUSED unsigned j) { float *dst = in_dst; @@ -189,8 +189,8 @@ util_format_r11g11b10_float_fetch_rgba(void *in_dst, const uint8_t *src, void -util_format_r11g11b10_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_r11g11b10_float_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -215,8 +215,8 @@ util_format_r11g11b10_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_st void -util_format_r11g11b10_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_r11g11b10_float_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -256,8 +256,8 @@ r8g8bx_derive(int16_t r, int16_t g) } void -util_format_r8g8bx_snorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_r8g8bx_snorm_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -285,8 +285,8 @@ util_format_r8g8bx_snorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, void -util_format_r8g8bx_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_r8g8bx_snorm_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -313,8 +313,8 @@ util_format_r8g8bx_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_strid void -util_format_r8g8bx_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, +util_format_r8g8bx_snorm_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -338,8 +338,8 @@ util_format_r8g8bx_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, void -util_format_r8g8bx_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_r8g8bx_snorm_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -364,7 +364,7 @@ util_format_r8g8bx_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, void -util_format_r8g8bx_snorm_fetch_rgba(void *in_dst, const uint8_t *src, +util_format_r8g8bx_snorm_fetch_rgba(void *restrict in_dst, const uint8_t *restrict src, UNUSED unsigned i, UNUSED unsigned j) { float *dst = in_dst; diff --git a/src/util/format/u_format_other.h b/src/util/format/u_format_other.h index c02b38a124b..4f656c148f5 100644 --- a/src/util/format/u_format_other.h +++ b/src/util/format/u_format_other.h @@ -34,77 +34,77 @@ void -util_format_r9g9b9e5_float_unpack_rgba_float(void *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_r9g9b9e5_float_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_r9g9b9e5_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, +util_format_r9g9b9e5_float_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_r9g9b9e5_float_fetch_rgba(void *dst, const uint8_t *src, +util_format_r9g9b9e5_float_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_r9g9b9e5_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_r9g9b9e5_float_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_r9g9b9e5_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_r9g9b9e5_float_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_r11g11b10_float_unpack_rgba_float(void *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_r11g11b10_float_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_r11g11b10_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, +util_format_r11g11b10_float_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_r11g11b10_float_fetch_rgba(void *dst, const uint8_t *src, +util_format_r11g11b10_float_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_r11g11b10_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_r11g11b10_float_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_r11g11b10_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_r11g11b10_float_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_r8g8bx_snorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_r8g8bx_snorm_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_r8g8bx_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, +util_format_r8g8bx_snorm_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_r8g8bx_snorm_fetch_rgba(void *dst, const uint8_t *src, +util_format_r8g8bx_snorm_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_r8g8bx_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_r8g8bx_snorm_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_r8g8bx_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_r8g8bx_snorm_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); #endif /* U_FORMAT_OTHER_H_ */ diff --git a/src/util/format/u_format_rgtc.c b/src/util/format/u_format_rgtc.c index fa65a71cd4a..3be378b1903 100644 --- a/src/util/format/u_format_rgtc.c +++ b/src/util/format/u_format_rgtc.c @@ -29,7 +29,7 @@ #include "util/rgtc.h" void -util_format_rgtc1_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) +util_format_rgtc1_unorm_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j) { util_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 1); dst[1] = 0; @@ -38,7 +38,7 @@ util_format_rgtc1_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsi } void -util_format_rgtc1_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_rgtc1_unorm_unpack_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, comps = 4; unsigned x, y, i, j; @@ -63,7 +63,7 @@ util_format_rgtc1_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride } void -util_format_rgtc1_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *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; @@ -86,7 +86,7 @@ util_format_rgtc1_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, } void -util_format_rgtc1_unorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_rgtc1_unorm_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y, i, j; int block_size = 8; @@ -111,7 +111,7 @@ util_format_rgtc1_unorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, co } void -util_format_rgtc1_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_rgtc1_unorm_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { const unsigned bw = 4, bh = 4, bytes_per_block = 8; unsigned x, y, i, j; @@ -133,7 +133,7 @@ util_format_rgtc1_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, c } void -util_format_rgtc1_unorm_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, unsigned j) +util_format_rgtc1_unorm_fetch_rgba(void *restrict in_dst, const uint8_t *restrict src, unsigned i, unsigned j) { float *dst = in_dst; uint8_t tmp_r; @@ -145,30 +145,30 @@ util_format_rgtc1_unorm_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, } void -util_format_rgtc1_snorm_fetch_rgba_8unorm(UNUSED uint8_t *dst, UNUSED const uint8_t *src, +util_format_rgtc1_snorm_fetch_rgba_8unorm(UNUSED uint8_t *restrict dst, UNUSED const uint8_t *restrict src, UNUSED unsigned i, UNUSED unsigned j) { fprintf(stderr,"%s\n", __func__); } void -util_format_rgtc1_snorm_unpack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride, - UNUSED const uint8_t *src_row, UNUSED unsigned src_stride, +util_format_rgtc1_snorm_unpack_rgba_8unorm(UNUSED uint8_t *restrict dst_row, UNUSED unsigned dst_stride, + UNUSED const uint8_t *restrict src_row, UNUSED unsigned src_stride, UNUSED unsigned width, UNUSED unsigned height) { fprintf(stderr,"%s\n", __func__); } void -util_format_rgtc1_snorm_pack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride, - UNUSED const uint8_t *src_row, UNUSED unsigned src_stride, +util_format_rgtc1_snorm_pack_rgba_8unorm(UNUSED uint8_t *restrict dst_row, UNUSED unsigned dst_stride, + UNUSED const uint8_t *restrict src_row, UNUSED unsigned src_stride, UNUSED unsigned width, UNUSED unsigned height) { fprintf(stderr,"%s\n", __func__); } void -util_format_rgtc1_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_rgtc1_snorm_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { const unsigned bw = 4, bh = 4, bytes_per_block = 8; unsigned x, y, i, j; @@ -190,7 +190,7 @@ util_format_rgtc1_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, c } void -util_format_rgtc1_snorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_rgtc1_snorm_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y, i, j; int block_size = 8; @@ -215,7 +215,7 @@ util_format_rgtc1_snorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, co } void -util_format_rgtc1_snorm_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, unsigned j) +util_format_rgtc1_snorm_fetch_rgba(void *restrict in_dst, const uint8_t *restrict src, unsigned i, unsigned j) { float *dst = in_dst; int8_t tmp_r; @@ -228,7 +228,7 @@ util_format_rgtc1_snorm_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, void -util_format_rgtc2_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) +util_format_rgtc2_unorm_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j) { util_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 2); util_format_unsigned_fetch_texel_rgtc(0, src + 8, i, j, dst + 1, 2); @@ -237,7 +237,7 @@ util_format_rgtc2_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsi } void -util_format_rgtc2_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_rgtc2_unorm_unpack_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, comps = 4; unsigned x, y, i, j; @@ -262,7 +262,7 @@ util_format_rgtc2_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride } void -util_format_rgtc2_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_rgtc2_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 = 16; unsigned x, y, i, j; @@ -287,7 +287,7 @@ util_format_rgtc2_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, } void -util_format_rxtc2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height, unsigned chan2off) +util_format_rxtc2_unorm_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height, unsigned chan2off) { const unsigned bw = 4, bh = 4, bytes_per_block = 16; unsigned x, y, i, j; @@ -312,13 +312,13 @@ util_format_rxtc2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, c } void -util_format_rgtc2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_rgtc2_unorm_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_rxtc2_unorm_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height, 1); } void -util_format_rgtc2_unorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_rgtc2_unorm_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y, i, j; int block_size = 16; @@ -344,7 +344,7 @@ util_format_rgtc2_unorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, co } void -util_format_rgtc2_unorm_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, unsigned j) +util_format_rgtc2_unorm_fetch_rgba(void *restrict in_dst, const uint8_t *restrict src, unsigned i, unsigned j) { float *dst = in_dst; uint8_t tmp_r, tmp_g; @@ -358,30 +358,30 @@ util_format_rgtc2_unorm_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, void -util_format_rgtc2_snorm_fetch_rgba_8unorm(UNUSED uint8_t *dst, UNUSED const uint8_t *src, +util_format_rgtc2_snorm_fetch_rgba_8unorm(UNUSED uint8_t *restrict dst, UNUSED const uint8_t *restrict src, UNUSED unsigned i, UNUSED unsigned j) { fprintf(stderr,"%s\n", __func__); } void -util_format_rgtc2_snorm_unpack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride, - UNUSED const uint8_t *src_row, UNUSED unsigned src_stride, +util_format_rgtc2_snorm_unpack_rgba_8unorm(UNUSED uint8_t *restrict dst_row, UNUSED unsigned dst_stride, + UNUSED const uint8_t *restrict src_row, UNUSED unsigned src_stride, UNUSED unsigned width, UNUSED unsigned height) { fprintf(stderr,"%s\n", __func__); } void -util_format_rgtc2_snorm_pack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride, - UNUSED const uint8_t *src_row, UNUSED unsigned src_stride, +util_format_rgtc2_snorm_pack_rgba_8unorm(UNUSED uint8_t *restrict dst_row, UNUSED unsigned dst_stride, + UNUSED const uint8_t *restrict src_row, UNUSED unsigned src_stride, UNUSED unsigned width, UNUSED unsigned height) { fprintf(stderr,"%s\n", __func__); } void -util_format_rgtc2_snorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_rgtc2_snorm_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y, i, j; int block_size = 16; @@ -407,7 +407,7 @@ util_format_rgtc2_snorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, co } void -util_format_rxtc2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height, unsigned chan2off) +util_format_rxtc2_snorm_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height, unsigned chan2off) { const unsigned bw = 4, bh = 4, bytes_per_block = 16; unsigned x, y, i, j; @@ -432,13 +432,13 @@ util_format_rxtc2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, c } void -util_format_rgtc2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_rgtc2_snorm_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_rxtc2_snorm_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height, 1); } void -util_format_rgtc2_snorm_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, unsigned j) +util_format_rgtc2_snorm_fetch_rgba(void *restrict in_dst, const uint8_t *restrict src, unsigned i, unsigned j) { float *dst = in_dst; int8_t tmp_r, tmp_g; diff --git a/src/util/format/u_format_rgtc.h b/src/util/format/u_format_rgtc.h index 1c600428fbf..44ddfa9fdea 100644 --- a/src/util/format/u_format_rgtc.h +++ b/src/util/format/u_format_rgtc.h @@ -29,86 +29,86 @@ #define U_FORMAT_RGTC_H_ void -util_format_rgtc1_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_rgtc1_unorm_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_rgtc1_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_rgtc1_unorm_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_rgtc1_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +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); void -util_format_rgtc1_unorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_rgtc1_unorm_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_rgtc1_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_rgtc1_unorm_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_rgtc1_unorm_fetch_rgba(void *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_rgtc1_unorm_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_rgtc1_snorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_rgtc1_snorm_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_rgtc1_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_rgtc1_snorm_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_rgtc1_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_rgtc1_snorm_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_rgtc1_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_rgtc1_snorm_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_rgtc1_snorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_rgtc1_snorm_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_rgtc1_snorm_fetch_rgba(void *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_rgtc1_snorm_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_rgtc2_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_rgtc2_unorm_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_rgtc2_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_rgtc2_unorm_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_rgtc2_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_rgtc2_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); void -util_format_rxtc2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height, unsigned chan2off); +util_format_rxtc2_unorm_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height, unsigned chan2off); void -util_format_rgtc2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_rgtc2_unorm_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_rgtc2_unorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_rgtc2_unorm_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_rgtc2_unorm_fetch_rgba(void *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_rgtc2_unorm_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_rgtc2_snorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_rgtc2_snorm_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_rgtc2_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_rgtc2_snorm_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_rgtc2_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_rgtc2_snorm_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_rgtc2_snorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_rgtc2_snorm_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_rxtc2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height, unsigned chan2off); +util_format_rxtc2_snorm_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height, unsigned chan2off); void -util_format_rgtc2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_rgtc2_snorm_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_rgtc2_snorm_fetch_rgba(void *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_rgtc2_snorm_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); #endif diff --git a/src/util/format/u_format_s3tc.c b/src/util/format/u_format_s3tc.c index 05889a4cc16..06b80f5625a 100644 --- a/src/util/format/u_format_s3tc.c +++ b/src/util/format/u_format_s3tc.c @@ -43,31 +43,31 @@ util_format_dxtn_pack_t util_format_dxtn_pack = (util_format_dxtn_pack_t)tx_comp */ void -util_format_dxt1_rgb_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) +util_format_dxt1_rgb_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j) { util_format_dxt1_rgb_fetch(0, src, i, j, dst); } void -util_format_dxt1_rgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) +util_format_dxt1_rgba_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j) { util_format_dxt1_rgba_fetch(0, src, i, j, dst); } void -util_format_dxt3_rgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) +util_format_dxt3_rgba_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j) { util_format_dxt3_rgba_fetch(0, src, i, j, dst); } void -util_format_dxt5_rgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) +util_format_dxt5_rgba_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j) { util_format_dxt5_rgba_fetch(0, src, i, j, dst); } void -util_format_dxt1_rgb_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, unsigned j) +util_format_dxt1_rgb_fetch_rgba(void *restrict in_dst, const uint8_t *restrict src, unsigned i, unsigned j) { float *dst = in_dst; uint8_t tmp[4]; @@ -79,7 +79,7 @@ util_format_dxt1_rgb_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, un } void -util_format_dxt1_rgba_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, unsigned j) +util_format_dxt1_rgba_fetch_rgba(void *restrict in_dst, const uint8_t *restrict src, unsigned i, unsigned j) { float *dst = in_dst; uint8_t tmp[4]; @@ -91,7 +91,7 @@ util_format_dxt1_rgba_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, u } void -util_format_dxt3_rgba_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, unsigned j) +util_format_dxt3_rgba_fetch_rgba(void *restrict in_dst, const uint8_t *restrict src, unsigned i, unsigned j) { float *dst = in_dst; uint8_t tmp[4]; @@ -103,7 +103,7 @@ util_format_dxt3_rgba_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, u } void -util_format_dxt5_rgba_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, unsigned j) +util_format_dxt5_rgba_fetch_rgba(void *restrict in_dst, const uint8_t *restrict src, unsigned i, unsigned j) { float *dst = in_dst; uint8_t tmp[4]; @@ -120,8 +120,8 @@ util_format_dxt5_rgba_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, u */ static inline void -util_format_dxtn_rgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_dxtn_rgb_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height, util_format_dxtn_fetch_t fetch, unsigned block_size, boolean srgb) @@ -149,8 +149,8 @@ util_format_dxtn_rgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, } void -util_format_dxt1_rgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_dxt1_rgb_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_dxtn_rgb_unpack_rgba_8unorm(dst_row, dst_stride, @@ -161,8 +161,8 @@ util_format_dxt1_rgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, } void -util_format_dxt1_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_dxt1_rgba_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_dxtn_rgb_unpack_rgba_8unorm(dst_row, dst_stride, @@ -173,8 +173,8 @@ util_format_dxt1_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, } void -util_format_dxt3_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_dxt3_rgba_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_dxtn_rgb_unpack_rgba_8unorm(dst_row, dst_stride, @@ -185,8 +185,8 @@ util_format_dxt3_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, } void -util_format_dxt5_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_dxt5_rgba_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_dxtn_rgb_unpack_rgba_8unorm(dst_row, dst_stride, @@ -197,8 +197,8 @@ util_format_dxt5_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, } static inline void -util_format_dxtn_rgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_dxtn_rgb_unpack_rgba_float(float *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height, util_format_dxtn_fetch_t fetch, unsigned block_size, boolean srgb) @@ -232,8 +232,8 @@ util_format_dxtn_rgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, } void -util_format_dxt1_rgb_unpack_rgba_float(void *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_dxt1_rgb_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_dxtn_rgb_unpack_rgba_float(dst_row, dst_stride, @@ -244,8 +244,8 @@ util_format_dxt1_rgb_unpack_rgba_float(void *dst_row, unsigned dst_stride, } void -util_format_dxt1_rgba_unpack_rgba_float(void *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_dxt1_rgba_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_dxtn_rgb_unpack_rgba_float(dst_row, dst_stride, @@ -256,8 +256,8 @@ util_format_dxt1_rgba_unpack_rgba_float(void *dst_row, unsigned dst_stride, } void -util_format_dxt3_rgba_unpack_rgba_float(void *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_dxt3_rgba_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_dxtn_rgb_unpack_rgba_float(dst_row, dst_stride, @@ -268,8 +268,8 @@ util_format_dxt3_rgba_unpack_rgba_float(void *dst_row, unsigned dst_stride, } void -util_format_dxt5_rgba_unpack_rgba_float(void *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_dxt5_rgba_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_dxtn_rgb_unpack_rgba_float(dst_row, dst_stride, @@ -285,8 +285,8 @@ util_format_dxt5_rgba_unpack_rgba_float(void *dst_row, unsigned dst_stride, */ static inline void -util_format_dxtn_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src, unsigned src_stride, +util_format_dxtn_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src, unsigned src_stride, unsigned width, unsigned height, enum util_format_dxtn format, unsigned block_size, boolean srgb) @@ -323,8 +323,8 @@ util_format_dxtn_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, } void -util_format_dxt1_rgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src, unsigned src_stride, +util_format_dxt1_rgb_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src, unsigned src_stride, unsigned width, unsigned height) { util_format_dxtn_pack_rgba_8unorm(dst_row, dst_stride, src, src_stride, @@ -333,8 +333,8 @@ util_format_dxt1_rgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, } void -util_format_dxt1_rgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src, unsigned src_stride, +util_format_dxt1_rgba_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src, unsigned src_stride, unsigned width, unsigned height) { util_format_dxtn_pack_rgba_8unorm(dst_row, dst_stride, src, src_stride, @@ -343,8 +343,8 @@ util_format_dxt1_rgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, } void -util_format_dxt3_rgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src, unsigned src_stride, +util_format_dxt3_rgba_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src, unsigned src_stride, unsigned width, unsigned height) { util_format_dxtn_pack_rgba_8unorm(dst_row, dst_stride, src, src_stride, @@ -353,8 +353,8 @@ util_format_dxt3_rgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, } void -util_format_dxt5_rgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src, unsigned src_stride, +util_format_dxt5_rgba_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src, unsigned src_stride, unsigned width, unsigned height) { util_format_dxtn_pack_rgba_8unorm(dst_row, dst_stride, src, src_stride, @@ -363,8 +363,8 @@ util_format_dxt5_rgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, } static inline void -util_format_dxtn_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src, unsigned src_stride, +util_format_dxtn_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src, unsigned src_stride, unsigned width, unsigned height, enum util_format_dxtn format, unsigned block_size, boolean srgb) @@ -399,7 +399,7 @@ util_format_dxtn_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, } void -util_format_dxt1_rgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, +util_format_dxt1_rgb_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *src, unsigned src_stride, unsigned width, unsigned height) { @@ -409,7 +409,7 @@ util_format_dxt1_rgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, } void -util_format_dxt1_rgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, +util_format_dxt1_rgba_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *src, unsigned src_stride, unsigned width, unsigned height) { @@ -419,7 +419,7 @@ util_format_dxt1_rgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, } void -util_format_dxt3_rgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, +util_format_dxt3_rgba_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *src, unsigned src_stride, unsigned width, unsigned height) { @@ -429,7 +429,7 @@ util_format_dxt3_rgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, } void -util_format_dxt5_rgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, +util_format_dxt5_rgba_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *src, unsigned src_stride, unsigned width, unsigned height) { @@ -444,7 +444,7 @@ util_format_dxt5_rgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, */ void -util_format_dxt1_srgb_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) +util_format_dxt1_srgb_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j) { uint8_t tmp[4]; util_format_dxt1_rgb_fetch(0, src, i, j, tmp); @@ -455,7 +455,7 @@ util_format_dxt1_srgb_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsign } void -util_format_dxt1_srgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) +util_format_dxt1_srgba_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j) { uint8_t tmp[4]; util_format_dxt1_rgba_fetch(0, src, i, j, tmp); @@ -466,7 +466,7 @@ util_format_dxt1_srgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsig } void -util_format_dxt3_srgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) +util_format_dxt3_srgba_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j) { uint8_t tmp[4]; util_format_dxt3_rgba_fetch(0, src, i, j, tmp); @@ -477,7 +477,7 @@ util_format_dxt3_srgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsig } void -util_format_dxt5_srgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) +util_format_dxt5_srgba_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j) { uint8_t tmp[4]; util_format_dxt5_rgba_fetch(0, src, i, j, tmp); @@ -488,7 +488,7 @@ util_format_dxt5_srgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsig } void -util_format_dxt1_srgb_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, unsigned j) +util_format_dxt1_srgb_fetch_rgba(void *restrict in_dst, const uint8_t *restrict src, unsigned i, unsigned j) { float *dst = in_dst; uint8_t tmp[4]; @@ -500,7 +500,7 @@ util_format_dxt1_srgb_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, u } void -util_format_dxt1_srgba_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, unsigned j) +util_format_dxt1_srgba_fetch_rgba(void *restrict in_dst, const uint8_t *restrict src, unsigned i, unsigned j) { float *dst = in_dst; uint8_t tmp[4]; @@ -512,7 +512,7 @@ util_format_dxt1_srgba_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, } void -util_format_dxt3_srgba_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, unsigned j) +util_format_dxt3_srgba_fetch_rgba(void *restrict in_dst, const uint8_t *restrict src, unsigned i, unsigned j) { float *dst = in_dst; uint8_t tmp[4]; @@ -524,7 +524,7 @@ util_format_dxt3_srgba_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, } void -util_format_dxt5_srgba_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, unsigned j) +util_format_dxt5_srgba_fetch_rgba(void *restrict in_dst, const uint8_t *restrict src, unsigned i, unsigned j) { float *dst = in_dst; uint8_t tmp[4]; @@ -536,7 +536,7 @@ util_format_dxt5_srgba_fetch_rgba(void *in_dst, const uint8_t *src, unsigned i, } void -util_format_dxt1_srgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_dxt1_srgb_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_dxtn_rgb_unpack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, @@ -546,7 +546,7 @@ util_format_dxt1_srgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, } void -util_format_dxt1_srgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_dxt1_srgba_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_dxtn_rgb_unpack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, @@ -556,7 +556,7 @@ util_format_dxt1_srgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, } void -util_format_dxt3_srgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_dxt3_srgba_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_dxtn_rgb_unpack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, @@ -566,7 +566,7 @@ util_format_dxt3_srgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, } void -util_format_dxt5_srgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_dxt5_srgba_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_dxtn_rgb_unpack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, @@ -576,7 +576,7 @@ util_format_dxt5_srgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, } void -util_format_dxt1_srgb_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_dxt1_srgb_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_dxtn_rgb_unpack_rgba_float(dst_row, dst_stride, src_row, src_stride, @@ -586,7 +586,7 @@ util_format_dxt1_srgb_unpack_rgba_float(void *dst_row, unsigned dst_stride, cons } void -util_format_dxt1_srgba_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_dxt1_srgba_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_dxtn_rgb_unpack_rgba_float(dst_row, dst_stride, src_row, src_stride, @@ -596,7 +596,7 @@ util_format_dxt1_srgba_unpack_rgba_float(void *dst_row, unsigned dst_stride, con } void -util_format_dxt3_srgba_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_dxt3_srgba_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_dxtn_rgb_unpack_rgba_float(dst_row, dst_stride, src_row, src_stride, @@ -606,7 +606,7 @@ util_format_dxt3_srgba_unpack_rgba_float(void *dst_row, unsigned dst_stride, con } void -util_format_dxt5_srgba_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_dxt5_srgba_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_dxtn_rgb_unpack_rgba_float(dst_row, dst_stride, src_row, src_stride, @@ -616,7 +616,7 @@ util_format_dxt5_srgba_unpack_rgba_float(void *dst_row, unsigned dst_stride, con } void -util_format_dxt1_srgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_dxt1_srgb_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_dxtn_pack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, width, height, UTIL_FORMAT_DXT1_RGB, @@ -624,7 +624,7 @@ util_format_dxt1_srgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, co } void -util_format_dxt1_srgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_dxt1_srgba_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_dxtn_pack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, width, height, UTIL_FORMAT_DXT1_RGBA, @@ -632,7 +632,7 @@ util_format_dxt1_srgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, c } void -util_format_dxt3_srgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_dxt3_srgba_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_dxtn_pack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, width, height, UTIL_FORMAT_DXT3_RGBA, @@ -640,7 +640,7 @@ util_format_dxt3_srgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, c } void -util_format_dxt5_srgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_dxt5_srgba_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_dxtn_pack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, width, height, UTIL_FORMAT_DXT5_RGBA, @@ -648,7 +648,7 @@ util_format_dxt5_srgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, c } void -util_format_dxt1_srgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_dxt1_srgb_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_dxtn_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height, UTIL_FORMAT_DXT1_RGB, @@ -656,7 +656,7 @@ util_format_dxt1_srgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, con } void -util_format_dxt1_srgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_dxt1_srgba_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_dxtn_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height, UTIL_FORMAT_DXT1_RGBA, @@ -664,7 +664,7 @@ util_format_dxt1_srgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, co } void -util_format_dxt3_srgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_dxt3_srgba_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_dxtn_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height, UTIL_FORMAT_DXT3_RGBA, @@ -672,7 +672,7 @@ util_format_dxt3_srgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, co } void -util_format_dxt5_srgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_dxt5_srgba_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_dxtn_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height, UTIL_FORMAT_DXT5_RGBA, diff --git a/src/util/format/u_format_s3tc.h b/src/util/format/u_format_s3tc.h index 4fe58fb1186..0487f1e0d82 100644 --- a/src/util/format/u_format_s3tc.h +++ b/src/util/format/u_format_s3tc.h @@ -67,149 +67,149 @@ extern util_format_dxtn_pack_t util_format_dxtn_pack; void -util_format_dxt1_rgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt1_rgb_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt1_rgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt1_rgb_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt1_rgb_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_dxt1_rgb_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_dxt1_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt1_rgba_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt1_rgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt1_rgba_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt1_rgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_dxt1_rgba_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_dxt3_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt3_rgba_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt3_rgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt3_rgba_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt3_rgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_dxt3_rgba_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_dxt5_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt5_rgba_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt5_rgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt5_rgba_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt5_rgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_dxt5_rgba_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_dxt1_srgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt1_srgb_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt1_srgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt1_srgb_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt1_srgb_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_dxt1_srgb_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_dxt1_srgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt1_srgba_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt1_srgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt1_srgba_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt1_srgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_dxt1_srgba_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_dxt3_srgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt3_srgba_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt3_srgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt3_srgba_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt3_srgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_dxt3_srgba_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_dxt5_srgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt5_srgba_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt5_srgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt5_srgba_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt5_srgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_dxt5_srgba_fetch_rgba_8unorm(uint8_t *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_dxt1_rgb_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt1_rgb_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt1_rgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt1_rgb_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt1_rgb_fetch_rgba(void *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_dxt1_rgb_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_dxt1_rgba_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt1_rgba_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt1_rgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt1_rgba_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt1_rgba_fetch_rgba(void *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_dxt1_rgba_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_dxt3_rgba_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt3_rgba_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt3_rgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt3_rgba_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt3_rgba_fetch_rgba(void *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_dxt3_rgba_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_dxt5_rgba_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt5_rgba_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt5_rgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt5_rgba_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt5_rgba_fetch_rgba(void *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_dxt5_rgba_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_dxt1_srgb_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt1_srgb_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt1_srgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt1_srgb_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt1_srgb_fetch_rgba(void *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_dxt1_srgb_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_dxt1_srgba_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt1_srgba_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt1_srgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt1_srgba_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt1_srgba_fetch_rgba(void *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_dxt1_srgba_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_dxt3_srgba_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt3_srgba_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt3_srgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt3_srgba_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt3_srgba_fetch_rgba(void *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_dxt3_srgba_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_dxt5_srgba_unpack_rgba_float(void *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt5_srgba_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt5_srgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_dxt5_srgba_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_dxt5_srgba_fetch_rgba(void *dst, const uint8_t *src, unsigned i, unsigned j); +util_format_dxt5_srgba_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); #ifdef __cplusplus } diff --git a/src/util/format/u_format_yuv.c b/src/util/format/u_format_yuv.c index b5f75bdc0cf..80022e433d7 100644 --- a/src/util/format/u_format_yuv.c +++ b/src/util/format/u_format_yuv.c @@ -39,8 +39,8 @@ void -util_format_r8g8_b8g8_unorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_r8g8_b8g8_unorm_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -93,8 +93,8 @@ util_format_r8g8_b8g8_unorm_unpack_rgba_float(void *dst_row, unsigned dst_stride void -util_format_r8g8_b8g8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_r8g8_b8g8_unorm_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -147,8 +147,8 @@ util_format_r8g8_b8g8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_st void -util_format_r8g8_b8g8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, +util_format_r8g8_b8g8_unorm_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -196,8 +196,8 @@ util_format_r8g8_b8g8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_strid void -util_format_r8g8_b8g8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_r8g8_b8g8_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) { unsigned x, y; @@ -245,7 +245,7 @@ util_format_r8g8_b8g8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stri void -util_format_r8g8_b8g8_unorm_fetch_rgba(void *in_dst, const uint8_t *src, +util_format_r8g8_b8g8_unorm_fetch_rgba(void *restrict in_dst, const uint8_t *restrict src, unsigned i, ASSERTED unsigned j) { float *dst = in_dst; @@ -261,8 +261,8 @@ util_format_r8g8_b8g8_unorm_fetch_rgba(void *in_dst, const uint8_t *src, void -util_format_g8r8_g8b8_unorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_g8r8_g8b8_unorm_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -315,8 +315,8 @@ util_format_g8r8_g8b8_unorm_unpack_rgba_float(void *dst_row, unsigned dst_stride void -util_format_g8r8_g8b8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_g8r8_g8b8_unorm_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -369,8 +369,8 @@ util_format_g8r8_g8b8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_st void -util_format_g8r8_g8b8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, +util_format_g8r8_g8b8_unorm_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -418,8 +418,8 @@ util_format_g8r8_g8b8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_strid void -util_format_g8r8_g8b8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_g8r8_g8b8_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) { unsigned x, y; @@ -467,7 +467,7 @@ util_format_g8r8_g8b8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stri void -util_format_g8r8_g8b8_unorm_fetch_rgba(void *in_dst, const uint8_t *src, +util_format_g8r8_g8b8_unorm_fetch_rgba(void *restrict in_dst, const uint8_t *restrict src, unsigned i, ASSERTED unsigned j) { float *dst = in_dst; @@ -483,8 +483,8 @@ util_format_g8r8_g8b8_unorm_fetch_rgba(void *in_dst, const uint8_t *src, void -util_format_uyvy_unpack_rgba_float(void *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_uyvy_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -531,8 +531,8 @@ util_format_uyvy_unpack_rgba_float(void *dst_row, unsigned dst_stride, void -util_format_uyvy_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_uyvy_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -579,8 +579,8 @@ util_format_uyvy_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, void -util_format_uyvy_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, +util_format_uyvy_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -632,8 +632,8 @@ util_format_uyvy_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, void -util_format_uyvy_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_uyvy_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -685,7 +685,7 @@ util_format_uyvy_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, void -util_format_uyvy_fetch_rgba(void *in_dst, const uint8_t *src, +util_format_uyvy_fetch_rgba(void *restrict in_dst, const uint8_t *restrict src, unsigned i, ASSERTED unsigned j) { float *dst = in_dst; @@ -705,8 +705,8 @@ util_format_uyvy_fetch_rgba(void *in_dst, const uint8_t *src, void -util_format_yuyv_unpack_rgba_float(void *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_yuyv_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -753,8 +753,8 @@ util_format_yuyv_unpack_rgba_float(void *dst_row, unsigned dst_stride, void -util_format_yuyv_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_yuyv_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -801,8 +801,8 @@ util_format_yuyv_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, void -util_format_yuyv_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, +util_format_yuyv_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -854,8 +854,8 @@ util_format_yuyv_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, void -util_format_yuyv_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_yuyv_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -907,7 +907,7 @@ util_format_yuyv_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, void -util_format_yuyv_fetch_rgba(void *in_dst, const uint8_t *src, +util_format_yuyv_fetch_rgba(void *restrict in_dst, const uint8_t *restrict src, unsigned i, ASSERTED unsigned j) { float *dst = in_dst; diff --git a/src/util/format/u_format_yuv.h b/src/util/format/u_format_yuv.h index 20c5176e8dd..b592d36865c 100644 --- a/src/util/format/u_format_yuv.h +++ b/src/util/format/u_format_yuv.h @@ -122,99 +122,99 @@ util_format_yuv_to_rgb_8unorm(uint8_t y, uint8_t u, uint8_t v, void -util_format_uyvy_unpack_rgba_float(void *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_uyvy_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_uyvy_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_uyvy_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_uyvy_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, +util_format_uyvy_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_uyvy_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_uyvy_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_uyvy_fetch_rgba(void *dst, const uint8_t *src, +util_format_uyvy_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_yuyv_unpack_rgba_float(void *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_yuyv_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_yuyv_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_yuyv_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_yuyv_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, +util_format_yuyv_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_yuyv_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_yuyv_pack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_yuyv_fetch_rgba(void *dst, const uint8_t *src, +util_format_yuyv_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_r8g8_b8g8_unorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_r8g8_b8g8_unorm_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_r8g8_b8g8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_r8g8_b8g8_unorm_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_r8g8_b8g8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, +util_format_r8g8_b8g8_unorm_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_r8g8_b8g8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_r8g8_b8g8_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); void -util_format_r8g8_b8g8_unorm_fetch_rgba(void *dst, const uint8_t *src, +util_format_r8g8_b8g8_unorm_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); void -util_format_g8r8_g8b8_unorm_unpack_rgba_float(void *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_g8r8_g8b8_unorm_unpack_rgba_float(void *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_g8r8_g8b8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_g8r8_g8b8_unorm_unpack_rgba_8unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_g8r8_g8b8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, +util_format_g8r8_g8b8_unorm_pack_rgba_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_g8r8_g8b8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_g8r8_g8b8_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); void -util_format_g8r8_g8b8_unorm_fetch_rgba(void *dst, const uint8_t *src, +util_format_g8r8_g8b8_unorm_fetch_rgba(void *restrict dst, const uint8_t *restrict src, unsigned i, unsigned j); #endif /* U_FORMAT_YUV_H_ */ diff --git a/src/util/format/u_format_zs.c b/src/util/format/u_format_zs.c index d941c37d22d..442a66f7a06 100644 --- a/src/util/format/u_format_zs.c +++ b/src/util/format/u_format_zs.c @@ -111,8 +111,8 @@ z32_unorm_to_z32_float(uint32_t z) void -util_format_s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_s8_uint_unpack_s_8uint(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned y; @@ -124,8 +124,8 @@ util_format_s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, } void -util_format_s8_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_s8_uint_pack_s_8uint(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned y; @@ -137,8 +137,8 @@ util_format_s8_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, } void -util_format_z16_unorm_unpack_z_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_z16_unorm_unpack_z_float(float *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -155,8 +155,8 @@ util_format_z16_unorm_unpack_z_float(float *dst_row, unsigned dst_stride, } void -util_format_z16_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, +util_format_z16_unorm_pack_z_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -174,8 +174,8 @@ util_format_z16_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride, } void -util_format_z16_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_z16_unorm_unpack_z_32unorm(uint32_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -192,8 +192,8 @@ util_format_z16_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, } void -util_format_z16_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, - const uint32_t *src_row, unsigned src_stride, +util_format_z16_unorm_pack_z_32unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint32_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -211,8 +211,8 @@ util_format_z16_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, } void -util_format_z32_unorm_unpack_z_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_z32_unorm_unpack_z_float(float *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -229,8 +229,8 @@ util_format_z32_unorm_unpack_z_float(float *dst_row, unsigned dst_stride, } void -util_format_z32_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, +util_format_z32_unorm_pack_z_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -248,8 +248,8 @@ util_format_z32_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride, } void -util_format_z32_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_z32_unorm_unpack_z_32unorm(uint32_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned y; @@ -261,8 +261,8 @@ util_format_z32_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, } void -util_format_z32_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, - const uint32_t *src_row, unsigned src_stride, +util_format_z32_unorm_pack_z_32unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint32_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned y; @@ -274,8 +274,8 @@ util_format_z32_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, } void -util_format_z32_float_unpack_z_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_z32_float_unpack_z_float(float *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned y; @@ -287,8 +287,8 @@ util_format_z32_float_unpack_z_float(float *dst_row, unsigned dst_stride, } void -util_format_z32_float_pack_z_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, +util_format_z32_float_pack_z_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned y; @@ -300,8 +300,8 @@ util_format_z32_float_pack_z_float(uint8_t *dst_row, unsigned dst_stride, } void -util_format_z32_float_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_z32_float_unpack_z_32unorm(uint32_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -318,8 +318,8 @@ util_format_z32_float_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, } void -util_format_z32_float_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, - const uint32_t *src_row, unsigned src_stride, +util_format_z32_float_pack_z_32unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint32_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -335,56 +335,56 @@ util_format_z32_float_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, } void -util_format_z16_unorm_s8_uint_unpack_z_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_z16_unorm_s8_uint_unpack_z_float(float *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unreachable("z16_s8 packing/unpacking is not implemented."); } void -util_format_z16_unorm_s8_uint_pack_z_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, +util_format_z16_unorm_s8_uint_pack_z_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unreachable("z16_s8 packing/unpacking is not implemented."); } void -util_format_z16_unorm_s8_uint_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_z16_unorm_s8_uint_unpack_z_32unorm(uint32_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unreachable("z16_s8 packing/unpacking is not implemented."); } void -util_format_z16_unorm_s8_uint_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, - const uint32_t *src_row, unsigned src_stride, +util_format_z16_unorm_s8_uint_pack_z_32unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint32_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unreachable("z16_s8 packing/unpacking is not implemented."); } void -util_format_z16_unorm_s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_z16_unorm_s8_uint_unpack_s_8uint(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unreachable("z16_s8 packing/unpacking is not implemented."); } void -util_format_z16_unorm_s8_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_z16_unorm_s8_uint_pack_s_8uint(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unreachable("z16_s8 packing/unpacking is not implemented."); } void -util_format_z24_unorm_s8_uint_unpack_z_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_z24_unorm_s8_uint_unpack_z_float(float *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -401,8 +401,8 @@ util_format_z24_unorm_s8_uint_unpack_z_float(float *dst_row, unsigned dst_stride } void -util_format_z24_unorm_s8_uint_pack_z_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, +util_format_z24_unorm_s8_uint_pack_z_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -422,8 +422,8 @@ util_format_z24_unorm_s8_uint_pack_z_float(uint8_t *dst_row, unsigned dst_stride void -util_format_z24_unorm_s8_uint_unpack_z24(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_z24_unorm_s8_uint_unpack_z24(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -440,8 +440,8 @@ util_format_z24_unorm_s8_uint_unpack_z24(uint8_t *dst_row, unsigned dst_stride, } void -util_format_z24_unorm_s8_uint_pack_z24(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_z24_unorm_s8_uint_pack_z24(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -461,8 +461,8 @@ util_format_z24_unorm_s8_uint_pack_z24(uint8_t *dst_row, unsigned dst_stride, } void -util_format_z24_unorm_s8_uint_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_z24_unorm_s8_uint_unpack_z_32unorm(uint32_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -479,8 +479,8 @@ util_format_z24_unorm_s8_uint_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_s } void -util_format_z24_unorm_s8_uint_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, - const uint32_t *src_row, unsigned src_stride, +util_format_z24_unorm_s8_uint_pack_z_32unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint32_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -499,8 +499,8 @@ util_format_z24_unorm_s8_uint_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stri } void -util_format_z24_unorm_s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_z24_unorm_s8_uint_unpack_s_8uint(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -517,8 +517,8 @@ util_format_z24_unorm_s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stri } void -util_format_z24_unorm_s8_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_z24_unorm_s8_uint_pack_s_8uint(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -537,7 +537,7 @@ util_format_z24_unorm_s8_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride } void -util_format_z24_unorm_s8_uint_pack_separate(uint8_t *dst_row, unsigned dst_stride, +util_format_z24_unorm_s8_uint_pack_separate(uint8_t *restrict dst_row, unsigned dst_stride, const uint32_t *z_src_row, unsigned z_src_stride, const uint8_t *s_src_row, unsigned s_src_stride, unsigned width, unsigned height) @@ -557,8 +557,8 @@ util_format_z24_unorm_s8_uint_pack_separate(uint8_t *dst_row, unsigned dst_strid } void -util_format_s8_uint_z24_unorm_unpack_z_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_s8_uint_z24_unorm_unpack_z_float(float *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -575,8 +575,8 @@ util_format_s8_uint_z24_unorm_unpack_z_float(float *dst_row, unsigned dst_stride } void -util_format_s8_uint_z24_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, +util_format_s8_uint_z24_unorm_pack_z_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -595,8 +595,8 @@ util_format_s8_uint_z24_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride } void -util_format_s8_uint_z24_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_s8_uint_z24_unorm_unpack_z_32unorm(uint32_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -613,8 +613,8 @@ util_format_s8_uint_z24_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_s } void -util_format_s8_uint_z24_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, - const uint32_t *src_row, unsigned src_stride, +util_format_s8_uint_z24_unorm_pack_z_32unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint32_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -633,8 +633,8 @@ util_format_s8_uint_z24_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stri } void -util_format_s8_uint_z24_unorm_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_s8_uint_z24_unorm_unpack_s_8uint(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -651,8 +651,8 @@ util_format_s8_uint_z24_unorm_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stri } void -util_format_s8_uint_z24_unorm_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_s8_uint_z24_unorm_pack_s_8uint(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -671,8 +671,8 @@ util_format_s8_uint_z24_unorm_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride } void -util_format_z24x8_unorm_unpack_z_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_z24x8_unorm_unpack_z_float(float *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -689,8 +689,8 @@ util_format_z24x8_unorm_unpack_z_float(float *dst_row, unsigned dst_stride, } void -util_format_z24x8_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, +util_format_z24x8_unorm_pack_z_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -708,8 +708,8 @@ util_format_z24x8_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride, } void -util_format_z24x8_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_z24x8_unorm_unpack_z_32unorm(uint32_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -726,8 +726,8 @@ util_format_z24x8_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, } void -util_format_z24x8_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, - const uint32_t *src_row, unsigned src_stride, +util_format_z24x8_unorm_pack_z_32unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint32_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -745,8 +745,8 @@ util_format_z24x8_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, } void -util_format_x8z24_unorm_unpack_z_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_x8z24_unorm_unpack_z_float(float *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -763,8 +763,8 @@ util_format_x8z24_unorm_unpack_z_float(float *dst_row, unsigned dst_stride, } void -util_format_x8z24_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, +util_format_x8z24_unorm_pack_z_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -782,8 +782,8 @@ util_format_x8z24_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride, } void -util_format_x8z24_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_x8z24_unorm_unpack_z_32unorm(uint32_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -800,8 +800,8 @@ util_format_x8z24_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, } void -util_format_x8z24_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, - const uint32_t *src_row, unsigned src_stride, +util_format_x8z24_unorm_pack_z_32unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint32_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -819,8 +819,8 @@ util_format_x8z24_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, } void -util_format_z32_float_s8x24_uint_unpack_z_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_z32_float_s8x24_uint_unpack_z_float(float *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -838,8 +838,8 @@ util_format_z32_float_s8x24_uint_unpack_z_float(float *dst_row, unsigned dst_str } void -util_format_z32_float_s8x24_uint_pack_z_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, +util_format_z32_float_s8x24_uint_pack_z_float(uint8_t *restrict dst_row, unsigned dst_stride, + const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -857,8 +857,8 @@ util_format_z32_float_s8x24_uint_pack_z_float(uint8_t *dst_row, unsigned dst_str } void -util_format_z32_float_s8x24_uint_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_z32_float_s8x24_uint_unpack_z_32unorm(uint32_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -876,8 +876,8 @@ util_format_z32_float_s8x24_uint_unpack_z_32unorm(uint32_t *dst_row, unsigned ds } void -util_format_z32_float_s8x24_uint_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, - const uint32_t *src_row, unsigned src_stride, +util_format_z32_float_s8x24_uint_pack_z_32unorm(uint8_t *restrict dst_row, unsigned dst_stride, + const uint32_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -893,8 +893,8 @@ util_format_z32_float_s8x24_uint_pack_z_32unorm(uint8_t *dst_row, unsigned dst_s } void -util_format_z32_float_s8x24_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_z32_float_s8x24_uint_unpack_s_8uint(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -912,8 +912,8 @@ util_format_z32_float_s8x24_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_s } void -util_format_z32_float_s8x24_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_z32_float_s8x24_uint_pack_s_8uint(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { unsigned x, y; @@ -932,7 +932,7 @@ util_format_z32_float_s8x24_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_str void -util_format_x24s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_x24s8_uint_unpack_s_8uint(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_z24_unorm_s8_uint_unpack_s_8uint(dst_row, dst_stride, src_row, src_stride, @@ -940,7 +940,7 @@ util_format_x24s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, con } void -util_format_x24s8_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_x24s8_uint_pack_s_8uint(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_z24_unorm_s8_uint_pack_s_8uint(dst_row, dst_stride, src_row, src_stride, @@ -948,7 +948,7 @@ util_format_x24s8_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const } void -util_format_s8x24_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_s8x24_uint_unpack_s_8uint(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_s8_uint_z24_unorm_unpack_s_8uint(dst_row, dst_stride, src_row, src_stride, @@ -956,7 +956,7 @@ util_format_s8x24_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, con } void -util_format_s8x24_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_s8x24_uint_pack_s_8uint(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_s8_uint_z24_unorm_pack_s_8uint(dst_row, dst_stride, src_row, src_stride, @@ -964,8 +964,8 @@ util_format_s8x24_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const } void -util_format_x32_s8x24_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_x32_s8x24_uint_unpack_s_8uint(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_z32_float_s8x24_uint_unpack_s_8uint(dst_row, dst_stride, @@ -975,8 +975,8 @@ util_format_x32_s8x24_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, } void -util_format_x32_s8x24_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, +util_format_x32_s8x24_uint_pack_s_8uint(uint8_t *restrict dst_row, unsigned dst_stride, + const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height) { util_format_z32_float_s8x24_uint_pack_s_8uint(dst_row, dst_stride, diff --git a/src/util/format/u_format_zs.h b/src/util/format/u_format_zs.h index f2b003c6da0..6ff802a9927 100644 --- a/src/util/format/u_format_zs.h +++ b/src/util/format/u_format_zs.h @@ -37,212 +37,212 @@ extern "C" { #endif void -util_format_s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_s8_uint_unpack_s_8uint(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_s8_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_s8_uint_pack_s_8uint(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z16_unorm_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z16_unorm_unpack_z_float(float *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z16_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z16_unorm_pack_z_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z16_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z16_unorm_unpack_z_32unorm(uint32_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z16_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z16_unorm_pack_z_32unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint32_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z32_unorm_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z32_unorm_unpack_z_float(float *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z32_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z32_unorm_pack_z_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z32_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z32_unorm_unpack_z_32unorm(uint32_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z32_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z32_unorm_pack_z_32unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint32_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z32_float_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z32_float_unpack_z_float(float *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z32_float_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z32_float_pack_z_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z32_float_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z32_float_unpack_z_32unorm(uint32_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z32_float_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z32_float_pack_z_32unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint32_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z24_unorm_s8_uint_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z24_unorm_s8_uint_unpack_z_float(float *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z24_unorm_s8_uint_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z24_unorm_s8_uint_pack_z_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z24_unorm_s8_uint_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z24_unorm_s8_uint_unpack_z_32unorm(uint32_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z24_unorm_s8_uint_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z24_unorm_s8_uint_pack_z_32unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint32_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z24_unorm_s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z24_unorm_s8_uint_unpack_s_8uint(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z24_unorm_s8_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z24_unorm_s8_uint_pack_s_8uint(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z24_unorm_s8_uint_pack_separate(uint8_t *dst_row, unsigned dst_stride, const uint32_t *z_src_row, unsigned z_src_stride, const uint8_t *s_src_row, unsigned s_src_stride, unsigned width, unsigned height); +util_format_z24_unorm_s8_uint_pack_separate(uint8_t *restrict dst_row, unsigned dst_stride, const uint32_t *z_src_row, unsigned z_src_stride, const uint8_t *s_src_row, unsigned s_src_stride, unsigned width, unsigned height); void -util_format_z24_unorm_s8_uint_unpack_z24(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z24_unorm_s8_uint_unpack_z24(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z24_unorm_s8_uint_pack_z24(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z24_unorm_s8_uint_pack_z24(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_s8_uint_z24_unorm_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_s8_uint_z24_unorm_unpack_z_float(float *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_s8_uint_z24_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_s8_uint_z24_unorm_pack_z_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_s8_uint_z24_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_s8_uint_z24_unorm_unpack_z_32unorm(uint32_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_s8_uint_z24_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_s8_uint_z24_unorm_pack_z_32unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint32_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_s8_uint_z24_unorm_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_s8_uint_z24_unorm_unpack_s_8uint(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_s8_uint_z24_unorm_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_s8_uint_z24_unorm_pack_s_8uint(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z24x8_unorm_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z24x8_unorm_unpack_z_float(float *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z24x8_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z24x8_unorm_pack_z_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z24x8_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z24x8_unorm_unpack_z_32unorm(uint32_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z24x8_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z24x8_unorm_pack_z_32unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint32_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_x8z24_unorm_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_x8z24_unorm_unpack_z_float(float *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_x8z24_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_x8z24_unorm_pack_z_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_x8z24_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_x8z24_unorm_unpack_z_32unorm(uint32_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_x8z24_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_x8z24_unorm_pack_z_32unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint32_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z32_float_s8x24_uint_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z32_float_s8x24_uint_unpack_z_float(float *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z32_float_s8x24_uint_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z32_float_s8x24_uint_pack_z_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z32_float_s8x24_uint_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z32_float_s8x24_uint_unpack_z_32unorm(uint32_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z32_float_s8x24_uint_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z32_float_s8x24_uint_pack_z_32unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint32_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z32_float_s8x24_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z32_float_s8x24_uint_unpack_s_8uint(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z32_float_s8x24_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z32_float_s8x24_uint_pack_s_8uint(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z16_unorm_s8_uint_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z16_unorm_s8_uint_unpack_z_float(float *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z16_unorm_s8_uint_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z16_unorm_s8_uint_pack_z_float(uint8_t *restrict dst_row, unsigned dst_stride, const float *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z16_unorm_s8_uint_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z16_unorm_s8_uint_unpack_z_32unorm(uint32_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z16_unorm_s8_uint_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z16_unorm_s8_uint_pack_z_32unorm(uint8_t *restrict dst_row, unsigned dst_stride, const uint32_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z16_unorm_s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z16_unorm_s8_uint_unpack_s_8uint(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_z16_unorm_s8_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_z16_unorm_s8_uint_pack_s_8uint(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_x24s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_x24s8_uint_unpack_s_8uint(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_x24s8_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_x24s8_uint_pack_s_8uint(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_s8x24_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_s8x24_uint_unpack_s_8uint(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_s8x24_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_s8x24_uint_pack_s_8uint(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_x32_s8x24_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_x32_s8x24_uint_unpack_s_8uint(uint8_t *restrict dst_row, unsigned dst_stride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); void -util_format_x32_s8x24_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_sride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); +util_format_x32_s8x24_uint_pack_s_8uint(uint8_t *restrict dst_row, unsigned dst_sride, const uint8_t *restrict src_row, unsigned src_stride, unsigned width, unsigned height); #ifdef __cplusplus }