Incremental Shared Constants for Low-Overhead GPU Draw Calls
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing graphics processing unit (GPU) operations based on non-incremental constants result in significant overhead due to the need to copy the entire constant buffer for minor changes, impacting pipeline efficiency and performance.
Innovation Solution
Implementing shared constants that are configured to appear as context registers, allowing incremental loading and mapping to the constant memory, with a shader preamble executed before each draw call to copy shared constants on an as-needed basis, reducing the need for full buffer copies.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If constants are defined in a parent package for use by child packages, then code reuse and consistency are improved, but the parent package cannot be independently imported without triggering circular import errors
Solution Approach 1:
The patent segments the constants from the parent package by creating a separate constants package that child packages can import independently. This allows constants to be reused across multiple child packages without requiring imports from the parent package, thereby eliminating circular import errors while maintaining code reuse and consistency.
2Ease of operation
If constants are moved to a separate constants package, then independent import by child packages is enabled, but the coupling between parent and child packages is reduced
Solution Approach 1:
The patent creates a universal constants package that serves multiple child packages simultaneously. This constants package acts as a shared resource that can be imported by any child package independently, providing multi-functionality and reducing the need for each child package to have its own constants definition, thereby simplifying the overall package structure.
3Stability of the object's composition
If a parent package defines constants that child packages must import, then consistency across packages is maintained, but adding new constants requires modifying the parent package and all child packages
Solution Approach 1:
The patent extracts constants from the parent package into a separate, dedicated constants package. This extraction allows constants to be maintained in a single location that can be independently updated. When new constants need to be added or existing ones modified, changes are made only in the constants package, and all child packages automatically benefit from the updates without requiring modifications to the parent package.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
This disclosure provides systems, devices, apparatus, and methods, including computer programs encoded on storage media, for fast incremental shared constants. In aspects, a CPU may determine/update shared constant data for a first draw call of a plurality of draw calls. The shared constant data, which may correspond to at least one shader, may be updated based on a draw call update for the first draw call. The CPU may communicate the updated shared constant data for the first draw call to a GPU. The GPU may receive, in at least one register, the updated shared constant data from the CPU and configure the at least one register based on the updated shared constant data corresponding to the draw call update of the first draw call of the plurality of draw calls.