Frame: buffer cached PSF events per worker

This commit is contained in:
wyj committed 2026-09-05 03:06:46 -04:00
1 parent 4953775cdd
commit 2a03cbf724
5 files changed
+187 -32

No files matched your search

+18
View File
@@ -222,6 +222,24 @@ int main(void) {
goto done;
}
psf_kernel_cache_destroy(&loose_tail_cache);
/* This is the exact eligibility split that a future event sink exposes to
* HIP: cache event, CPU direct fallback, or min-Y discard. */
PsfCachedEvent prepared = {0};
if (psf_prepare_cached_event(&prepared, 12.25, 14.75,
(LinearRgb){1.0, 1.0, 1.0}, 1.0, &psf, &cache,
1.0, psf_relative_tail, 0.0) != 0 ||
prepared.x != 12.25 || prepared.y != 14.75 ||
!(prepared.support_radius > 0.0) ||
psf_prepare_cached_event(&prepared, 12.25, 14.75,
(LinearRgb){1.0, 1.0, 1.0}, 1000.0, &psf, &cache,
1.0, psf_relative_tail, 0.0) != 1 ||
psf_prepare_cached_event(&prepared, 12.25, 14.75,
(LinearRgb){1.0, 1.0, 1.0}, 1.0, &psf, &cache,
1.0, psf_relative_tail, 1.0) != 3) {
fputs("PSF event eligibility regression failed\n", stderr);
free(cached_hdr); free(reference_hdr); psf_kernel_cache_destroy(&cache);
goto done;
}
const double phases[][2] = {{0.01, 0.99}, {0.499, 0.501}, {0.999, 0.001}};
for (size_t phase = 0; phase < sizeof phases / sizeof *phases; ++phase) {
memset(cached_hdr, 0, (size_t)width * height * 3 * sizeof *cached_hdr);