MCPcopy Create free account
hub / github.com/dolphin-emu/dolphin / SetSpans

Function SetSpans

Source/Core/VideoBackends/Software/TextureEncoder.cpp:216–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214}
215
216static void SetSpans(int sBlkSize, int tBlkSize, s32* tSpan, s32* sBlkSpan, s32* tBlkSpan, s32* writeStride)
217{
218 // width is 1 less than the number of pixels of width
219 u32 width = bpmem.copyTexSrcWH.x >> bpmem.triggerEFBCopy.half_scale;
220 u32 alignedWidth = (width + sBlkSize) & (~(sBlkSize-1));
221
222 u32 readStride = 3 << bpmem.triggerEFBCopy.half_scale;
223
224 *tSpan = (640 - sBlkSize) * readStride; // bytes to advance src pointer after each row of texels in a block
225 *sBlkSpan = ((-640 * tBlkSize) + sBlkSize) * readStride; // bytes to advance src pointer after each block
226 *tBlkSpan = ((640 * tBlkSize) - alignedWidth) * readStride; // bytes to advance src pointer after each row of blocks
227
228 *writeStride = bpmem.copyMipMapStrideChannels * 32;
229}
230
231#define ENCODE_LOOP_BLOCKS \
232 for (int tBlk = 0; tBlk < tBlkCount; tBlk++) { \

Callers 2

EncodeRGBA6Function · 0.85
TextureEncoder.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected