diff options
author | Patrick Rudolph <siro@das-labor.org> | 2016-09-02 15:32:44 +0200 |
---|---|---|
committer | Jose Fonseca <jfonseca@vmware.com> | 2016-09-21 11:48:49 +0100 |
commit | 3e6c417b8d4e64b78003fba4599f1de336b60133 (patch) | |
tree | 1dd26a887450a1d1cf2ba5de121a27f7fe9fe027 /retrace/d3d9state_formats.cpp | |
parent | ada2111fe61aa582bc01c22c27986ba41257de3a (diff) |
d3dretrace: Add support for D3DFMT_X8B8G8R8
Add format D3DFMT_X8B8G8R8.
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Diffstat (limited to 'retrace/d3d9state_formats.cpp')
-rw-r--r-- | retrace/d3d9state_formats.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/retrace/d3d9state_formats.cpp b/retrace/d3d9state_formats.cpp index 9c128aff..c3157a33 100644 --- a/retrace/d3d9state_formats.cpp +++ b/retrace/d3d9state_formats.cpp @@ -186,6 +186,7 @@ ConvertImage(D3DFORMAT SrcFormat, channelType = image::TYPE_FLOAT; break; case D3DFMT_X8R8G8B8: + case D3DFMT_X8B8G8R8: case D3DFMT_R5G6B5: numChannels = 3; channelType = image::TYPE_UNORM8; @@ -263,6 +264,13 @@ ConvertImage(D3DFORMAT SrcFormat, dst[3*x + 2] = src[4*x + 0]; } break; + case D3DFMT_X8B8G8R8: + for (unsigned x = 0; x < Width; ++x) { + dst[3*x + 0] = src[4*x + 0]; + dst[3*x + 1] = src[4*x + 1]; + dst[3*x + 2] = src[4*x + 2]; + } + break; case D3DFMT_A32B32G32R32F: for (unsigned x = 0; x < Width; ++x) { ((float *)dst)[4*x + 0] = ((const float *)src)[4*x + 0]; |