Explanation of three types of memory in d3d: memory, memory, and memory

Source: Internet
Author: User

Http://bbs.gameres.com/showthread.asp? Threadid = 57428

 

The excerpt is as follows:


 

Three types of memory, such as the local memory and system memory of the video card, all of us know that the local memory of the video card is the memory of the video card, and the system memory is the memory card of the video card. What is the content of the AGP memory? In fact, it was because the memory of the video card was very small in the past. At that time, when the memory size was 16 MB and 32 MB was the mainstream, if you were running a 3D program that needed a lot of textures, so the memory will not be enough for a while. What should we do? I have to ask if the system memory usage is used! This is the origin of the AGP memory. In our computer bios, there is an option to set the AGP aperture. Here we set the maximum allowable value for the video card to use the system memory, which is usually set to 64 MB. Note: Here we only talk about the maximum allowed value. Instead of taking the 64 m off the server, your 256 memory will become 192! However, your memory is still 256 MB, but you can limit the maximum usage of 64 MB system memory for the video card.


Let's talk about the speed of these three memories!

Of course, the system memory is the fastest CPU read and write operations! The graphics card will be much slower than using your own video memory!
The speed of reading and writing video card memory is normal, of course, no video card is faster! The CPU is relatively complex. The speed of reading the memory from the CPU is very slow, but the write speed is not slow, but the speed is average, which is a little slower than using the system memory, that is to say, it is suitable for CPU to write but not suitable for reading. Someone may ask, the same is that the system memory name is just different. What is the difference in speed? Well, I am not quite clear about this. Foreigners just need to remember it!
The last point is the video memory. This is very simple. Of course, the speed of reading and writing the video card is the fastest, and the speed of reading and writing the CPU must be much slower!
After talking about the differences between the three memories, let's talk about their usefulness! This involves a d3dusage enumeration volume, d3dusage_dynamic. This variable is used when you create a resource. It instructs d3d to specify the resource as dynamic, which means that it needs to be modified frequently, generally, the CPU is modified, so dynamic resources should be placed in the AGP memory. This can minimize the impact on speed.

 

D3dusage_writeonly indicates that only write operations are allowed on the created resource. Using this flag allows devices to place this resource in the most suitable area of memory for write processing and rendering. If the d3dusage_writeonly flag is not used, the device may select a memory area if the created resource is used for both reading and writing, the speed of read and write operations is moderate. This sacrifices some processing and rendering speeds.

 

The access speed depends on the lock type and the Resource Creation type.

Yes, d3dlock flag and Resource Creation type are also affected.
However, the three memory types are another method to optimize access, because for example, the particle system needs to use the AGP memory, because it requires frequent CPU modifications and frequent reading by the graphics processing card, if it is stored in the video memory, the CPU modification efficiency is too low! If it is stored in the memory, the access speed of the graphics processing card is too slow! Therefore, the three types of memory must be clear!

 

Note:

Similarly, the system memory name is different. Why is the speed different? Well, I am not quite clear about this. Foreigners just need to remember it!
------------------------------------------------------------------------
That's because there is no cache for CPU reading, and there is no cache for writing, but there is a write combine (this Chinese character seems to be fast writing ?).
In addition, The AGP aperture size set in BIOS has long been ignored by the driver or system.

 

 

Directx9 (memory l) details three types of memory: resource management best practices topic


 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.