Skip to content

Commit

Permalink
D3D9: Reuse BGRA conversion code.
Browse files Browse the repository at this point in the history
Also, couldn't have been right to skip it when the pointers equal, not
sure if that case was ever being hit.
  • Loading branch information
unknownbrackets committed Jun 6, 2018
1 parent 2ab1552 commit ad0b843
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions GPU/Directx9/FramebufferDX9.cpp
Expand Up @@ -529,16 +529,7 @@ static const D3DVERTEXELEMENT9 g_FramebufferVertexElements[] = {
const u32 *src32 = (const u32 *)src;

if (format == GE_FORMAT_8888) {
u32 *dst32 = (u32 *)dst;
if (src == dst) {
return;
} else {
for (u32 y = 0; y < height; ++y) {
ConvertBGRA8888ToRGBA8888(dst32, src32, width);
src32 += srcStride;
dst32 += dstStride;
}
}
ConvertFromBGRA8888(dst, src, dstStride, srcStride, width, height, Draw::DataFormat::R8G8B8A8_UNORM);
} else {
// But here it shouldn't matter if they do intersect
u16 *dst16 = (u16 *)dst;
Expand Down

0 comments on commit ad0b843

Please sign in to comment.