Shader-Dependent Fragment Processing with Early and Late Depth Tests

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Graphics processing systems experience reduced performance due to latency and stalling of the rendering pipeline when processing a mix of punch through and non-punch through objects, as the presence of punch through fragments requires shader-dependent processing, leading to inefficiencies in deferred rendering.

Innovation Solution

Implement an early depth test followed by shader program execution for punch through fragments, and a late depth test after determining their presence, allowing simultaneous processing of non-punch through fragments, thereby reducing pipeline stalling and improving performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If punch through fragments are processed with shader-dependent presence determination, then rendering accuracy is improved, but pipeline stalling and latency increase

Engineering Contradiction:
Improverendering accuracyVSAvoidpipeline latency
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent performs an early depth test on punch through fragments before shader execution to preliminarily determine which fragments can be discarded. This preliminary action filters out clearly occluded fragments before committing resources to shader processing, reducing both unnecessary shader executions and pipeline stalling while maintaining rendering accuracy for fragments that require full processing.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent segments the depth testing process into two distinct phases: an early depth test performed before shader execution and a late depth test performed after. This segmentation allows the rendering pipeline to process different fragment types differently - punch through fragments undergo both tests with shader execution in between, while non-punch through fragments can use optimized paths - thereby resolving the contradiction between accuracy and latency.

Inventive Principle:
Principle #1Segmentation

2Measurement precision

If punch through fragments are processed with late depth test after shader execution, then hidden surface removal accuracy is improved, but processing throughput decreases

Engineering Contradiction:
Improvehidden surface removal accuracyVSAvoidprocessing throughput
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent applies different processing qualities to different fragment types locally. Punch through fragments receive the full treatment with both early and late depth tests plus shader execution to ensure accuracy where needed. Non-punch through fragments receive optimized processing with only early depth testing and no shader execution. This local differentiation maintains hidden surface removal accuracy for punch through objects while preserving overall processing throughput.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent implements partial depth testing for punch through fragments by performing an early depth test that provides sufficient filtering for many cases, with the option to perform additional late depth testing only when necessary. This partial action approach maintains adequate accuracy while avoiding the excessive processing that would occur if all fragments underwent complete depth testing and shader execution.

Inventive Principle:
Principle #16Partial or excessive action

3Productivity

If non-punch through fragments are processed while punch through fragments are in flight, then pipeline utilization is improved, but depth buffer consistency may be compromised

Engineering Contradiction:
Improvepipeline utilizationVSAvoiddepth buffer consistency
Core Design Contradiction:
ProductivityVSStability of the object's composition

Solution Approach 1:

The patent performs preliminary early depth testing on punch through fragments before allowing non-punch through fragments to proceed. This preliminary action establishes a baseline depth state that ensures consistency when the depth buffer is later updated after shader execution, allowing pipeline overlap while maintaining depth buffer integrity.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent uses the early depth test result as an intermediary mechanism that decouples the processing of punch through and non-punch through fragments. By establishing depth acceptance criteria before shader execution, the system allows non-punch through fragments to be processed in parallel while the punch through fragments undergo shader processing, with the early depth test acting as a mediator that ensures depth buffer consistency when results are later committed.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS12406433B2Processing fragments which have a shader-dependent property in a graphics processing system
Publication Date: 2025.09.02 IMAGINATION TECH LTD
  • US12406433B2 patent drawing
  • US12406433B2 patent drawing
  • US12406433B2 patent drawing

AI summary

Methods and graphics processing units for processing a plurality of fragments in a graphics processing system. A received first fragment is processed by performing an early depth test with hidden surface removal logic using a depth buffer; in response to the first fragment passing the early depth test, executing one or more instructions of a shader program for the first fragment on the processing logic to determine the property of the first fragment; and after the determination of the property of the first fragment, performing a late depth test on the first fragment with the hidden surface removal logic using the depth buffer. After said receiving a first fragment, a second fragment to be processed is received, wherein the second fragment does not have a shader-dependent property. The second fragment is processed by, before said late depth test is performed on the first fragment, performing an early depth test on the second fragment with the hidden surface removal logic.