GPU Shader Code Instrumentation for Automated Coverage Reports

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current methods for generating structural code coverage data for GPU shader code are labor-intensive, prone to human error, and increase development costs and cycle time, with no automated tools available for instrumenting and analyzing GPU shader code.

Innovation Solution

A method and system that adds flags to GPU shader code and creates graphic objects on a display device for each line of code executed, changing attributes based on execution, and generates a structural code coverage report using hit files and mapping information.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If manual methods are used to generate structural code coverage data for GPU shader code, then accuracy and reliability of coverage data can be maintained, but labor intensity increases and development cycle time extends

Engineering Contradiction:
Improveaccuracy of code coverage dataVSAvoiddevelopment cycle time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system enables automatic self-testing of GPU shader code by instrumenting the shader code itself with coverage tracking mechanisms. The GPU executes the instrumented shader code during rendering, and coverage data is automatically collected and reported without requiring external manual testing tools or processes. This transforms the manual testing process into an automated self-service system that runs concurrently with normal GPU rendering operations.

Inventive Principle:
Principle #25Self-service

2Extent of automation

If automated code coverage tools are used for CPU code, then productivity and automation level improve, but these tools are not applicable to GPU shader code

Engineering Contradiction:
Improveautomation level of code coverage analysisVSAvoidapplicability to GPU shader code
Core Design Contradiction:
Extent of automationVSAdaptability or versatility

Solution Approach 1:

The patent applies code coverage instrumentation specifically at the GPU shader level rather than using generic CPU-based coverage tools. The instrumented shader code includes coverage tracking logic embedded within the shader itself, allowing automated coverage analysis to be performed locally on GPU code during execution. This localized instrumentation approach enables automation specific to GPU shader code characteristics.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The system introduces an intermediary coverage tracking mechanism that bridges the gap between GPU shader execution and coverage data collection. The instrumented shader code acts as a mediator, executing on the GPU while simultaneously tracking execution paths and generating coverage information that can be retrieved and analyzed automatically. This intermediary layer enables automated coverage analysis for GPU code without requiring direct integration with complex GPU hardware.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If comprehensive code coverage testing is performed, then reliability and code quality improve, but development costs increase

Engineering Contradiction:
Improvecode qualityVSAvoiddevelopment cost
Core Design Contradiction:
ReliabilityVSEase of manufacture

Solution Approach 1:

The system enables continuous code coverage testing to occur concurrently with normal GPU rendering operations. The instrumented shader code tracks coverage continuously during execution, eliminating the need for separate dedicated testing phases. This continuous action approach allows comprehensive coverage testing to be performed as part of normal software development and rendering workflows, reducing overall development costs by eliminating idle testing time.

Inventive Principle:
Principle #20Continuity of useful action

Data Source

PatentUS12443512B2Systems and methods for determining code coverage for GPU shader code
Publication Date: 2025.10.14 HONEYWELL INTERNATIONAL INC
  • US12443512B2 patent drawing
  • US12443512B2 patent drawing
  • US12443512B2 patent drawing

AI summary

Systems and methods for determining code coverage for GPU shader code are provided herein. In one example, a method includes adding a flag for each line of shader code to be executed by a GPU. The method further includes creating at least one graphic object to be displayed on a display device for each line of shader code to be executed by the GPU. The method further includes receiving one or more hit files that include a status of one or more attributes of displayed graphic objects on the display device after execution of a requirements-based test. The method further includes generating a structural code coverage report for the shader code based on the one or more hit files and a mapping between the shader code and the displayed graphic objects.