# US 2022/0284537 A1 · Methods and apparatus for intra-wave texture looping

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2022/0284537 A1
- Document ID: US20220284537A1
- Status: Published application
- Kind: A1
- Application number: 17/191,439
- Filed: 2021-03-03
- Published: 2022-09-08
- Earliest claimed: 2021-03-03
- Assignees: QUALCOMM Incorporated
- Applicants: QUALCOMM Incorporated
- Inventors: Andrew Evan GRUBER
- Web page: https://patentgrep.com/patent/US20220284537A1

## CPC

- G06F 8/4442: {Reducing the number of cache misses; Data prefetching (cache prefetching G06F12/0862)}
- G06T 1/20: Processor architectures; Processor configuration, e.g. pipelining
- G06F 9/4843: {by program, e.g. task dispatcher, supervisor, operating system}
- G06F 12/0862: with prefetch
- G06T 1/60: Memory management
- G06T 15/005: {General purpose rendering architectures}
- G06F 2212/6024: History based prefetching
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

The present disclosure relates to methods and devices for graphics processing including an apparatus, e.g., a GPU. The apparatus may determine whether to divide a group of threads into a plurality of sub-groups of threads, each thread of the group of threads being associated with a shader program. The apparatus may also divide, upon determining to divide the group of threads into the plurality of sub-groups of threads, the group of threads into the plurality of sub-groups of threads. Additionally, the apparatus may execute, upon dividing the group of threads into the plurality of sub-groups of threads, a subsection of the shader program for each sub-group of threads of the plurality of sub-groups of threads.

## Claims

### Claim 1

A method of graphics processing, comprising:
determining whether to divide a group of threads into a plurality of sub-groups of threads, each thread of the group of threads being associated with a shader program;
dividing, upon determining to divide the group of threads into the plurality of sub-groups of threads, the group of threads into the plurality of sub-groups of threads;
inserting a loop marker for each of the plurality of sub-groups of threads based on a subsection of the shader program; and
executing, upon dividing the group of threads into the plurality of sub-groups of threads, the subsection of the shader program for each sub-group of threads of the plurality of sub-groups of threads, the subsection of the shader program completing execution for one sub-group of threads before commencing execution for a subsequent sub-group of threads.

### Claim 2 (depends on 1)

The method of claim 1, wherein the group of threads is a wave of threads and the plurality of sub-groups of threads is a plurality of sub-waves of threads.

### Claim 3 (depends on 1)

The method of claim 1, wherein the group of threads is at least one of a group of pixels, a group of vertices, or a group of work items.

### Claim 4 (depends on 3)

The method of claim 3, wherein the group of pixels is a group of texture pixels or a group of texels.

### Claim 5

(canceled)

### Claim 6 (depends on 1)

The method of claim 1, wherein the loop marker defines a range of the subsection of the shader program.

### Claim 7 (depends on 6)

The method of claim 6, wherein the range includes a start of the subsection of the shader program and an end of the subsection of the shader program.

### Claim 8 (depends on 1)

The method of claim 1, wherein the loop marker is associated with an initiation mechanism or a hardware initiation mechanism.

### Claim 9 (depends on 1)

The method of claim 1, further comprising:
determining whether successive instructions of a set of instructions for the group of threads are associated with a same surface.

### Claim 10 (depends on 9)

The method of claim 9, wherein the set of instructions are texture instructions and the same surface is a texture surface.

### Claim 11 (depends on 9)

The method of claim 9, wherein the set of instructions correspond to downsampling instructions.

### Claim 12 (depends on 1)

The method of claim 1, wherein a memory footprint of the subsection of the shader program for each of the plurality of sub-groups of threads is associated with a size of a cache.

### Claim 13 (depends on 12)

The method of claim 12, wherein the memory footprint of all of the subsections of the shader program for the group of threads exceeds the size of the cache.

### Claim 14 (depends on 12)

The method of claim 12, further comprising:
storing, in the cache, the memory footprint of the subsection of the shader program for each of the plurality of sub-groups of threads.

### Claim 15 (depends on 12)

The method of claim 12, wherein the cache is a texture cache or a level 1 (L1) texture cache.

### Claim 16 (depends on 1)

The method of claim 1, wherein the determination whether to divide the group of threads into the plurality of sub-groups of threads is performed by a compiler.

### Claim 17 (depends on 1)

The method of claim 1, wherein the subsection of the shader program for each of the plurality of sub-groups of threads is executed by a graphics shader in a graphics processing unit (GPU).

### Claim 18

An apparatus for graphics processing, comprising:
a memory; and
at least one processor coupled to the memory and configured to:
determine whether to divide a group of threads into a plurality of sub-groups of threads, each thread of the group of threads being associated with a shader program;
divide, upon determining to divide the group of threads into the plurality of sub-groups of threads, the group of threads into the plurality of sub-groups of threads;
insert a loop marker for each of the plurality of sub-groups of threads based on a subsection of the shader program; and
execute, upon dividing the group of threads into the plurality of sub-groups of threads, the subsection of the shader program for each sub-group of threads of the plurality of sub-groups of threads, the subsection of the shader program completing execution for one sub-group of threads before commencing execution for a subsequent sub-group of threads.

### Claim 19 (depends on 18)

The apparatus of claim 18, wherein the group of threads is a wave of threads and the plurality of sub-groups of threads is a plurality of sub-waves of threads.

### Claim 20 (depends on 18)

The apparatus of claim 18, wherein the group of threads is at least one of a group of pixels, a group of vertices, or a group of work items.

### Claim 21 (depends on 20)

The apparatus of claim 20, wherein the group of pixels is a group of texture pixels or a group of texels.

### Claim 22

(canceled)

### Claim 23 (depends on 18)

The apparatus of claim 18, wherein the loop marker defines a range of the subsection of the shader program.

### Claim 24 (depends on 23)

The apparatus of claim 23, wherein the range includes a start of the subsection of the shader program and an end of the subsection of the shader program.

### Claim 25 (depends on 18)

The apparatus of claim 18, wherein the loop marker is associated with an initiation mechanism or a hardware initiation mechanism.

### Claim 26 (depends on 18)

The apparatus of claim 18, wherein the at least one processor is further configured to:
determine whether successive instructions of a set of instructions for the group of threads are associated with a same surface.

### Claim 27 (depends on 26)

The apparatus of claim 26, wherein the set of instructions are texture instructions and the same surface is a texture surface.

### Claim 28 (depends on 26)

The apparatus of claim 26, wherein the set of instructions correspond to downsampling instructions.

### Claim 29 (depends on 18)

The apparatus of claim 18, wherein a memory footprint of the subsection of the shader program for each of the plurality of sub-groups of threads is associated with a size of a cache.

### Claim 30 (depends on 29)

The apparatus of claim 29, wherein the memory footprint of all the subsections of the shader program for the group of threads exceeds the size of the cache.

### Claim 31 (depends on 29)

The apparatus of claim 29, wherein the at least one processor is further configured to:
store, in the cache, the memory footprint of the subsection of the shader program for each of the plurality of sub-groups of threads.

### Claim 32 (depends on 29)

The apparatus of claim 29, wherein the cache is a texture cache or a level 1 (L1) texture cache.

### Claim 33 (depends on 18)

The apparatus of claim 18, wherein the determination whether to divide the group of threads into the plurality of sub-groups of threads is performed by a compiler.

### Claim 34 (depends on 18)

The apparatus of claim 18, wherein the subsection of the shader program for each of the plurality of sub-groups of threads is executed by a graphics shader in a graphics processing unit (GPU).

### Claim 35

An apparatus for graphics processing, comprising:
means for determining whether to divide a group of threads into a plurality of sub-groups of threads, each thread of the group of threads being associated with a shader program;
means for dividing, upon determining to divide the group of threads into the plurality of sub-groups of threads, the group of threads into the plurality of sub-groups of threads;
means for inserting a loop marker for each of the plurality of sub-groups of threads based on a subsection of the shader program; and
means for executing, upon dividing the group of threads into the plurality of sub-groups of threads, the subsection of the shader program for each sub-group of threads of the plurality of sub-groups of threads, the subsection of the shader program completing execution for one sub-group of threads before commencing execution for a subsequent sub-group of threads.

### Claim 36

A non-transitory computer-readable medium storing computer executable code for graphics processing, the code when executed by a processor causes the processor to:
determine whether to divide a group of threads into a plurality of sub-groups of threads, each thread of the group of threads being associated with a shader program;
divide, upon determining to divide the group of threads into the plurality of sub-groups of threads, the group of threads into the plurality of sub-groups of threads;
insert a loop marker for each of the plurality of sub-groups of threads based on a subsection of the shader program; and
execute, upon dividing the group of threads into the plurality of sub-groups of threads, the subsection of the shader program for each sub-group of threads of the plurality of sub-groups of threads, the subsection of the shader program completing execution for one sub-group of threads before commencing execution for a subsequent sub-group of threads.
