Pipeline state object data processing method and device, electronic equipment and storage medium

By obtaining and compiling pipeline state object data in material configuration information during the construction of the game software installation package, the problem of manual collection of PSO data is solved, and efficient and comprehensive PSO data collection and game rendering stability is achieved.

CN119806526APending Publication Date: 2025-04-11TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311301729.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-09
Publication Date
2025-04-11

Smart Images

  • Figure CN119806526A_ABST
    Figure CN119806526A_ABST
Patent Text Reader

Abstract

The invention relates to a pipeline state object data processing method and device, electronic equipment and a storage medium. The method comprises the following steps: in a software installation package construction process of a target application, obtaining material configuration information corresponding to the target application; the material configuration information comprises a plurality of preset material description items and at least one sub-description item set under each preset material description item; traversing the at least one sub-description item set under the plurality of preset material description items to obtain a plurality of pieces of pipeline state object data; a plurality of sub description items included in each piece of pipeline state object data are in one-to-one correspondence with the plurality of preset material description items; and compiling the multiple pieces of pipeline state object data into pipeline cache files, and summarizing the pipeline cache files into the software installation package of the target application. According to the technical scheme provided by the invention, the collection efficiency of the pipeline state object data can be improved, and processing resources required by collection can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a pipeline status object data processing method, device, electronic device and storage medium. Background Art

[0002] With the development of computer technology, pages based on computer technology are becoming more and more abundant, such as various game pages. In the related technology, in order to avoid the jamming caused by synchronous compilation of PSO (Pipeline State Object) during game operation, the following PSO collection and compilation process is generally adopted: after building the game installation package, turn on the function switch for collecting PSO; then, according to the scenarios where various PSOs exist, formulate collection target scenarios, and manually run the game to traverse the target scenarios, such as running tests of the entire map, the use of various game props, etc., to obtain the collected PSO list. Furthermore, pre-compilation can be performed based on the PSO list when the game is first started to solve the above-mentioned jamming problem.

[0003] However, manually traversing and collecting PSOs is very time-consuming. When the parent material changes, it is often necessary to re-collect all of them, which is extremely labor-intensive. In addition, the manually traversed and collected PSOs often cannot cover the entire game scene, and there will always be some omissions. When the omitted PSOs need to be rendered in the game scene, the above-mentioned lag caused by synchronous compilation of PSOs will occur. In addition, the collection of PSOs requires game running tests in different scenes, resulting in low PSO collection efficiency and high consumption of processing resources. Summary of the invention

[0004] The present application provides a pipeline state object data processing method, device, electronic device and storage medium, which can improve the efficiency and comprehensiveness of PSO collection. The technical solution of the present application is as follows:

[0005] According to a first aspect of an embodiment of the present application, a pipeline state object data processing method is provided, comprising:

[0006] In the process of constructing a software installation package of a target application, obtaining material configuration information corresponding to the target application; the material configuration information includes a plurality of preset material description items and at least one sub-description item set under each preset material description item;

[0007] Traversing the at least one sub-description item set under the multiple preset material description items to obtain multiple pipeline state object data; the multiple sub-description items included in each pipeline state object data correspond one-to-one to the multiple preset material description items;

[0008] The plurality of pipeline state object data are compiled into a pipeline cache file, and aggregated into the software installation package of the target application.

[0009] According to a second aspect of an embodiment of the present application, a pipeline state object data processing method is provided, comprising:

[0010] Downloading a software installation package of a target application; the software installation package includes a pipeline cache file corresponding to the target application, the pipeline cache file is obtained by compiling a plurality of pipeline state object data, the plurality of pipeline state object data is obtained by traversing a combination of at least one sub-description item set under a plurality of preset material description items in material configuration information corresponding to the target application during the process of constructing the software installation package of the target application;

[0011] Installing the target application based on the software installation package and starting the target application;

[0012] In response to the start of the target application, the pipeline cache file is compiled to obtain a shader binary file.

[0013] According to a third aspect of an embodiment of the present application, a pipeline state object data processing device is provided, including:

[0014] An acquisition module, used to acquire material configuration information corresponding to the target application during the construction of the software installation package of the target application; the material configuration information includes a plurality of preset material description items and at least one sub-description item set under each preset material description item;

[0015] A pipeline state object collection module, used to traverse the at least one sub-description item set under the multiple preset material description items to obtain multiple pipeline state object data; the multiple sub-description items included in each pipeline state object data correspond one-to-one to the multiple preset material description items;

[0016] The first compiling module is used to compile the plurality of pipeline state object data into a pipeline cache file, and aggregate the pipeline cache file into the software installation package of the target application.

[0017] According to a fourth aspect of an embodiment of the present application, a pipeline state object data processing device is provided, including:

[0018] A download module, used to download a software installation package of a target application; the software installation package includes a pipeline cache file corresponding to the target application, the pipeline cache file is obtained by compiling a plurality of pipeline state object data, the plurality of pipeline state object data is obtained by traversing a combination of at least one sub-description item set under a plurality of preset material description items in material configuration information corresponding to the target application during the process of constructing the software installation package of the target application;

[0019] A startup module, used to install the target application based on the software installation package and start the target application;

[0020] The second compiling module is used for compiling the pipeline cache file in response to starting the target application to obtain a shader binary file.

[0021] According to a fifth aspect of an embodiment of the present application, an electronic device is provided, comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement a method as described in any one of the above-mentioned first aspects.

[0022] According to the sixth aspect of the embodiments of the present application, a computer-readable storage medium is provided. When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute any method described in the first aspect of the embodiments of the present application.

[0023] According to a seventh aspect of an embodiment of the present application, a computer program product is provided, comprising computer instructions, which, when executed by a processor, enable a computer to execute any one of the methods described in the first aspect of the embodiment of the present application.

[0024] The technical solution provided by the embodiments of the present application brings at least the following beneficial effects:

[0025] During the process of building the software installation package of the target application, the material configuration information corresponding to the target application is obtained; the material configuration information is set to include multiple preset material description items and at least one sub-description item set under each preset material description item; and at least one sub-description item set under multiple preset material description items is traversed to obtain multiple pipeline state object data; the multiple sub-description items included in each pipeline state object data correspond one-to-one to the multiple preset material description items; and the multiple pipeline state object data are compiled into a pipeline cache file and summarized into the software installation package of the target application. In this way, there is no need to perform target application running tests in different scenarios to collect the PSO data required by the target application, so that the resources consumed by the collection of PSO data are relatively low, and there is no need to collect PSO data manually, so that the collection of PSO data is more efficient and can avoid omissions. The setting method makes the collection of PSO data more comprehensive, and the subsequent target application can quickly find the compiled PSO data when performing material rendering to avoid jamming.

[0026] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application, and do not constitute an improper limitation on the present application.

[0028] Figure 1 It is a schematic diagram of an application environment according to an exemplary embodiment.

[0029] Figure 2 The figure is a flowchart of a pipeline state object data processing method according to an exemplary embodiment.

[0030] Figure 3 The present invention is a schematic diagram showing a process of collecting, compiling and publishing pipeline status object data according to an exemplary embodiment.

[0031] Figure 4 The diagram is a schematic diagram of a traversal order of multiple preset material description items according to an exemplary embodiment.

[0032] Figure 5 The figure is a schematic diagram showing deduplication of pipeline state object data according to an exemplary embodiment.

[0033] Figure 6 The present invention is a schematic diagram of a compilation process of a pipeline cache file after a target application is revealed according to an exemplary embodiment.

[0034] Figure 7The figure is a schematic diagram of asynchronous compilation of incremental materials according to an exemplary embodiment.

[0035] Figure 8 The figure is a block diagram of a pipeline state object data processing device according to an exemplary embodiment.

[0036] Fig. 9 The invention is a block diagram of an electronic device for processing pipeline state object data according to an exemplary embodiment.

[0037] Fig.10 The invention is a block diagram of an electronic device for processing pipeline state object data according to an exemplary embodiment. DETAILED DESCRIPTION

[0038] Various exemplary embodiments, features and aspects of the present application will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.

[0039] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.

[0040] In addition, in order to better illustrate the present application, numerous specific details are provided in the following specific embodiments. It should be understood by those skilled in the art that the present application can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present application.

[0041] See also Figure 1 , Figure 1 FIG. 1 is a schematic diagram of an application system provided according to an embodiment of the present application. The application system can be used in the pipeline state object data processing method of the present application. Figure 1 As shown, the application system may at least include a server 01 and a terminal 02 .

[0042] In an embodiment of the present application, the server 01 can be used to collect pipeline status object data, compile multiple pipeline status object data into pipeline cache files, and aggregate them into the software installation package of the target application, etc. The server 01 may include an independent physical server, or it may be a server cluster or distributed system composed of multiple physical servers, or it may be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0043] In the embodiment of the present application, the terminal 02 can be used for compiling pipeline cache files to obtain shader binary files, asynchronous compilation of new materials, etc. The terminal 02 may include physical devices such as smart phones, desktop computers, tablet computers, laptops, smart speakers, digital assistants, augmented reality (AR) / virtual reality (VR) devices, smart wearable devices, etc. The physical device may also include software running in the physical device, such as applications, etc. The operating system running on the terminal 02 in the embodiment of the present application may include but is not limited to Android system, IOS system, Linux, Windows, etc.

[0044] In addition, it should be noted that Figure 1 What is shown is only one application environment of the pipeline state object data processing method provided by this application.

[0045] In the embodiments of this specification, the terminal 02 and the server 01 may be directly or indirectly connected via wired or wireless communication, which is not limited in this application.

[0046] In a specific embodiment, when the server 02 is a distributed system, the distributed system can be a blockchain system. When the distributed system is a blockchain system, it can be formed by multiple nodes (any form of computing devices in the access network, such as servers and user terminals), and a point-to-point network is formed between the nodes. The protocol used by the point-to-point network is an application layer protocol running on the Transmission Control Protocol (TCP). In a distributed system, any machine such as a server or a terminal can join and become a node. The node includes a hardware layer, an intermediate layer, an operating system layer, and an application layer. Specifically, the functions of each node in the blockchain system may include:

[0047] 1) Routing: a basic function of a node, used to support communication between nodes.

[0048] In addition to the routing function, the node can also have the following functions:

[0049] 2) Applications are deployed in the blockchain to implement specific businesses based on actual business needs, record data related to the implementation of functions to form record data, carry digital signatures in the record data to indicate the source of the task data, and send the record data to other nodes in the blockchain system for other nodes to add the record data to a temporary block when they successfully verify the source and integrity of the record data.

[0050] It should be noted that in the specific implementation of this application, user-related data is involved. When the following embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0051] Before introducing the method embodiments provided in the present application, a brief introduction is first given to the application scenarios, relevant terms or nouns that may be involved in the method embodiments of the present application to facilitate understanding by technicians in the field of the present application.

[0052] PSO: Pipeline State Object, which combines the shader and rendering state required for a single rendering into one object, such as vertex declaration, VS, PS, rendering state (BlendState, etc.), Render Target pixel format, etc.

[0053] COOK: A process for building game installation packages in Unreal Engine. It can deserialize the uobject saved in the blueprint resources such as uasset and umap under the Editor into memory, and then serialize it again according to the requirements of the corresponding target platform, thereby realizing the conversion of original resources to the target platform.

[0054] VS: VertexShader is an image processing unit that adds 3D special effects. The vertex shading engine has programmable characteristics, allowing the use of instructions to adjust special effects. Each vertex is defined by a data structure, basically with x, y, and z coordinates. Each vertex may also have color, material, light characteristics, etc.

[0055] PS: PixelShader (pixel shader), after the model vertices are transformed, they need to be filled with color. The PS filling algorithm is for each pixel on the screen.

[0056] Figure 2FIG. 1 is a flow chart of a pipeline state object data processing method according to an exemplary embodiment. The pipeline state object data processing method can be applied to a server, such as a packaging server of a software installation package. Figure 2 As shown, the pipeline state object data processing method may include the following steps.

[0057] S201, in the process of building a software installation package of a target application, obtaining material configuration information corresponding to the target application; the material configuration information includes a plurality of preset material description items and at least one sub-description item set under each preset material description item.

[0058] In the embodiments of this specification, the target application may refer to an application program, such as a game, multimedia, etc. The material configuration information corresponding to the target application may refer to the full material description information pre-configured for the target application, so that PSO data can be collected in the subsequent scene-by-scene testing without the need.

[0059] As an example, the material configuration information may include a plurality of preset material description items and at least one sub-description item set under each preset material description item. For example, the plurality of preset material description items may include a vertex description item (Vertex), a blend state (Blend State) description item, a multi-sample anti-aliasing (Multi-Sample Anti-Aliasing, MSAASample, multi-sample anti-aliasing) description item, a render target (Render Target) description item, a clipping mode (Cull Mode, also referred to as a culling mode) description item, a depth stencil format (Depth Stencil Attachment, DSA) description item, a depth stencil state (Depth Stencil State, DSS) description item, a fragment shader (Fragment Shader, FS) description item, and a pixel shader (Pixel Shader, PS) description item.

[0060] Among them, the Vertex description item can be used to describe vertices. Exemplarily, at least one sub-description item (i.e., multiple material properties) under the Vertex description item may include: Static Mesh, Instanced Mesh, Skeletal Mesh, Niagara Spriteh, Niagara Ribbon, Niagara Mesh, Procedural Mesh (procedural mesh, i.e., generating a model based on vertices), and Deferred Decal vertex structure description. Niagara here is a visual design plug-in in the Unreal Engine. Accordingly, Niagara Spriteh refers to the particle effect of the visual design plug-in, Niagara Ribbon refers to the strip effect of the visual design plug-in, and NiagaraMesh refers to the network of the visual design plug-in.

[0061] Each sub-description item under the above Vertex description item can be represented by multiple fields, for example, by 16 fields V0-V15. The V0-V15 can be used to describe each material attribute, for example, vertex position, x-direction tangent, z-direction tangent, vertex color, texture 0 coordinates, texture 1 coordinates, texture 2 coordinates, texture 3 coordinates, origin, space transformation 1, space transformation 2, space transformation 3, texture coordinate offset, light map texture, bone index, bone weight, etc., that is, the field describing the vertex. Among them, texture 0 coordinates, texture 1 coordinates, texture 2 coordinates and texture 3 coordinates can indicate that the corresponding 4 textures can be used simultaneously; space transformation 1, space transformation 2 and space transformation 3 can indicate that the processing of 3 space changes can be supported.

[0062] Blend State description items can be used to describe the blend state, as shown in Table 1.

[0063] Table 1

[0064]

[0065] Among them, on the left side can be at least one sub-description item under the Blend State description item, that is, multiple blend state properties: Deferred Decal (delayed decal) blend state effect, Slate UI (UI drawing), UI stands for UserInterface, user interface, Base Pass Meshes (base pass mesh). Each sub-description item can be represented by five fields in Table 1, which are Opaque, Masked, Translucent, Additive, and AlphaComposite.

[0066] C can represent output color; A can represent output alpha (semi-transparent channel in output color); sc can represent source color (resource color); sa can represent source alpha (semi-transparent channel in resource color); dc can represent dest color (final processing color value); da can represent dest alpha (final processing translucent value).

[0067] For example, for the Deferred Decal material, the Translucent blending state attribute is specified, and the output color can be calculated according to sc*sa+dc*(1-sa) under Translucent in Table 1, and alpha is directly output as sa.

[0068] The MSAASample description item can be used to describe the sampling method. Accordingly, at least one sub-description item set under the MSAASample description item can be at least one number of pixel sampling points, for example, the number of pixel sampling points can be 1, 2, 4, or 8.

[0069] Optionally, if the material has an explicit MSAASample description, the default value can be used directly and the default format can be traversed later. If there is no default value, the number of pixel sampling points can be 1, 2, 4, or 8, and 1, 2, 4, or 8 needs to be traversed later.

[0070] At least one sub-description item under the Render Target description item can generally include at least one of the following four formats: PF_FloatRGBA, PF_FloatR11G11B10, PF_B8G8R8A8, and PF_R5G6B5_UNORM. Among them, PF_FloatRGBA may mean that the rgb color and the a semi-transparent information values ​​are all floating point types; PF_FloatR11G11B10 may mean that the rgb color occupies 11 bits, 11 bits, and 10 bits of floating point respectively; PF_B8G8R8A8 may mean that the rgb color and the a semi-transparent information values ​​are all 8-bit integers; PF_R5G6B5_UNORM may mean that the rgb color occupies 5 bits, 6 bits, and 5 bits of integers respectively.

[0071] Optionally, if the material has a clear RenderTarget specification, the default format can be used directly and the default format can be traversed later. If it is not specified, at least one sub-description item under the Render Target description item can be one of the four formats, and the four formats need to be traversed later.

[0072] At least one sub-description item under the Cull Mode description item can usually include at least one of the following three formats: CullModeFront, CullModeBack, and CullModeNone. Among them, CullModeFron refers to the outer surface culling mode (when the outer surface is blocked, the entire outer surface will not be rendered and will be directly culled); CullModeBack refers to the inner surface culling mode (when the inner surface is blocked, the entire inner surface will not be rendered and will be directly culled); CullModeNone refers to the non-culling mode (when the inner and outer surfaces are blocked, no surface will be culled).

[0073] Optionally, if the material has a clear CullMode, the default format is used directly, and the default format can be traversed later. If there is no default, at least one sub-description item under the Cull Mode description item can be one of the three formats, and the three formats need to be traversed later.

[0074] At least one sub-description item under the DSA description item can generally include at least one of the following three formats: FormatStencil8, FormatDepth32Float_Stencil8, FormatDepth32Float. Among them, FormatStencil8 means that the template value of each pixel is an 8-bit integer; FormatDepth32Float_Stencil8 means that the template value of each pixel is an 8-bit integer and the depth value is a 32-bit floating point; FormatDepth32Float means that the depth value of each pixel is a 32-bit floating point.

[0075] If the material has a default specification for DSA, the default format is used directly and the default format can be traversed later. If there is no default specification, at least one sub-description item under the DSA description item can be in the three formats, which covers all aspects and needs to be traversed later.

[0076] At least one sub-description item under a DSS description item can usually include a combination of two types of variables, which can be ECompareFunction type and EstencilOp type. EcompareFunction can have 14 subtypes, and EstencilOp can have 10 subtypes. Subsequently, traversal can be performed on these 14 subtypes and 10 subtypes. EcompareFunction is a comparison function, and EstencilOp is a template operation type, such as keeping the original, setting to zero, etc.

[0077] FS description items and PS description items can be used to describe at least one shader, which can generally include VertexShader, FragmentShader, GeometryShader, and DomainShader. For example, if the target application is a game, for a mobile phone, VertexShader and FragmentShader can be included, and accordingly, VertexShader and FragmentShader can be traversed later.

[0078] In the embodiments of this specification, the Unreal Engine can be used to construct the software installation package of the target application. During the construction of the software installation package of the target application, the material configuration information corresponding to the target application can be obtained to collect the full amount of PSO data during the construction of the software installation package of the target application. For example, a plug-in can be set in COOK to obtain the material configuration information corresponding to the target application during the construction of the software installation package of the target application, thereby collecting the full amount of PSO data.

[0079] S203, traversing at least one sub-description item set under multiple preset material description items to obtain multiple pipeline state object data; the multiple sub-description items included in each pipeline state object data correspond one-to-one to the multiple preset material description items.

[0080] In the embodiment of the present specification, at least one sub-description item set under multiple preset material description items can be traversed, and a sub-description item set under each traversed preset material description item can be combined to obtain multiple pipeline state object data (i.e., PSO data).

[0081] Exemplarily, it is assumed that g sub-description items are set under the Vertex description item, a sub-description items are set under the BlendState description item, b sub-description items are set under the MSAASample description item, f sub-description items are set under the Render Target description item, c sub-description items are set under the Cull Mode description item, e sub-description items are set under the DSA description item, d sub-description items are set under the DSS description item, m sub-description items are set under the FS description item, and n sub-description items are set under the PS description item. In this case, at least one sub-description item set under multiple preset material description items is traversed to obtain multiple pipeline state object data, that is, multiple PSO data. The number of the multiple PSO data can be m*n*a*b*c*d*e*f*g, that is, m*n*a*b*c*d*e*f*g PSO data, so that the full amount of PSO self-collection of the entire material can be completed. Among them, at least one sub-description item set under each preset material description item can be obtained by full enumeration based on the commonly used sub-description items to cover as comprehensive sub-description items as possible. This allows any material subsequently loaded during the running of the target application to be found in the fully enumerated PSO data, improving material rendering efficiency and avoiding lags.

[0082] In a possible implementation, traversing the at least one sub-description item combination set under multiple preset material description items to obtain multiple pipeline state object data may include:

[0083] The traversal order is set for the above-mentioned multiple preset material description items; for example, the traversal order of the multiple preset material description items is randomly set. For example, it can be as follows Figure 4 shown.

[0084] Based on the traversal order, traversal is started from the preset material description item that is ranked first, and when traversing to any preset material description item, a sub-description item is extracted from the any preset material description item;

[0085] When the preset material description item at the last position is traversed, the extracted multiple sub-description items are combined together to obtain a pipeline state object data;

[0086] Further, it can be determined whether the combined pipeline state object data represents that any sub-description item in the first preset material description item has been combined with any sub-description item in the second preset material description item, that is, it can be determined whether the number of combined pipeline state object data is the full combination number. For example, g sub-description items are set under the Vertex description item, a sub-description items are set under the BlendState description item, b sub-description items are set under the MSAASample description item, f sub-description items are set under the RenderTarget description item, c sub-description items are set under the Cull Mode description item, e sub-description items are set under the DSA description item, d sub-description items are set under the DSS description item, m sub-description items are set under the VS description item, and n sub-description items are set under the PS description item. Accordingly, the full combination number can be the above-mentioned m*n*a*b*c*d*e*f*g.

[0087] The combined pipeline state object data indicates that any sub-description item in the first preset material description item has been combined with any sub-description item in the second preset material description item, and the combined pipeline state object data can be used as a plurality of pipeline state object data;

[0088] When the combined pipeline status object data does not indicate that any sub-description item in the first preset material description item has been combined with any sub-description item in the second preset material description item, return to the above-mentioned step based on the traversal order, start traversal from the first preset material description item, and when traversing to any preset material description item, extract a sub-description item from the any preset material description item, until the combined pipeline status object data indicates that any sub-description item in the first preset material description item has been combined with any sub-description item in the second preset material description item.

[0089] The first preset material description item may be any preset material description item; and the second preset material description item may be a preset material description item among multiple preset material description items except the first preset material description item.

[0090] In an optional implementation, considering that various materials may have duplicate PSO data during the PSO enumeration traversal process, deduplication operations can be performed based on the content hash value (hash value) of each PSO data to reduce the redundancy of various PSO data. For example, see Figure 5 , for the acquired full amount of PSO data, PSO data deduplication can be performed, so that the deduplicated multiple PSO data can be compiled to obtain PipelineCache files, and then the PipelineCache files can be aggregated into the software installation package. Accordingly, the above-mentioned pipeline state object data that has been combined represents that any sub-description item in the first preset material description item has been combined with any sub-description item in the second preset material description item, and the combined pipeline state object data is used as multiple pipeline state object data steps replaced by:

[0091] The combined pipeline state object data represents that any sub-description item in the first preset material description item has been combined with any sub-description item in the second preset material description item, and a hash operation is performed on each combined pipeline state object data to obtain a hash value of each combined pipeline state object data;

[0092] Furthermore, based on the hash value, the combined pipeline state object data can be deduplicated to obtain multiple pipeline state object data.

[0093] S205, compile multiple pipeline state object data into a pipeline cache file, and aggregate them into a software installation package of the target application.

[0094] In the embodiments of this specification, multiple pipeline state object data can be compiled into pipeline cache files and aggregated into the software installation package of the target application. For example, multiple PSO data can be compiled into pipeline cache files, i.e. pipeline cache files, using Shader Pipeline Cache Tool Build. Furthermore, the pipeline cache files can be aggregated into the software installation package. For example, they can be used as a configuration file in the software installation package.

[0095] During the process of building the software installation package of the target application, the material configuration information corresponding to the target application is obtained; the material configuration information is set to include multiple preset material description items and at least one sub-description item set under each preset material description item; and at least one sub-description item set under multiple preset material description items is traversed to obtain multiple pipeline state object data; the multiple sub-description items included in each pipeline state object data correspond one-to-one to the multiple preset material description items; and the multiple pipeline state object data are compiled into a pipeline cache file and summarized into the software installation package of the target application. In this way, there is no need to perform target application running tests in different scenarios to collect the PSO data required by the target application, so that the resources consumed by the collection of PSO data are relatively low, and there is no need to collect PSO data manually, so that the collection of PSO data is more efficient and can avoid omissions. The setting method makes the collection of PSO data more comprehensive, and the subsequent target application can quickly find the compiled PSO data when performing material rendering to avoid jamming.

[0096] In the embodiment of the present specification, a flowchart of a pipeline state object data processing method is also provided, and the pipeline state object data processing method can be applied to a server, such as a packaging server of a software installation package. Specifically, the pipeline state object data processing method can include the following steps.

[0097] Download the software installation package of the target application; the software installation package may include a pipeline cache file corresponding to the target application, the pipeline cache file is compiled from multiple pipeline state object data, and the multiple pipeline state object data are obtained by traversing at least one sub-description item set under multiple preset material description items in the material configuration information corresponding to the target application during the process of building the software installation package of the target application; the construction of the software installation package and the acquisition process of the pipeline cache file can refer to the above-mentioned corresponding content, which will not be repeated here.

[0098] Install the target application based on the software installation package and start the target application;

[0099] In response to the start of the target application, the pipeline cache file is compiled to obtain a shader binary file.

[0100] In the embodiments of this specification, the pipeline cache file carried by the downloaded software installation package can be precompiled to form a shader binary file that can be directly used for rendering and display. Taking the target application as a game application (referred to as game) as an example, the terminal can download the software installation package of the game, and can install the game based on the software installation package and start the installed game. After the game is installed and started for the first time, the pipeline cache file carried in the software installation package of the game can be compiled to form the shader binary file required for rendering. The shader binary file can include binary description information corresponding to each of the multiple pipeline state object data, that is, the pipeline state object data is described in binary form, so that it can be directly used for material rendering.

[0101] Optionally, in order to prevent the full pre-compilation process from being too long, a preset duration may be set to constrain and adjust the pre-compilation process. For example, the preset duration may be 5 minutes, which is not limited in this application.

[0102] See also Figure 6 Specifically, in response to the startup of the target application, that is, the first installation and login startup, compilation can be started to compile the pipeline cache file; and it can be detected whether the compilation time has timed out, for example, whether it exceeds the preset time. When it is detected that the compilation time has reached the preset time, the compilation can be paused, and the compiled file can be stored, waiting to continue the compilation at the next startup, until the compilation of the full amount of PSO data in the pipeline cache file is completed (that is, the full compilation is completed), and the shader binary file required for rendering is obtained.

[0103] In a possible implementation, the method may further include:

[0104] In response to the target application needing to load the first material during operation, obtaining description information of the first material;

[0105] According to the description information of the first material, searching in the shader binary file to obtain matching target binary description information;

[0106] The first material is rendered and displayed based on the target binary description information.

[0107] The first material may be any material that needs to be rendered in the target application. The description information of the first material may be binary description information corresponding to the PSO data used to describe the first material after compilation, or the description information of the first material may be PSO data used to describe the first material, in which case the PSO data describing the first material may be compiled into binary description information. The above-mentioned shader binary file may include binary description information corresponding to each of the plurality of pipeline state object data.

[0108] In actual applications, the target application can be started and the pages in the target application can be browsed. When entering any page, page rendering is required. Specifically, the material of any target in the page needs to be rendered. For example, the target application needs to load the first material. In response to the need to load the first material during the operation of the target application, the description information of the first material can be obtained, such as the PSO data describing the first material corresponding to the compiled binary description information. Or if the description information of the first material is the PSO data used to describe the first material, then the PSO data describing the first material can be compiled into binary description information here.

[0109] Furthermore, the binary description information corresponding to the first material can be searched in the shader binary file to obtain matching target binary description information, so that the first material can be rendered and displayed based on the target binary description information.

[0110] By setting the shader binary files corresponding to the full amount of multiple pipeline state object data, material rendering can use a table lookup method to quickly find matching target binary description information, which can improve the rendering and display efficiency of loaded materials.

[0111] In a possible implementation, the method may further include:

[0112] In response to the target application needing to load a second material during operation, obtaining description information of the second material;

[0113] When the second material is a newly added material, an asynchronous compilation process is started to compile the description information of the second material to obtain binary description information corresponding to the second material;

[0114] Add the binary description information corresponding to the second material to the shader binary file.

[0115] The second material may be any material that needs to be rendered in the target application. The description information of the second material may be PSO data for describing the second material. The newly added material may refer to an incremental material, or may refer to a material other than a plurality of PSO data.

[0116] In practical applications, refer to Figure 7Incremental materials can be compiled asynchronously. Specifically, the target application can be started and the pages in the target application can be browsed. When entering any page, page rendering is required. Specifically, the material of any target in the page needs to be rendered. For example, the second material needs to be loaded in the target application. In response to the need to load the second material during the operation of the target application, the description information of the second material can be obtained, such as obtaining the PSO data describing the second material. In this way, it can be determined whether it is a newly added material. For example, it can be determined whether it belongs to multiple PSO data. If it does, it can be rendered and displayed in the same way as the loading process of the first material mentioned above; if it does not, it can be considered to be a newly added material, so that an asynchronous compilation process can be started to compile the description information of the second material, and the binary description information corresponding to the second material can be obtained, that is, the compilation result can be obtained; and the binary description information corresponding to the second material can be added to the shader binary file, and the compilation result can be saved locally for the subsequent loading and rendering of the second material.

[0117] The asynchronous compilation process here can be understood as a process that can be processed in parallel with the process that supports the operation of the target application, that is, the asynchronous compilation process can be processed in parallel with the process that supports the operation of the target application.

[0118] By starting an asynchronous compilation process to compile the description information of the newly added material, obtaining the binary description information corresponding to the second material, and adding the binary description information corresponding to the second material to the shader binary file, it is possible to prevent stalls caused by synchronous compilation and facilitate quick extraction during subsequent rendering.

[0119] Figure 8 FIG. 1 is a block diagram of a pipeline state object data processing device according to an exemplary embodiment. Figure 8 , the device may include:

[0120] The acquisition module 801 is used to acquire material configuration information corresponding to the target application during the construction of the software installation package of the target application; the material configuration information includes a plurality of preset material description items and at least one sub-description item set under each preset material description item;

[0121] The pipeline state object collection module 803 is used to traverse the at least one sub-description item set under the multiple preset material description items to obtain multiple pipeline state object data; the multiple sub-description items included in each pipeline state object data correspond one-to-one to the multiple preset material description items;

[0122] The first compiling module 805 is used to compile the plurality of pipeline state object data into pipeline cache files, and aggregate them into the software installation package of the target application.

[0123] In one possible implementation, the multiple preset material description items include vertex description items, blending state description items, multi-sampling anti-aliasing description items, rendering target description items, clipping mode description items, depth template format description items, depth template state description items, fragment shader description items, and pixel shader description items.

[0124] In a possible implementation, the pipeline state object collection module 803 may include:

[0125] A traversal order setting unit, used to set a traversal order for the plurality of preset material description items;

[0126] A traversal unit, configured to start traversing from the first preset material description item based on the traversal order, and extract a sub-description item from any preset material description item when traversing to the preset material description item;

[0127] The extraction unit is used to combine the extracted sub-description items together to obtain a pipeline state object data when the preset material description item at the last position is traversed;

[0128] A pipeline state object data acquisition unit, used to combine any sub-description item in the first preset material description item represented by the combined pipeline state object data with any sub-description item in the second preset material description item, and use the combined pipeline state object data as the plurality of pipeline state object data;

[0129] Returning the traversal unit, used for returning the step of traversing from the first preset material description item based on the traversal order and extracting a sub-description item from any preset material description item when the combined pipeline state object data does not indicate that any sub-description item in the first preset material description item has been combined with any sub-description item in the second preset material description item;

[0130] Among them, the first preset material description item is any preset material description item; the second preset material description item is a preset material description item among the multiple preset material description items except the first preset material description item.

[0131] In a possible implementation, the pipeline state object data acquisition unit is further used to perform a hash operation on each combined pipeline state object data to obtain a hash value of each combined pipeline state object data, and based on the hash value, deduplicate the combined pipeline state object data to obtain the multiple pipeline state object data.

[0132] The embodiment of the present application further provides a pipeline state object data processing device, which may include:

[0133] A download module, used to download a software installation package of a target application; the software installation package includes a pipeline cache file corresponding to the target application, the pipeline cache file is obtained by compiling a plurality of pipeline state object data, the plurality of pipeline state object data is obtained by traversing a combination of at least one sub-description item set under a plurality of preset material description items in material configuration information corresponding to the target application during the process of constructing the software installation package of the target application;

[0134] A startup module, used to install the target application based on the software installation package and start the target application;

[0135] The second compiling module is used for compiling the pipeline cache file in response to starting the target application to obtain a shader binary file.

[0136] In a possible implementation, the second compiling module may include:

[0137] A compiling unit, configured to compile the pipeline cache file in response to starting the target application;

[0138] The compilation suspension unit is used to suspend the compilation and store the compiled file when it is detected that the compilation time reaches a preset time.

[0139] In a possible implementation, the above device may further include:

[0140] A first loading module, configured to obtain description information of the first material in response to the need to load the first material during the operation of the target application;

[0141] A search module, configured to search the shader binary file according to the description information of the first material to obtain matching target binary description information; the shader binary file includes binary description information corresponding to each of the plurality of pipeline state object data;

[0142] A rendering module is used to render and display the first material based on the target binary description information.

[0143] In a possible implementation, the above device may further include:

[0144] A second loading module, configured to obtain description information of the second material in response to the need to load the second material during the operation of the target application;

[0145] an asynchronous compilation module, for starting an asynchronous compilation process to compile the description information of the second material to obtain binary description information corresponding to the second material when the second material is a newly added material;

[0146] The storage module is used to add the binary description information corresponding to the second material to the shader binary file.

[0147] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0148] Fig. 9 is a block diagram of an electronic device for processing pipeline state object data according to an exemplary embodiment. The electronic device may be a terminal, and its internal structure diagram may be as shown in FIG. Fig. 9 As shown. The electronic device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for processing pipeline state object data is implemented. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covering the display screen, or a key, trackball or touchpad set on the housing of the electronic device, or an external keyboard, touchpad or mouse, etc.

[0149] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0150] Fig.10 is a block diagram of an electronic device for processing pipeline state object data according to an exemplary embodiment. The electronic device may be a server, and its internal structure diagram may be as shown in FIG. Fig.10As shown. The electronic device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for processing pipeline state object data is implemented.

[0151] Those skilled in the art will understand that Fig.10 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0152] In an exemplary embodiment, an electronic device is also provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the pipeline state object data processing method as in the embodiment of the present application.

[0153] In an exemplary embodiment, a computer-readable storage medium is also provided, and when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute the pipeline state object data processing method in the embodiment of the present application. The computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0154] In an exemplary embodiment, a computer program product including instructions is also provided. When the computer program product is executed on a computer, the computer executes the method for processing pipeline state object data in the embodiment of the present application.

[0155] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0156] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0157] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A pipeline status object data processing method, characterized in that: include: In the process of building a software installation package of a target application, obtaining material configuration information corresponding to the target application; the material configuration information includes a plurality of preset material description items and at least one sub-description item set under each preset material description item; Traversing the at least one sub-description item set under the multiple preset material description items to obtain multiple pipeline state object data; the multiple sub-description items included in each pipeline state object data correspond one-to-one to the multiple preset material description items; The plurality of pipeline state object data are compiled into a pipeline cache file, and aggregated into the software installation package of the target application.

2. The method according to claim 1, characterized in that The multiple preset material description items include vertex description items, blending state description items, multi-sampling anti-aliasing description items, rendering target description items, clipping mode description items, depth template format description items, depth template state description items, fragment shader description items, and pixel shader description items.

3. The method according to claim 1, characterized in that The traversing the at least one sub-description item combination set under the plurality of preset material description items to obtain a plurality of pipeline state object data includes: Setting a traversal order for the plurality of preset material description items; Based on the traversal order, traversing starts from the first preset material description item, and when traversing to any preset material description item, extracting a sub-description item from the any preset material description item; When the preset material description item at the last position is traversed, the extracted multiple sub-description items are combined together to obtain a pipeline state object data; The combined pipeline state object data represents that any sub-description item in the first preset material description item has been combined with any sub-description item in the second preset material description item, and the combined pipeline state object data is used as the plurality of pipeline state object data; If the combined pipeline state object data does not indicate that any sub-description item in the first preset material description item has been combined with any sub-description item in the second preset material description item, returning to the step of traversing from the first preset material description item based on the traversal order, and extracting a sub-description item from any preset material description item when traversing to the preset material description item; Among them, the first preset material description item is any preset material description item; the second preset material description item is a preset material description item among the multiple preset material description items except the first preset material description item.

4. The method according to claim 3, characterized in that The combined pipeline state object data represents that any sub-description item in the first preset material description item has been combined with any sub-description item in the second preset material description item, and the combined pipeline state object data is used as the multiple pipeline state object data steps are replaced by: The combined pipeline state object data represents that any sub-description item in the first preset material description item has been combined with any sub-description item in the second preset material description item, and a hash operation is performed on each combined pipeline state object data to obtain a hash value of each combined pipeline state object data; Based on the hash value, the combined pipeline state object data is deduplicated to obtain the multiple pipeline state object data.

5. A pipeline status object data processing method, characterized in that: include: Downloading a software installation package of a target application; the software installation package includes a pipeline cache file corresponding to the target application, the pipeline cache file is obtained by compiling a plurality of pipeline state object data, the plurality of pipeline state object data is obtained by traversing a combination of at least one sub-description item set under a plurality of preset material description items in material configuration information corresponding to the target application during the process of constructing the software installation package of the target application; Installing the target application based on the software installation package and starting the target application; In response to the start of the target application, the pipeline cache file is compiled to obtain a shader binary file.

6. The method according to claim 5, characterized in that In response to starting the target application, compiling the pipeline cache file to obtain a shader binary file includes: In response to starting the target application, compiling the pipeline cache file; When it is detected that the compilation time reaches a preset time, the compilation is paused and the compiled file is stored.

7. The method according to claim 5, characterized in that The method further comprises: In response to the target application needing to load a first material during operation, obtaining description information of the first material; According to the description information of the first material, searching in the shader binary file to obtain matching target binary description information; the shader binary file includes binary description information corresponding to each of the plurality of pipeline state object data; The first material is rendered and displayed based on the target binary description information.

8. The method according to claim 5, characterized in that The method further comprises: In response to the target application needing to load a second material during operation, obtaining description information of the second material; In the case where the second material is a newly added material, starting an asynchronous compilation process to compile the description information of the second material to obtain binary description information corresponding to the second material; Add binary description information corresponding to the second material to the shader binary file.

9. A pipeline status object data processing device, characterized in that: include: An acquisition module, used to acquire material configuration information corresponding to the target application during the construction of the software installation package of the target application; the material configuration information includes a plurality of preset material description items and at least one sub-description item set under each preset material description item; A pipeline state object collection module, used to traverse the at least one sub-description item set under the multiple preset material description items to obtain multiple pipeline state object data; the multiple sub-description items included in each pipeline state object data correspond one-to-one to the multiple preset material description items; The first compiling module is used to compile the plurality of pipeline state object data into a pipeline cache file, and aggregate the pipeline cache file into the software installation package of the target application.

10. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the pipeline state object data processing method according to any one of claims 1 to 4 or the pipeline state object data processing method according to any one of claims 5 to 8.

11. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the pipeline state object data processing method as described in any one of claims 1 to 4 or the pipeline state object data processing method as described in any one of claims 5 to 8.