Architecture and instructions for accessing multi-dimensional formatted surface memory
First Claim
1. A method for accessing multi-dimensional formatted surface memory by a program, comprising:
- receiving a surface instruction that specifies an x-coordinate of a sample and a y-coordinate of the sample, wherein the sample is associated with a multi-dimensional formatted surface;
computing an address of a location in the multi-dimensional formatted surface memory based on the x-coordinate, the y-coordinate, and attributes of the multi-dimensional formatted surface, by computing a plurality of address fields included in the address, wherein two or more address fields in the plurality of address fields comprise one or more bits corresponding to the x-coordinate and one or more bits corresponding to the y-coordinate; and
accessing the sample via the address;
wherein;
a first address field in the plurality of address fields identifies a block within the multi-dimensional formatted surface, anda second address field in the plurality of address fields identifies a group of blocks (GOB) within the block.
1 Assignment
0 Petitions
Accused Products
Abstract
One embodiment of the present invention sets forth a technique for a program to access multi-dimensional formatted graphics surface memory. Multi-dimensional memory objects called “surfaces” stored in a user-specified data or pixel format and arranged in a graphics optimized layout are accessed by programs using surface instructions. A set of memory access instructions e.g., load, store, reduce, and atomic, referred to as surface instructions, may be used to access the surfaces. Coordinate bounds checking is performed with configurable clamping. Caching behavior may also be specified by the surface instructions. Data format conversion and packing to a specified storage format is supported for store, reduction, and atomic surface instructions. Data format conversion and unpacking from a specified storage format is supported for loads and atomic surface instructions.
-
Citations
27 Claims
-
1. A method for accessing multi-dimensional formatted surface memory by a program, comprising:
-
receiving a surface instruction that specifies an x-coordinate of a sample and a y-coordinate of the sample, wherein the sample is associated with a multi-dimensional formatted surface; computing an address of a location in the multi-dimensional formatted surface memory based on the x-coordinate, the y-coordinate, and attributes of the multi-dimensional formatted surface, by computing a plurality of address fields included in the address, wherein two or more address fields in the plurality of address fields comprise one or more bits corresponding to the x-coordinate and one or more bits corresponding to the y-coordinate; and accessing the sample via the address; wherein; a first address field in the plurality of address fields identifies a block within the multi-dimensional formatted surface, and a second address field in the plurality of address fields identifies a group of blocks (GOB) within the block. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)
-
-
19. A non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor executing a program to access a multi-dimensional formatted surface memory, by performing the steps of:
-
receiving a surface instruction that specifies an x-coordinate of a sample and a y-coordinate of the sample, wherein the sample is associated with a multi-dimensional formatted surface; computing an address of a location in the multi-dimensional formatted surface memory based on the x-coordinate, the y-coordinate, and attributes of the multi-dimensional formatted surface, by computing a plurality of address fields included in the address, wherein two or more address fields in the plurality of address fields comprise one or more bits corresponding to the x-coordinate and one or more bits corresponding to the y-coordinate; and accessing the sample via the address; wherein; a first address field in the plurality of address fields identifies a block within the multi-dimensional formatted surface, and a second address field in the plurality of address fields identifies a group of blocks (GOB) within the block. - View Dependent Claims (20, 21, 22, 23, 24)
-
-
25. A system comprising:
-
a multi-dimensional formatted surface memory; and a parallel thread processor coupled to the multi-dimensional formatted surface memory and configured to; receive a surface instruction that specifies an x-coordinate of a sample and a y-coordinate of the sample, wherein the sample is associated with a multi-dimensional formatted surface; compute an address of a location in the multi-dimensional formatted surface memory based on the x-coordinate, the y-coordinate, and attributes of the multi-dimensional formatted surface, by computing a plurality of address fields included in the address, wherein two or more address fields in the plurality of address fields comprise one or more bits corresponding to the x-coordinate and one or more bits corresponding to the y-coordinate; and access the sample via the address; wherein; a first address field in the plurality of address fields identifies a block within the multi-dimensional formatted surface, and a second address field in the plurality of address fields identifies a group of blocks (GOB) within the block. - View Dependent Claims (26)
-
-
27. A method for accessing multi-dimensional formatted surface memory by a program, comprising:
-
receiving a surface instruction that specifies an x-coordinate of a sample and a y-coordinate of the sample, wherein the sample is associated with a multidimensional formatted surface; computing an address of a location in the multi-dimensional formatted surface memory based on the x-coordinate, the y-coordinate, and attributes of the multi-dimensional formatted surface, by computing a plurality of address fields included in the address, wherein two or more address fields in the plurality of address fields comprise one or more bits corresponding to the x-coordinate and one or more bits corresponding to the y-coordinate; and
accessing the sample via the address;wherein; a first address field in the plurality of address fields identifies a block within the multi-dimensional formatted surface and is computed based on a first bit corresponding to the x-coordinate and a first bit corresponding to the y-coordinate, a second address field in the plurality of address fields identifies a group of blocks (GOB) within the block and is computed based on a second bit corresponding to the x-coordinate and a second bit corresponding to the y-coordinate, a third address field in the plurality of address fields identifies a cache line in the GOB and is computed based on a third bit corresponding to the x-coordinate and a third bit corresponding to the y-coordinate, a fourth address field in the plurality of address fields identifies a sector in the cache line and is computed based on a fourth bit corresponding to the x-coordinate and a fourth bit corresponding to the y-coordinate, and a fifth address field in the plurality of address fields identifies a byte in the sector and is computed based on a fifth bit corresponding to the x-coordinate and a fifth bit corresponding to the y-coordinate.
-
Specification