MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / ReadTextureGPU24

Method ReadTextureGPU24

pcsx2/GS/GSLocalMemoryMultiISA.cpp:1077–1095  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1075}
1076
1077void GSLocalMemoryFunctions::ReadTextureGPU24(GSLocalMemory& mem, const GSOffset& off, const GSVector4i& r, u8* dst, int dstpitch, const GIFRegTEXA& TEXA)
1078{
1079 foreachBlock(off.assertSizesMatch(GSLocalMemory::swizzle16), mem, r, dst, dstpitch, 16, [&](u8* read_dst, const u8* src)
1080 {
1081 GSBlock::ReadBlock16(src, read_dst, dstpitch);
1082 });
1083
1084 // Convert packed RGB scanline to 32 bits RGBA
1085 pxAssert(dstpitch >= r.width() * 4);
1086 for (int y = r.top; y < r.bottom; y++)
1087 {
1088 u8* line = dst + y * dstpitch;
1089
1090 for (int x = r.right; x >= r.left; x--)
1091 {
1092 *(u32*)&line[x * 4] = *(u32*)&line[x * 3] & 0xFFFFFF;
1093 }
1094 }
1095}
1096
1097void GSLocalMemoryFunctions::ReadTexture16(GSLocalMemory& mem, const GSOffset& off, const GSVector4i& r, u8* dst, int dstpitch, const GIFRegTEXA& TEXA)
1098{

Callers

nothing calls this directly

Calls 3

ReadBlock16Function · 0.85
assertSizesMatchMethod · 0.80
foreachBlockFunction · 0.70

Tested by

no test coverage detected