Method for executing graphics Z-compare and pixel merge instructions in a data processor
First Claim
1. In a data processing system, comprising:
- storage means for storing a plurality of data elements and a plurality of instructions, said plurality of data elements comprising data operands for use with said plurality of instructions;
execution means for executing a selected type of graphics instructions;
communications means coupled to said storage means and said execution means, for providing said selected type of graphics instructions to said execution means, said communications means transferring said plurality of data elements between said storage means and said execution means; and
sequencer means coupled to said communications means for providing a sequence of instruction addresses to said storage means, for retrieving a sequence of instructions for execution by said execution means in response thereto, and for issuing said sequence of instructions to said execution means, said sequencer means also retrieving a required number of data elements from said storage means for each instruction in said sequence of instructions;
a method for executing a graphics pixel compare instruction to determine whether to display a pixel of a three-dimensional image, comprising the steps of;
transferring under direction by said sequencer means, a selected number of data operands to said execution means each of said selected data operands comprising one or more values representing a predetermined number of Z-axis coordinates, each of said pixel of said three-dimensional image in an X, Y, and Z Cartesian coordinate system;
comparing, via said execution means, one or more Z-axis coordinates within a first data operand to one or more z-axis coordinates in a corresponding bit-field position within a second data operand to determine a relative Z-axis position of each of the one or more pixels associated with said one or more Z-axis coordinates;
encoding, via said execution means, a pixel compare result bit-vector to uniquely represent possible results of comparing each of said corresponding bit-field positions comprising said one or more Z-axis coordinates in each of said first and second operands, said encoding of said pixel compare result bit-vector being designed such that a predefined set of most likely compare results are readily detectable using a single bit test; and
storing, under direction of said execution means, said pixel compare result bit-vector in said storage means, and using said pixel compare result bit-vector to determine which pixels of said three-dimensional image to display.
10 Assignments
0 Petitions
Accused Products
Abstract
A method for performing graphics Z-compare and pixel merge operations, for use in a Z-buffering system to remove hidden surfaces when displaying a three-dimensional image, is provided. The data processing system includes a main memory for storing data and instructions, and a graphics execution unit for executing graphics instructions. The graphics execution units are connected to an instruction sequencer, which provides instructions and data operands to the execution units, via a communications bus. In response to receiving Z-compare and pixel merge instructions, the graphics execution unit compares one or more Z-axis coordinates within a first data operand to one or more Z-axis coordinates in a corresponding bit-field position within a second data operand to determine a relative Z-axis position of each of the one or more pixels associated with the one or more Z-axis coordinates. A pixel compare result bit-vector uniquely representing the possible results of comparing each of the corresponding bit-field positions is stored in a register. Utilizing the pixel compare result vector, the graphics execution unit executes a pixel merge instruction, to selectively store the pixels in an image buffer.
-
Citations
7 Claims
-
1. In a data processing system, comprising:
-
storage means for storing a plurality of data elements and a plurality of instructions, said plurality of data elements comprising data operands for use with said plurality of instructions; execution means for executing a selected type of graphics instructions; communications means coupled to said storage means and said execution means, for providing said selected type of graphics instructions to said execution means, said communications means transferring said plurality of data elements between said storage means and said execution means; and sequencer means coupled to said communications means for providing a sequence of instruction addresses to said storage means, for retrieving a sequence of instructions for execution by said execution means in response thereto, and for issuing said sequence of instructions to said execution means, said sequencer means also retrieving a required number of data elements from said storage means for each instruction in said sequence of instructions; a method for executing a graphics pixel compare instruction to determine whether to display a pixel of a three-dimensional image, comprising the steps of; transferring under direction by said sequencer means, a selected number of data operands to said execution means each of said selected data operands comprising one or more values representing a predetermined number of Z-axis coordinates, each of said pixel of said three-dimensional image in an X, Y, and Z Cartesian coordinate system; comparing, via said execution means, one or more Z-axis coordinates within a first data operand to one or more z-axis coordinates in a corresponding bit-field position within a second data operand to determine a relative Z-axis position of each of the one or more pixels associated with said one or more Z-axis coordinates; encoding, via said execution means, a pixel compare result bit-vector to uniquely represent possible results of comparing each of said corresponding bit-field positions comprising said one or more Z-axis coordinates in each of said first and second operands, said encoding of said pixel compare result bit-vector being designed such that a predefined set of most likely compare results are readily detectable using a single bit test; and storing, under direction of said execution means, said pixel compare result bit-vector in said storage means, and using said pixel compare result bit-vector to determine which pixels of said three-dimensional image to display. - View Dependent Claims (2)
-
-
3. In a data processing system, comprising:
-
storage means for storing a plurality of data elements and a plurality of instructions, said plurality of data elements comprising data operands for use with said plurality of instructions; execution means for executing a selected type of graphics instructions; communications means coupled to said storage means and said execution means, for providing said selected type of graphics instructions to said execution means, said communications means transferring said plurality of data elements between said storage means and said execution means; and sequencer means coupled to said communication means for providing a sequence of instruction addresses to said storage means, for retrieving a sequence of instructions for execution by said execution means in response thereto, and for issuing said sequence of instructions to said execution means, said sequencer means also retrieving a required number of data elements from said storage means for each instruction in said sequence of instructions; a method for executing a graphics pixel compare instruction to determine whether to display a pixel of a three-dimensional image, comprising the steps of; transferring, under direction by said sequencer means, a selected number of data operands to said execution means each of said selected data operands comprising one or more values representing a predetermined number of Z-axis coordinates, each of said predetermined number of Z-axis coordinates being associated with one pixel of said three-dimensional image in an X, Y, and Z Cartesian coordinate system; comparing, via said execution means, one or more Z-axis coordinates within a first data operand to one or more Z-axis coordinates in a corresponding bit-field position within a second data operand to determine a relative Z-axis position of each of the one or more pixels associated with said one or more Z-axis coordinates; encoding, via said execution means, a pixel compare result bit-vector to uniquely represent possible results of comparing each of said corresponding bit-field positions comprising said one or more Z-axis coordinates in each of said first and second operands, said result bit-vector encoding being suitable for use as a branch offset into a table of instructions defining subsequent operations to be performed by said execution means based upon a result of each comparison; and storing, under direction of said execution means, said pixel compare result bit-vector in said storage means, and using said pixel compare result bit-vector to determine which pixels of said three-dimensional image to display. - View Dependent Claims (4)
-
-
5. In a data processing system, comprising:
-
storage means for storing a plurality of data elements and a plurality of instructions, said plurality of data elements comprising data operands for use with said plurality of instructions; execution means for executing a selected type of graphics instructions; communications means coupled to said storage means and said execution units, for providing said selected type of graphics instructions to said execution means, said communications means transferring said plurality of data elements between said storage means and said execution means; and sequencer means coupled to said communications means for providing a sequence of instruction addresses to said storage means, for retrieving a sequence of instructions for execution by said execution means in response thereto, and for issuing said sequence of instructions to said execution means, said sequencer means also retrieving a required number of data elements from said storage means for each instruction in said sequence of instructions; a method for executing a graphics pixel compare and merge instruction to determine whether to display a pixel of a three-dimensional image, comprising the steps of; transferring, under direction by said sequencer means, a selected number of data operands to said execution means each of said selected data operands comprising one or more values representing a predetermined number of Z-axis coordinates, each of said predetermined number of Z-axis coordinates being associated with one pixel of said three-dimensional image in an X, Y, and Z Cartesian coordinate system; comparing, via said execution means, one or more Z-axis coordinates within a first data operand to one or more Z-axis coordinates in a corresponding bit-field position within a second data operand to generate a comparison result representing a relative Z-axis position of each of the one or more pixels associated with said one or more Z-axis coordinates; generating, via said execution means, an intermediate value each bit of which corresponds to the result of said comparison between said one or more Z-axis coordinates within a first data operand to one or more Z-axis coordinates in a corresponding bit-field position within said second data operand; and accumulating, via said execution means, said intermediate value with a third data operand to generate a result mask, each bit of said result mask being used, by said execution means, to control the storage in said storage means, of said pixel associated with each respective Z-axis coordinate. - View Dependent Claims (6, 7)
-
Specification