From 9d845a3846ab7eaf3c9377cf7a20e8cb6ff5ca3b Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Fri, 16 Oct 2026 15:54:10 -0700
Subject: [PATCH] testcolorspace: use the default SDR white point for the HDR10
ramp test
On Metal with HDR10 output the SDR_white_level was 1.25 (100 nits), so the white point was set lower than on other platforms. We'll use the same value on all platforms so the test has consistent output.
---
test/testcolorspace.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/test/testcolorspace.c b/test/testcolorspace.c
index 82ff644a7014f..fbb269311d931 100644
--- a/test/testcolorspace.c
+++ b/test/testcolorspace.c
@@ -911,14 +911,6 @@ static SDL_Texture *CreateHDR10Texture(int width, float max_nits)
SDL_SetNumberProperty(props, SDL_PROP_TEXTURE_CREATE_ACCESS_NUMBER, SDL_TEXTUREACCESS_STATIC);
SDL_SetNumberProperty(props, SDL_PROP_TEXTURE_CREATE_WIDTH_NUMBER, width);
SDL_SetNumberProperty(props, SDL_PROP_TEXTURE_CREATE_HEIGHT_NUMBER, 1);
- // The white point for HDR10 textures is the SDR white level in nits
- if (SDR_white_level > 1.0f) {
- // We'll match the current display SDR white level so we don't get any scaling here
- SDL_SetFloatProperty(props, SDL_PROP_TEXTURE_CREATE_SDR_WHITE_POINT_FLOAT, SDR_white_level * SCRGB_NITS);
- } else {
- // ITU-R BT.2408-6 recommends using an SDR white point of 203 nits.
- SDL_SetFloatProperty(props, SDL_PROP_TEXTURE_CREATE_SDR_WHITE_POINT_FLOAT, 203.0f);
- }
texture = SDL_CreateTextureWithProperties(renderer, props);
SDL_DestroyProperties(props);
if (!texture) {