WO2022048097A1 - Single-frame picture real-time rendering method based on multiple graphics cards - Google Patents

Single-frame picture real-time rendering method based on multiple graphics cards Download PDF

Info

Publication number
WO2022048097A1
WO2022048097A1 PCT/CN2021/070641 CN2021070641W WO2022048097A1 WO 2022048097 A1 WO2022048097 A1 WO 2022048097A1 CN 2021070641 W CN2021070641 W CN 2021070641W WO 2022048097 A1 WO2022048097 A1 WO 2022048097A1
Authority
WO
WIPO (PCT)
Prior art keywords
rendering
gpu
picture
rendered
frame
Prior art date
Application number
PCT/CN2021/070641
Other languages
French (fr)
Chinese (zh)
Inventor
郭建君
吴越昕
孙华庆
Original Assignee
北京蔚领时代科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京蔚领时代科技有限公司 filed Critical 北京蔚领时代科技有限公司
Publication of WO2022048097A1 publication Critical patent/WO2022048097A1/en

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/45Controlling the progress of the video game
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/66Methods for processing data by generating or executing the game program for rendering three dimensional images

Definitions

  • the invention relates to the technical field of cloud games, and in particular, to a real-time rendering method of a single frame image based on multiple graphics cards.
  • Real-time rendering is a GPU-based graphics rendering technology, which is mainly used in games, applications and other fields with real-time graphical interfaces.
  • the current real-time rendering is basically completed by one GPU. Because the performance is sufficient, the general user will not need multi-GPU rendering support. Of course, when the user is in the hardware upgrade stage, when the new and old hardware is used together, the multi-GPU rendering can also make full use of the hardware. Improve user experience. In the field of cloud game cloud hosts, high-performance CPUs and multi-GPUs are standard. It is necessary to make full use of multi-GPU resources to serve user interface and game interface rendering to meet real-time rendering requirements.
  • the purpose of the present invention is to provide a mode that is different from the existing single GPU rendering mode, and can more efficiently use multiple GPU resources to complete the synchronous rendering of the same frame.
  • the present invention provides a real-time rendering method for a single frame based on multiple graphics cards, the method comprising the following steps:
  • the rendering result of the at least one rendering GPU is synthesized into one frame of picture and output, and the next frame of picture is rendered.
  • the determining of the target GPU according to the to-be-rendered picture includes:
  • At least one rendering GPU that renders the picture to be rendered is determined from the plurality of GPUs.
  • step 103 the picture to be rendered is divided into at least one rendering part, including:
  • the to-be-rendered image is divided into at least one rendering part according to the size of the to-be-rendered image and the number of rendering GPUs.
  • the picture to be rendered is a vector graphic represented by coordinates
  • the bitmap is divided to obtain at least one rendering part.
  • a swap buffer is allocated to each rendering GPU
  • the rendering of the at least one rendering part by the at least one rendering GPU includes:
  • the rendering results of each of the rendering GPUs are imported into the corresponding swap buffers.
  • the target GPU further includes a synthesis GPU for synthesizing rendering results
  • the outputting after synthesizing the rendering result of the at least one rendering GPU into one frame of picture includes:
  • the rendering results of each of the rendering parts are synthesized by the synthesizing GPU.
  • a corresponding swap buffer is allocated to the synthetic GPU
  • the outputting after synthesizing the rendering result of the at least one rendering GPU into one frame of picture includes:
  • the composite rendering result of the composite GPU is imported into a swap buffer corresponding to the composite GPU and then output.
  • the present invention also provides a real-time rendering system for single-frame images based on multiple graphics cards, the system comprising:
  • an obtaining unit configured to obtain a to-be-rendered picture, wherein the to-be-rendered picture is a frame of picture;
  • a target GPU determination unit for determining a target GPU according to the picture to be rendered, wherein the target GPU includes at least one rendering GPU for rendering the picture to be rendered;
  • a splitting unit configured to split the to-be-rendered picture into at least one rendering part, wherein the number of rendering parts is less than or equal to the number of rendering GPUs;
  • a rendering unit configured to execute a rendering program, and the at least one rendering GPU renders the at least one rendering part
  • An output unit which combines the rendering results of the at least one rendering GPU into a frame of pictures and outputs them.
  • the present invention also provides an electronic device, comprising a memory and a processor, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to achieve the The method of any of claims 1-7.
  • the computer program is executed by a processor to implement the method according to any one of claims 1-7.
  • the beneficial effects of the present invention are: the rendering of the same frame picture is completed by multiple GPUs, the rendering of complex 3D scenes can be completed by using multiple GPU resources more efficiently, the frame rate can be maintained high, the smoothness of the picture can be guaranteed, and the use of less Resources serve more users.
  • FIG. 1 is a schematic diagram of an implementation flowchart of a method for real-time rendering of a single-frame image based on multiple graphics cards according to an embodiment of the present invention
  • FIG. 2 is a multi-GPU rendering structure diagram of a method for real-time rendering of single-frame images based on multiple graphics cards according to an embodiment of the present invention
  • FIG. 3 is a flowchart of multi-GPU rendering of a method for real-time rendering of single-frame images based on multiple graphics cards according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of a system structure of a real-time rendering system for a single frame image based on multiple graphics cards according to an embodiment of the present invention.
  • a real-time rendering method for a single-frame image based on multiple graphics cards includes the following steps:
  • a target GPU is determined according to the to-be-rendered picture, wherein the target GPU includes at least one rendering GPU for rendering the to-be-rendered picture; the target GPU is an configurable GPU among multiple GPUs.
  • the rendering result of the at least one rendering GPU is synthesized into one frame of picture and output, and the next frame of picture is rendered.
  • N rendering GPUs participating in rendering are acquired, and N ⁇ 1; then the frame to be rendered is divided into M rendering parts, and 1 ⁇ M ⁇ N;
  • the picture to be rendered can be, for example, a vector graphic represented by coordinates
  • the bitmap is divided to obtain at least one rendering part.
  • the determining of the target GPU according to the to-be-rendered picture includes:
  • At least one rendering GPU that renders the picture to be rendered is determined from the plurality of GPUs.
  • the to-be-rendered picture is divided into at least one rendering part, including:
  • the to-be-rendered image is divided into at least one rendering part according to the size of the to-be-rendered image and the number of rendering GPUs.
  • the frame to be rendered is divided into four rendering parts, and four rendering GPUs, namely GPU1, GPU2, GPU3, and GPU4, are used for rendering.
  • rendering a task record the identification of the rendering part and the identification of the corresponding rendering GPU.
  • GPU1, GPU2, GPU3 and GPU4 execute the rendering program in parallel.
  • the rendering program provides the resources required for rendering for each rendering part, and the rendering resources include the current rendering.
  • the synthesis GPU of the synthesizer synthesizes the four rendering parts according to the identification of the rendering part, and after the synthesis GPU completes the synthesis rendering, it outputs the rendered image of one frame, repeating The above rendering operation renders the scene image in real time, and outputs a smooth frame image.
  • the target GPU further includes a synthetic GPU for synthesizing rendering results
  • synthesizing the rendering results of at least one rendering GPU into one frame of picture and outputting it includes: copying the rendering results of each rendering part from the swap buffer corresponding to each rendering GPU to the memory; synthesizing the rendering results of each rendering part by synthesizing the GPU .
  • a GPU resource In this way, different GPUs are allocated to improve the utilization rate of the GPU of the whole machine.
  • a swap buffer is allocated to each of the rendering GPUs, and each of the rendering GPUs includes completing image rendering and importing the rendering result into the swap buffer.
  • a rendering GPU corresponds to rendering a rendering part
  • each rendering part is associated with a rendering GPU
  • the composite GPU is an independent GPU, but generally does not monopolize a GPU, because the workload is small, you can choose to use a dedicated GPU
  • the GPU for display output does the compositing, or one GPU can do both rendering and compositing at the same time.
  • Each rendering process includes rendering, swapping buffers, and copying GPU rendering results to memory.
  • the composite process includes sending the copied rendering results of each rendering GPU to the composite GPU to complete composite rendering, and outputting the composite rendering results to the swap buffer, and the swap buffer outputs the completed rendering results of one frame to the display device.
  • an encoding device completes the rendering of one frame of picture, repeatedly performs the above-mentioned rendering, renders the scene picture in real time, and outputs a smooth frame picture.
  • the method is applied to a game process of a cloud game, and the game scenes of multiple users are rendered in real time. Since multiple GPUs are simultaneously rendering at the same time, smooth 3D game scene rendering can be achieved. Effect.
  • the method of the present invention can be encapsulated into a graphics API library with the ability to call multiple graphics cards, and developers can use one or more graphics cards to perform graphics rendering in a single process by using the provided API.
  • the present invention also provides a real-time rendering system for single-frame images based on multiple graphics cards, the system includes:
  • an obtaining unit configured to obtain a to-be-rendered picture, wherein the to-be-rendered picture is a frame of picture;
  • a target GPU determination unit configured to determine a target GPU according to the to-be-rendered picture, wherein the target GPU includes at least one rendering GPU for rendering the to-be-rendered picture;
  • a splitting unit configured to split the to-be-rendered picture into at least one rendering part, wherein the number of rendering parts is less than or equal to the number of rendering GPUs;
  • a rendering unit configured to execute a rendering program, and the at least one rendering GPU renders the at least one rendering part
  • An output unit which combines the rendering results of the at least one rendering GPU into a frame of pictures and outputs them.
  • the acquisition unit acquires a frame to be rendered, and the target GPU determination unit determines a target GPU according to the to-be-rendered image, and the target GPU includes at least one rendering GPU for rendering the to-be-rendered image; determined by the size of the one-frame image
  • the number of rendering GPUs involved in rendering; a frame to be rendered is usually a vector graphic represented by coordinates, and a bitmap is first generated through geometric operations and pixel coloring; the segmentation unit is based on the size of the bitmap and the rendering GPU. number of divisions.
  • the number of rendering GPUs is the same as the number of divided rendering parts.
  • One rendering GPU renders one rendering part, and provides resources required for rendering for each rendering part.
  • the rendering resources include the models and textures that the current rendering part needs to use. data.
  • the rendering unit executes rendering programs, and each rendering process includes rendering, swapping buffers, and copying GPU rendering results to memory.
  • the output synthesis process includes sending the copied rendering results of each rendering GPU to the synthesis GPU to complete the synthesis rendering, outputting the synthesized rendering results to the exchange buffer, and outputting the completed rendering results of one frame to the display from the exchange buffer.
  • the device or encoding device completes the rendering of a frame. By continuously executing frame stream data, the scene image is rendered in real time, and a smooth video stream image is output.
  • the game scenes of multiple users are rendered in real time, and the identification of the rendering part, the identification of the corresponding rendering GPU, and the user identification are recorded when the screen is split.
  • the GPUs complete the rendering respectively, according to the rendering part ID, rendering GPU ID and user ID, the current game scene is synthesized for the user, and the synthesized and rendered game scene is sent to the corresponding user terminal to serve multiple users simultaneously in one game process. , which can ensure the smoothness of the game screen and improve the user experience while reducing the consumption of server resources and the number of servers.
  • the present disclosure also relates to an electronic device, including a server, a terminal, and the like.
  • the electronic device includes: at least one processor; a memory communicatively connected to the at least one processor; and a communication component communicatively connected to the storage medium, the communication component receiving and transmitting data under the control of the processor; wherein the memory stores Instructions executable by at least one processor to implement the methods in the above-described embodiments.
  • the memory as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs and modules.
  • the processor executes various functional applications and data processing of the device by running the non-volatile software programs, instructions and modules stored in the memory, that is, implementing the method.
  • the memory may include a stored program area and a stored data area, wherein the stored program area can store an operating system, an application program required by at least one function; the stored data area can store an option list and the like. Additionally, the memory may include high speed random access memory, and may also include nonvolatile memory, such as at least one magnetic disk storage device, flash memory device, or other nonvolatile solid state storage device. In some embodiments, the memory may optionally include memory located remotely from the processor, such remote memory being connectable to an external device via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
  • One or more modules are stored in memory, and when executed by one or more processors, perform the method in any of the above method embodiments.
  • the above product can execute the methods provided by the embodiments of the present application, and have functional modules and beneficial effects corresponding to the execution methods.
  • functional modules and beneficial effects corresponding to the execution methods For technical details not described in detail in the present embodiments, reference may be made to the methods provided by the embodiments of the present application.
  • the present disclosure also relates to a computer-readable storage medium for storing a computer-readable program, the computer-readable program being used for a computer to execute some or all of the above method embodiments.
  • the aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Generation (AREA)

Abstract

Disclosed in the present invention is a single-frame picture real-time rendering method based on multiple graphics cards, the method comprising: acquiring a picture to be rendered; on the basis of the picture, determining target GPU, the target GPU comprising at least one rendering GPU; dividing the picture into at least one rendering part, the number of rendering parts being less than or equal to the number of rendering GPU; by means of the at least one rendering GPU, rendering the at least one rendering part; synthesising the rendering result of the at least one rendering GPU into a picture frame and outputting same, and implementing rendering of the next picture frame. Also disclosed in the present invention are a single-frame picture real-time rendering system based on multiple graphics cards and an electronic device. The beneficial effects of the present invention are: implementing rendering of the same picture frame by means of multiple GPU, so that the multiple GPU resources can be used more effectively to implement rendering of complex 3D scenes, maintaining a high frame rate, ensuring the smoothness of the picture, and using fewer resources to serve more users.

Description

一种基于多显卡的单帧画面实时渲染方法A real-time rendering method of single-frame image based on multiple graphics cards 技术领域technical field
本发明涉及云游戏技术领域,具体而言,涉及一种基于多显卡的单帧画面实时渲染方法。The invention relates to the technical field of cloud games, and in particular, to a real-time rendering method of a single frame image based on multiple graphics cards.
背景技术Background technique
实时渲染是基于GPU的图形渲染技术,主要应用于游戏、应用程序等有实时图形界面的领域。目前的实时渲染基本都是由一个GPU来完成,由于性能足够一般用户不会有多GPU渲染支持的需求,当然用户在硬件升级阶段,新老硬件一起使用时,多GPU渲染也能充分利用硬件提升用户体验。在云游戏云主机领域,高性能CPU、多GPU是标配,需要充分利用多GPU资源来服务用户界面、游戏界面渲染的满足实时渲染需求。Real-time rendering is a GPU-based graphics rendering technology, which is mainly used in games, applications and other fields with real-time graphical interfaces. The current real-time rendering is basically completed by one GPU. Because the performance is sufficient, the general user will not need multi-GPU rendering support. Of course, when the user is in the hardware upgrade stage, when the new and old hardware is used together, the multi-GPU rendering can also make full use of the hardware. Improve user experience. In the field of cloud game cloud hosts, high-performance CPUs and multi-GPUs are standard. It is necessary to make full use of multi-GPU resources to serve user interface and game interface rendering to meet real-time rendering requirements.
发明内容SUMMARY OF THE INVENTION
为解决上述问题,本发明的目的在于提供一种区别于现有的单个GPU渲染的模式,能够更高效的使用多个GPU资源完成同一帧画面的同步渲染。In order to solve the above problem, the purpose of the present invention is to provide a mode that is different from the existing single GPU rendering mode, and can more efficiently use multiple GPU resources to complete the synchronous rendering of the same frame.
为实现上述目的,本发明提供了一种基于多显卡的单帧画面实时渲染方法,该方法包括以下步骤:In order to achieve the above object, the present invention provides a real-time rendering method for a single frame based on multiple graphics cards, the method comprising the following steps:
获取待渲染画面,其中,所述待渲染画面为一帧画面;obtaining a picture to be rendered, wherein the picture to be rendered is a frame of picture;
根据所述待渲染画面确定目标GPU,其中,所述目标GPU包括用于渲染所述待渲染画面的至少一个渲染GPU;Determine a target GPU according to the to-be-rendered picture, wherein the target GPU includes at least one rendering GPU for rendering the to-be-rendered picture;
将所述待渲染画面分割为至少一个渲染部分,其中,渲染部分的数量小于或等于渲染GPU的数量;dividing the picture to be rendered into at least one rendering part, wherein the number of rendering parts is less than or equal to the number of rendering GPUs;
通过所述至少一个渲染GPU渲染所述至少一个渲染部分;rendering the at least one rendering portion by the at least one rendering GPU;
将所述至少一个渲染GPU的渲染结果合成为一帧画面后输出,进行下一帧画面的渲染。The rendering result of the at least one rendering GPU is synthesized into one frame of picture and output, and the next frame of picture is rendered.
作为本发明进一步的改进,包括多个GPU,As a further improvement of the present invention, including multiple GPUs,
所述根据所述待渲染画面确定目标GPU,包括:The determining of the target GPU according to the to-be-rendered picture includes:
根据所述待渲染画面的大小,从所述多个GPU中确定渲染所述待渲染画面的至少一个渲染GPU。According to the size of the picture to be rendered, at least one rendering GPU that renders the picture to be rendered is determined from the plurality of GPUs.
作为本发明进一步的改进,步骤103中,将所述待渲染画面分割为至少 一个渲染部分,包括:As a further improvement of the present invention, in step 103, the picture to be rendered is divided into at least one rendering part, including:
根据所述待渲染画面的大小和渲染GPU的数量,将所述待渲染画面分割为至少一个渲染部分。The to-be-rendered image is divided into at least one rendering part according to the size of the to-be-rendered image and the number of rendering GPUs.
作为本发明进一步的改进,所述待渲染画面为坐标表示的矢量图形,As a further improvement of the present invention, the picture to be rendered is a vector graphic represented by coordinates,
将所述待渲染画面分割为至少一个渲染部分,包括:Divide the to-be-rendered picture into at least one rendering part, including:
将所述矢量图形通过几何运算和像素着色后生成位图;generating a bitmap after the vector graphic is rendered through geometric operations and pixel coloring;
根据所述位图的大小和所述渲染GPU的数量,对所述位图进行分割,得到至少一个渲染部分。According to the size of the bitmap and the number of rendering GPUs, the bitmap is divided to obtain at least one rendering part.
作为本发明进一步的改进,为各个渲染GPU对应分配一个交换缓冲区,As a further improvement of the present invention, a swap buffer is allocated to each rendering GPU,
其中,所述通过所述至少一个渲染GPU渲染所述至少一个渲染部分,包括:The rendering of the at least one rendering part by the at least one rendering GPU includes:
将一个渲染部分通过一个渲染GPU进行渲染;Render a rendering part through a rendering GPU;
将各个所述渲染GPU的渲染结果导入到对应的交换缓冲区中。The rendering results of each of the rendering GPUs are imported into the corresponding swap buffers.
作为本发明进一步的改进,所述目标GPU还包括用于合成渲染结果的合成GPU,As a further improvement of the present invention, the target GPU further includes a synthesis GPU for synthesizing rendering results,
其中,所述将所述至少一个渲染GPU的渲染结果合成为一帧画面后输出,包括:Wherein, the outputting after synthesizing the rendering result of the at least one rendering GPU into one frame of picture includes:
从各个所述渲染GPU对应的交换缓冲区中复制各个渲染部分的渲染结果到内存;Copy the rendering result of each rendering part to memory from the swap buffer corresponding to each of the rendering GPUs;
通过所述合成GPU合成各个所述渲染部分的渲染结果。The rendering results of each of the rendering parts are synthesized by the synthesizing GPU.
作为本发明进一步的改进,为所述合成GPU对应分配一个交换缓冲区,As a further improvement of the present invention, a corresponding swap buffer is allocated to the synthetic GPU,
其中,所述将所述至少一个渲染GPU的渲染结果合成为一帧画面后输出,包括:Wherein, the outputting after synthesizing the rendering result of the at least one rendering GPU into one frame of picture includes:
将所述合成GPU的合成渲染结果导入至所述合成GPU对应的交换缓冲区后输出。The composite rendering result of the composite GPU is imported into a swap buffer corresponding to the composite GPU and then output.
本发明还提供了一种基于多显卡的单帧画面实时渲染系统,该系统包括:The present invention also provides a real-time rendering system for single-frame images based on multiple graphics cards, the system comprising:
获取单元,用于获取待渲染画面,其中,所述待渲染画面为一帧画面;an obtaining unit, configured to obtain a to-be-rendered picture, wherein the to-be-rendered picture is a frame of picture;
目标GPU确定单元,用于根据所述待渲染画面确定目标GPU,其中,所 述目标GPU包括用于渲染所述待渲染画面的至少一个渲染GPU;A target GPU determination unit for determining a target GPU according to the picture to be rendered, wherein the target GPU includes at least one rendering GPU for rendering the picture to be rendered;
切分单元,用于将所述待渲染画面分割为至少一个渲染部分,其中,渲染部分的数量小于或等于渲染GPU的数量;a splitting unit, configured to split the to-be-rendered picture into at least one rendering part, wherein the number of rendering parts is less than or equal to the number of rendering GPUs;
渲染单元,用于执行渲染程序,所述至少一个渲染GPU渲染所述至少一个渲染部分;a rendering unit, configured to execute a rendering program, and the at least one rendering GPU renders the at least one rendering part;
输出单元,将所述至少一个渲染GPU的渲染结果合成为一帧画面后输出。An output unit, which combines the rendering results of the at least one rendering GPU into a frame of pictures and outputs them.
本发明还提供了一种电子设备,包括存储器和处理器,其特征在于,所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被处理器执行以实现如权利要求1-7中任一项所述的方法。The present invention also provides an electronic device, comprising a memory and a processor, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to achieve the The method of any of claims 1-7.
作为本发明进一步的改进,所述计算机程序被处理器执行以实现如权利要求1-7中任一项所述的方法。As a further improvement of the present invention, the computer program is executed by a processor to implement the method according to any one of claims 1-7.
本发明的有益效果为:通过多个GPU完成同一帧画面的渲染,能够更高效的使用多个GPU资源完成对复杂3D场景的渲染,保持高帧频,保证画面的流畅性,利用更少的资源服务更多的用户。The beneficial effects of the present invention are: the rendering of the same frame picture is completed by multiple GPUs, the rendering of complex 3D scenes can be completed by using multiple GPU resources more efficiently, the frame rate can be maintained high, the smoothness of the picture can be guaranteed, and the use of less Resources serve more users.
附图说明Description of drawings
图1为本发明实施例所述的一种基于多显卡的单帧画面实时渲染方法的实现流程示意图;FIG. 1 is a schematic diagram of an implementation flowchart of a method for real-time rendering of a single-frame image based on multiple graphics cards according to an embodiment of the present invention;
图2为本发明实施例所述的一种基于多显卡的单帧画面实时渲染方法的多GPU渲染结构图;2 is a multi-GPU rendering structure diagram of a method for real-time rendering of single-frame images based on multiple graphics cards according to an embodiment of the present invention;
图3为本发明实施例所述的一种基于多显卡的单帧画面实时渲染方法的多GPU渲染流程图;3 is a flowchart of multi-GPU rendering of a method for real-time rendering of single-frame images based on multiple graphics cards according to an embodiment of the present invention;
图4为本发明实施例所述的一种基于多显卡的单帧画面实时渲染系统的系统机构示意图。FIG. 4 is a schematic diagram of a system structure of a real-time rendering system for a single frame image based on multiple graphics cards according to an embodiment of the present invention.
具体实施方式detailed description
下面通过具体的实施例并结合附图对本发明做进一步的详细描述。The present invention will be further described in detail below through specific embodiments and in conjunction with the accompanying drawings.
本发明实施例所述的一种基于多显卡的单帧画面实时渲染方法,如图1-3所示,该方法包括以下步骤:A real-time rendering method for a single-frame image based on multiple graphics cards according to an embodiment of the present invention, as shown in Figures 1-3, the method includes the following steps:
获取待渲染画面,其中,所述待渲染画面为一帧画面;obtaining a picture to be rendered, wherein the picture to be rendered is a frame of picture;
根据所述待渲染画面确定目标GPU,其中,所述目标GPU包括用于渲染 所述待渲染画面的至少一个渲染GPU;目标GPU为多个GPU中的可调配的GPU。A target GPU is determined according to the to-be-rendered picture, wherein the target GPU includes at least one rendering GPU for rendering the to-be-rendered picture; the target GPU is an configurable GPU among multiple GPUs.
将所述待渲染画面分割为至少一个渲染部分,其中,渲染部分的数量小于或等于渲染GPU的数量;dividing the picture to be rendered into at least one rendering part, wherein the number of rendering parts is less than or equal to the number of rendering GPUs;
通过所述至少一个渲染GPU渲染所述至少一个渲染部分;rendering the at least one rendering portion by the at least one rendering GPU;
将所述至少一个渲染GPU的渲染结果合成为一帧画面后输出,进行下一帧画面的渲染。The rendering result of the at least one rendering GPU is synthesized into one frame of picture and output, and the next frame of picture is rendered.
其中,例如获取参与渲染的N个渲染GPU,N≥1;则分割所述待渲染的一帧画面为M个渲染部分,1≤M≤N;Wherein, for example, N rendering GPUs participating in rendering are acquired, and N≥1; then the frame to be rendered is divided into M rendering parts, and 1≤M≤N;
待渲染画面例如可以为坐标表示的矢量图形,The picture to be rendered can be, for example, a vector graphic represented by coordinates,
将所述待渲染画面分割为至少一个渲染部分,包括:Divide the to-be-rendered picture into at least one rendering part, including:
将所述矢量图形通过几何运算和像素着色后生成位图;generating a bitmap after the vector graphic is rendered through geometric operations and pixel coloring;
根据所述位图的大小和所述渲染GPU的数量,对所述位图进行分割,得到至少一个渲染部分。According to the size of the bitmap and the number of rendering GPUs, the bitmap is divided to obtain at least one rendering part.
一种可选的实施方式,包括多个GPU,An optional implementation comprising multiple GPUs,
所述根据所述待渲染画面确定目标GPU,包括:The determining of the target GPU according to the to-be-rendered picture includes:
根据所述待渲染画面的大小,从所述多个GPU中确定渲染所述待渲染画面的至少一个渲染GPU。According to the size of the picture to be rendered, at least one rendering GPU that renders the picture to be rendered is determined from the plurality of GPUs.
一种可选的实施方式,将待渲染画面分割为至少一个渲染部分,包括:In an optional implementation manner, the to-be-rendered picture is divided into at least one rendering part, including:
根据所述待渲染画面的大小和渲染GPU的数量,将所述待渲染画面分割为至少一个渲染部分。The to-be-rendered image is divided into at least one rendering part according to the size of the to-be-rendered image and the number of rendering GPUs.
举例说明,如图2所示,针对待渲染的一帧画面,将待渲染的一帧画面分割为四个渲染部分,并通过四个渲染GPU,分别为GPU1、GPU2、GPU3和GPU4,在分配渲染任务时,记录渲染部分的标识以及相对应的渲染GPU的标识,GPU1、GPU2、GPU3和GPU4并行的执行渲染程序,渲染程序为每个渲染部分提供渲染所需的资源,渲染资源包含当前渲染部分需要使用到的模型、纹理等数据。待所有渲染GPU都完成渲染并将渲染结果输出待合成,合成器的合成GPU根据渲染部分的标识将四个渲染部分合成,合成GPU完 成合成渲染后将一帧画面的渲染后的画面输出,重复上述渲染操作,实时的对场景画面进行渲染,输出流畅的帧画面。For example, as shown in Figure 2, for a frame to be rendered, the frame to be rendered is divided into four rendering parts, and four rendering GPUs, namely GPU1, GPU2, GPU3, and GPU4, are used for rendering. When rendering a task, record the identification of the rendering part and the identification of the corresponding rendering GPU. GPU1, GPU2, GPU3 and GPU4 execute the rendering program in parallel. The rendering program provides the resources required for rendering for each rendering part, and the rendering resources include the current rendering. Some models, textures and other data that need to be used. After all the rendering GPUs complete the rendering and output the rendering results to be synthesized, the synthesis GPU of the synthesizer synthesizes the four rendering parts according to the identification of the rendering part, and after the synthesis GPU completes the synthesis rendering, it outputs the rendered image of one frame, repeating The above rendering operation renders the scene image in real time, and outputs a smooth frame image.
一种可选的实施方式,目标GPU还包括用于合成渲染结果的合成GPU,In an optional implementation manner, the target GPU further includes a synthetic GPU for synthesizing rendering results,
其中,将至少一个渲染GPU的渲染结果合成为一帧画面后输出,包括:从各个渲染GPU对应的交换缓冲区中复制各个渲染部分的渲染结果到内存;通过合成GPU合成各个渲染部分的渲染结果。Wherein, synthesizing the rendering results of at least one rendering GPU into one frame of picture and outputting it includes: copying the rendering results of each rendering part from the swap buffer corresponding to each rendering GPU to the memory; synthesizing the rendering results of each rendering part by synthesizing the GPU .
一种可选的实施方式,渲染GPU的数量和分割得到的渲染部分的数量相同,即N=M,一个渲染GPU对应渲染一个渲染部分,合成GPU与其中一个渲染工作量较小的渲染GPU共用一个GPU资源。以此调配不同的GPU,提升整机GPU的利用率。An optional implementation manner, the number of rendering GPUs is the same as the number of rendering parts obtained by division, that is, N=M, one rendering GPU corresponds to rendering one rendering part, and the composite GPU is shared with one of the rendering GPUs with a smaller rendering workload. A GPU resource. In this way, different GPUs are allocated to improve the utilization rate of the GPU of the whole machine.
一种可选的实施方式,每个所述渲染GPU对应分配一个交换缓冲区,每个所述渲染GPU包括完成图像渲染和将渲染结果导入到交换缓冲区。In an optional implementation manner, a swap buffer is allocated to each of the rendering GPUs, and each of the rendering GPUs includes completing image rendering and importing the rendering result into the swap buffer.
进一步的,为合成GPU对应分配一个交换缓冲区,其中,将至少一个渲染GPU的渲染结果合成为一帧画面后输出,包括:将合成GPU的合成渲染结果导入至合成GPU对应的交换缓冲区后输出。Further, allocate a corresponding swap buffer for the composite GPU, wherein the rendering result of at least one rendering GPU is synthesized into one frame of picture and then output, including: importing the composite rendering result of the composite GPU into the swap buffer corresponding to the composite GPU. output.
如图3所示,一个渲染GPU对应渲染一个渲染部分,每个渲染部分关联一个渲染GPU,合成GPU为一个独立的GPU,但一般不会独占一个GPU,因为工作量小,可以选择使用专用的用于显示输出的GPU进行合成,也可以由一个GPU同时进行渲染和合成。每个渲染流程包括渲染、交换缓冲区和复制GPU渲染结果到内存。合成流程包括将复制的各渲染GPU的渲染结果,发送至合成GPU完成合成渲染,合成渲染后的结果输出至交换缓冲区,并由交换缓冲区将完成的一帧画面的渲染结果输出至显示设备或编码设备,完成一帧画面的渲染,重复执行上述渲染,实时的对场景画面进行渲染,输出流畅的帧画面。As shown in Figure 3, a rendering GPU corresponds to rendering a rendering part, each rendering part is associated with a rendering GPU, and the composite GPU is an independent GPU, but generally does not monopolize a GPU, because the workload is small, you can choose to use a dedicated GPU The GPU for display output does the compositing, or one GPU can do both rendering and compositing at the same time. Each rendering process includes rendering, swapping buffers, and copying GPU rendering results to memory. The composite process includes sending the copied rendering results of each rendering GPU to the composite GPU to complete composite rendering, and outputting the composite rendering results to the swap buffer, and the swap buffer outputs the completed rendering results of one frame to the display device. Or an encoding device, completes the rendering of one frame of picture, repeatedly performs the above-mentioned rendering, renders the scene picture in real time, and outputs a smooth frame picture.
一种可选的实施方式,将该方法应用到云游戏的一个游戏进程中,实时的多个用户的游戏场景进行渲染,由于是多个GPU同时同步进行渲染,可实现流畅的3D游戏场景渲染效果。使用时,本发明的方法可被封装成为一个具有多显卡调用能力的图形API库,开发者可以通过使用提供的API就可以在 单个进程内使用一张或多张显卡进行图形渲染。In an optional implementation manner, the method is applied to a game process of a cloud game, and the game scenes of multiple users are rendered in real time. Since multiple GPUs are simultaneously rendering at the same time, smooth 3D game scene rendering can be achieved. Effect. When in use, the method of the present invention can be encapsulated into a graphics API library with the ability to call multiple graphics cards, and developers can use one or more graphics cards to perform graphics rendering in a single process by using the provided API.
如图4所示,本发明还提供的一种基于多显卡的单帧画面实时渲染系统,该系统包括:As shown in FIG. 4 , the present invention also provides a real-time rendering system for single-frame images based on multiple graphics cards, the system includes:
获取单元,用于获取待渲染画面,其中,所述待渲染画面为一帧画面;an obtaining unit, configured to obtain a to-be-rendered picture, wherein the to-be-rendered picture is a frame of picture;
目标GPU确定单元,用于根据所述待渲染画面确定目标GPU,其中,所述目标GPU包括用于渲染所述待渲染画面的至少一个渲染GPU;a target GPU determination unit, configured to determine a target GPU according to the to-be-rendered picture, wherein the target GPU includes at least one rendering GPU for rendering the to-be-rendered picture;
切分单元,用于将所述待渲染画面分割为至少一个渲染部分,其中,渲染部分的数量小于或等于渲染GPU的数量;a splitting unit, configured to split the to-be-rendered picture into at least one rendering part, wherein the number of rendering parts is less than or equal to the number of rendering GPUs;
渲染单元,用于执行渲染程序,所述至少一个渲染GPU渲染所述至少一个渲染部分;a rendering unit, configured to execute a rendering program, and the at least one rendering GPU renders the at least one rendering part;
输出单元,将所述至少一个渲染GPU的渲染结果合成为一帧画面后输出。An output unit, which combines the rendering results of the at least one rendering GPU into a frame of pictures and outputs them.
其中,in,
获取单元获取待渲染的一帧画面,目标GPU确定单元根据所述待渲染画面确定目标GPU,目标GPU包括用于渲染所述待渲染画面的至少一个渲染GPU;通过所述一帧画面的大小确定参与渲染的渲染GPU的数量;待渲染的一帧画面通常是以坐标表示的矢量图形,首先通过几何运算和像素着色后生成位图;切分单元根据所述位图的大小和所述渲染GPU的数量进行分割。渲染GPU的数量和分割得到的渲染部分的数量相同,一个渲染GPU对应渲染一个渲染部分,并为每个渲染部分提供渲染所需的资源,渲染资源包含当前渲染部分需要使用到的模型、纹理等数据。渲染单元执行渲染程序,每个渲染流程包括渲染、交换缓冲区和复制GPU渲染结果到内存。输出合成流程包括将复制的各渲染GPU的渲染结果,发送至合成GPU完成合成渲染,合成渲染后的结果输出至交换缓冲区,并由交换缓冲区将完成的一帧画面的渲染结果输出至显示设备或编码设备,完成一帧画面的渲染。通过持续执行帧流数据,实时的对场景画面进行渲染,输出流畅的视频流画面。The acquisition unit acquires a frame to be rendered, and the target GPU determination unit determines a target GPU according to the to-be-rendered image, and the target GPU includes at least one rendering GPU for rendering the to-be-rendered image; determined by the size of the one-frame image The number of rendering GPUs involved in rendering; a frame to be rendered is usually a vector graphic represented by coordinates, and a bitmap is first generated through geometric operations and pixel coloring; the segmentation unit is based on the size of the bitmap and the rendering GPU. number of divisions. The number of rendering GPUs is the same as the number of divided rendering parts. One rendering GPU renders one rendering part, and provides resources required for rendering for each rendering part. The rendering resources include the models and textures that the current rendering part needs to use. data. The rendering unit executes rendering programs, and each rendering process includes rendering, swapping buffers, and copying GPU rendering results to memory. The output synthesis process includes sending the copied rendering results of each rendering GPU to the synthesis GPU to complete the synthesis rendering, outputting the synthesized rendering results to the exchange buffer, and outputting the completed rendering results of one frame to the display from the exchange buffer. The device or encoding device completes the rendering of a frame. By continuously executing frame stream data, the scene image is rendered in real time, and a smooth video stream image is output.
一种可选的实施方式,在一个游戏进程中,实时的对多个用户的游戏场景进行渲染,在画面拆分时记录渲染部分的标识、相对应的渲染GPU的标识以及用户标识,多个GPU分别完成渲染后,根据渲染部分标识、渲染GPU 标识和用户标识为用户合成当前的游戏场景,并将合成渲染后的游戏场景发送至对应的用户终端,在一个游戏进程中为多用户同时服务,在降低对服务器资源的消耗和减少服务器数量的同时能保证游戏画面的流畅性和提高用户体验感。In an optional implementation manner, in a game process, the game scenes of multiple users are rendered in real time, and the identification of the rendering part, the identification of the corresponding rendering GPU, and the user identification are recorded when the screen is split. After the GPUs complete the rendering respectively, according to the rendering part ID, rendering GPU ID and user ID, the current game scene is synthesized for the user, and the synthesized and rendered game scene is sent to the corresponding user terminal to serve multiple users simultaneously in one game process. , which can ensure the smoothness of the game screen and improve the user experience while reducing the consumption of server resources and the number of servers.
本公开还涉及一种电子设备,包括服务器、终端等。该电子设备包括:至少一个处理器;与至少一个处理器通信连接的存储器;以及与存储介质通信连接的通信组件,所述通信组件在处理器的控制下接收和发送数据;其中,存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行以实现上述实施例中的方法。The present disclosure also relates to an electronic device, including a server, a terminal, and the like. The electronic device includes: at least one processor; a memory communicatively connected to the at least one processor; and a communication component communicatively connected to the storage medium, the communication component receiving and transmitting data under the control of the processor; wherein the memory stores Instructions executable by at least one processor to implement the methods in the above-described embodiments.
在一种可选的实施方式中,存储器作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块。处理器通过运行存储在存储器中的非易失性软件程序、指令以及模块,从而执行设备的各种功能应用以及数据处理,即实现方法。In an optional implementation manner, the memory, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs and modules. The processor executes various functional applications and data processing of the device by running the non-volatile software programs, instructions and modules stored in the memory, that is, implementing the method.
存储器可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储选项列表等。此外,存储器可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,存储器可选包括相对于处理器远程设置的存储器,这些远程存储器可以通过网络连接至外接设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory may include a stored program area and a stored data area, wherein the stored program area can store an operating system, an application program required by at least one function; the stored data area can store an option list and the like. Additionally, the memory may include high speed random access memory, and may also include nonvolatile memory, such as at least one magnetic disk storage device, flash memory device, or other nonvolatile solid state storage device. In some embodiments, the memory may optionally include memory located remotely from the processor, such remote memory being connectable to an external device via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
一个或者多个模块存储在存储器中,当被一个或者多个处理器执行时,执行上述任意方法实施例中的方法。One or more modules are stored in memory, and when executed by one or more processors, perform the method in any of the above method embodiments.
上述产品可执行本申请实施例所提供的方法,具备执行方法相应的功能模块和有益效果,未在本实施例中详尽描述的技术细节,可参见本申请实施例所提供的方法。The above product can execute the methods provided by the embodiments of the present application, and have functional modules and beneficial effects corresponding to the execution methods. For technical details not described in detail in the present embodiments, reference may be made to the methods provided by the embodiments of the present application.
本公开还涉及一种计算机可读存储介质,用于存储计算机可读程序,所述计算机可读程序用于供计算机执行上述部分或全部的方法实施例。The present disclosure also relates to a computer-readable storage medium for storing a computer-readable program, the computer-readable program being used for a computer to execute some or all of the above method embodiments.
即,本领域技术人员可以理解,实现上述实施例方法中的全部或部分步 骤是可以通过程序来指令相关的硬件来完成,该程序存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。That is, those skilled in the art can understand that all or part of the steps in the method for implementing the above embodiments can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium and includes several instructions to make a device ( It may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. It will be understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
此外,本领域普通技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, it will be understood by those of ordinary skill in the art that although some of the embodiments described herein include certain features, but not others, included in other embodiments, that combinations of features of different embodiments are intended to be within the scope of the invention within and form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
本领域技术人员应理解,尽管已经参考示例性实施例描述了本发明,但是在不脱离本发明的范围的情况下,可进行各种改变并可用等同物替换其元件。另外,在不脱离本发明的实质范围的情况下,可进行许多修改以使特定情况或材料适应本发明的教导。因此,本发明不限于所公开的特定实施例,而是本发明将包括落入所附权利要求范围内的所有实施例。It will be understood by those skilled in the art that although the invention has been described with reference to exemplary embodiments, various changes may be made and equivalents may be substituted for elements thereof without departing from the scope of the invention. In addition, many modifications may be made to adapt a particular situation or material to the teachings of the invention without departing from the essential scope thereof. Therefore, the inventions are not to be limited to the particular embodiments disclosed, but the inventions are to include all embodiments falling within the scope of the appended claims.

Claims (10)

  1. 一种基于多显卡的单帧画面实时渲染方法,其特征在于,该方法包括以下步骤:A method for real-time rendering of single-frame images based on multiple graphics cards, characterized in that the method comprises the following steps:
    获取待渲染画面,其中,所述待渲染画面为一帧画面;obtaining a picture to be rendered, wherein the picture to be rendered is a frame of picture;
    根据所述待渲染画面确定目标GPU,其中,所述目标GPU包括用于渲染所述待渲染画面的至少一个渲染GPU;Determine a target GPU according to the to-be-rendered picture, wherein the target GPU includes at least one rendering GPU for rendering the to-be-rendered picture;
    将所述待渲染画面分割为至少一个渲染部分,其中,渲染部分的数量小于或等于渲染GPU的数量;dividing the picture to be rendered into at least one rendering part, wherein the number of rendering parts is less than or equal to the number of rendering GPUs;
    通过所述至少一个渲染GPU渲染所述至少一个渲染部分;rendering the at least one rendering portion by the at least one rendering GPU;
    将所述至少一个渲染GPU的渲染结果合成为一帧画面后输出,进行下一帧画面的渲染。The rendering result of the at least one rendering GPU is synthesized into one frame of picture and output, and the next frame of picture is rendered.
  2. 根据权利要求1所述的基于多显卡的单帧画面实时渲染方法,其特征在于,包括多个GPU,The method for real-time rendering of a single-frame picture based on multiple graphics cards according to claim 1, wherein the method comprises a plurality of GPUs,
    所述根据所述待渲染画面确定目标GPU,包括:The determining of the target GPU according to the to-be-rendered picture includes:
    根据所述待渲染画面的大小,从所述多个GPU中确定渲染所述待渲染画面的至少一个渲染GPU。According to the size of the picture to be rendered, at least one rendering GPU that renders the picture to be rendered is determined from the plurality of GPUs.
  3. 根据权利要求1所述的基于多显卡的单帧画面实时渲染方法,其特征在于,将所述待渲染画面分割为至少一个渲染部分,包括:The real-time rendering method for a single-frame picture based on multiple graphics cards according to claim 1, wherein dividing the to-be-rendered picture into at least one rendering part comprises:
    根据所述待渲染画面的大小和渲染GPU的数量,将所述待渲染画面分割为至少一个渲染部分。The to-be-rendered image is divided into at least one rendering part according to the size of the to-be-rendered image and the number of rendering GPUs.
  4. 根据权利要求3所述的基于多显卡的单帧画面实时渲染方法,其特征在于,所述待渲染画面为坐标表示的矢量图形,The method for rendering a single-frame image in real time based on multiple graphics cards according to claim 3, wherein the image to be rendered is a vector graphic represented by coordinates,
    将所述待渲染画面分割为至少一个渲染部分,包括:Divide the to-be-rendered picture into at least one rendering part, including:
    将所述矢量图形通过几何运算和像素着色后生成位图;generating a bitmap after the vector graphic is rendered through geometric operations and pixel coloring;
    根据所述位图的大小和所述渲染GPU的数量,对所述位图进行分割,得到至少一个渲染部分。According to the size of the bitmap and the number of rendering GPUs, the bitmap is divided to obtain at least one rendering part.
  5. 根据权利要求1所述的基于多显卡的单帧画面实时渲染方法,其特征在于,为各个渲染GPU对应分配一个交换缓冲区,The method for real-time rendering of a single-frame picture based on multiple graphics cards according to claim 1, wherein a swap buffer is allocated to each rendering GPU,
    其中,所述通过所述至少一个渲染GPU渲染所述至少一个渲染部分,包 括:Wherein, the rendering of the at least one rendering part by the at least one rendering GPU includes:
    将一个渲染部分通过一个渲染GPU进行渲染;Render a rendering part through a rendering GPU;
    将各个所述渲染GPU的渲染结果导入到对应的交换缓冲区中。The rendering results of each of the rendering GPUs are imported into the corresponding swap buffers.
  6. 根据权利要求5所述的基于多显卡的单帧画面实时渲染方法,其特征在于,所述目标GPU还包括用于合成渲染结果的合成GPU,The real-time rendering method for a single-frame picture based on multiple graphics cards according to claim 5, wherein the target GPU further comprises a composite GPU for synthesizing rendering results,
    其中,所述将所述至少一个渲染GPU的渲染结果合成为一帧画面后输出,包括:Wherein, the outputting after synthesizing the rendering result of the at least one rendering GPU into one frame of picture includes:
    从各个所述渲染GPU对应的交换缓冲区中复制各个渲染部分的渲染结果到内存;Copy the rendering result of each rendering part to memory from the swap buffer corresponding to each of the rendering GPUs;
    通过所述合成GPU合成各个所述渲染部分的渲染结果。The rendering results of each of the rendering parts are synthesized by the synthesizing GPU.
  7. 根据权利要求6所述的基于多显卡的单帧画面实时渲染方法,其特征在于,为所述合成GPU对应分配一个交换缓冲区,The real-time rendering method for a single-frame picture based on multiple graphics cards according to claim 6, wherein a swap buffer is allocated correspondingly to the composite GPU,
    其中,所述将所述至少一个渲染GPU的渲染结果合成为一帧画面后输出,包括:Wherein, the outputting after synthesizing the rendering result of the at least one rendering GPU into one frame of picture includes:
    将所述合成GPU的合成渲染结果导入至所述合成GPU对应的交换缓冲区后输出。The composite rendering result of the composite GPU is imported into the swap buffer corresponding to the composite GPU and then output.
  8. 一种基于多显卡的单帧画面实时渲染系统,其特征在于,所述系统包括:A single-frame picture real-time rendering system based on multiple graphics cards, characterized in that the system includes:
    获取单元,用于获取待渲染画面,其中,所述待渲染画面为一帧画面;an obtaining unit, configured to obtain a to-be-rendered picture, wherein the to-be-rendered picture is a frame of picture;
    目标GPU确定单元,用于根据所述待渲染画面确定目标GPU,其中,所述目标GPU包括用于渲染所述待渲染画面的至少一个渲染GPU;a target GPU determination unit, configured to determine a target GPU according to the to-be-rendered picture, wherein the target GPU includes at least one rendering GPU for rendering the to-be-rendered picture;
    切分单元,用于将所述待渲染画面分割为至少一个渲染部分,其中,渲染部分的数量小于或等于渲染GPU的数量;a splitting unit, configured to split the to-be-rendered picture into at least one rendering part, wherein the number of rendering parts is less than or equal to the number of rendering GPUs;
    渲染单元,用于执行渲染程序,所述至少一个渲染GPU渲染所述至少一个渲染部分;a rendering unit, configured to execute a rendering program, and the at least one rendering GPU renders the at least one rendering part;
    输出单元,将所述至少一个渲染GPU的渲染结果合成为一帧画面后输出。An output unit that combines the rendering results of the at least one rendering GPU into a frame of pictures and outputs them.
  9. 一种电子设备,包括存储器和处理器,其特征在于,所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被处理器执 行以实现如权利要求1-7中任一项所述的方法。An electronic device comprising a memory and a processor, characterized in that the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement claims 1-7 The method of any of the above.
  10. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行以实现如权利要求1-7中任一项所述的方法。A computer-readable storage medium on which a computer program is stored, wherein the computer program is executed by a processor to implement the method according to any one of claims 1-7.
PCT/CN2021/070641 2020-09-02 2021-01-07 Single-frame picture real-time rendering method based on multiple graphics cards WO2022048097A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010907575.7 2020-09-02
CN202010907575.7A CN112057851A (en) 2020-09-02 2020-09-02 Multi-display-card-based real-time rendering method for single-frame picture

Publications (1)

Publication Number Publication Date
WO2022048097A1 true WO2022048097A1 (en) 2022-03-10

Family

ID=73666616

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/070641 WO2022048097A1 (en) 2020-09-02 2021-01-07 Single-frame picture real-time rendering method based on multiple graphics cards

Country Status (2)

Country Link
CN (2) CN112057851A (en)
WO (1) WO2022048097A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115359226A (en) * 2022-10-19 2022-11-18 深圳市明源云客电子商务有限公司 Texture compression-based VR display method for Hongmong system, electronic device and medium

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112057851A (en) * 2020-09-02 2020-12-11 北京蔚领时代科技有限公司 Multi-display-card-based real-time rendering method for single-frame picture
CN112416605B (en) * 2020-12-16 2021-11-05 北京蔚领时代科技有限公司 Internet-based distributed display card calling method and device
CN115086696B (en) * 2022-06-07 2023-11-10 北京蔚领时代科技有限公司 Video playing control method and device, electronic equipment and storage medium
CN115375530A (en) * 2022-07-13 2022-11-22 北京松应科技有限公司 Multi-GPU collaborative rendering method, system, device and storage medium
CN114998500B (en) * 2022-07-20 2022-11-18 南京芯驰半导体科技有限公司 Rendering system and method based on SOC platform
CN115423989A (en) * 2022-09-06 2022-12-02 歌尔科技有限公司 Control method and component for AR glasses picture display
CN116185640B (en) * 2023-04-20 2023-08-08 上海励驰半导体有限公司 Image command processing method and device based on multiple GPUs, storage medium and chip

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1890660A (en) * 2003-11-19 2007-01-03 路西德信息技术有限公司 Method and system for multiple 3-d graphic pipeline over a PC bus
US20100045672A1 (en) * 2008-08-22 2010-02-25 Justin Novosad Computerized Image Rendering With Per-Frame Buffer Scene Segmentation
US20140125680A1 (en) * 2012-11-05 2014-05-08 Nvidia Corporation Method for graphics driver level decoupled rendering and display
CN109978751A (en) * 2017-12-28 2019-07-05 辉达公司 More GPU frame renderings
CN112057851A (en) * 2020-09-02 2020-12-11 北京蔚领时代科技有限公司 Multi-display-card-based real-time rendering method for single-frame picture

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111494936A (en) * 2020-02-12 2020-08-07 阿里巴巴集团控股有限公司 Picture rendering method, device, system and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1890660A (en) * 2003-11-19 2007-01-03 路西德信息技术有限公司 Method and system for multiple 3-d graphic pipeline over a PC bus
US20100045672A1 (en) * 2008-08-22 2010-02-25 Justin Novosad Computerized Image Rendering With Per-Frame Buffer Scene Segmentation
US20140125680A1 (en) * 2012-11-05 2014-05-08 Nvidia Corporation Method for graphics driver level decoupled rendering and display
CN109978751A (en) * 2017-12-28 2019-07-05 辉达公司 More GPU frame renderings
CN112057851A (en) * 2020-09-02 2020-12-11 北京蔚领时代科技有限公司 Multi-display-card-based real-time rendering method for single-frame picture

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115359226A (en) * 2022-10-19 2022-11-18 深圳市明源云客电子商务有限公司 Texture compression-based VR display method for Hongmong system, electronic device and medium

Also Published As

Publication number Publication date
CN112057851A (en) 2020-12-11
CN113521735A (en) 2021-10-22

Similar Documents

Publication Publication Date Title
WO2022048097A1 (en) Single-frame picture real-time rendering method based on multiple graphics cards
US20100060652A1 (en) Graphics rendering system
TW201216200A (en) Multi-shader system and processing method thereof
US11288765B2 (en) System and method for efficient multi-GPU execution of kernels by region based dependencies
WO2022048098A1 (en) Game screen rendering method and system based on multiple graphics cards
US11900500B2 (en) System and method for efficient multi-GPU rendering of geometry by subdividing geometry
JP7355960B2 (en) System and method for efficient multi-GPU rendering of geometry by geometry analysis during rendering
US10237563B2 (en) System and method for controlling video encoding using content information
CN113473226B (en) Method and device for improving video rendering efficiency, computer equipment and storage medium
US20220005148A1 (en) System and method for efficient multi-gpu rendering of geometry by performing geometry analysis while rendering
CN115210748A (en) System and method for efficient multi-GPU rendering of geometric figures through region testing during rendering
US11847720B2 (en) System and method for performing a Z pre-pass phase on geometry at a GPU for use by the GPU when rendering the geometry
US20210241414A1 (en) System and method for efficient multi-gpu rendering of geometry by pretesting against screen regions using configurable shaders
US11961159B2 (en) Region testing of geometry while rendering for efficient multi-GPU rendering
US11508110B2 (en) System and method for efficient multi-GPU rendering of geometry by performing geometry analysis before rendering
US11263718B2 (en) System and method for efficient multi-GPU rendering of geometry by pretesting against in interleaved screen regions before rendering
US20240185377A1 (en) Reassigning geometry based on timing analysis when rendering an image frame
US20210358075A1 (en) System and method for efficient multi-gpu rendering of geometry by pretesting against screen regions using prior frame information
CN118154405A (en) Graphic image processing method for cloud rendering, cloud rendering method and system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21863169

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 23/06/2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21863169

Country of ref document: EP

Kind code of ref document: A1