The invention discloses a Direct3D
memory model compatible method based on adaptive placeholder resources, which comprises the following steps: establishing resource
metadata, accessing a scene
library, checking an instruction template and double sandboxes when a DXVK is started, describing related resources by the DXVK through the
metadata after a D3D application is started, completing resource mapping and
metadata dynamic updating, and allocating the resources to the corresponding sandboxes; the DXVK compiles an application
shader code, identifies a resource access instruction, matches an access scene and a check template by combining a pipeline stage and binding slot query metadata, instantiates the check instruction and adds the check instruction to the front of a target instruction; according to the unbound resources, adaptive generation of corresponding occupied resources is carried out, the authority and the state are configured, the unbound resources are bound to a Vulkan descriptor set to replace VKNULLHANDLE, and
adaptation of the
shader interface and the pipeline state parameters is completed to create PSO (
Particle Swarm Optimization); and intercepting an application rendering instruction analysis parameter to construct a command buffer area, submitting the command buffer area to a Vulkan
queue to trigger a GPU (Graphic
Processing Unit) to execute rendering, and finally completing complete conversion and
adaptation from the D3D rendering logic to the Vulkan.