summaryrefslogtreecommitdiff
path: root/retrace/d3d9state_formats.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'retrace/d3d9state_formats.cpp')
-rw-r--r--retrace/d3d9state_formats.cpp8
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];