The invention discloses a Direct3D
stream output virtual implementation method based on kernel enhancement, which comprises the following steps: in a DXVK compiling stage, constructing
stream data for a
shader, establishing a format mapping table and an application scene
library of D3D, DXVK and a kernel, initializing a
shared memory pool when the kernel is started, after the DXVK is started, establishing an
abstraction layer consistent with VKEXTTransformFEDback, analyzing parameters when an application calls a
stream output related API (Application Program Interface), and implementing the kernel enhancement based Direct3D stream output virtual implementation. The buffer binding type API triggers a kernel to distribute partitions for streams, the
stream control type API triggers a corresponding
shader to rewrite, the query operation type API extracts query related information, the execution
shader writes data into a temporary delivery buffer, data distribution is completed when a distribution condition is met, a distribution channel of an
abstraction layer is packaged into a Vulkan secondary command buffer, and the Vulkan secondary command buffer is used for sending the data to the execution shader. And reusing a DXVK rendering thread command
pool and submitting the command
pool to the GPU in batches to finish rendering.