Method and apparatus for efficient loop processing in a graphics hardware front end
Abstract
Various embodiments enable loop processing in a command processing block of the graphics hardware. Such hardware may include a processor including a command buffer, and a graphics command parser. The graphics command parser to load graphics commands from the command buffer, parse a first graphics command, store a loop count value associated with the first graphics command, parse a second graphics command and store a loop wrap address based on the second graphics command. The graphics command parser may execute a command sequence identified by the second graphics command, parse a third graphics command, the third graphics command identifying an end of the command sequence, set a new loop count value, and iteratively execute the command sequence using the loop wrap address based on the new loop count value.
Claims
exact text as granted — not AI-modified1 . (canceled)
2 . An apparatus comprising:
a memory; and a graphics processing unit to execution graphics commands loaded from the memory, the execution comprising:
parsing a first graphics command from the graphics commands, the first graphics command identifying a loop wrap address;
executing a command sequence based on the first graphics command;
parsing a second graphics command, the second graphics command identifying an end of the command sequence;
setting a loop count value upon the second graphics command being parsed;
iteratively executing the command sequence using the loop wrap address based on the loop count value.
3 . The apparatus of claim 2 , wherein the loop wrap address is to be stored in a hardware stack.
4 . The apparatus of claim 3 , wherein the loop count value is stored in the hardware stack.
5 . The apparatus of claim 3 , wherein one or more entries including the loop wrap address and loop count value in the hardware stack are cached in an on-die storage of the apparatus.
6 . The apparatus of claim 3 , wherein the command sequence includes at least one nested loop, and wherein the hardware stack stores another loop wrap address for the at least one nested loop.
7 . The apparatus of claim 6 , wherein the another loop wrap address for the at least one nested loop is stored in an entry on top of an corresponding entry for the loop wrap address in the hardware stack.
8 . The apparatus of claim 2 , wherein the loop count value prior to the second graphics command being parsed is stored in the memory, and wherein the stored loop count value is based on parsing another graphics command loaded from the memory prior to parsing the first graphics command.
9 . The apparatus of claim 8 , wherein setting the loop count value comprises decrementing the stored loop count value.
10 . The apparatus of claim 2 , wherein at least one command in the command sequence includes indirect data, and wherein the indirect data for the at least one command is determined based on a loop variable.
11 . A method comprising:
loading graphics commands from a memory of an apparatus; executing the graphics commands loaded from the memory, the execution comprising:
parsing a first graphics command from the graphics commands, the first graphics command identifying a loop wrap address;
executing a command sequence based on the first graphics command;
parsing a second graphics command, the second graphics command identifying an end of the command sequence;
setting a loop count value upon the second graphics command being parsed;
iteratively executing the command sequence using the loop wrap address based on the loop count value.
12 . The method of claim 11 , wherein the loop wrap address is to be stored in a hardware stack.
13 . The method of claim 12 , wherein the loop count value is stored in the hardware stack.
14 . The method of claim 12 , wherein one or more entries including the loop wrap address and loop count value in the hardware stack are cached in an on-die storage of the apparatus.
15 . The method of claim 12 , wherein the command sequence includes at least one nested loop, and wherein the hardware stack stores another loop wrap address for the at least one nested loop.
16 . The method of claim 15 , wherein the another loop wrap address for the at least one nested loop is stored in an entry on top of an corresponding entry for the loop wrap address in the hardware stack.
17 . The method of claim 12 , wherein the loop count value prior to the second graphics command being parsed is stored in the memory, and wherein the stored loop count value is based on parsing another graphics command loaded from the memory prior to parsing the first graphics command.
18 . The method of claim 12 , wherein at least one command in the command sequence includes indirect data, and wherein the indirect data for the at least one command is determined based on a loop variable.
19 . A non-transitory machine-readable storage medium storing instructions, which when executed by a machine, are capable of causing the machine to perform:
loading graphics commands from a memory of an apparatus; executing the graphics commands loaded from the memory, the execution comprising:
parsing a first graphics command from the graphics commands, the first graphics command identifying a loop wrap address;
executing a command sequence based on the first graphics command;
parsing a second graphics command, the second graphics command identifying an end of the command sequence;
setting a loop count value upon the second graphics command being parsed;
iteratively executing the command sequence using the loop wrap address based on the loop count value.
20 . The non-transitory machine-readable storage medium of claim 19 , wherein the loop wrap address is to be stored in a hardware stack.
21 . The non-transitory machine-readable storage medium of claim 20 , wherein the loop count value is stored in the hardware stack.Join the waitlist — get patent alerts
Track US2022284539A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.