feat(remote): decode R11G11B10F and R9G9B9E5 packed HDR formats in remote export#240
Conversation
…mote export Both formats are common HDR render-target and IBL storage formats that PR #237 scoped out. They are closed-form bit-unpackable in numpy with no GPU round-trip, so they follow the existing local-decode path for Regular Float formats. Add _unpack_r11g11b10 and _unpack_r9g9b9e5 vectorised helpers and branch on them in _decode_texture_png before the Regular gate, carrying their own MSAA reject and local width/height/depth/length checks. Decoded RGB feeds the existing Float display pipeline (nan_to_num, clip, sRGB encode, opaque alpha, depth tiling). Repurpose the former R11G11B10 rejection test to R5G6B5, which remains an unsupported packed format after this change.
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
Warning Review limit reached
More reviews will be available in 14 minutes and 50 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
Summary
Remote-mode texture/RT export now decodes the two packed HDR formats named in #236:
R11G11B10_FLOAT(VK_FORMAT_B10G11R11_UFLOAT_PACK32)R9G9B9E5_SHAREDEXP(VK_FORMAT_E5B9G9R9_UFLOAT_PACK32)#237 scoped these out (all non-
RegularResourceFormatTypes were rejected with -32002). Both are closed-form bit-unpackable, so they now decode locally like the Regular formats.Implementation
handlers/_helpers.py: a shared unsigned mini-float decoder (5-bit exponent, 6/5-bit mantissa, bias 15, subnormal/Inf/NaN semantics) for R11G11B10, and shared-exponent decode (m * 2^(E-24)) for R9G9B9E5.Regulargate with its own MSAA rejection and a 4-bytes-per-pixel length check (compCount/compByteWidthare unreliable for packed formats).R5G6B5).Testing
--proxyexport decoded both to the exact expected sRGB (255, 188, 137), matching tex-stats ground truth. Normal-format remote export verified unaffected by the new branch ordering.