CN112057851A - A real-time rendering method of single-frame image based on multiple graphics cards - Google Patents
A real-time rendering method of single-frame image based on multiple graphics cards Download PDFInfo
- Publication number
- CN112057851A CN112057851A CN202010907575.7A CN202010907575A CN112057851A CN 112057851 A CN112057851 A CN 112057851A CN 202010907575 A CN202010907575 A CN 202010907575A CN 112057851 A CN112057851 A CN 112057851A
- Authority
- CN
- China
- Prior art keywords
- rendering
- picture
- gpu
- rendered
- frame
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
Images
Classifications
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/45—Controlling the progress of the video game
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/50—Controlling the output signals based on the game progress
- A63F13/52—Controlling the output signals based on the game progress involving aspects of the displayed game scene
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/20—Processor architectures; Processor configuration, e.g. pipelining
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F2300/00—Features 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/60—Methods for processing data by generating or executing the game program
- A63F2300/66—Methods for processing data by generating or executing the game program for rendering three dimensional images
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Generation (AREA)
Abstract
本发明公开了一种基于多显卡的单帧画面实时渲染方法,该方法包括获取待渲染画面,根据所述待渲染画面确定目标GPU,目标GPU包括至少一个渲染GPU;将所述待渲染画面分割为至少一个渲染部分,其中,渲染部分的数量小于或等于渲染GPU的数量;通过所述至少一个渲染GPU渲染所述至少一个渲染部分;将所述至少一个渲染GPU的渲染结果合成为一帧画面后输出,进行下一帧画面的渲染。本发明还公开的一种基于多显卡的单帧画面实时渲染系统和一种电子设备。本发明的有益效果为:通过多个GPU完成同一帧画面的渲染,能够更高效的使用多个GPU资源完成对复杂3D场景的渲染,保持高帧频,保证画面的流畅性,利用更少的资源服务更多的用户。
The invention discloses a real-time rendering method for a single-frame image based on multiple graphics cards. The method includes acquiring a to-be-rendered image, determining a target GPU according to the to-be-rendered image, and the target GPU includes at least one rendering GPU; dividing the to-be-rendered image into segments is at least one rendering part, wherein the number of rendering parts is less than or equal to the number of rendering GPUs; the at least one rendering part is rendered by the at least one rendering GPU; the rendering result of the at least one rendering GPU is synthesized into one frame of picture After output, the next frame of picture rendering is performed. The invention also discloses a multi-graphics card-based single-frame picture real-time rendering system and an electronic device. 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
技术领域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 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.
作为本发明进一步的改进,所述待渲染画面为坐标表示的矢量图形,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, 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.
本发明还提供了一种电子设备,包括存储器和处理器,其特征在于,所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被处理器执行以实现如权利要求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 ways
下面通过具体的实施例并结合附图对本发明做进一步的详细描述。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 multi-graphics card calling capability, and developers can use one or more graphics cards for 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-OnlyMemory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。That is, those skilled in the art can understand that all or part of the steps in the method of implementing the above embodiments can be completed by instructing 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, removable 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)
Priority Applications (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010907575.7A CN112057851A (en) | 2020-09-02 | 2020-09-02 | A real-time rendering method of single-frame image based on multiple graphics cards |
| PCT/CN2021/070641 WO2022048097A1 (en) | 2020-09-02 | 2021-01-07 | Single-frame picture real-time rendering method based on multiple graphics cards |
| CN202111006227.3A CN113521735A (en) | 2020-09-02 | 2021-08-30 | Multi-GPU-based real-time rendering method for single-frame picture |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010907575.7A CN112057851A (en) | 2020-09-02 | 2020-09-02 | A real-time rendering method of single-frame image based on multiple graphics cards |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN112057851A true CN112057851A (en) | 2020-12-11 |
Family
ID=73666616
Family Applications (2)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010907575.7A Pending CN112057851A (en) | 2020-09-02 | 2020-09-02 | A real-time rendering method of single-frame image based on multiple graphics cards |
| CN202111006227.3A Pending CN113521735A (en) | 2020-09-02 | 2021-08-30 | Multi-GPU-based real-time rendering method for single-frame picture |
Family Applications After (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202111006227.3A Pending CN113521735A (en) | 2020-09-02 | 2021-08-30 | Multi-GPU-based real-time rendering method for single-frame picture |
Country Status (2)
| Country | Link |
|---|---|
| CN (2) | CN112057851A (en) |
| WO (1) | WO2022048097A1 (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113521735A (en) * | 2020-09-02 | 2021-10-22 | 北京蔚领时代科技有限公司 | Multi-GPU-based real-time rendering method for single-frame picture |
| CN114022600A (en) * | 2021-11-04 | 2022-02-08 | 深圳市瑞云科技有限公司 | A multi-frame rendering information synchronization method based on munu scheduler |
| WO2022126815A1 (en) * | 2020-12-16 | 2022-06-23 | 北京蔚领时代科技有限公司 | Internet-based distributed display card calling method and apparatus |
| WO2024051579A1 (en) * | 2022-09-06 | 2024-03-14 | 歌尔科技有限公司 | Control method and component for picture display of ar glasses |
Families Citing this family (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114255292A (en) * | 2021-12-13 | 2022-03-29 | 深圳供电局有限公司 | Using digital twin technology to realize rendering processing method and system in distribution network |
| CN115086696B (en) * | 2022-06-07 | 2023-11-10 | 北京蔚领时代科技有限公司 | Video playing control method and device, electronic equipment and storage medium |
| CN115375530B (en) * | 2022-07-13 | 2024-07-09 | 北京松应科技有限公司 | 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 |
| CN115359226B (en) * | 2022-10-19 | 2023-01-20 | 深圳市明源云客电子商务有限公司 | Texture compression-based VR display method for Hongmong system, electronic device and medium |
| CN116468597B (en) * | 2023-02-16 | 2023-11-17 | 深圳技术大学 | Multi-GPU based image rendering method, device and readable storage medium |
| CN116185640B (en) * | 2023-04-20 | 2023-08-08 | 上海励驰半导体有限公司 | Image command processing method and device based on multiple GPUs, storage medium and chip |
| CN117649474B (en) * | 2023-12-06 | 2025-04-29 | 中国人民解放军军事科学院战争研究院 | Picture-oriented multi-GPU rendering system, method and device and storage medium |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1890660A (en) * | 2003-11-19 | 2007-01-03 | 路西德信息技术有限公司 | Method and system for multiple 3D graphics pipelines on PC bus |
| CN109978751A (en) * | 2017-12-28 | 2019-07-05 | 辉达公司 | More GPU frame renderings |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9665968B2 (en) * | 2008-08-22 | 2017-05-30 | Autodesk, Inc. | Computerized image rendering with per-frame buffer scene segmentation |
| TWI498849B (en) * | 2012-11-05 | 2015-09-01 | Nvidia Corp | Method for graphics driver level decoupled rendering and display |
| CN111494936A (en) * | 2020-02-12 | 2020-08-07 | 阿里巴巴集团控股有限公司 | Picture rendering method, device, system and storage medium |
| CN112057851A (en) * | 2020-09-02 | 2020-12-11 | 北京蔚领时代科技有限公司 | A real-time rendering method of single-frame image based on multiple graphics cards |
-
2020
- 2020-09-02 CN CN202010907575.7A patent/CN112057851A/en active Pending
-
2021
- 2021-01-07 WO PCT/CN2021/070641 patent/WO2022048097A1/en not_active Ceased
- 2021-08-30 CN CN202111006227.3A patent/CN113521735A/en active Pending
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1890660A (en) * | 2003-11-19 | 2007-01-03 | 路西德信息技术有限公司 | Method and system for multiple 3D graphics pipelines on PC bus |
| CN109978751A (en) * | 2017-12-28 | 2019-07-05 | 辉达公司 | More GPU frame renderings |
Non-Patent Citations (2)
| Title |
|---|
| 《数据库百科全书》编委会: "《数据库百科全书》", 30 September 2009, 上海交通大学出版社 * |
| 梅挺: "《计算机组装维护与维修教程》", 30 November 2009, 中国铁道出版社 * |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113521735A (en) * | 2020-09-02 | 2021-10-22 | 北京蔚领时代科技有限公司 | Multi-GPU-based real-time rendering method for single-frame picture |
| WO2022048097A1 (en) * | 2020-09-02 | 2022-03-10 | 北京蔚领时代科技有限公司 | Single-frame picture real-time rendering method based on multiple graphics cards |
| WO2022126815A1 (en) * | 2020-12-16 | 2022-06-23 | 北京蔚领时代科技有限公司 | Internet-based distributed display card calling method and apparatus |
| CN114022600A (en) * | 2021-11-04 | 2022-02-08 | 深圳市瑞云科技有限公司 | A multi-frame rendering information synchronization method based on munu scheduler |
| WO2024051579A1 (en) * | 2022-09-06 | 2024-03-14 | 歌尔科技有限公司 | Control method and component for picture display of ar glasses |
Also Published As
| Publication number | Publication date |
|---|---|
| CN113521735A (en) | 2021-10-22 |
| WO2022048097A1 (en) | 2022-03-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN112057851A (en) | A real-time rendering method of single-frame image based on multiple graphics cards | |
| US10311548B2 (en) | Scaling render targets to a higher rendering resolution to display higher quality video frames | |
| US20100060652A1 (en) | Graphics rendering system | |
| US20140292803A1 (en) | System, method, and computer program product for generating mixed video and three-dimensional data to reduce streaming bandwidth | |
| US12406324B2 (en) | Accessing local memory of a GPU executing a first kernel when executing a second kernel of another GPU | |
| CN113457160A (en) | Data processing method and device, electronic equipment and computer readable storage medium | |
| CN112057852B (en) | A game screen rendering method and system based on multiple graphics cards | |
| CN113473226B (en) | Method and device for improving video rendering efficiency, computer equipment and storage medium | |
| WO2021135320A1 (en) | Video generation method and apparatus, and computer system | |
| CN117618883B (en) | Method, computer readable medium and computer system for graphics processing | |
| 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 | |
| US10237563B2 (en) | System and method for controlling video encoding using content information | |
| WO2023160041A1 (en) | Image rendering method and apparatus, computer device, computer-readable storage medium and computer program product | |
| CN114845151A (en) | A multi-screen synchronous display method, system, terminal device and storage medium | |
| CN112835730A (en) | Image storage, memory allocation, image synthesis method, apparatus, device and medium | |
| CN118154405A (en) | Graphic image processing method for cloud rendering, cloud rendering method and system | |
| US11961159B2 (en) | Region testing of geometry while rendering for efficient multi-GPU rendering | |
| CN116966546A (en) | Image processing method, apparatus, medium, device, and program product | |
| CN112752131B (en) | Barrage information display method and device, storage medium and electronic device | |
| CN114245138B (en) | Video frame processing method and device | |
| CN111738903B (en) | Method, device and equipment for optimizing layered material of object | |
| CN118283344A (en) | Image rendering method, device, electronic equipment and computer readable medium | |
| CN120420676A (en) | A method for taking photos in a game based on UE5 | |
| WO2022135050A1 (en) | Rendering method, device, and system | |
| CN115866336A (en) | Method and device for generating video with irregular shape, electronic equipment and medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| WD01 | Invention patent application deemed withdrawn after publication | ||
| WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20201211 |