GPU Shader Context Handling via Register Segmentation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional graphics processing units (GPUs) face challenges in handling the increased number of state packages required by newer APIs, such as DirectX 10, due to limited register capacity, leading to potential timing issues and increased CPU workload when attempting to manage frequent context switches.

Innovation Solution

The system employs a scheduler to differentiate between 'mini-packages' and 'standard packages' of state updates, using separate registers for frequent and infrequent data access, allowing for efficient execution of compute packets by allocating and deallocating registers as needed to manage state updates effectively.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If the number of state packages supported by the graphics pipeline is increased to handle newer APIs, then the capability to support frequent context switches is improved, but the die area significantly increases due to additional registers required

Engineering Contradiction:
Improvecapability to support frequent context switchesVSAvoiddie area
Core Design Contradiction:
Adaptability or versatilityVSArea of stationary object

Solution Approach 1:

The patent segments state packages into two distinct types: mini-packages stored in mini-state registers and standard-packages stored in standard-state registers. This segmentation allows the system to support frequent context switches for mini-packages using a limited number of dedicated registers, while standard-packages use a separate register pool, thereby avoiding the need to increase the total register count for all state packages.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a new dimension by adding mini-state registers as a separate storage layer alongside existing standard-state registers. This dimensional addition allows the system to handle frequent context switches without expanding the traditional state package storage capacity, effectively solving the contradiction between supporting more context switches and maintaining limited die area.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Adaptability or versatility

If the number of state packages is increased beyond the storage capacity of the pipeline, then the support for newer APIs is improved, but timing issues occur as the graphics pipeline stalls

Engineering Contradiction:
Improvesupport for newer APIsVSAvoidpipeline timing
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

By segmenting state packages into mini-packages and standard-packages with separate register storage, the patent ensures that frequent context switches for mini-packages do not exceed the capacity of mini-state registers. This prevents pipeline stalls and timing issues while still supporting the increased state package requirements of newer APIs.

Inventive Principle:
Principle #1Segmentation

3Quantity of substance

If software re-ordering of work is used to reduce the number of state changes, then the number of state packages needed is reduced, but the CPU workload significantly increases to search and sort input transactions

Engineering Contradiction:
Improvenumber of state packagesVSAvoidCPU workload
Core Design Contradiction:
Quantity of substanceVSDevice complexity

Solution Approach 1:

The patent implements self-service by having the GPU automatically manage and differentiate between mini-packages and standard-packages without requiring CPU intervention for re-ordering or sorting. The scheduler within the GPU handles the classification and allocation of state packages to appropriate register sets, eliminating the need for CPU-based work re-ordering while still reducing the number of state changes through intelligent hardware-based management.

Inventive Principle:
Principle #25Self-service

4Productivity

If the number of state packages is increased to support frequent context switches, then the capability for newer APIs is improved, but the register capacity is exceeded leading to pipeline stalls

Engineering Contradiction:
Improvefrequency of context switchesVSAvoidregister capacity
Core Design Contradiction:
ProductivityVSQuantity of substance

Solution Approach 1:

The patent divides the register capacity into two separate pools: mini-state registers dedicated to frequently accessed mini-packages and standard-state registers for less frequently accessed standard-packages. This segmentation allows the system to support a high frequency of context switches for mini-packages within the limited mini-state register capacity, while standard-packages utilize the separate standard-state register pool, thereby preventing register capacity exhaustion and pipeline stalls.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS8593465B2Handling of extra contexts for shader constants
Publication Date: 2013.11.26 ADVANCED MICRO DEVICES INC
  • US8593465B2 patent drawing
  • US8593465B2 patent drawing
  • US8593465B2 patent drawing

AI summary

The present invention provides a system for handling extra contexts for shader constants, and applications thereof. In an embodiment there is provided a computer-based method for executing a series of compute packets in an execution pipeline. The execution pipeline includes a first plurality of registers configured to store state-updates of a first type and a second plurality of registers configured to store state-updates of a second type. A first number of state-updates of the first type and a second number of state-updates of the second type are respectively identified and stored in the first and second plurality of registers. A compute packet is sent to the execution pipeline responsive to the first number and the second number. Then, the compute packet is executed by the execution pipeline.