Graphic command processing method and device, electronic equipment and readable medium
By using the starting position stored in the CPU as the copy position and updating the packet size and copy position according to the total size of the GPU command, the problem of low efficiency in GPU command processing in the prior art is solved, and more efficient GPU command processing is achieved.
Patent Information
- Application Number
- CN202510653522.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-20
- Publication Date
- 2025-09-19
AI Technical Summary
In the prior art, GPU command processing efficiency is low and time-consuming, resulting in a decrease in graphics rendering performance.
By using the starting storage location where the drawing command packet is stored in the CPU as the copy location, if the packet size is larger than the specified size, the command packet data of the specified size is copied from the location to the command storage area of the GPU, and the packet size and copy location are updated according to the total size of the complete GPU command in the command packet data until all the drawing command packets are copied.
Ensure that the data copied each time does not exceed the size of the command storage area, avoid the problem of GPU commands not being able to be executed normally due to the copy exceeding the command storage area, and improve the processing efficiency of GPU commands.
Smart Images

Figure CN120672558A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, electronic device and readable medium for processing graphics commands. Background Art
[0002] Currently, Graphics Processing Units (GPUs), as an important component of electronic devices, play an increasingly critical role in graphics rendering. During graphics rendering, multiple GPU commands are generated for a graphics drawing task, and rendering is achieved through the continuous execution of GPU commands.
[0003] In the prior art, the GPU directly copies drawing command packets stored in the CPU and parses and executes the GPU commands contained therein. Due to the limited size of the GPU's command storage area, the CPU must use the graphics driver to split multiple GPU commands into smaller drawing command packets whose sizes do not exceed the command storage area, in order to avoid the copied data exceeding the command storage area and causing execution failures. This results in low GPU command processing efficiency and a long processing time. Summary of the Invention
[0004] Embodiments of the present invention provide a method, device, electronic device, and readable medium for processing graphics commands, which can solve the problem of low efficiency and long processing time of GPU commands.
[0005] In order to solve the above problems, an embodiment of the present invention discloses a method for processing graphics commands, which is applied to an electronic device. The method includes:
[0006] The starting storage location of the drawing command packet stored in the CPU is used as the copy location; the drawing command packet is generated by initialization of the graphics drawing task corresponding to the electronic device;
[0007] If the packet size of the drawing command packet is larger than a specified size, copying the command packet data of the specified size to a command storage area of the GPU starting from the copy position; the specified size is the size of the command storage area;
[0008] updating the packet size and the copy position according to the total size of the complete GPU command in the command packet data;
[0009] If the updated packet size is still larger than the specified size, the command packet data continues to be copied from the updated copy position to the command storage area until all the drawing command packets are copied.
[0010] On the other hand, an embodiment of the present invention discloses a graphics command processing device, which is applied to an electronic device, and includes:
[0011] A first processing module is configured to use the starting storage location of the drawing command packet stored in the CPU as a copy location; the drawing command packet is generated by initialization of the graphics drawing task corresponding to the electronic device;
[0012] a first copy module, configured to copy command packet data of the specified size starting from the copy position to a command storage area of the GPU if the packet size of the drawing command packet is larger than a specified size; the specified size is the size of the command storage area;
[0013] an updating module, configured to update the packet size and the copy position according to the total size of the complete GPU command in the command packet data;
[0014] The second processing module is configured to continue copying the command packet data from the updated copy position to the command storage area if the updated packet size is still larger than the specified size, until all the drawing command packets are copied.
[0015] On the other hand, an embodiment of the present invention discloses an electronic device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus; the memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the aforementioned method.
[0016] An embodiment of the present invention further discloses a machine-readable medium having instructions stored thereon. When executed by one or more processors, the processors are enabled to execute the method described above.
[0017] Embodiments of the present invention have the following advantages: The graphics command processing method provided by the embodiments of the present invention uses the starting storage location of a drawing command packet stored in the CPU as the copy location; the drawing command packet is generated by initialization of the corresponding graphics drawing task of the electronic device. If the packet size of the drawing command packet exceeds a specified size, command packet data of the specified size is copied from the copy location to the command storage area of the GPU; the specified size is the size of the command storage area. The packet size and the copy location are updated based on the total size of the complete GPU commands in the command packet data. If the updated packet size is still larger than the specified size, the command packet data is copied from the updated copy location to the command storage area until all drawing command packets are copied. This ensures that the GPU can ensure that the copied data does not exceed the size of the command storage area. Even if the size of the drawing command packet to be executed exceeds the size of the command storage area, the GPU commands in the drawing command packet can be correctly executed, thus avoiding the problem of the GPU copying data exceeding the command storage area and causing execution failure. Accordingly, when the CPU generates a drawing command packet, it does not need to split it into multiple small drawing command packets, thereby improving GPU command processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0019] Figure 1 This is a flowchart of a method for processing graphics commands provided by an embodiment of the present invention;
[0020] Figure 2 This is a copy schematic diagram provided by an embodiment of the present invention;
[0021] Figure 3 It is a schematic diagram of command packet processing in the prior art;
[0022] Figure 4 This is a schematic diagram of command packet processing provided by an embodiment of the present invention;
[0023] Figure 5 This is another command packet processing diagram provided by an embodiment of the present invention;
[0024] Figure 6 is a block diagram of a graphics command processing device provided by an embodiment of the present invention;
[0025] Figure 7 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0026] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0027] Figure 1 This is a flowchart of a method for processing graphics commands provided by an embodiment of the present invention. Figure 1 As shown, the method for processing the graphics command may include the following steps:
[0028] Step 101: The starting storage location of the drawing command packet stored in the CPU is used as the copy location; the drawing command packet is generated by initialization of the graphics drawing task corresponding to the electronic device.
[0029] Step 102: If the packet size of the drawing command packet is larger than a specified size, copy the command packet data of the specified size starting from the copy position to the command storage area of the GPU; the specified size is the size of the command storage area.
[0030] Step 103: Update the packet size and the copy position according to the uncopied commands in the drawing command packet.
[0031] Step 104: If the updated packet size is still larger than the specified size, continue copying the command packet data from the updated copy position to the command storage area until all the drawing command packets are copied.
[0032] The graphics command processing method can be applied to electronic devices including a CPU and a GPU. A drawing command packet can be generated by the CPU and stored in the CPU's memory area. The drawing command packet can be any drawing command packet generated by the CPU, and a drawing command packet can also be referred to as a GPU command packet. By processing the drawing command packet by the GPU, that is, by the GPU executing the drawing commands in the drawing command packet, the graphics drawing task can be completed, thereby achieving graphics drawing. The drawing command packet occupies a certain amount of space in the CPU's memory area. The starting storage location of the drawing command packet in the CPU refers to the address of the first byte of the drawing command packet in the memory area. For example, assuming the packet size of the drawing command packet is 0x0550 and the space occupied by the drawing command packet in the memory area is 0x0001 to 0x0550, the starting storage location of the drawing command packet in the CPU is 0x0001. The starting storage location of the drawing command packet in the CPU and the packet size of the drawing command packet can be transmitted by the CPU to the GPU.
[0033] The command packet data is the data included in the drawing command packet. The command storage area can be an area in the GPU for caching copied command packet data. The size of the command storage area is a specified size. For example, the command storage area can be represented as cmd_buf, and the specified size can be represented as firm_max_size. In an embodiment of the present invention, the GPU can copy through direct memory access (DMA). When the GPU copies the drawing command packet stored in the CPU, it will first identify the size relationship between the packet size of the drawing command packet and the specified size of the command storage area. If the packet size is larger than the specified size corresponding to the command storage area, only the command packet data of the specified size will be copied. That is, the GPU itself will copy the command packet data according to the size of the command storage area. In this way, for any size of drawing command packet, it can avoid the data copied by the GPU exceeding the command storage area, resulting in failure to execute normally, thereby allowing the CPU to generate GPU commands of any size, thereby improving the flexibility of generating drawing command packets. Specifically, in the prior art, the CPU can only generate drawing command packets that are no larger than a specified size. In the embodiments of the present invention, since the GPU can process drawing command packets that are larger than a specified size, the CPU can directly package multiple GPU commands generated for graphics drawing tasks into one drawing command packet when the total size of the multiple GPU commands is no larger than a specified size. Correspondingly, when the total size of the multiple GPU commands is larger than a specified size, the multiple GPU commands are packaged into a drawing command packet with a packet size larger than the specified size, and the GPU will copy the command packet data in the specified size.
[0034] Furthermore, after the copy process, command packet data of a specified size is cached in the command storage area. The command packet data may include one or more GPU commands. The GPU commands included in the drawing command packet are all complete GPU commands. However, due to the size limit of the command storage area, the copying ends within the storage area of a certain GPU command. Consequently, the command packet data copied to the command storage area may contain incomplete GPU commands (i.e., partial data within a complete GPU command), making the incomplete GPU commands unexecuted. Therefore, the GPU can only identify and execute the complete GPU commands included in the command storage area. Simultaneously, the GPU updates the packet size and copy position based on the total size of the complete GPU commands in the command packet data, so that subsequent copying begins at the starting position of the incomplete GPU command, ensuring that the incomplete GPU command is completely copied and executed in the next copy. For example, the packet size is updated to the total size of the unexecuted commands in the drawing command packet, and the copy position is updated to the starting storage position of the unexecuted commands. Since the GPU only executes complete GPU commands, if an incomplete GPU command exists, it is treated as an unexecuted command, allowing it to be executed during the next copy execution. In the case that all GPUs in the drawing command packet are copied, it is determined that all the drawing command packets are copied.
[0035] Figure 2 This is a copy diagram provided by an embodiment of the present invention, such as Figure 2 As shown in the figure, assuming the specified size of the command storage area is 0x0250, data from 0x0001 to 0x0250 is copied starting from 0x0001 on the CPU. The drawing command in the CPU includes GPU Command 1 stored at 0x0001 to 0x0100, GPU Command 2 stored at 0x0101 to 0x0200, GPU Command 3 stored at 0x0201 to 0x0300, GPU Command 4 stored at 0x0301 to 0x0400, GPU Command 5 stored at 0x0401 to 0x0500, and GPU Command 6 stored at 0x0501 to 0x0550. The command packet data copied from the CPU copy location to the command storage area is shown by the dotted line. There are two complete GPU commands: GPU Command 1 and GPU Command 2, and one incomplete GPU command: GPU Command 3. The GPU only executes the complete GPU Command 1 and GPU Command 2.
[0036] Accordingly, the unexecuted commands in the drawing command packet include GPU command 3 and subsequent other GPU commands. The updated packet size is represented by: GPU command 3 + the total size of other GPU commands, so the updated packet size is 0x0350, and the updated copy position is the starting storage position of GPU command 3, so the updated copy position is Figure 2 0x0201 in the command, ensure that the next time you copy it, it will start from the starting storage location of GPU command 3, that is, from 0x0201.
[0037] Furthermore, after completing the update, if the packet size is still larger than the specified size, the GPU returns to the step of copying the command packet data of the specified size to the command storage area of the GPU starting from the copy position and continues to execute, and then continues to copy the command packet data from the starting storage position of the unexecuted commands to the command storage area based on the size relationship between the total size of the unexecuted commands and the specified size. In this way, by copying and parsing and executing multiple times, the drawing command packet with a packet size larger than the specified size can be executed. When all the GPU commands in the drawing command packet are executed, the process ends. For example, for Figure 2 In the example, since the updated packet size 0x0350 is larger than the specified size 0x0250, the data from 0x0201 to 0x0450 is copied to the command storage area starting from 0x0201. The command packet data copied to the command storage area this time still contains two complete GPU commands: GPU command 3 and GPU command 4, and one incomplete GPU command: GPU command 5. Accordingly, since CPU command 5 is incomplete, the unexecuted commands in the drawing command packet include GPU command 5 and other subsequent GPU commands. The updated packet size represents the total size of GPU command 5 + other GPU commands, so the updated packet size is 0x0150, and the updated copy position represents the starting storage position of GPU command 5, which is Figure 2 0x0401 in the , thereby ensuring that the next time it is copied again, it will start from the starting storage location of GPU command 5.
[0038] In summary, the graphics command processing method provided by an embodiment of the present invention uses the starting storage location of a drawing command packet stored in the CPU as the copy location. The drawing command packet is generated by the initialization of the corresponding graphics drawing task of the electronic device. If the packet size of the drawing command packet exceeds a specified size, the command packet data of the specified size is copied from the copy location to the command storage area of the GPU; the specified size is the size of the command storage area. The packet size and the copy location are updated based on the total size of the complete GPU commands in the command packet data. If the updated packet size is still larger than the specified size, the command packet data is copied from the updated copy location to the command storage area until all drawing command packets are copied. In this way, the GPU itself can ensure that the copied data does not exceed the size of the command storage area. Even if the size of the drawing command packet to be executed exceeds the size of the command storage area, the GPU commands in the drawing command packet can be correctly executed, thus avoiding the problem of the GPU copying data exceeding the command storage area and causing abnormal execution. Accordingly, when the CPU generates a drawing command packet, it does not need to split it into multiple small drawing command packets, thereby improving the processing efficiency of GPU commands.
[0039] Optionally, before the above-mentioned step of using the initial storage location of the drawing command packet in the CPU as the copy location, the embodiment of the present invention further includes the following steps:
[0040] Step S21: For any graphics drawing task, directly generate the drawing command packet based on multiple GPU commands corresponding to the graphics drawing task, and store the packet in the storage area of the CPU.
[0041] Step S22: Write the starting storage location of the drawing command packet in the storage area and the packet size of the drawing command packet into a shared register for reading by the GPU.
[0042] In an embodiment of the present invention, the process of initializing and generating a drawing command packet for a graphics drawing task corresponding to an electronic device may be steps S21 to S22 described above. The image drawn by the graphics drawing task may be a 2D image, or a 3D image. That is, the graphics command processing method provided by an embodiment of the present invention may be applied to complex graphics rendering scenes. For a graphics drawing task, the application generates multiple GPU commands through the CPU. These multiple GPU commands are the multiple GPU commands corresponding to the graphics drawing task.
[0043] A drawing command packet includes GPU commands, which are divided into two types: draw calls and fence commands. A draw call is an instruction used to instruct the GPU to perform rendering operations. A fence command, also known as a fence synchronization command, is used to instruct the GPU to refresh. In the synchronization mechanism between the CPU and GPU, the CPU uses the fence command as the end command of a drawing command packet. That is, a drawing command packet includes a fence command. The CPU combines at least one draw command and one fence command to obtain a drawing command packet according to a specific format: fence commands exist between drawing command packets. At least one drawing command in a drawing command packet is regarded as a group of drawing commands, which is equivalent to having fence commands inserted between each group of drawing commands. Accordingly, in the prior art, the CPU will use the graphics driver to package multiple GPU commands into multiple small drawing command packets of a size not exceeding a specified size according to the size of the command storage area. This will increase the number of fence commands, and executing fence commands will consume time, which will in turn reduce the parallelism of CPU and GPU execution, resulting in a decrease in graphics rendering performance.
[0044] In this embodiment of the present invention, since the GPU can process drawing command packets larger than a specified size, the CPU can directly generate a drawing command packet based on the multiple GPU commands corresponding to the graphics rendering task. Specifically, the CPU can use the graphics driver to add a fence command to the multiple GPU commands to obtain a drawing command packet. This can minimize the number of drawing command packets and the number of fence commands that the GPU needs to execute, thereby increasing the parallelism between the CPU and GPU execution and improving graphics rendering performance.
[0045] For example, assuming the GPU is a GPU under the Loongson platform, such as LG100, the command storage area of this GPU can only store 32 GPU commands. For a graphics rendering task, there are 320 corresponding GPU commands. In the prior art, the CPU needs to package these 320 GPU commands into at least 10 rendering command packets, that is, there are 10 fence commands. In other words, in the prior art, the CPU is equivalent to splitting a large command packet into small command packets through the graphics driver and adding multiple fence synchronization commands to process the large command. In the embodiment of the present invention, since the GPU has the ability to process large command packets, the CPU can directly package these 320 GPU commands into a single rendering command packet, with only one fence command. For complex rendering scenarios where multiple graphics rendering commands are issued and multiple graphics rendering tasks are generated, this can effectively improve graphics rendering performance. For example, the CPU can first create a command buffer (Command Buffer), and then write these multiple rendering commands into the command buffer in sequence according to the order in which the rendering commands are generated to form a rendering command sequence. A fence command is added at the end of the rendering command sequence to obtain a rendering command packet. When adding a fence command, an object creation function (for example, a vkCreateFence function) may be used to first create a fence object as a fence command, and the fence object is associated with a drawing command sequence in a command buffer.
[0046] Figure 3 It is a schematic diagram of command packet processing in the prior art, such as Figure 3 As shown in the figure, assume that for a certain graphics drawing task, four drawing commands are generated: drawing command 0, drawing command 1, drawing command 2, and drawing command 3. In the prior art, in order to ensure that the packet size of the drawing command packet does not exceed the specified size of the command storage area, these four drawing commands are packaged into two drawing command packets: a drawing command packet consisting of drawing command 0, drawing command 1, and a fence command, and a drawing command packet consisting of drawing command 2, drawing command 3, and a fence command. It is understandable that Figure 3 This is only a schematic illustration. In actual application scenarios, a graphics drawing task often corresponds to a large number of drawing commands, which are packaged into a large number of drawing command packets through the graphics driver.
[0047] Accordingly, the GPU first copies (DMA copies) drawing commands 0, 1, and the fence command to the command storage area through direct memory access (DMA), and then executes drawing commands 0, 1, and the fence command in sequence. Then, it performs another DMA copy to copy drawing commands 2, 3, and the fence command to the command storage area, and then executes drawing commands 2, 3, and the fence command in sequence. In this way, the GPU needs to process two fence commands.
[0048] Figure 4 This is a schematic diagram of command packet processing provided by an embodiment of the present invention. Figure 4 As shown, for these four drawing commands: drawing command 0, drawing command 1, drawing command 2, and drawing command 3, they only need to be packaged into one drawing command package: a drawing command package consisting of drawing command 0, drawing command 1, drawing command 2, drawing command 3, and a fence command.
[0049] Assuming that the size of the command storage area cmd_buf is the size of two drawing commands plus the size of one fence command, in the embodiment of the present invention, the GPU will first use the starting storage location as the copy location. Since the packet size of the drawing command packet is larger than the specified size, the DMA copy is performed starting from the copy location, and the drawing command 0, drawing command 1, and part of the drawing command 2 (i.e., the incomplete GPU command, Figure 3 The GPU then copies the command (not shown) to the command store, and then executes the complete GPU commands in the command store in sequence: draw command 0 and draw command 1. The packet size is updated, and the copy location is updated to the starting storage location of the unexecuted commands. Since the updated packet size is not larger than the specified size, another DMA copy is performed starting from the updated copy location, starting from the starting storage location of the unexecuted commands, that is, the starting storage location of draw command 2. Draw command 2, draw command 3, and the fence command are copied to the command store, and then the complete GPU commands in the command store are executed in sequence: draw command 2, draw command 3, and the fence command. In this way, the GPU only needs to process one fence command.
[0050] Furthermore, the CPU can store the generated drawing command packet in a CPU storage area (e.g., a preset memory area), which is accessible to the GPU and is used to store the drawing command packet. After the storage operation is completed, the graphics driver can write the starting storage location of the drawing command packet in the CPU and the packet size of the drawing command packet into a shared register. The shared register is a register used to transmit the two parameters of the drawing command packet's starting storage location in the CPU and the packet size of the drawing command packet between the CPU and the GPU.
[0051] Accordingly, the GPU, acting as firmware, can read the starting storage location and packet size from the shared register and store them in a preset variable, which can be a firmware stack variable. For example, the GPU can store the read starting storage location in the addr variable and the read packet size in the cmd_size variable. This way, by writing the CPU's starting storage location and the packet size of the drawing command packet to the shared register, parameter passing can be achieved, ensuring parameter transfer efficiency to a certain extent.
[0052] Optionally, in the embodiment of the present invention, the operation of identifying and executing the complete GPU command included in the command storage area may specifically include:
[0053] Step S31: traverse from the starting position of the command storage area, and identify the command headers included in the command storage area in sequence.
[0054] Step S32: Determine the command bodies corresponding to the command headers from the command packet data respectively.
[0055] Step S33: If the command body is complete, the command header and the command body are determined to be a complete GPU command, and the complete GPU command is executed.
[0056] In an embodiment of the present invention, the GPU can first initialize a copy offset, setting it to an initial value of 0. The copy offset can be stored in a local variable within the GPU, which is a stack variable and can be represented as an offset. The command storage area cmd_buf is then initialized to store the copied command packet data. The firm_max_size of cmd_buf may vary between GPUs, depending on the hardware design. Because the scope of a local variable is limited to the function or code block that defines it, using a local variable as a copy offset can reduce the probability of the copy offset being accidentally modified by other processes, compared to global variables. The lifecycle of a local variable begins when the local variable is defined and ends when the function or code block containing the local variable completes execution. Using the local variable as the copy offset, the drawing command packet is completely copied. That is, after the graphics command processing method completes execution, the local variable is automatically destroyed, freeing the occupied stack space.
[0057] For example, in one implementation, when copying for the first time, the copy position is the starting storage position of the drawing command packet in the CPU. Specifically, addr+offset can be used as the copy position. Since offset is 0 at this time, the copy position is equal to the starting storage position of the drawing command packet in the CPU. Figure 2For example, during the first copy, the copy offset is 0 and the starting storage location is 0x0001. Accordingly, the copy location is: 0x0001 + 0 = 0x0001. During the second copy, the updated copy offset is calculated based on the full GPU command size to be 0x0200. Accordingly, the copy location is: 0x0001 + 0x0200 = 0x0201. The GPU can use DMA to copy the drawing command packet from the updated memory address of addr + offset to the command storage area cmd_buf. Then, the command storage area is parsed from the starting location in a forward-to-backward order to identify the command header included in the command storage area.
[0058] Specifically, the parsing process can be: using the preset command header as a keyword, wherein the preset command header is the command header of the GPU command, starting from the starting position of the command storage area, traversing and matching the command packet data in the command storage area. Specifically, starting from the starting position of the command storage area, the data with the same length as the preset command header can be taken as a data block, and the data block can be matched with the preset command header. If the two are consistent, the data block is determined to be a command header. By identifying the command header, the complete GPU command in the command storage area is searched in the command header, and the data of M length after the data block is determined as the command body of the command header. The command body can also be called the command body, and M is the length of the command body corresponding to the command header. Then the data with the same length as the preset command header after the command body is taken as a data block, and the traversal matching continues until the end position of the command storage area is reached.
[0059] In an embodiment of the present invention, the command header includes a bit field representing the length of the command body. The value of the bit field representing the length of the command body can be used as M. The value of the bit field representing the length of the command body may be different in different command headers. Furthermore, for each identified command header, the command header and the command body of the command header constitute a piece of GPU command data. The GPU command data may represent a complete GPU command or an incomplete GPU command. The GPU command can be stored in a binary format, and the incomplete GPU command is a portion of the binary data representing the GPU command. For any piece of GPU command data, if the command header of the GPU command data in the command storage area includes data of length M, that is, offset_a+size_a is not greater than firm_max_size. Wherein, size_a represents the size of M, and offset_a represents the offset of the command header in the GPU command data in the command storage area. That is, if the length of the data after the command header in the command storage area is not less than M, it can be determined that the command body is complete. Accordingly, it can be determined that the GPU command data is a complete GPU command. If the length of the data following the command header in the command storage is less than M, the command body can be determined to be incomplete. Accordingly, the GPU command data can be determined to be an incomplete GPU command. For example, assuming a command header is identified, and the command body length M defined in the command header is 0x0070, and the length of the data following the command header identified in the command storage is 0x0030, the command body is incomplete.
[0060] In an embodiment of the present invention, the GPU can recognize all complete GPU commands and then execute all complete GPU commands in sequence, or, after recognizing a complete GPU command, execute the complete GPU command. Specifically, when executing a drawing command, the GPU can pass the content of the command body of the drawing command to the hardware pipeline by writing to a register, and the hardware pipeline executes the content of the command body. After the hardware pipeline completes execution, the drawing result is output to the memory or video memory. The memory or video memory is specified by the drawing subject. When executing a fence command, the GPU passes the content of the command body of the fence command, that is, the information on which caches need to be refreshed, to the hardware by writing to a register, and the hardware performs a refresh operation to ensure that the data in the cache is written to the memory / video memory.
[0061] Specifically, the organization of drawing commands and fence commands can be shown in Table 1 below:
[0062]
[0063] Table 1
[0064] Specifically, the command header of the drawing command: 0x10200 and the command header of the fence command: 0x20004 can be used as the preset command header. If the data block is consistent with 0x10200, it means that the data block is a command header of a drawing command, and the command type of the GPU command composed of the GPU command data in the data block is a drawing command, and the rendering operation can be performed through the drawing command. If the data block is consistent with 0x20004, it means that the data block is a command header of a fence command, and the command type of the GPU command composed of the GPU command data in the data block is a fence command, and the fence command can be used as the end command of the drawing command packet to instruct the GPU to refresh.
[0065] In an embodiment of the present invention, traversal is performed starting from the beginning of the command storage area, and the command headers included in the command storage area are sequentially identified. For any identified command header, the command body of the command header is determined from the command packet data. The command header and the command body determined for the command header are treated as a piece of GPU command data. If the command body is complete, the GPU command data is determined to be a complete GPU command, and the complete GPU command is executed. In this way, by starting from the beginning of the command storage area and sequentially identifying backward, all complete GPU commands included in the command storage area can be determined, avoiding missing GPU commands.
[0066] Optionally, the step of updating the packet size according to the total size of the complete GPU commands in the command packet data may specifically include:
[0067] Step 1031: If the command storage area contains only the complete GPU commands, determine the specified size as the total size of the complete GPU commands.
[0068] Step 1032: Otherwise, determine the sum of the sizes of all the complete GPU commands to obtain the total size of the complete GPU commands.
[0069] Step 1033: Calculate the difference between the packet size and the total size, and update the packet size to the difference.
[0070] In this embodiment of the present invention, if the command storage area contains only complete GPU commands, this indicates that the command storage area does not contain incomplete GPU commands. In this case, the specified size can be determined as the total size of a complete GPU command packet. Otherwise, this indicates that the command storage area contains incomplete GPU commands. In this case, the total size of a complete GPU command packet can be obtained by calculating the sum of the sizes of all complete GPU commands.
[0071] Specifically, if the command storage area does not include incomplete GPU commands, it means that the size of the command storage area is the total size of the complete GPU command packet. Therefore, the GPU can determine the specified size as the total size of the complete GPU command packet. If the command storage area includes incomplete GPU commands, it means that the size of the command storage area is greater than the total size of the complete GPU command packet. Therefore, the GPU can determine the sum of the sizes of all complete GPU commands identified from the command storage area this time as the total size of the complete GPU command packet. The GPU then updates the packet size to the difference between the packet size and the total size of the complete GPU command packet. Since the incomplete GPU command is not executed this time, it can be ensured that the updated packet size can accurately represent the total size of the unexecuted commands in the drawing command packet.
[0072] If the command storage area does not include an incomplete GPU command, the value of cmd_size is updated to: cmd_size = cmd_size - firm_max_size. If the command storage area includes an incomplete GPU command, the value of cmd_size is updated to: cmd_size = cmd_size - firm_max_size + unused_size (the size of the incomplete GPU command). In this embodiment of the present invention, when copying command packet data of a specified size to the command storage area, the packet size can be directly updated to the difference between the packet size and the total size of the complete GPU command packet, that is, cmd_size is updated to cmd_size - firm_max_size. Then, after identifying that the command storage area includes a complete GPU command, the packet size is updated to the sum of the packet size and the size of the incomplete GPU command, that is, the size of the incomplete GPU command is added to cmd_size, and cmd_size is updated to cmd_size + unused_size. Where unused_size is the difference between the specified size and the total size of the complete GPU command packet. If it is determined that the command storage area does not include an incomplete GPU command, unused_size is 0. Specifically, only when the command storage area includes an incomplete GPU command, that is, when unused_size is not 0, can the packet size be updated to the sum of the packet size and the size of the incomplete GPU command, that is, the size of the incomplete GPU command is added to cmd_size, and cmd_size is updated to cmd_size + unused_size.
[0073] Optionally, the embodiment of the present invention further includes the following steps:
[0074] Step S41: If the specified size is larger than the total size of the complete GPU command, determine that the command storage area includes an incomplete GPU command.
[0075] Step S42: Otherwise, determine that all the commands in the command storage area are the complete GPU commands.
[0076] In this embodiment of the present invention, the GPU can detect whether the specified size is greater than the total size of a complete GPU command packet. If the specified size is greater than the total size of a complete GPU command packet, the GPU determines that the command storage area includes incomplete GPU commands. Otherwise, the GPU determines that the command storage area does not include incomplete GPU commands, that is, the GPU determines that the command storage area contains only complete GPU commands.
[0077] Specifically, if the command storage area includes incomplete GPU commands, then there is remaining data near the end of the command storage area that cannot match the preset command header, or the length of the data after the last identified command header is less than M. Accordingly, in an embodiment of the present invention, after completing the traversal operation on the command storage area and identifying all complete GPU commands included therein, the sum of the sizes of all complete GPU commands can be determined to obtain the total size of the complete GPU command packet.
[0078] Then, the difference between the specified size and the total size of the complete GPU command packet is calculated. If the difference is greater than 0, it is determined that the specified size is greater than the total size of the complete GPU command packet, and the command storage area includes incomplete GPU commands. Conversely, if the difference is equal to 0, it is determined that the specified size is equal to the total size of the complete GPU command packet, and the command storage area does not include incomplete GPU commands. For example, assuming that the specified size is 0x0250 and the total size of the complete GPU command packet is 0x0200, when performing the detection, the difference of 0x0250-0x0200 can be calculated to obtain 0x0050. Since the difference is greater than 0, it can be determined that the command storage area includes incomplete GPU commands. In this embodiment of the present invention, the GPU can accurately determine whether the command storage area includes incomplete GPU commands by detecting whether the specified size is greater than the total size of the complete GPU command packet.
[0079] Optionally, the embodiment of the present invention may further include the following steps:
[0080] Step S51: If the packet size is not greater than the specified size, directly copy the command packet data of the packet size to the command storage area starting from the copy position.
[0081] Step S52: Identify and execute all complete GPU commands included in the command storage area respectively.
[0082] For simple drawing tasks, the CPU copies fewer GPU commands. Therefore, the resulting drawing command packet may not be larger than the specified size. Accordingly, before processing the drawing command packet, the GPU can first check whether the packet size is larger than the specified size. For example, the GPU can calculate the difference between the packet size and the specified size. If the difference is greater than 0, the packet size is determined to be larger than the specified size. Conversely, if the difference is not greater than 0, the packet size is determined to be smaller than the specified size.
[0083] Accordingly, if the packet size is detected to be greater than the specified size, it indicates that the drawing command packet requires multiple copies to be processed, and the above-mentioned step 102 is executed. If the packet size is detected to be less than the specified size, it indicates that the drawing command packet requires only a single copy to be processed, and the above-mentioned step S51 is executed, starting from the starting storage location of the drawing command packet in the CPU, to copy the command packet data of the packet size. In this way, the command storage area includes a complete drawing command packet, and the GPU commands included in the command storage area are all complete GPU commands. Therefore, the GPU can read the contents of the command storage area, identify all complete GPU commands included in the command storage area, and execute them. It should be noted that after updating the packet size to the total size of the unexecuted commands in the drawing command packet and updating the copy location to the starting storage location of the unexecuted commands, if the packet size is not greater than the specified size, the GPU returns to the step of directly copying the command packet data of the packet size to the command storage area starting from the copy location and begins execution. That is to say, after the update, you can return to the step of detecting whether the package size is larger than the specified size and start execution. In this way, when the updated package size is larger than the specified size or the updated package size is larger than the specified size, the corresponding operations of these two situations are executed.
[0084] Specifically, a preset command header can be used as a keyword. Starting from the beginning of the command storage area, data of the same length as the preset command header is taken as a data block. This data block is matched with the preset command header. If the two match, the data block is determined to be a command header. The M-length data following the data block is determined to be the command body of the command header. The command header and the command body of the command header are considered as a complete GPU command.
[0085] In this embodiment of the present invention, if the packet size is no larger than a specified size, the GPU directly copies the command packet data up to the specified size from the copy location to the command storage area. It then identifies all complete GPU commands contained in the command storage area and executes them. This eliminates the need for an update operation and completes the processing of the drawing command packet with a single copy and execution, thereby ensuring efficient processing.
[0086] Optionally, the step of updating the copy location in the embodiment of the present invention may specifically include:
[0087] Step 1034: Update the copy offset to the sum of the current value of the copy offset and the total size of the complete GPU command; the copy offset represents the offset relative to the starting storage position when performing the copy operation, and the initial value is 0.
[0088] Step 1035: Update the copy position to the sum of the starting storage position and the updated copy offset.
[0089] Among them, the execution order of the operation of updating the copy position and the operation of updating the package size is not unique. For example, they can be executed synchronously, or the copy position can be updated and then the operation of updating the package size can be executed. The embodiment of the present invention does not limit this.
[0090] Specifically, the copy offset can be first updated to the sum of the current value of the copy offset and the total size of the complete GPU commands. For example, for the second copy, the copy offset is 0 + the sum of the total size of the complete GPU commands in the command data packet of the first copy, and for the third copy, the copy offset is the sum of the total size of the complete GPU commands in the command data packet of the first copy + the sum of the total size of the complete GPU commands in the command data packet of the second copy. In this way, by updating the copy offset, the copy offset can represent the total size of all complete GPU commands that have been cumulatively identified for the drawing command packet, that is, the copy offset can represent the total size of the GPU commands that have been executed for the drawing command packet.
[0091] For example, in combination Figure 2 In the example above, during the first copy, data from 0x0001 to 0x0250 is copied to the command storage area. The command storage area is identified as containing two complete GPU commands: GPU Command 1 and GPU Command 2, and one incomplete GPU command: GPU Command 3. Accordingly, the updated packet size is 0x0550 - 0x0200 (the total size of complete GPU commands in the command storage area) = 0x0350, the updated copy offset is 0 + 0x0200, and the updated copy address is 0x0001 + 0x0200 = 0x0201. Because the updated packet size of 0x0350 is greater than the specified size of 0x0250, during the second copy, the specified size of command packet data is copied starting at 0x0201: data from 0x0201 to 0x0450 is copied to the command storage area. The complete GPU commands in the command packet data copied to the command storage area for the second time include: GPU command 3 and GPU command 4.
[0092] Accordingly, the updated packet size is = 0x0350 - 0x0200 (the total size of the complete GPU commands in the command store) = 0x0150, the updated copy offset = 0 + 0x0200 (the total size of the complete GPU commands in the command store during the first copy) + 0x0200 (the total size of the complete GPU commands in the command store during the second copy) = 0x0400, and the updated copy address = 0x0001 + 0x0400 = 0x0401. Since the updated packet size of 0x0150 is not greater than the specified size of 0x0250, during the third copy, starting at 0x0401, the command packet data of that size is copied: data from 0x0401 to 0x0550 is copied to the command store. The complete GPU commands included in the command store are: GPU Command 5 and GPU Command 6. At this point, the drawing command packet copy is complete, and the copy process can be terminated.
[0093] Accordingly, the sum of the drawing command packet's starting storage location in the CPU and the updated copy offset represents the starting storage location of the unexecuted commands in the drawing command packet. The copy location can be updated to the sum of the drawing command packet's starting storage location in the CPU and the updated copy offset, i.e., to addr + the updated offset.
[0094] Figure 5 This is another command packet processing diagram provided by an embodiment of the present invention. Figure 5 As shown, the GPU can first obtain the starting storage location of the drawing command packet passed by the graphics driver in the CPU and store it in addr, and obtain the packet size of the drawing command packet and store it in cmd_size. Then, local variables are initialized. Specifically, offest is initialized to 0, and firm_max_size is initialized to a specified size. Next, it determines whether cmd_size is greater than firm_max_size. If cmd_size is greater than firm_max_size, command packet data of size firm_max_size is copied from addr + offset to the command storage area, and cmd_size is updated to cmd_size - firm_max_size. Then, all complete GPU commands are identified and executed, and cmd_size is updated to cmd_size + unused_size, and offset = offset + the total size of the complete GPU command. Then, the process returns to the step of determining whether cmd_size is greater than firm_max_size. If cmd_size is not greater than firm_max_size, command packet data of size cmd_size is copied from addr + offset to the command storage area. Then, all complete GPU commands are identified and executed.
[0095] In this embodiment of the present invention, the copy offset is updated to the sum of the current copy offset value and the total size of the complete GPU command. The sum of the starting storage location of the drawing command packet and the updated copy offset is calculated as the starting storage location of the unexecuted command. The copy location is updated to the starting storage location of the unexecuted command. This ensures that the next copy starts from the starting storage location of the unexecuted command, avoiding missing data in the drawing command packet.
[0096] Reference Figure 6 , shows a block diagram of a graphics command processing device provided by an embodiment of the present invention, which is applied to electronic devices such as Figure 6 As shown, the graphics command processing device may specifically include:
[0097] The first processing module 301 is configured to use the starting storage location of the drawing command packet stored in the CPU as a copy location; the drawing command packet is generated by initialization of the graphics drawing task corresponding to the electronic device;
[0098] A first copy module 302 is configured to copy command packet data of the specified size starting from the copy position to a command storage area of the GPU if the packet size of the drawing command packet is larger than a specified size; the specified size is the size of the command storage area;
[0099] An updating module 303 is configured to update the packet size and the copy position according to the total size of the complete GPU command in the command packet data;
[0100] The second processing module 304 is configured to continue copying the command packet data from the updated copy position to the command storage area if the updated packet size is still larger than the specified size, until all the drawing command packets are copied.
[0101] The first processing module 301 , the first copy module 302 , the update module 303 and the second processing module 304 belong to the GPU.
[0102] Optionally, the device further comprises:
[0103] a second copy module, configured to copy command packet data of the packet size directly from the copy position to the command storage area if the packet size is not greater than the specified size;
[0104] The third processing module is configured to respectively identify and execute all complete GPU commands included in the command storage area.
[0105] The second copy module and the third processing module belong to the GPU.
[0106] Optionally, the device further comprises:
[0107] an identification module, configured to traverse from a starting position of the command storage area and sequentially identify command headers included in the command storage area;
[0108] A first determining module is used to determine the command bodies corresponding to the command headers from the command packet data respectively;
[0109] The fourth processing module is configured to determine the command header and the command body as a complete GPU command if the command body is complete, and execute the complete GPU command.
[0110] Optionally, the updating module 303 is specifically configured to:
[0111] If the command storage area contains only the complete GPU commands, determining the specified size as the total size of the complete GPU commands;
[0112] Otherwise, determining the sum of the sizes of all the complete GPU commands to obtain the total size of the complete GPU command;
[0113] A difference between the packet size and the total size is calculated, and the packet size is updated to the difference.
[0114] Optionally, the device further comprises:
[0115] The second determining module is configured to determine that the command storage area includes incomplete GPU commands if the specified size is greater than the total size of the complete GPU commands; otherwise, determine that the command storage area contains only the complete GPU commands.
[0116] The second determining module belongs to the GPU.
[0117] Optionally, the updating module 303 is further configured to:
[0118] Updating the copy offset to the sum of the current value of the copy offset and the total size of the complete GPU command; the copy offset represents the offset relative to the starting storage location when performing the copy operation, and the initial value is 0;
[0119] The copy position is updated to the sum of the starting storage position and the updated copy offset.
[0120] Optionally, the device further comprises:
[0121] a generating module, configured to generate, for any graphics drawing task, the drawing command packet directly based on a plurality of GPU commands corresponding to the graphics drawing task, and store the generated drawing command packet in a storage area of the CPU;
[0122] The writing module is configured to write the starting storage location of the drawing command packet in the storage area and the packet size of the drawing command packet into a shared register for reading by the GPU.
[0123] Among them, the generation module and the writing module belong to the CPU.
[0124] In summary, in the graphics command processing device provided by the embodiments of the present invention, the starting storage location of a drawing command packet stored in the CPU is used as the copy location. A drawing command packet is generated by initialization of a graphics drawing task corresponding to an electronic device. If the packet size of the drawing command packet exceeds a specified size, command packet data of the specified size is copied from the copy location to the command storage area of the GPU, where the specified size is the size of the command storage area. The packet size and the copy location are updated based on the total size of the complete GPU commands in the command packet data. If the updated packet size is still larger than the specified size, the command packet data is copied from the updated copy location to the command storage area until all drawing command packets are copied. In this way, the GPU itself can ensure that the copied data does not exceed the size of the command storage area. Even if the size of the drawing command packet to be executed exceeds the size of the command storage area, the GPU commands in the drawing command packet can be correctly executed, thereby avoiding the problem of the GPU copying data exceeding the command storage area and causing execution failure. Accordingly, when the CPU generates a drawing command packet, it does not need to split it into multiple small drawing command packets, thereby improving GPU command processing efficiency.
[0125] Reference Figure 6 Schematic diagram of the structure of the electronic device provided by the embodiment of the present invention. Figure 6 As shown, the electronic device includes: a processor, a memory, a communication interface and a communication bus.
[0126] The processor, the memory, and the communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction, which enables the processor to execute the graphics command processing method of the aforementioned embodiment. The executable instruction can form a program.
[0127] An embodiment of the present invention provides a machine-readable medium having instructions stored thereon. When executed by one or more processors, the processors are enabled to execute the method for processing graphics commands of the aforementioned embodiment.
[0128] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0129] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, apparatus, or computer program products. Thus, embodiments of the present invention may take the form of a fully hardware embodiment, a fully software embodiment, or an embodiment combining software and hardware. Furthermore, embodiments of 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 magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0130] It should be noted that all actions of acquiring signals, information or data in this application are carried out in compliance with the relevant data protection laws and policies of the country where they are located and with the authorization given by the owner of the corresponding device.
[0131] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the 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 the 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 processor, or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the process 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.
[0132] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing terminal device to operate in a predictable 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 The function specified in one or more boxes.
[0133] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.
[0134] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they become aware of the basic creative concepts. 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 embodiments of the present invention.
[0135] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations.
[0136] Moreover, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or terminal device that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not preclude the presence of additional identical elements in the process, method, article, or terminal device that includes the element.
[0137] The above describes in detail a method for processing graphics commands, a device for processing graphics commands, an electronic device, and one or more readable media provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only intended to help understand the method and core concept of the present invention. At the same time, for those skilled in the art, according to the concept of the present invention, there may be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting the present invention.
Claims
1. A method for processing a graphics command, characterized in that: Applied to electronic equipment, the method includes: The starting storage location of the drawing command packet stored in the CPU is used as the copy location; the drawing command packet is generated by initialization of the graphics drawing task corresponding to the electronic device; If the packet size of the drawing command packet is larger than a specified size, copying the command packet data of the specified size to a command storage area of the GPU starting from the copy position; the specified size is the size of the command storage area; updating the packet size and the copy position according to the total size of the complete GPU command in the command packet data; If the updated packet size is still larger than the specified size, the command packet data continues to be copied from the updated copy position to the command storage area until all the drawing command packets are copied.
2. The method according to claim 1, characterized in that The method further comprises: If the packet size is not greater than the specified size, directly copying the command packet data of the packet size to the command storage area starting from the copy position; All complete GPU commands included in the command storage area are identified and executed respectively.
3. The method according to claim 1, characterized in that The method further comprises: Traversing from a starting position of the command storage area, and sequentially identifying command headers included in the command storage area; Determining the command bodies corresponding to the command headers from the command packet data respectively; If the command body is complete, the command header and the command body are determined as a complete GPU command, and the complete GPU command is executed.
4. The method according to claim 3, characterized in that The updating of the packet size includes: If the command storage area contains only the complete GPU commands, determining the specified size as the total size of the complete GPU commands; Otherwise, determining the sum of the sizes of all the complete GPU commands to obtain the total size of the complete GPU command; A difference between the packet size and the total size is calculated, and the packet size is updated to the difference.
5. The method according to claim 4, characterized in that The method further comprises: If the specified size is greater than the total size of the complete GPU command, determining that the command storage area includes an incomplete GPU command; Otherwise, it is determined that all the commands in the command storage area are the complete GPU commands.
6. The method according to any one of claims 1 to 5, characterized in that The updating of the copy location includes: Updating the copy offset to the sum of the current value of the copy offset and the total size of the complete GPU command; the copy offset represents the offset relative to the starting storage location when performing the copy operation, and the initial value is 0; The copy position is updated to the sum of the starting storage position and the updated copy offset.
7. The method according to any one of claims 1 to 5, characterized in that The method further comprises: For any graphics rendering task, directly generating the rendering command packet based on multiple GPU commands corresponding to the graphics rendering task, and storing the packet in the storage area of the CPU; The drawing command packet is written into a starting storage location of the storage area and a packet size of the drawing command packet into a shared register for reading by the GPU.
8. A graphics command processing device, characterized in that: Applied to electronic equipment, the device comprises: A first processing module is configured to use the starting storage location of the drawing command packet stored in the CPU as a copy location; the drawing command packet is generated by initialization of the graphics drawing task corresponding to the electronic device; a first copy module, configured to copy command packet data of the specified size starting from the copy position to a command storage area of the GPU if the packet size of the drawing command packet is larger than a specified size; the specified size is the size of the command storage area; an updating module, configured to update the packet size and the copy position according to the total size of the complete GPU command in the command packet data; The second processing module is configured to continue copying the command packet data from the updated copy position to the command storage area if the updated packet size is still larger than the specified size, until all the drawing command packets are copied.
9. An electronic device, characterized in that: include: A processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; The memory is used to store executable instructions, and the executable instructions enable the processor to execute the device according to any one of claims 1 to 7.
10. One or more machine-readable media, characterized in that Instructions are stored thereon, which, when executed by one or more processors, cause the processors to execute the apparatus according to any one of claims 1 to 7.