I have a question.
Does MMX work good with the latest AMD chips? I had a computer about 3 years ago with an AMD and MMX, but on all my games, it didn't read MMX, and went about 1 frame a second, on a good day. Does anybody know anything about this?
I have a question.
Does MMX work good with the latest AMD chips? I had a computer about 3 years ago with an AMD and MMX, but on all my games, it didn't read MMX, and went about 1 frame a second, on a good day. Does anybody know anything about this?
Think out of the box! Open Source rules!
-Breach23
not really Game Programming related, General Discussions would be much better
I consider it game related since MMX is most used in games. I don't have an AMD processor but I now the Athlons supports MMX.
// Gliptic
MMX is similar to RISC in design, I dont see how it could matter what sort of processor you had. I think all MMX is for AGP though.
Im still happy with a voodoo3.
And what has MMX with AGP to do? Don't you know what MMX is? It has absolutly nothing to do with gfx cards.
// Gliptic
My mistake, I misunderstood what mmx was.
1) Yes, the Athlons support MMX. Previously, AMD would only support its own 3dNow! instruction set.
2) MMX is getting to be more and more useless. Now, I'm sure some people would disagree, but the arguments against it:
* Requires the program to check for the availability of these instructions and use them
* More and more, video computation is being done on the video card itself, not by the CPU, so it's not as useful.
However, some things like the DirectX HEL I believe will check for 3DNow/MMX processors, so when they DO use software rendering, they use optimized instructions, allowing DirectX software rendering to be faster than non-MMX software renderers.
MMX is a great concept, but it was implemented too late. The video card architecture is just as fast or faster than any MMX instructions.
I don't know why checking for MMX would slow the program down. Just check for MMX when the program starts. If it's there, set a flag and call the functions that use the MMX instructions. If it's not, clear the flag and call the functions that do not use the MMX instructions. I can assure you they do not check for MMX during the rendering process and on every pass through the pipeline.
Okay, thank you all for your replies. Have fun arguing about the uses of MMX!
Think out of the box! Open Source rules!
-Breach23
I use MMX regulary for non-3D graphics tasks. For example, you can't do data encryption using your videocard (unless I haven't missed something)!
I've also done some MMX Alpha blending routines which uses alpha channels. I haven't found any alpha blending routines which uses alpha channels with MMX before.
// Gliptic
gliptic -- could you post some of your source code for MMX-enabled alpha blending, or point me to some good sources? I'm interested in learning and using this as a videocard-independant way of doing alpha blends, but have found little useful info on my own. I'd love to see and hear about how you've implemented it.
Last edited by The V.; 10-24-2001 at 12:25 PM.
Yes, I can mail you the sourcecode. I don't have it here but I'll bring it tomorrow.
The source I have is for 16-bit videomodes but 32-bit is quite easy to implent also. The current routine runs at about 100000 pixels per millisecond when blitting 32x32 images on my 500Mhz computer (that's just a non-gfx test). It uses a special image format I invented which makes it faster to read in the source images. I haven't done a clipper for it yet but that shouldn't be a big deal, although I have to use the standard instruction set when blitting leftover pixels (the routine blits 4 pixels / iteration).
BTW. Yesterday, I made a keycolor blitter which runs twice as fast as my hardware blitter, thanks to MMX!
Last edited by gliptic; 10-23-2001 at 01:01 AM.
// Gliptic
Here is my keycolor blitting routine. I haven't tested it yet, but it should work.
Code:movq mm5,KEYCOLOR ;mm5 = 1111111111111111 - The byte repeated 8 times mov eax,imagewidth mov ebx,imagewrap mov edx,screenpitch sub edx,screenwidth push ebp alphaloop: movq mm7,[esi] ;mm7 = 1122112211221122 pcmpeqb mm7,mm5 ;mm7 = FF00FF00FF00FF00 movq mm6,mm7 ;mm6 = FF00FF00FF00FF00 pand mm7,[edi] ;mm7 = FF00FF00FF00FF00 & 3344334433443344 = 3300330033003300 pandn mm6,[esi] ;mm6 = 00FF00FF00FF00FF & 1122112211221122 = 0022002200220022 por mm6,mm7 ;mm6 = 3300330033003300 | 0022002200220022 = 3322332233223322 movq [edi],mm6 add edi,8 add esi,8 dec ecx jnz alphaloop add esi,ebx ;imagewrap add edi,edx ;screenwrap (pitch-width) mov ecx,eax ;imagewidth dec ebp jnz alphaloop pop ebp
The last message was posted by me. I forgot that I haven't been on this forum on this computer.
Thanks, I'll play around w/ it.
BTW, what assembler do you use? I've used a few, wondering if you had any recommendations, although I suppose they're all the same.