A GPU compiler pre-attribute configuration method

By obtaining and loading the attribute configuration table and default value table, combined with register operations, the problems of complex attribute data management and poor hardware adaptability in graphics rendering are solved, and efficient and accurate data processing and rendering efficiency are achieved.

CN118689488BActive Publication Date: 2024-12-06WUHAN LINGJIU MICROELECTRONICS CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411161599.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2024-12-06
Estimated Expiration
2044-08-23

AI Technical Summary

Technical Problem

In the process of graphics rendering, the pre-configuration of attribute data has problems such as low efficiency, complex data management, repeated configuration, poor hardware differences adaptability, and difficult to ensure data real-time and consistency, especially when dealing with complex scenarios and large-scale When graphic data, the rendering efficiency and delay phenomenon occur.

Method used

By obtaining the attribute configuration table of each thread, extracting vertex data and loading it into registers, combining the attribute default value table to achieve efficient data management and processing, establishing the correspondence between thread id and SP stack space, and optimizing data transmission and processing. Ensure the accuracy and real-time of the data.

Benefits of technology

It realizes efficient and accurate attribute data acquisition and processing, avoids data confusion and duplicate configuration, improves graphics rendering efficiency, and ensures good adaptability and data consistency in different hardware environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118689488B_ABST
    Figure CN118689488B_ABST
Patent Text Reader

Abstract

The present invention provides a GPU compiler pre-attribute configuration method, which obtains the attribute configuration table of each thread based on the start.s file; extracts the corresponding vertex data from the cache and attribute default value table according to the configuration information, and stores the extracted vertex data in the input register; loads the base address of the SP register of each thread, and establishes the corresponding relationship between the thread id and the SP stack space base address based on the SP register; sends the corresponding relationship to the hardware device; the hardware device extracts the corresponding vertex data from the input register according to the thread id, and places it in the corresponding SP stack space for processing. The present invention responds to the challenges in the programming implementation process, simplifies the complex operations in the association and binding of vertex data, index data and attribute data, reduces technical difficulties, and reduces the development difficulty of developers in the actual design process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of graphics rendering, and more specifically, to a GPU compiler pre-attribute configuration method. Background Art

[0002] Graphics processing units (GPUs) were initially used to handle graphics rendering-related tasks. With the continuous advancement of the technology field, GPU parallel computing capabilities have been widely used in many fields, such as deep learning and scientific computing. The compiler plays a decisive and key role in this. It is responsible for converting shader programs written in high-level languages ​​into machine languages ​​that can be executed by the processor, especially vertex shaders and fragment shaders. Vertex shaders are mainly used to process vertex-related operations, and fragment shaders are used to process pixel-level operations, such as color calculation and texture mapping. In order for the compiler to achieve the best effect when compiling vertex shader code, attribute data pre-configuration is required. This includes attribute count, index array address, attribute default value address, and 32-bit storage size, bit field and other instructions of 8 valid attributes (each attribute contains information such as index, size, type, whether it is standardized, step size and pointer). Through the pre-configuration of attribute data, the basic requirements of the GPU compiler can be met, and secondly, technical space is reserved for subsequent performance improvements, thereby improving the running efficiency and performance of the shader code on the GPU.

[0003] In actual operation, the pre-configuration process of attribute data faces many technical challenges. First, how to systematically organize and manage the huge amount of attribute data with complex indexes in an efficient, orderly, scientific and reasonable way, in order to ensure that Shader can quickly, accurately and unbiasedly access and use attribute data, and avoid data confusion, loss or errors, it is necessary to plan and build appropriate data structures and management strategies according to the actual situation of the self-developed compiler; second, when faced with a large number of different Shaders with different functions, how to achieve the sharing and collaboration of attribute data is critical and important. From the perspective of improving rendering efficiency and avoiding repeated configuration work, it is necessary to reasonably coordinate the configuration relationship of the pre-data between different Shaders and build a customized sharing mechanism and collaboration mode. At the same time, different hardware platforms and graphics APIs usually have their own unique characteristics and limitations for attribute data configuration, which requires full consideration and adaptation of these differences during the self-developed development process to ensure that the ideal rendering effect can be successfully achieved under various hardware environments and technical conditions. In addition, the consistency and real-time nature of attribute data must always be guaranteed, and it must be updated and adjusted in real time with the dynamic changes in the scene and the user's operations to ensure that the graphics rendering can closely match the actual situation. Moreover, when dealing with complex scenes and large-scale graphics data, how to effectively optimize the transmission and processing efficiency of attribute data and reduce the probability of data delay and jamming is also a key issue that needs to be explored in depth and properly resolved. Summary of the invention

[0004] The present invention aims at solving the technical problems existing in the prior art and provides a GPU compiler pre-attribute configuration method, comprising:

[0005] Obtaining an attribute configuration table of each thread based on the start.s file, wherein the attribute configuration table stores configuration information of vertex data, and the configuration information describes the storage structure of vertex data. The start.s file is located in the front position of the compiler compiling the shader;

[0006] According to the configuration information, the corresponding vertex data is extracted from the cache, and if the value of the vertex data in the cache is default, the default value of the corresponding vertex is obtained from the attribute default value table;

[0007] The vertex data extracted from the cache and the vertex data extracted from the attribute default value table are stored in the input register;

[0008] Load the base address of the SP register of each thread, and establish the correspondence between the thread id and the SP stack space base address based on the SP register;

[0009] Sending the correspondence between the thread id and the SP stack space base address to the hardware device;

[0010] The hardware device extracts the corresponding vertex data from the input register according to the thread id and places it in the corresponding SP stack space for processing.

[0011] The present invention provides a GPU compiler pre-attribute configuration method, which is to design and optimize the start.s execution process, covering a series of closely related steps from obtaining the base address of the attribute configuration table and the default value table, to loading data in the register, judging the operation type, processing the cache data, to loading the SP register base address and finally jumping the program address, etc., and through specific register storage and calculation, it realizes efficient and accurate acquisition and processing of various attribute data. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 A flowchart of a GPU compiler pre-attribute configuration method provided by the present invention;

[0013] Figure 2 This is a schematic diagram of the video memory structure;

[0014] Figure 3 Schematic diagram of the software and hardware system of the graphics rendering system. DETAILED DESCRIPTION

[0015] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. In addition, the technical features in the various embodiments or single embodiments provided by the present invention can be arbitrarily combined with each other to form a feasible technical solution. This combination is not subject to the constraints of the sequence of steps and / or the structural composition mode, but must be based on the ability of ordinary technicians in this field to achieve. When the combination of technical solutions is contradictory or cannot be achieved, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0016] A typical GPU compiler will configure the attribute data in advance before compiling the Shader. Vertex data is represented by vertex attributes, which are an interface used when sending vertex data to the graphics card. It defines how to read vertex data from the cache (VBO) and how to pass the data to different stages of the rendering pipeline.

[0017] In OpenGL, vertex attributes are generally defined with the help of the glVertexAttribPointer function, which tells OpenGL how to parse vertex data such as position, normal, and texture coordinates from VBO and associate them with the vertex attributes of the vertex shader. This function involves parameters such as attribute position index, number of components of each attribute, data type, whether it is standardized, and data stride, and is designed to convert vertex data in memory into a "vertex stream" that the rendering pipeline can recognize.

[0018] See also Figure 1 , provides a GPU compiler pre-attribute configuration method, the method comprising:

[0019] Step 1, based on the start.s file, obtain the attribute configuration table of each thread, wherein the attribute configuration table stores configuration information of vertex data, and the configuration information describes the storage structure of vertex data. The start.s file is located in the front position of the compiler compiling the shader.

[0020] It is understandable that before graphics rendering, the attributes of vertex data need to be configured in advance, where each thread corresponds to an attribute configuration table, and the defined attribute configuration table is stored in a register. For example, the test convention here is named R2 register, that is, the attribute configuration table corresponding to each thread is stored in the corresponding R2 register.

[0021] The attribute configuration table stores configuration information of vertex data, and the configuration information describes the storage structure of vertex data.

[0022] In the present invention, the configuration information of the vertex data is generated according to the data structure specified in the OpenGL specification. When executing related tasks, the configuration information of the vertex data is generated and sent to a fixed address of the video memory for storage. The specific data structure is shown in Table 1 below:

[0023] Table 1 Data structure of configuration information

[0024]

[0025] As can be seen from Table 1, the configuration information includes an attribute count, an index array address, an attribute default value address, and multiple valid attributes. Table 1 includes 8 valid attributes, which are numbered as valid attribute 0 to valid attribute 7, and defines the attribute count, index array address, attribute default value address, and the storage size and bit field of each valid attribute.

[0026] For each valid attribute, its configuration information is defined. The configuration information of each valid attribute includes index, size, type, normalized, stride, and pointer.

[0027] The attribute configuration table in Table 1 above occupies a maximum of 108 bytes, with a storage address range of 0x100 to 0x16c and is aligned to 0x200 (as agreed in the test example).

[0028] The present invention designs a start.s file specifically responsible for executing attribute data configuration. The vertex data configuration information (including attribute position index, number of components of each attribute, data type, whether normalized, data stride, etc.) set by the glVertexAttribPointer function will be stored in the attribute configuration table in the video memory. The start.s file first obtains the base address and offset of the attribute configuration table corresponding to each thread, and then obtains the configuration information of the valid attributes in the attribute configuration table according to the base address and offset of the attribute configuration table.

[0029] Among them, obtaining the configuration information of the valid attributes in the attribute configuration table according to the base address and offset of the attribute configuration table corresponding to each thread includes: obtaining the base address and attribute count of the attribute configuration table, and obtaining the configuration information of each valid attribute according to the base address of the attribute configuration table and the offset of each valid attribute.

[0030] It is understandable that there are 1 to 8 valid attributes in the attribute configuration table, so first determine the number of valid attributes in the attribute configuration table according to the attribute count in the attribute configuration table, and obtain the configuration information of each valid attribute according to the base address of the attribute configuration table and the offset of each valid attribute.

[0031] Step 2: extract corresponding vertex data from the cache according to the configuration information. If the value of the vertex data in the cache is default, obtain the default value of the corresponding vertex from the attribute default value table.

[0032] It is understandable that start.s obtains the location of the vertex data required for the current vertex shading by reading and parsing the attribute configuration table. Then it loads all the attribute data of the vertex into the vertex shader for shading calculation. Figure 2 ,The attribute configuration table, attribute default value table and cache are all located in the video memory, and the cache may include multiple ones.

[0033] Step 3: Store the vertex data extracted from the cache and the vertex data extracted from the attribute default value table in the input register.

[0034] Among them, according to the configuration information of each valid attribute, the vertex data corresponding to each valid attribute is extracted from the cache and the attribute default value table, and the vertex data corresponding to each valid attribute is stored in the corresponding input register, wherein one input register stores the vertex data corresponding to one valid attribute.

[0035] It is understandable that the buffer stores vertex data to be rendered, and the vertex data corresponding to each valid attribute is first obtained from the buffer according to the configuration information of each valid attribute. If the value of the vertex data in the buffer is default, the default value of the corresponding vertex needs to be obtained from the attribute default value table.

[0036] The vertex data obtained from the cache and the attribute default value table are stored in the input registers, wherein the vertex data corresponding to each valid attribute in the attribute configuration table is stored in an input register. For example, there are 8 valid attributes in the attribute configuration table, numbered as valid attribute 0 to valid attribute 7. Then, according to the configuration information of each valid attribute, the corresponding vertex data is extracted from the cache and the attribute default value table, and the vertex data corresponding to the 8 valid attributes are respectively stored in 8 input registers. The input registers can be numbered as input0 register to input7 register, which respectively store the vertex data corresponding to valid attribute 0 to valid attribute 7.

[0037] Among them, see Figure 2 , the specific process of extracting vertex data from the cache and attribute default value table includes:

[0038] Obtaining the attribute count in the configuration information, obtaining the base address of the attribute configuration table of the current thread, and obtaining the base address of the attribute default table;

[0039] The base address, index and storage size of each valid attribute are calculated cyclically, and vertex data corresponding to the valid attribute is obtained from the cache and the attribute default value table respectively. The valid attribute count is reduced by 1 to determine whether to end the loop, update the valid attribute number for the next loop processing, and determine whether to jump out of the loop according to whether the attribute count value is 0; when it is determined to jump out of the loop, the obtained vertex data is loaded into the corresponding input register.

[0040] Each valid attribute corresponds to a plurality of vertex data. In the process of cyclically extracting vertex data, according to the number of vertex data corresponding to the current valid attribute, the vertex data corresponding to the current valid attribute is obtained from the cache and the attribute default value table.

[0041] It is understandable that each valid attribute in the attribute configuration table corresponds to multiple vertex data. When looping to extract the vertex data corresponding to each valid attribute, the vertex data corresponding to the current valid attribute is obtained from the cache and attribute default value table according to the number of vertex data corresponding to the current valid attribute.

[0042] Before extracting vertex data from the cache or attribute default value table, it also includes: determining the number of vertex data that need to be extracted based on the attribute count, and obtaining the number of vertex data loaded in the Load instruction; judging whether the number of vertex data loaded in the Load instruction is consistent with the number of vertex data that needs to be extracted determined based on the attribute count, and saving the result of whether they are consistent.

[0043] It is understandable that, based on the attribute count and the number of vertex data corresponding to each valid attribute, the total number of vertex data that needs to be obtained can be calculated, and then the number of vertex data loaded in the Load instruction is obtained; it is determined whether the number of vertex data loaded in the Load instruction is consistent with the number of vertex data that needs to be extracted based on the attribute count. If they are consistent, it means that the number loaded in the Load instruction is correct. If they are inconsistent, it means that the number loaded in the Load instruction is wrong. It should be noted that when obtaining vertex data from the cache and / or attribute default value table, the corresponding number of vertex data is extracted based on the number of vertex data that needs to be extracted calculated based on the attribute count in the attribute configuration table, rather than based on the number of loads in the Load instruction.

[0044] The vertex data extracted from the cache and / or attribute default value table is stored in the input register. As mentioned above, the vertex data corresponding to different valid attributes are stored in different input registers, so the vertex data corresponding to the attribute configuration table of each thread will be stored in a group of input registers.

[0045] It should be noted that before extracting vertex data from the cache or attribute default value table, it also includes: determining the execution operation type in the shading process, the execution operation type includes glDrawArrays operation and glDrawElements operation; after the hardware device obtains the corresponding vertex data from the input register, it executes the corresponding type of operation to perform the vertex rendering operation process.

[0046] Step 4: load the base address of the SP register of each thread, and establish a corresponding relationship between the thread id and the SP stack space base address based on the SP register.

[0047] It is understandable that to load the base address of the SP register of each thread (agreed in the test case), this operation first needs to obtain the thread id, and then update the SP stack space base address of the corresponding thread. That is, the corresponding relationship between the thread id and the SP stack space base address is established in the SP register.

[0048] Step 5: Send the corresponding relationship between the thread id and the SP stack space base address to the hardware device.

[0049] It is understandable that the established correspondence between the thread id and the SP stack space base address is sent to a subsequent processing module, referred to herein as a hardware device, and the hardware device jumps to the vertex shader program address to start the formal compilation work of the compiler.

[0050] Step 6: The hardware device extracts the corresponding vertex data from the input register according to the thread id and places it in the corresponding SP stack space for processing.

[0051] It can be understood that after the hardware device receives the correspondence between the thread id and the SP stack space base address, it obtains the thread id according to the thread that needs to be processed, obtains the corresponding vertex data from the input register according to the thread id, and stores the vertex data in the SP stack space corresponding to the thread id, and performs image rendering operations on the vertex data in the SP stack space.

[0052] In step 3, the execution operation type in the shading process is determined, and the execution operation type includes glDrawArrays operation and glDrawElements operation. Then, in the SP stack space, the vertex data can be operated according to the operation type.

[0053] See also Figure 3 , which is a diagram of the software and hardware system of the graphics rendering system. The compiler is located in the user-mode driver, and the start.s in the present invention is located in the front position of the compiler compiling the shader.

[0054] Among them, the user space mainly includes start.s and the compiler, the kernel space includes the 3D kernel driver, and the hardware devices include the GPU device. The configuration information of the vertex data in the attribute configuration table is obtained through start.s, the vertex data is obtained according to the configuration information, and the vertex data is sent to the GPU device through the kernel space, so that the GPU device renders the vertex data.

[0055] A GPU compiler pre-attribute configuration method provided by an embodiment of the present invention has the following beneficial effects:

[0056] (1) When executing start.s, the base addresses of the attribute configuration table and the attribute default value table can be accurately obtained, which means that the accuracy and efficiency of data acquisition can be ensured. Based on accurate base address acquisition, whether obtaining data from the default value table or the cache, it can reduce data acquisition errors and time consumption.

[0057] (2) By loading the data in the attribute default value table into the input register, centralized data management and fast call are achieved. This centralized data processing method avoids repeated search and loading operations when data is needed.

[0058] (3) Accurate judgment of glDrawArrays and glDrawElements enables the system to select the most appropriate operation mode according to different graphics drawing requirements. This intelligent judgment mechanism can optimize the effect and efficiency of graphics rendering.

[0059] (4) In the process of retrieving data from the cache, sophisticated attribute count calculation, loop processing, and accurate processing of each attribute loading parameter can ensure the integrity and accuracy of the data. At the same time, data is stored in the corresponding register according to the attribute characteristics, making data storage and call more orderly and efficient.

[0060] (5) The loading and timely updating of the SP register base address of each thread ensures the independence between threads and the rationality of resource allocation, avoiding interference and conflict between threads.

[0061] (6) The accurate operation of directly jumping to the vertex shader program address ensures the continuity and efficiency of the program flow, allowing the entire graphics processing process to proceed smoothly.

[0062] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0063] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0064] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0065] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0066] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0067] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0068] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A GPU compiler pre-attribute configuration method, characterized in that: include: Obtaining an attribute configuration table of each thread based on the start.s file, wherein the attribute configuration table stores configuration information of vertex data, and the configuration information describes the storage structure of vertex data. The start.s file is located in the front position of the compiler compiling the shader; According to the configuration information, corresponding vertex data is extracted from the cache, and if the value of the vertex data in the cache is default, the default value of the corresponding vertex is obtained from the attribute default value table; The vertex data extracted from the cache and the vertex data extracted from the attribute default value table are stored in the input register; Load the base address of the SP register of each thread, and establish the correspondence between the thread id and the SP stack space base address based on the SP register; Send the corresponding relationship between the thread id and the SP stack space base address to the hardware device; The hardware device extracts the corresponding vertex data from the input register according to the thread id and places it in the corresponding SP stack space for processing.

2. The GPU compiler pre-attribute configuration method according to claim 1, characterized in that: The configuration information is generated according to the data structure defined in the OpenGL specification, and includes an attribute count, an index array address, an attribute default value address, and multiple valid attributes, and defines the attribute count, index array address, attribute default value address, and storage size and bit field of each valid attribute.

3. The GPU compiler pre-attribute configuration method according to claim 2, characterized in that: The extracting corresponding vertex data from the cache according to the configuration information, and if the value of the vertex data in the cache is default, obtaining the default value of the corresponding vertex from the attribute default value table, includes: Acquire configuration information of valid attributes in the attribute configuration table according to the base address and offset of the attribute configuration table corresponding to each thread; According to the configuration information of the valid attributes, the corresponding vertex data is extracted from the cache and the attribute default value table, and the vertex data is stored in the corresponding input register.

4. The GPU compiler pre-attribute configuration method according to claim 3, characterized in that: According to the base address and offset of the attribute configuration table corresponding to each thread, configuration information of valid attributes in the attribute configuration table is obtained, including: Obtaining a base address and an attribute count of the attribute configuration table, and obtaining configuration information of each valid attribute according to the base address of the attribute configuration table and an offset of each valid attribute; According to the configuration information of each valid attribute, the vertex data corresponding to each valid attribute is extracted from the cache and the attribute default value table, and the vertex data corresponding to each valid attribute is stored in the corresponding input register, wherein one input register stores the vertex data corresponding to one valid attribute.

5. The GPU compiler pre-attribute configuration method according to claim 4, characterized in that: The step of obtaining the base address and attribute count of the attribute configuration table includes: The starting address of the attribute configuration table of each thread is defined, and the attribute configuration table of each thread is stored in the R2 register of the test agreement, wherein the attribute configuration table of one thread is stored in a corresponding R2 register.

6. The GPU compiler pre-attribute configuration method according to claim 4, characterized in that: The step of extracting vertex data corresponding to each valid attribute from the cache and the attribute default value table according to the configuration information of each valid attribute includes: Obtaining the attribute count in the configuration information, obtaining the base address of the attribute configuration table of the current thread, and obtaining the base address of the attribute default value table; Looping to calculate the base address, index and storage size of each valid attribute, respectively obtaining vertex data corresponding to the valid attribute from the cache and the attribute default value table, subtracting 1 from the valid attribute count to determine whether to end the loop, update the valid attribute number for the next loop processing, and determine whether to jump out of the loop according to whether the attribute count value is 0; When it is determined to jump out of the loop, the acquired vertex data is loaded into the corresponding input register.

7. The GPU compiler pre-attribute configuration method according to claim 6, characterized in that: Each valid attribute corresponds to a plurality of vertex data. In the process of looping to extract vertex data, according to the number of vertex data corresponding to the current valid attribute, the vertex data corresponding to the current valid attribute is obtained from the cache and the attribute default value table.

8. The GPU compiler pre-attribute configuration method according to claim 7, characterized in that: Before extracting vertex data from the cache or attribute default value table, it also includes: Determine the number of vertex data to be extracted according to the attribute count, and obtain the number of vertex data loaded in the Load instruction; It is determined whether the number of vertex data loaded in the Load instruction is consistent with the number of vertex data to be extracted according to the attribute count, and the result of whether they are consistent is saved.

9. The GPU compiler pre-attribute configuration method according to claim 8, characterized in that: The method further comprises, before extracting vertex data from the cache or the attribute default value table: Determine the execution operation type in the shading process, wherein the execution operation type includes a glDrawArrays operation and a glDrawElements operation; After the hardware device obtains the corresponding vertex data from the input register, it performs the corresponding type of operation and performs the vertex rendering operation process.

10. The GPU compiler pre-attribute configuration method according to claim 1, characterized in that: The compiler is located in the user mode driver.

Citation Information

Patent Citations

  • Graphics processing systems

    CN106408504A

  • Graph data prefetching method, processor and electronic equipment

    CN114090078A

  • Local image blocks for graphics processing

    CN116862755A

  • Embedded system, vertex processing device and decoder

    KR1020070067347A

  • System, method, and computer program product for optimizing the management of thread stack memory

    US20140164727A1