Too slow graphic (direct mode)

I have my own low-level graphic routines and only need Photon to copy the resulting memory surface to the video card. Is there some fast way?

I tried PgContextBlitArea with offscreen context PgGetOffscreenContextPtr. When I copy the memory content with memcpy, much time is spent in this memcpy. Perhaps it has something to do with our hardware and the shared memory implementation. The HW is Power PC processor with 266 MHz. It uses flash memory as disc space and 128 MB SDRAM for programs. Other Photon programs run fast, with no problems.

And I tried PgDrawImage which is perhaps even slower, you can see how the screen fills from top to bottom. Most time is spent in the graphics driver.

Please help!

Thanks guys,

Well, you are going to be limited by the PCI bus speed, 33Mhz. So if you are going to compose your display in host memory then the memcpy is going to be slow. The best speed will be obtained by creating an off-screen context and using the Pg*() API to draw into that context and then blitting that to the screen.

I know that Pg* API is the fastest way, but my drawing functions have some special features. I measured that memcpy to offscreen context takes about 0.2seconds. Offscreen has about 768kB (800x480x16bpp). It is about 3.75MB/s and I think it must be ten times more. PWM and other programs like pterm have very high FPS.



PCI and it’s relatives need to operate in burst mode to get the rated perfomance, otherwise you will get exactly what you’ve been getting.

And I don’t know how to perform a burst transaction from code.