GPU Shader Operation with Deferred Varying Fetch for Culling

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Vertex shading in GPUs is inefficient due to redundant computational power and bandwidth usage for primitives that are ultimately culled, as existing solutions require splitting vertex shaders into position and varying shaders, leading to increased hardware requirements and scheduling costs.

Innovation Solution

A method where vertex shaders emit positions first, wait for cull results, and then fetch and process varyings only for remaining instances, reducing redundant processing and memory accesses without splitting shaders into separate parts.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If vertex shading is performed before primitive culling, then position data can be calculated for all instances, but computational power and bandwidth are wasted on culled primitives

Engineering Contradiction:
Improvecorrectness of renderingVSAvoidcomputational power and bandwidth usage
Core Design Contradiction:
ReliabilityVSLoss of energy

Solution Approach 1:

The vertex shader is divided into two separate shader programs: a first vertex shader that calculates only position data, and a second vertex shader that calculates varying data. This segmentation allows the system to execute only the necessary portion of shader code for culled primitives, avoiding wasted computation on varying data for instances that will be discarded.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The first vertex shader executes preliminary action by calculating position data before culling occurs. This allows the culling unit to determine which instances should be discarded based on their position, enabling subsequent optimization where the second vertex shader is executed only for non-culled instances, thus preventing wasted computational effort.

Inventive Principle:
Principle #10Preliminary action

2Loss of energy

If vertex shaders are split into position and varying shaders, then redundant processing is reduced, but hardware requirements and scheduling costs increase

Engineering Contradiction:
Improveredundant processingVSAvoidhardware requirements and scheduling
Core Design Contradiction:
Loss of energyVSDevice complexity

Solution Approach 1:

The system uses a universal shader core that can execute both the first vertex shader and the second vertex shader. This multi-functional approach allows the same hardware resource to handle different shader programs without requiring separate dedicated hardware for each shader type, thereby reducing overall hardware complexity while still enabling selective execution.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The shader execution system is made dynamic by allowing the shader core to switch between executing the first vertex shader and the second vertex shader based on culling results. This dynamic behavior enables the system to adapt its processing pipeline in real-time, executing only the necessary shader program for each instance, thus reducing redundant processing without requiring static additional hardware.

Inventive Principle:
Principle #15Dynamics

3Speed

If all input attributes are fetched at the beginning, then the first part of the shader can execute efficiently, but memory bandwidth is wasted for culled instances

Engineering Contradiction:
Improveshader execution speedVSAvoidmemory bandwidth usage
Core Design Contradiction:
SpeedVSLoss of energy

Solution Approach 1:

The input attribute fetching is segmented into two phases: first, attributes necessary for position calculation are fetched before culling; second, attributes needed for varying calculation are fetched only after culling results indicate the instance should be processed. This segmentation of data access aligns with the segmented shader execution, ensuring memory bandwidth is used only when necessary.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system performs preliminary action by fetching only the essential input attributes required for position calculation before the culling decision is made. This preliminary data retrieval enables efficient execution of the first vertex shader without committing to fetching all possible attributes, thereby preserving memory bandwidth for later use only when needed for non-culled instances.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS20250322584A1Efficient shader operation
Publication Date: 2025.10.16 IMAGINATION TECH LTD
  • US20250322584A1 patent drawing
  • US20250322584A1 patent drawing
  • US20250322584A1 patent drawing

AI summary

A method of operating a GPU uses input attributes in executing a first part of a geometry task fetched by a shader core. The first part of the task executes a first part of a shader to calculate position data for each instance of the task. The first part of the task is executed to output the position data for each instance of the task. The task is then descheduled until cull results are received for each instance. In response to receiving cull results indicating at least one remaining instance in the task, input attributes used in executing a second part of a task are fetched. The second part of the task executes a second part of a shader to calculate varyings for each remaining instance. The second part of the task is executed and the varyings for each remaining instance are output.