The invention discloses a Direct3D rendering model compatible method based on a dynamic template
pool, which comprises the following steps: establishing three types of mapping tables between D3D and Vulkan when compiling DXVK, constructing resource
metadata, and creating a core, extended and temporary three-level template
pool according to the mapping tables after starting; when the D3D application creates resources,
metadata is initialized, parameters are verified, physical memories are allocated and grouped, resource groups are pre-verified, a batch binding command is generated, memory binding is completed, and the
metadata is updated; when a resource view is created, a template is matched from a template
pool, a
handle is generated after instantiation, a resource
handle is associated, and a descriptor is bound; when a rendering state is set and a rendering instruction is executed, the rendering state and the rendering instruction are respectively converted into a Vulkan related state and a Vulkan related instruction through a mapping table, a
handle is bound after a PSO cache is inquired, a command buffer area is submitted to a GPU
queue to execute drawing, and compatible operation of the D3D application on a platform supporting a Vulkan
operating system is realized under the condition that the GPU does not support VKKHRmaintence5 and VKKHRmaintence6 extension.