Repository navigation
feat(metal): sync upstream batch 18 and optimize scanout caching & shader bindings - #535
Conversation
v_floor_f64, v_ceil_f64, v_fract_f64, v_frexp_mant_f64 and v_frexp_exp_i32_f64 ignored the FLOAT_MODE f16/f64 denormal field. On RDNA2 (gfx1031) bit 6 clear flushes a denormal input to a zero of its sign, so v_ceil_f64 of 2^-1074 is 0 instead of 1, and bit 7 clear flushes the denormal result v_fract_f64 gives for a positive denormal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v_add_f64 and v_mul_f64 ignored the FLOAT_MODE f16/f64 denormal field. On RDNA2 (gfx1031) bit 6 clear flushes both inputs to a zero of their sign, and bit 7 clear flushes a sum below 2^-1022 and a product whose exact value rounded to 53 significant bits with an unbounded exponent is below 2^-1022. The product test scales one source by 2^64 and compares the host product with 2^-958. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… parallel push elision
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Summary
This PR merges Upstream Batch 18 and applies four targeted Metal performance optimizations for Apple Silicon / Civilization VII:
MetalPresentation.mm):MTLTextureacross frames viareplaceRegion:withBytes:, eliminating 500 MB/s - 2 GB/s of transient VRAM allocation churn.MetalShaderPipeline.mm):std::mapwith an inline stack-backed flat array lookup table inprepare(), eliminating ~30,000 heap allocations per frame at 60 FPS.PreparedBindingsvectors (buffers,textures,samplers) up front.MetalDraw.mm):setVertexBytesandsetFragmentBytesacross consecutive draws sharing identical push payloads.