thiefyzheng
1cd6eaf7c6
copy_elements: dispatch fixed element widths 1/2/4/8/16 to a compile-time-sized memcpy loop
...
copy_elements ran a runtime-sized std::memcpy per texel/block (the call is not
inlined), which dominates TitleImageUpload::write on runtime texture refresh.
The per-row element loop is now copy_tiled_row<Into, Width>, chosen by one
switch on format.bytes per row: 1/2/4/8/16 get a constant-size memcpy, every
other size takes the unchanged runtime-size loop. Addresses (row/column tables,
pitches, linear fast path) are untouched, so the bytes written are identical,
including for unaligned pointers and pitches and in both directions.
texel_copy_test compares copy_elements with the original loop over the whole
destination buffer: tiled and linear, mips and tails, arrays, volumes, widths
1/2/4/8/16 plus non-specialized 3/6/12, misaligned buffers and padded pitches.
2026-11-30 23:34:45 +00:00
..
2026-11-29 09:55:11 -03:00
2026-11-27 04:55:14 -05:00
2026-11-30 17:28:44 +01:00
2026-11-29 00:22:45 +01:00
2026-11-27 18:42:00 -06:00
2026-11-29 08:10:03 +07:00
2026-11-29 10:40:34 -05:00
2026-11-29 10:40:34 -05:00
2026-11-29 09:55:11 -03:00
2026-11-27 14:24:29 +01:00
2026-11-27 18:49:10 -03:00
2026-11-27 18:42:21 -06:00
2026-11-29 06:34:52 -05:00
2026-11-28 19:01:06 +00:00
2026-11-28 19:01:06 +00:00
2026-11-27 18:49:03 -03:00
2026-11-27 19:56:00 +08:00
2026-11-27 16:10:51 -03:00
2026-11-27 19:56:25 +08:00
2026-11-27 19:36:14 -06:00
2026-11-29 22:43:46 +01:00
2026-11-27 13:49:07 +01:00
2026-11-28 19:01:06 +00:00
2026-11-28 18:55:48 +01:00
2026-11-28 05:38:10 -05:00
2026-11-28 18:53:57 +01:00
2026-11-28 19:01:06 +00:00
2026-11-27 18:25:47 -06:00
2026-11-29 06:34:52 -05:00
2026-11-29 20:00:27 +01:00
2026-11-27 18:25:47 -06:00
2026-11-29 02:05:56 +01:00
2026-11-28 19:01:06 +00:00
2026-11-28 19:01:06 +00:00
2026-11-28 19:01:06 +00:00
2026-11-29 06:36:03 -05:00
2026-11-28 19:01:06 +00:00
2026-11-28 19:01:06 +00:00
2026-11-30 14:19:24 +01:00
2026-11-28 19:01:06 +00:00
2026-11-30 04:34:17 -05:00
2026-11-28 19:01:06 +00:00
2026-11-28 19:01:06 +00:00
2026-11-28 05:38:10 -05:00
2026-11-29 13:44:40 +01:00
2026-11-29 06:36:03 -05:00
2026-11-27 14:24:29 +01:00
2026-11-29 16:42:29 +01:00
2026-11-28 19:01:06 +00:00
2026-11-27 10:51:23 -05:00
2026-11-28 19:01:06 +00:00
2026-11-27 14:24:29 +01:00
2026-11-29 09:37:37 -05:00
2026-11-28 19:01:06 +00:00
2026-11-28 06:29:45 -05:00
2026-11-29 07:17:27 -05:00
2026-11-29 06:36:03 -05:00
2026-11-28 19:01:06 +00:00
2026-11-29 11:51:06 -05:00
2026-11-29 20:00:27 +01:00
2026-11-28 19:01:06 +00:00
2026-11-29 06:33:39 -05:00
2026-11-29 09:25:40 -05:00
2026-11-29 06:34:52 -05:00
2026-11-27 13:01:19 +02:00
2026-11-29 11:41:49 -05:00
2026-11-29 09:37:37 -05:00
2026-11-28 21:26:33 +01:00
2026-11-28 19:01:06 +00:00
2026-11-27 15:14:45 -06:00
2026-11-28 19:01:06 +00:00
2026-11-27 13:15:10 -06:00
2026-11-29 16:44:51 +01:00
2026-11-28 21:19:06 +01:00
2026-11-27 12:13:35 -06:00
2026-11-27 19:40:07 -06:00
2026-11-29 16:42:49 +01:00
2026-11-30 14:31:07 +01:00
2026-11-29 11:51:06 -05:00
2026-11-27 05:03:32 -05:00
2026-11-26 16:43:28 -05:00
2026-11-28 19:01:06 +00:00
2026-11-27 18:49:18 -03:00
2026-11-28 19:01:06 +00:00
2026-11-28 19:01:06 +00:00
2026-11-27 22:36:30 -06:00
2026-11-29 21:05:26 -05:00
2026-11-28 19:01:06 +00:00
2026-11-28 19:01:06 +00:00
2026-11-28 19:01:06 +00:00
2026-11-27 05:56:53 -05:00
2026-11-28 19:01:06 +00:00
2026-11-29 06:34:13 -05:00
2026-11-29 06:34:13 -05:00
2026-11-28 19:01:06 +00:00
2026-11-28 19:01:06 +00:00
2026-11-28 19:01:06 +00:00
2026-11-28 19:01:06 +00:00
2026-11-28 19:01:06 +00:00
2026-11-29 13:51:25 +01:00
2026-11-28 19:01:06 +00:00
2026-11-28 19:01:06 +00:00
2026-11-28 20:42:28 -08:00
2026-11-27 18:25:47 -06:00
2026-11-28 18:52:14 +01:00
2026-11-29 21:05:26 -05:00
2026-11-28 00:06:16 -05:00
2026-11-29 11:41:49 -05:00
2026-11-27 18:39:18 -06:00
2026-11-26 19:40:14 -05:00
2026-11-27 18:48:19 -06:00
2026-11-29 06:34:13 -05:00
2026-11-29 07:17:27 -05:00
2026-11-28 19:01:06 +00:00
2026-11-29 11:51:06 -05:00
2026-11-28 05:38:11 -05:00
2026-11-27 18:25:16 -06:00
2026-11-29 06:34:13 -05:00
2026-11-28 19:01:06 +00:00
2026-11-29 21:05:26 -05:00
2026-11-27 12:46:36 +01:00
2026-11-30 16:34:27 +01:00
2026-11-28 19:01:06 +00:00
2026-11-28 19:01:06 +00:00
2026-11-30 23:34:45 +00:00
2026-11-26 18:52:44 -05:00
2026-11-27 11:44:26 -05:00
2026-11-29 10:40:34 -05:00
2026-11-28 06:29:45 -05:00
2026-11-30 04:34:17 -05:00
2026-11-28 04:42:02 -05:00
2026-11-27 19:57:44 -05:00
2026-11-27 11:28:10 +03:00
2026-11-27 16:38:40 +01:00
2026-11-27 23:24:53 -05:00
2026-11-28 19:01:06 +00:00
2026-11-29 13:44:40 +01:00
2026-11-28 20:42:28 -08:00
2026-11-28 04:42:02 -05:00
2026-11-29 09:25:40 -05:00
2026-11-27 13:24:49 +01:00
2026-11-27 21:10:54 -05:00
2026-11-26 19:40:14 -05:00
2026-11-30 17:00:23 +01:00
2026-11-30 14:30:43 +01:00
2026-11-29 10:40:34 -05:00
2026-11-26 17:22:16 -05:00
2026-11-29 16:41:49 +01:00
2026-11-29 06:34:52 -05:00
2026-11-29 06:34:52 -05:00
2026-11-28 19:01:06 +00:00
2026-11-28 16:50:03 -05:00
2026-11-29 20:00:18 +01:00
2026-11-29 07:17:27 -05:00
2026-11-27 04:32:30 -05:00
2026-11-30 14:19:24 +01:00
2026-11-27 05:20:52 -05:00
2026-11-28 04:42:02 -05:00
2026-11-29 10:40:34 -05:00
2026-11-29 06:34:13 -05:00
2026-11-26 19:40:14 -05:00
2026-11-28 04:42:02 -05:00
2026-11-27 20:07:18 -06:00
2026-11-27 19:40:07 -06:00
2026-11-27 19:39:04 -06:00
2026-11-29 06:34:52 -05:00
2026-11-29 21:05:26 -05:00
2026-11-29 13:44:40 +01:00
2026-11-28 19:01:06 +00:00
2026-11-27 21:13:23 -05:00
2026-11-29 13:44:40 +01:00
2026-11-27 18:22:59 -06:00
2026-11-27 18:22:59 -06:00
2026-11-29 13:44:40 +01:00
2026-11-28 19:01:06 +00:00
2026-11-30 04:34:17 -05:00
2026-11-29 21:05:26 -05:00