upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/vulkan_present.h
diff options
context:
space:
mode:
authorAlxcBTW <187763517+AlxcBTW@users.noreply.github.com>2026-11-22 19:45:00 +0100
committerAlxcBTW <187763517+AlxcBTW@users.noreply.github.com>2026-11-22 19:45:00 +0100
commitd3b774eed51b76dea1f0ca3888d6b02a997dcd0a (patch)
tree00006ce4f15e9b4ba5954aa95dbaeaef2e39083c /runtime/src/vulkan_present.h
parent09637840630da1db6e126e1a4cffa15c159c8d45 (diff)
PresentX planes: tone map shoulder, SDR white query off the present path, review fixes
- Tone map: identity up to 0.8 of SDR white, extended Reinhard shoulder above it, continuous in value and slope, content peak maps to 1.0 (SDR-range content is no longer darkened). - The Windows SDR white level is read by a background thread (about once a second, only while HDR10 is in use); PresentX reads an atomic. A failed query keeps the last good value; QueryDisplayConfig retries on ERROR_INSUFFICIENT_BUFFER. - LEONIDA_SDR_EOTF is case-insensitive, unknown or too long values are logged; setters are atomics; <cwchar> for wcscmp. - Tests: eight-step HDR10 ramp with hand-calculated bytes, curve properties (monotonic, identity below the knee, peak 1, slope continuity), HDR10 plane 1 over SDR plane 0 on HDR10 and SDR outputs, hand-calculated 50% overlay bytes, query cost. - Docs 4.5: shoulder description, query cost, sources marked (KWin claim unverified, vkd3d-proton file partly read, the measured 80 nits only covers the SDR fallback path). - present_compose.inc rebuilt with glslc 2026.4 (reproducible, spirv-val clean). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/vulkan_present.h')
-rw-r--r--runtime/src/vulkan_present.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/src/vulkan_present.h b/runtime/src/vulkan_present.h
index 09fb4490e..75492d30f 100644
--- a/runtime/src/vulkan_present.h
+++ b/runtime/src/vulkan_present.h
@@ -236,7 +236,7 @@ public:
236 // destination rectangle of the window, plane 1 blended over plane 0, composed by a compute pass into an RGBA16F image 236 // destination rectangle of the window, plane 1 blended over plane 0, composed by a compute pass into an RGBA16F image
237 // that is then copied to the swapchain image. Colour spaces are converted to the swapchain's: when a plane is HDR10 and 237 // that is then copied to the swapchain image. Colour spaces are converted to the swapchain's: when a plane is HDR10 and
238 // the surface lists an HDR10 (ST.2084) format the swapchain uses it (hdr_active()), else the HDR10 planes are 238 // the surface lists an HDR10 (ST.2084) format the swapchain uses it (hdr_active()), else the HDR10 planes are
239 // tone mapped to SDR (extended Reinhard, then clipped). Planes are filtered and blended in linear light. The swapchain 239 // tone mapped to SDR (shoulder above 0.8 of SDR white, then clipped). Planes are filtered and blended in linear light. The swapchain
240 // is always UNORM here; sRGB-format sources are 240 // is always UNORM here; sRGB-format sources are
241 // encoded again by the pass. Sources must be single-sample, sampled (no DENY_SHADER_RESOURCE) float/UNORM/sRGB 241 // encoded again by the pass. Sources must be single-sample, sampled (no DENY_SHADER_RESOURCE) float/UNORM/sRGB
242 // colour textures; others are refused (VK_ERROR_FORMAT_NOT_SUPPORTED). Rectangles outside their range give 242 // colour textures; others are refused (VK_ERROR_FORMAT_NOT_SUPPORTED). Rectangles outside their range give