2
0
Эх сурвалжийг харах

HDR10 colorspace isn't currently supported

You can't do blending directly in PQ space, which means you have to create a scene render target in linear space and use shaders to convert PQ texture data to linear, etc. All of this is out of scope for the SDL 2D renderer at the moment.
Sam Lantinga 1 жил өмнө
parent
commit
90597aeaef

+ 2 - 2
src/render/direct3d11/SDL_render_d3d11.c

@@ -2516,8 +2516,8 @@ SDL_Renderer *D3D11_CreateRenderer(SDL_Window *window, SDL_PropertiesID create_p
     SDL_SetupRendererColorspace(renderer, create_props);
     SDL_SetupRendererColorspace(renderer, create_props);
 
 
     if (renderer->output_colorspace != SDL_COLORSPACE_SRGB &&
     if (renderer->output_colorspace != SDL_COLORSPACE_SRGB &&
-        renderer->output_colorspace != SDL_COLORSPACE_SCRGB &&
-        renderer->output_colorspace != SDL_COLORSPACE_HDR10) {
+        renderer->output_colorspace != SDL_COLORSPACE_SCRGB
+        /*&& renderer->output_colorspace != SDL_COLORSPACE_HDR10*/) {
         SDL_SetError("Unsupported output colorspace");
         SDL_SetError("Unsupported output colorspace");
         SDL_free(renderer);
         SDL_free(renderer);
         return NULL;
         return NULL;

+ 2 - 2
src/render/direct3d12/SDL_render_d3d12.c

@@ -3041,8 +3041,8 @@ SDL_Renderer *D3D12_CreateRenderer(SDL_Window *window, SDL_PropertiesID create_p
     SDL_SetupRendererColorspace(renderer, create_props);
     SDL_SetupRendererColorspace(renderer, create_props);
 
 
     if (renderer->output_colorspace != SDL_COLORSPACE_SRGB &&
     if (renderer->output_colorspace != SDL_COLORSPACE_SRGB &&
-        renderer->output_colorspace != SDL_COLORSPACE_SCRGB &&
-        renderer->output_colorspace != SDL_COLORSPACE_HDR10) {
+        renderer->output_colorspace != SDL_COLORSPACE_SCRGB
+        /*&& renderer->output_colorspace != SDL_COLORSPACE_HDR10*/) {
         SDL_SetError("Unsupported output colorspace");
         SDL_SetError("Unsupported output colorspace");
         SDL_free(renderer);
         SDL_free(renderer);
         return NULL;
         return NULL;

+ 2 - 0
test/testcolorspace.c

@@ -403,8 +403,10 @@ int main(int argc, char *argv[])
                     colorspace = SDL_COLORSPACE_SRGB;
                     colorspace = SDL_COLORSPACE_SRGB;
                 } else if (SDL_strcasecmp(colorspace_name, "scRGB") == 0) {
                 } else if (SDL_strcasecmp(colorspace_name, "scRGB") == 0) {
                     colorspace = SDL_COLORSPACE_SCRGB;
                     colorspace = SDL_COLORSPACE_SCRGB;
+/* Not currently supported
                 } else if (SDL_strcasecmp(colorspace_name, "HDR10") == 0) {
                 } else if (SDL_strcasecmp(colorspace_name, "HDR10") == 0) {
                     colorspace = SDL_COLORSPACE_HDR10;
                     colorspace = SDL_COLORSPACE_HDR10;
+*/
                 } else {
                 } else {
                     SDL_Log("Unknown colorspace %s\n", argv[i + 1]);
                     SDL_Log("Unknown colorspace %s\n", argv[i + 1]);
                     goto quit;
                     goto quit;