高速格納Order書き換えメモ

通常

void* dst;
uint32 pitch;
int xp, yp;
const int ey = yp + 10;
texture.Lock(dst, pitch);
for (int y = yp; y < ey; ++y) {
	uint8* dp = (uint8*)dst+ y * pitch + xp;
	for (int x = 0; x < 10; ++x) {
		*dp++ = 0;
	}
}
texture.Unlock();

高速

void* dst;
uint32 pitch;
int xp, yp;
const int ex = xp + 10;
const int ey = yp + 10;
texture.Lock(dst, pitch);
for (int y = yp; y < ey; ++y) {
	const int yy = ((y >> 3) << 3) * pitch + ((y & 0x07) << 4);
	uint8* dyp = (uint8*)dst + yy;
	for (int x = xp; x < ex; ++x) {
		const int xx = ((x >> 4) << 7) + (x & 0x0f);
		uint8* dp = dyp + xx;
		*dp = 0;
	}
}
texture.Unlock();