Mid-primitive Graphics Execution Preemption via Pipeline Segmentation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for processor preemption in graphics program execution are inefficient, particularly when dealing with long-running graphics shader programs, as they either require draining the processor pipeline or incur significant overhead in storing and restoring execution state.

Innovation Solution

A mid-primitive graphics program execution preemption method that does not require draining the entire processing pipeline, allowing in-flight instructions to progress to an execution unit boundary and unloading the execution state, thereby reducing the context state to be saved and allowing for context switching at a coarse raster region boundary.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the processor pipeline is completely drained before preemption, then the processor can be safely switched to another application, but the time required for preemption increases significantly

Engineering Contradiction:
Improveprocessor state consistencyVSAvoidpreemption time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent segments the processor pipeline into multiple stages and identifies specific preemption points within the pipeline (such as after vertex processing, before rasterization, or after rasterization but before pixel shader execution). By allowing preemption at these intermediate boundaries rather than requiring complete pipeline drainage, the system achieves state consistency at acceptable time costs while maintaining the ability to switch applications efficiently

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary actions by pre-calculating and storing intermediate rendering results (such as vertex positions, triangle descriptors, or rasterization outcomes) at defined preemption boundaries. This allows the renderer to resume from these pre-computed states without needing to reprocess entire primitives, reducing the time penalty associated with preemption while ensuring consistent processor state

Inventive Principle:
Principle #10Preliminary action

2Loss of time

If the processor is frozen without draining the pipeline to implement preemption, then preemption time is reduced, but the amount of state that must be stored and restored increases significantly

Engineering Contradiction:
Improvepreemption timeVSAvoidexecution state size
Core Design Contradiction:
Loss of timeVSQuantity of substance

Solution Approach 1:

The patent extracts and stores only the essential intermediate results and processor states at predefined preemption boundaries (such as vertex buffer states, triangle descriptor tables, or coarse rasterization results) rather than saving the complete execution state of the entire pipeline. This selective extraction reduces the amount of data that must be stored and restored during preemption while maintaining sufficient information to resume rendering correctly

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent applies different state management strategies to different parts of the rendering pipeline. Critical states that must be preserved for accurate resumption (such as vertex shader outputs or triangle geometry descriptors) are stored with high fidelity, while less critical intermediate states are either discarded or reconstructed from stored metadata. This localized quality approach minimizes overall state size while ensuring essential rendering information is preserved

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS9710874B2Mid-primitive graphics execution preemption
Publication Date: 2017.07.18 NVIDIA CORP
  • US9710874B2 patent drawing
  • US9710874B2 patent drawing
  • US9710874B2 patent drawing

AI summary

One embodiment of the present invention sets forth a technique for mid-primitive execution preemption. When preemption is initiated no new instructions are issued, in-flight instructions progress to an execution unit boundary, and the execution state is unloaded from the processing pipeline. The execution units within the processing pipeline, including the coarse rasterization unit complete execution of in-flight instructions and become idle. However, rasterization of a triangle may be preempted at a coarse raster region boundary. The amount of context state to be stored is reduced because the execution units are idle. Preempting at the mid-primitive level during rasterization reduces the time from when preemption is initiated to when another process can execute because the entire triangle is not rasterized.