Data Processing Method and Related Apparatus
AssigneeHuawei Technologies Co., Ltd.
InventorsJing Ren, Deyou Kong
Life of this patent
Estimating the term…
Abstract
A data processing method includes a graphics processing unit (GPU) obtaining rendering data that is sent by a central processing unit (CPU) and that includes a plurality of pieces of attribute data. The GPU stores the plurality of pieces of attribute data into continuous storage space, for example, stores the plurality of pieces of attribute data into the continuous storage space in a form of an array. Then, the GPU directly determines an address of target attribute data in the continuous storage space based on an attribute selector to obtain the target attribute data.
Claims20
A data processing method implemented by a graphics processing unit (GPU), wherein the data processing method comprises:
- obtaining, from a central processing unit (CPU), rendering data, wherein the rendering data comprises a plurality of pieces of first attribute data, and wherein all of the plurality have a same attribute type;
- arranging the plurality into a continuous storage space;
- obtaining an attribute selector corresponding to a to-be-rendered material, wherein the attribute selector is for selecting second attribute data for rendering the to-be-rendered material;
- determining, based on the attribute selector, an address of target attribute data in the continuous storage space, wherein the target attribute data is for rendering the to-be-rendered material;
- and
- obtaining, based on the address, the target attribute data from the continuous storage space.
An electronic device, comprising:
- a central processing unit (CPU);
- and
- a graphics processing unit (GPU) coupled to the CPU and configured to:
- obtain, from the CPU, rendering data, wherein the rendering data comprises a plurality of pieces of first attribute data, and wherein all of the plurality have a same attribute type;
- arrange the plurality into continuous storage space;
- obtain an attribute selector corresponding to a to-be-rendered material, wherein the attribute selector is for selecting second attribute data for rendering the to-be-rendered material;
- determine, based on the attribute selector, an address of target attribute data in the continuous storage space, wherein the target attribute data is for rendering the to-be-rendered material;
- and
- obtain, based on the address, the target attribute data from the continuous storage space.
A computer program product comprising instructions stored on a non-transitory computer-readable medium that, when execute by one or more processors, cause a graphics processing unit (GPU) to:
- obtain, from a central processing unit (CPU), rendering data, wherein the rendering data comprises a plurality of pieces of first attribute data, and wherein all of the plurality have a same attribute type;
- arrange the plurality into continuous storage space;
- obtain an attribute selector corresponding to a to-be-rendered material, wherein the attribute selector is for selecting second attribute data for rendering the to-be-rendered material;
- determine, based on the attribute selector, an address of target attribute data in the continuous storage space, wherein the target attribute data is for rendering the to-be-rendered material;
- and
- obtain, based on the address, the target attribute data from the continuous storage space.
Dependencies are inferred from the claim text.