# US 2013/0155079 A1 · Saving and Restoring Shader Context State

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

- Number: US 2013/0155079 A1
- Document ID: US20130155079A1
- Status: Published application
- Kind: A1
- Application number: 13/325,339
- Filed: 2011-12-14
- Published: 2013-06-20
- Earliest claimed: 2011-12-14
- Inventors: Robert Scott HARTOG; Nuwan JAYASENA; Mark LEATHER; Michael MANTOR; Rex McCRARY; Kevin McGRATH; Sebastien NUSSBAUM; Philip J. ROGERS; Ralph Clay TAYLOR; Thomas R. WOLLER
- Web page: https://patentgrep.com/patent/US20130155079A1

## CPC

- G06F 9/4812: {by interrupt, e.g. masked}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Provided is a method for processing a command in a computing system including an accelerated processing device (APD) having a command processor. The method includes executing an interrupt routine to save one or more contexts related to a first set of instructions on a shader core in response to an instruction to preempt processing of the first set of instructions.

## Claims

### Claim 1

A method for processing a command in a computing system including an accelerated processing device (APD) having a command processor, the method comprising:
responsive to an instruction to preempt processing of a first set of instructions, executing an interrupt routine to save one or more contexts related to the first set of instructions on a shader core.

### Claim 2 (depends on 1)

The method of claim 1, wherein the interrupt routine is a trap routine.

### Claim 3 (depends on 1)

The method of claim 1, wherein the one or more contexts include context of wavefronts implementing one or more of the first set of instructions.

### Claim 4 (depends on 3)

The method of claim 3, wherein the one or more contexts include contexts of respective work-items of the wavefronts.

### Claim 5 (depends on 1)

The method of claim 1, wherein the one or more contexts include contents of at least one of general purpose registers and local memory.

### Claim 6 (depends on 1)

The method of claim 1, further comprising processing a second set of instructions upon completion of the preemption of the first set of instructions; and
resuming processing of the first set of instructions upon completion of the processing of the second set of instructions.

### Claim 7 (depends on 6)

The method of claim 6, further comprising resuming processing of the first set of instructions from a point of preemption.

### Claim 8 (depends on 1)

The method of claim 1, further comprising restoring the one or more contexts related to the first set of instructions.

### Claim 9 (depends on 1)

The method of claim 1, wherein the instruction to preempt processing of the first instruction is transmitted via the command processor.

### Claim 10 (depends on 9)

The method of claim 9, farther comprising transmitting the instruction to preempt processing of the first instruction to the shader core.

### Claim 11

A computer readable media storing commands wherein said commands when executed are configured to process work-items on an accelerated processing device (APD) to perform a method for:
responsive to an instruction to preempt processing of a first set of instructions, executing an interrupt routine to save one or more contexts related to a first set of instructions on a shader core.

### Claim 12

An apparatus, comprising:
a memory; and
an accelerated processing device (APD) coupled to the memory, wherein the APD is configured to, based on a command stored in the memory:
execute an interrupt routine to save one or more contexts related to a first set of instructions on a shader core in response to an instruction to preempt processing of the first set of instructions.

### Claim 13 (depends on 12)

The apparatus of claim 12, wherein the interrupt routine is a trap routine.

### Claim 14 (depends on 13)

The apparatus of claim 13, wherein the one or more contexts include context of wavefronts implementing one or more of the first set of instructions.

### Claim 15 (depends on 14)

The apparatus of claim 14, wherein the one or more contexts include contexts of respective work-items of the wavefronts.

### Claim 16 (depends on 15)

The apparatus of claim 15, wherein the one or more contexts include contents of at least one of general purpose registers and local memory.

### Claim 17 (depends on 16)

The apparatus of claim 16, wherein the APD is further configured to process a second set of instructions upon completion of the preemption of the first set of instructions; and
resume processing of the first set of instructions upon completion of the processing of the second set of instructions.

### Claim 18 (depends on 17)

The apparatus of claim 17, wherein the APD is further configured to resume processing of the first set of instructions from a point of preemption.

### Claim 19 (depends on 18)

The apparatus of claim 18, wherein the APD is further configured to restore the one or more contexts related to the first set of instructions.

### Claim 20 (depends on 19)

The apparatus of claim 19, wherein the APD includes a command processor and wherein the instruction to preempt processing of the first instruction is transmitted by the command processor.
