Skip to main content
GameDev.net gamedev.net
🔒 Locked

Prefetching textures

Started by neocron Sep 11, 2000 at 1:05 PM 0 replies 400+ views
Original Post
neocron
neocron
Hi, I was wondering if there''s a reliable way to mimic the ''prefetch'' asm instruction. I''d like to use prefetch on PII Intel processors to speedup sprite/billboard blitting (in a software renderer). ''prefetch'' is only supported on PIII. Thanks, Karen
mhkrause
mhkrause
int junk = *SomeDataINeedSometimeLater;

This is because on a modern CPU, prefetch is essentially a load that has no destination register. The above solution is not quite as efficient. Since you never use this data, there is no dependency, so the load can be pending while other stuff is going on. This will work on everything on a PPro on up, and a K6 on up.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.