--- DirectX11 base device (Device), and the device context (Device context)

Device (Device)

ID3DllDeviceInterface provides a number of ways to create shader program objects, resources, state objects and query objects (and so on). It also provides some hardware features to check the availability of the method, as well as a number of methods related to diagnostic and debugging. Typically, the device can be seen as the provider of resources used by the application.
In addition to being a resource provider Direct3D 11, the device further encapsulatedCharacteristic level (feature levels)the concept of. Use a level characteristic allows applications to run Direct3D 11 API and use of technology in the hardware that implements some older features such as Direct3D 10 gpu. This allows applications to use the same rendering API, but still for several generations of hardware.

Device context (Device Context)

althoughEquipment (device) Pipes used to create a variety of resources used, but in order to actually use these resources and to manipulate the pipe itself, we will useDevice context (device context). Device context is created for the resource, and status objects shader object is bound to the pipeline. They are also used to control execution of the rendering pipeline and calculation. In addition, they also provide a method of operating resources of the device created. Typically, device context can be seen as a device generating the resource consumer, as a device interface processing pipeline.
Implemented in a device context ID3DllDeviceContext interface. To help support the introduction of multi-threaded rendering, it provides two different styles of contexts. The first is calledImmediate context (immediate context)The second is calledDelay context (deferred context). While both types of devices to achieve the same context interface, but their use have very different semantics. We will discuss the concepts behind these two contexts below.

Even context (immediate context)

Even if the context is more or less a direct link to the rendering pipeline. When calling this method from context, Direct3D 11 will immediately submit the runtime method, in order to perform in the driver. Only one immediate context, and it was created at the same time creating the device. This context can be seen as direct interaction with all components of rendering pipeline interface. The render thread context must be used as the primary, as the primary interface and the GPU.

Delay context (deferred context)

Delay context is a type of secondary context, it provides a security thread, for recording a series of commands from the secondary thread (except for rendering the main thread). This command is used to generate a list of object that can be later in the immediate context "Playback." It allows the generation of a list of commands from other threads offer a number of performance improvements found in the multi-core CPU system. In addition, Direct3D 11 is also allowed to perform asynchronous resources on multiple threads created, which provides the ability to simplify multi-threaded load situations. When taking into account the current and future PC hardware environment, these are very important concept, we can expect an increasing number of CPU cores available in a given PC.

Guess you like

Origin blog.csdn.net/u014128662/article/details/90679565