Skip to content

Commit

Permalink
st/nine: Add fallback for YUV formats
Browse files Browse the repository at this point in the history
Adds alternative format to store YUV textures/surfaces.

These will be converted on upload to the alternative format.
Fixes: iXit/wine-nine-standalone#39

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
  • Loading branch information
axeldavy committed Apr 11, 2021
1 parent 94d2f64 commit 5a8a98f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/gallium/frontends/nine/nine_pipe.h
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,14 @@ d3d9_to_pipe_format_checked(struct pipe_screen *screen,
if (format_check_internal(PIPE_FORMAT_R32G32B32X32_FLOAT))
return PIPE_FORMAT_R32G32B32X32_FLOAT;
break;
/* Fallback for YUV formats */
case D3DFMT_UYVY:
case D3DFMT_YUY2:
case D3DFMT_NV12:
if (bindings & PIPE_BIND_RENDER_TARGET)
return PIPE_FORMAT_NONE;
if (format_check_internal(PIPE_FORMAT_R8G8B8X8_UNORM))
return PIPE_FORMAT_R8G8B8X8_UNORM;
default:
break;
}
Expand Down

0 comments on commit 5a8a98f

Please sign in to comment.