Skip to content

Commit 39f5b01

Browse files
committed
Use load/store rather than fetch/write naming
1 parent 64f1663 commit 39f5b01

3 files changed

Lines changed: 14 additions & 15 deletions

File tree

Source/astcenc_entry.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,6 @@ static void compress_image(
842842
// Only the first thread actually runs the initializer
843843
ctx.manage_compress.init(block_count);
844844

845-
846845
// Determine if we can use an optimized load function
847846
bool needs_swz = (swizzle.r != ASTCENC_SWZ_R) || (swizzle.g != ASTCENC_SWZ_G) ||
848847
(swizzle.b != ASTCENC_SWZ_B) || (swizzle.a != ASTCENC_SWZ_A);
@@ -853,10 +852,10 @@ static void compress_image(
853852
bool use_fast_load = !needs_swz && !needs_hdr &&
854853
block_z == 1 && image.data_type == ASTCENC_TYPE_U8;
855854

856-
auto load_func = fetch_image_block;
855+
auto load_func = load_image_block;
857856
if (use_fast_load)
858857
{
859-
load_func = fetch_image_block_fast_ldr;
858+
load_func = load_image_block_fast_ldr;
860859
}
861860

862861
// All threads run this processing loop until there is no work remaining
@@ -1143,7 +1142,7 @@ astcenc_error astcenc_decompress_image(
11431142
x * block_x, y * block_y, z * block_z,
11441143
scb, blk);
11451144

1146-
write_image_block(image_out, blk, *ctx->bsd,
1145+
store_image_block(image_out, blk, *ctx->bsd,
11471146
x * block_x, y * block_y, z * block_z, *swizzle);
11481147
}
11491148

Source/astcenc_image.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ static vfloat4 encode_texel_lns(
148148
}
149149

150150
/* See header for documentation. */
151-
void fetch_image_block(
151+
void load_image_block(
152152
astcenc_profile decode_mode,
153153
const astcenc_image& img,
154154
image_block& blk,
@@ -265,7 +265,7 @@ void fetch_image_block(
265265
}
266266

267267
/* See header for documentation. */
268-
void fetch_image_block_fast_ldr(
268+
void load_image_block_fast_ldr(
269269
astcenc_profile decode_mode,
270270
const astcenc_image& img,
271271
image_block& blk,
@@ -332,7 +332,7 @@ void fetch_image_block_fast_ldr(
332332
}
333333

334334
/* See header for documentation. */
335-
void write_image_block(
335+
void store_image_block(
336336
astcenc_image& img,
337337
const image_block& blk,
338338
const block_size_descriptor& bsd,

Source/astcenc_internal.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1761,7 +1761,7 @@ void compute_averages(
17611761
const avg_args& ag);
17621762

17631763
/**
1764-
* @brief Fetch a single image block from the input image.
1764+
* @brief Load a single image block from the input image.
17651765
*
17661766
* @param decode_mode The compression color profile.
17671767
* @param img The input image data.
@@ -1772,7 +1772,7 @@ void compute_averages(
17721772
* @param zpos The block Z coordinate in the input image.
17731773
* @param swz The swizzle to apply on load.
17741774
*/
1775-
void fetch_image_block(
1775+
void load_image_block(
17761776
astcenc_profile decode_mode,
17771777
const astcenc_image& img,
17781778
image_block& blk,
@@ -1783,7 +1783,7 @@ void fetch_image_block(
17831783
const astcenc_swizzle& swz);
17841784

17851785
/**
1786-
* @brief Fetch a single image block from the input image.
1786+
* @brief Load a single image block from the input image.
17871787
*
17881788
* This specialized variant can be used only if the block is 2D LDR U8 data,
17891789
* with no swizzle.
@@ -1797,7 +1797,7 @@ void fetch_image_block(
17971797
* @param zpos The block Z coordinate in the input image.
17981798
* @param swz The swizzle to apply on load.
17991799
*/
1800-
void fetch_image_block_fast_ldr(
1800+
void load_image_block_fast_ldr(
18011801
astcenc_profile decode_mode,
18021802
const astcenc_image& img,
18031803
image_block& blk,
@@ -1808,17 +1808,17 @@ void fetch_image_block_fast_ldr(
18081808
const astcenc_swizzle& swz);
18091809

18101810
/**
1811-
* @brief Write a single image block from the output image.
1811+
* @brief Store a single image block to the output image.
18121812
*
1813-
* @param[out] img The input image data.
1814-
* @param blk The image block to populate.
1813+
* @param[out] img The output image data.
1814+
* @param blk The image block to export.
18151815
* @param bsd The block size information.
18161816
* @param xpos The block X coordinate in the input image.
18171817
* @param ypos The block Y coordinate in the input image.
18181818
* @param zpos The block Z coordinate in the input image.
18191819
* @param swz The swizzle to apply on store.
18201820
*/
1821-
void write_image_block(
1821+
void store_image_block(
18221822
astcenc_image& img,
18231823
const image_block& blk,
18241824
const block_size_descriptor& bsd,

0 commit comments

Comments
 (0)