did u use video memory before?
-
there are 2 buffers (size= 1 MB) in my app. one buffer is in video memory (get by DirectX), another one is in system memory (by new). if copy from system buffer -> video buffer, time=15 ms if copy from video buffer -> system buffer, time=180 ms my question is: why is it so slow from video to system memory? how to solve the problem? thanks includeh10
-
there are 2 buffers (size= 1 MB) in my app. one buffer is in video memory (get by DirectX), another one is in system memory (by new). if copy from system buffer -> video buffer, time=15 ms if copy from video buffer -> system buffer, time=180 ms my question is: why is it so slow from video to system memory? how to solve the problem? thanks includeh10
It's very common for reads from the video buffer to be slow. The details of why depends on your specific hardware and directx driver. In general terms the video buffer is not just another block of RAM; after you are done writing to it, it may not contain exactly what you put in yet (or ever). DirectX tries to hide these details, but when you read from video memory it has to make everything synch up so it behaves like you expected it to. The most common workaround is to rework your application so it does not have to read from the video buffer. It's seldom absolutely necessary.
-
It's very common for reads from the video buffer to be slow. The details of why depends on your specific hardware and directx driver. In general terms the video buffer is not just another block of RAM; after you are done writing to it, it may not contain exactly what you put in yet (or ever). DirectX tries to hide these details, but when you read from video memory it has to make everything synch up so it behaves like you expected it to. The most common workaround is to rework your application so it does not have to read from the video buffer. It's seldom absolutely necessary.
Hi antlers, what i need is just "read from video memory". i don't need 'write to video memory'. it can be assumed as a screen capture. my process is 1. use surface->Lock to get video buffer 2. copy the buffer to system memory u say 'it does not have to read from the video buffer', could u give me some details for re-working my app? (the app is in realtime, speed is important, so i use DirectX) thanks. includeh10