JPH09212681A - Graphic drawing processor and graphic processing system - Google Patents

Graphic drawing processor and graphic processing system

Info

Publication number
JPH09212681A
JPH09212681A JP8016804A JP1680496A JPH09212681A JP H09212681 A JPH09212681 A JP H09212681A JP 8016804 A JP8016804 A JP 8016804A JP 1680496 A JP1680496 A JP 1680496A JP H09212681 A JPH09212681 A JP H09212681A
Authority
JP
Japan
Prior art keywords
data
buffer memory
pixel
frame
priority bit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP8016804A
Other languages
Japanese (ja)
Other versions
JP3233566B2 (en
Inventor
Yasuharu Takenaka
中 康 晴 竹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP01680496A priority Critical patent/JP3233566B2/en
Publication of JPH09212681A publication Critical patent/JPH09212681A/en
Application granted granted Critical
Publication of JP3233566B2 publication Critical patent/JP3233566B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

PROBLEM TO BE SOLVED: To increase the working speeds of the front-to-back processing of a Z zone system, the processing of a Z buffering system, etc., by deciding whether an image is drawn or not based on the priority bit value of a set operation mode and also on the comparison result of a Z data comparison means. SOLUTION: A graphic drawing processor 10 is provided with a generator 11, a Z comparator 12, a priority bit management device 13, a Z buffer memory controller 14 and a frame buffer memory controller 15. The generator 11 generates and outputs the (xy) coordinate of every pixel existing on a two-dimensional projection screen, the Z data showing the depth of every pixel, and the frame data showing the color to paint out every pixel. The comparator 12 compares the Z data which are already drawn and stored in a Z buffer memory 16 and given via the controller 14 with the Z data which are generated by the generator 11 to be newly drawn for every pixel in the same frame. Then the comparator 12 outputs its comparison result.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、3次元空間で定義
されていた多角形を2次元投影面上に投影した図形を描
くための図形描画プロセッサ、及びこのプロセッサを用
いた図形処理システムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a graphic drawing processor for drawing a graphic in which a polygon defined in a three-dimensional space is projected on a two-dimensional projection plane, and a graphic processing system using this processor.

【0002】[0002]

【従来の技術】図形描画プロセッサは、3次元空間で定
義されていた多角形を2次元投影面上に投影した結果得
られた頂点座標を用いて、この投影面上における画素を
塗りつぶすという描画処理を行うものである。
2. Description of the Related Art A graphic drawing processor uses a vertex coordinate obtained as a result of projecting a polygon defined in a three-dimensional space onto a two-dimensional projection surface to draw pixels on the projection surface. Is to do.

【0003】ここで、画素単位で塗りつぶすという処理
は、基本的には2次元処理である。しかし、投影面上で
多角形の重なりがある場合、最も手前にある図形が最終
的に残り、それよりも奥にある図形は描画されないよう
にする必要がある。このような処理を実現する方式とし
て、一般にはZソートとZバッファリングとがある。
Here, the process of painting in pixel units is basically a two-dimensional process. However, when polygons are overlapped on the projection surface, it is necessary to prevent the figure in the foreground from remaining and the figure in the back to be drawn. Generally, there are Z sort and Z buffering as methods for realizing such processing.

【0004】Zソートとは、描画処理を開始する前に、
奥行きを示すZデータに基づいて、各々の多角形を描画
する順番を予め決めておくというものである。そして、
Zソートにも、最も奥にある図形から手前の図形に順に
描画するバックトウフロントと、この逆に最も手前の図
形から描画していくというフロントトウバックとがあ
る。
Z-sort means that before the drawing process is started,
The order of drawing each polygon is determined in advance based on the Z data indicating the depth. And
Z-sort also includes a back toe front that sequentially draws from the furthest figure to the foreground figure, and conversely, a front toe back that draws from the foremost figure.

【0005】Zバッファリングとは、各々の画素毎のZ
データを格納するZバッファメモリを用意しておき、描
画時において、画素毎にメモリに格納されたZデータ
と、今回のサイクルで描画しようとしているZデータと
を比較し、今回描画しようとしているものの方が手前に
ある場合に描画を行うという方式である。
Z buffering means Z for each pixel.
A Z buffer memory for storing data is prepared, and at the time of drawing, the Z data stored in the memory for each pixel is compared with the Z data to be drawn in this cycle, and This is a method in which drawing is performed when one is in front.

【0006】[0006]

【発明が解決しようとする課題】しかし、従来の図形描
画プロセッサにより描画を行う場合に次のような問題が
あった。近年では高速で描画することが要求されるが、
所定の時間内に1フレームを構成する多角形の全てを描
画しきれない場合には、描画の順番が最後の図形は描き
きれずに次のフレームへ移行しなければならない。
However, there are the following problems when performing drawing by the conventional graphic drawing processor. In recent years, high-speed drawing is required,
If all the polygons that form one frame cannot be drawn within a predetermined time, the last figure in the drawing order cannot be drawn, and the next frame must be moved to.

【0007】上記Zソートにより複数の多角形の描画順
を予め設定している場合、奥から手前へ描画するバック
トウフロント方式では手前にある図形が描けずに欠ける
ことになる。逆に、手前から奥の図形を描画するフロン
トトウバック方式では、奥の図形が欠けることになる。
When the drawing order of a plurality of polygons is set in advance by the Z sort, the back toe front method of drawing from the back to the front cannot draw the figure in the front because it cannot be drawn. On the contrary, in the front-to-back method of drawing the figure from the front to the back, the figure in the back is missing.

【0008】通常は、奥にある図形よりも手前にある図
形の方が重要度が高い場合が多い。よって、手前の図形
が欠けるよりは奥の図形が欠ける方が望ましい。この点
で、フロントトウバック方式の方が有利である。
Usually, a figure in the foreground is more important than a figure in the back. Therefore, it is preferable that the figure in the back is missing rather than the figure in the foreground. In this respect, the front toeback system is more advantageous.

【0009】さらに、多くの多角形が重なっていたよう
な場合、バックトウフロントト方式では、重なった部分
は先に描画した図形の上に手前の図形を重ねて描くこと
になり、同じ画素に対して描画を複数回行なわなければ
ならない。一方、フロントトウバック方式では、先に描
いた手前の図形の奥に他の図形を描画する場合、重なる
部分は描画しない。よって、フロントトウバック方式の
方がバックトウフロント方式よりもフレームバッファへ
のアクセスが少なく、この点においてもフロントトウバ
ック方式の方が有利である。
Further, when many polygons are overlapped, in the back-to-front method, the overlapped part is drawn by drawing the foreground figure on top of the previously drawn figure, and the same pixel is drawn. On the other hand, drawing must be performed multiple times. On the other hand, in the front-to-back method, when another figure is drawn behind the figure drawn in front, the overlapping portion is not drawn. Therefore, the front-to-back method has less access to the frame buffer than the back-to-front method, and the front-to-back method is also advantageous in this respect.

【0010】ところが、フロントトウバック方式では、
各々の画素毎に既に描画されているか否かを判断しなけ
ればならず、このための手段を必要とする。一般には、
画素毎に既に描画されたか否かを示す1ビットのデータ
(以下、プライオリティビットという)を設定し、この
プライオリティビットを画素毎に用いて描画するか否か
を判断する。しかし、従来はこのような処理を行う効率
が悪く、処理速度の低下を招いていた。
However, in the front toeback system,
It has to be determined for each pixel whether or not it has already been drawn, which requires means for this. Generally,
1-bit data (hereinafter referred to as priority bit) indicating whether or not the pixel has already been drawn is set, and it is determined whether or not to draw by using this priority bit for each pixel. However, in the past, the efficiency of performing such processing was poor and the processing speed was lowered.

【0011】また、Zバッファリング方式により描画を
行う場合は、画素毎にZデータをバッファメモリから読
み出したり書き込む処理が必要となる。この処理のため
に従来はやはり処理速度の低下を招いていた。さらに、
1フレーム分の描画を行う毎に、前回のフレームのZデ
ータが残存していないようにZバッファメモリを初期化
する必要がある。Zデータは一般に、1画素当たり8ビ
ット、16ビット、32ビット、…、というように多く
のメモリ領域を必要とし、フレーム毎に初期化するには
多くの時間を消費していた。このように、Zバッファリ
ング方式ではZソート方式よりも、図形描画プロセッサ
とフレームバッファメモリとの間のデータアクセスが多
く、バスネックを招いていた。
Further, when drawing is performed by the Z buffering method, it is necessary to read or write Z data from the buffer memory for each pixel. Conventionally, this processing has caused a decrease in processing speed. further,
Each time one frame is drawn, it is necessary to initialize the Z buffer memory so that the Z data of the previous frame does not remain. Z data generally requires a large memory area such as 8 bits, 16 bits, 32 bits per pixel, and so much time is consumed to initialize each frame. As described above, the Z buffering method requires more data access between the graphic drawing processor and the frame buffer memory than the Z sort method, which causes a bus neck.

【0012】本発明は上記事情に鑑みてなされたもの
で、同一の構成により、Zソート方式によるフロントト
ウバック処理と、Zバッファリング方式による処理とを
選択していずれも高速に行い、さらにステンシルチェッ
ク処理、部分的Zバッファリング処理、フレームバッフ
ァのクリア処理の高速化を実現することが可能な図形描
画プロセッサ、及びこのプロセッサを用いた図形処理シ
ステムを提供することを目的とする。
The present invention has been made in view of the above circumstances. With the same configuration, the front toeback processing by the Z sort method and the processing by the Z buffering method are both selected and performed at high speed, and further, the stencil is used. An object of the present invention is to provide a graphic drawing processor capable of realizing high-speed check processing, partial Z buffering processing, and frame buffer clearing processing, and a graphic processing system using this processor.

【0013】[0013]

【課題を解決するための手段】本発明による図形描画プ
ロセッサは、図形の頂点座標を与えられて画素毎に座標
と、奥行きを示すZデータと、フレームデータとを各々
の画素毎に生成する生成手段と、前記Zデータを与えら
れて格納するZバッファメモリへの書き込み及び読み出
しを制御するZバッファメモリ制御手段と、前記フレー
ムデータと、各々の画素毎に設定されたプライオリティ
ビットとを対応付けて格納するフレームバッファメモリ
への書き込み及び読み出しを制御するフレームバッファ
メモリ制御手段と、前記Zバッファメモリに格納されて
おり、前記Zバッファメモリ制御手段により読み出され
たZデータと、前記生成手段により生成されたZデータ
とを与えられて比較し、比較結果を出力するZ比較手段
と、第1、第2、第3の動作モードのうち、いずれかを
設定するモード設定手段を有し、設定された動作モード
に従って前記Z比較手段、Zバッファメモリ制御手段、
フレームバッファメモリ制御手段を制御するプライオリ
ティビット管理手段であって、前記第1の動作モードが
設定されているときは、各々の画素に対応するプライオ
リティビットが第1の値である場合、前記生成器が生成
したフレームデータを前記フレームバッファメモリ制御
手段が前記フレームバッファメモリに書き込むことでこ
の画素を描画し、前記プライオリティビットが第2の値
である場合は描画せず、前記第2の動作モードが設定さ
れているときは、各々の画素に対応するプライオリティ
ビットが前記第1の値である場合、対応する画素に関す
る前記Zデータ比較手段の比較結果にかかわらず、前記
生成器が生成したフレームデータを前記フレームバッフ
ァメモリ制御手段が前記フレームバッファメモリに書き
込むことでこの画素を描画し、対応する前記プライオリ
ティビットが前記第2の値である場合、前記Zデータ比
較手段の比較結果に応じてこの画素を描画するか否かを
判断し、前記第3の動作モードが設定されているとき
は、各々の画素に対応するプライオリティビットが前記
第2の値である場合、対応する画素に関する前記Zデー
タ比較手段の比較結果にかかわらずこの画素を描画せ
ず、対応するプライオリティビットが前記第1の値であ
る場合、前記Zデータ比較手段の比較結果に応じてこの
画素を描画するか否かを判断する、前記プライオリティ
ビット管理手段とを備えたことを特徴としている。
A graphic drawing processor according to the present invention generates a coordinate for each pixel, Z data indicating depth, and frame data for each pixel given the vertex coordinates of the graphic. Means, Z buffer memory control means for controlling writing and reading to and from the Z buffer memory for receiving and storing the Z data, the frame data, and priority bits set for each pixel in association with each other. Frame buffer memory control means for controlling writing and reading to and from the frame buffer memory to be stored, Z data stored in the Z buffer memory and read by the Z buffer memory control means, and generated by the generating means Z comparison means for receiving and comparing the generated Z data and outputting a comparison result; Of the three modes of operation, has a mode setting means for setting either said Z comparison means in accordance with the set operation mode, Z buffer memory control means,
Priority bit management means for controlling the frame buffer memory control means, wherein when the first operation mode is set, the priority bit corresponding to each pixel has a first value, the generator The frame buffer memory control means writes the frame data generated by the frame buffer memory to draw this pixel, and when the priority bit has a second value, the pixel is not drawn, and the second operation mode is When set, when the priority bit corresponding to each pixel is the first value, the frame data generated by the generator is irrelevant regardless of the comparison result of the Z data comparison means regarding the corresponding pixel. This frame buffer memory control unit writes this image by writing in the frame buffer memory. And the corresponding priority bit is the second value, it is determined whether or not this pixel is drawn according to the comparison result of the Z data comparison means, and the third operation mode is set. If the priority bit corresponding to each pixel is the second value, the pixel is not drawn regardless of the comparison result of the Z data comparison means for the corresponding pixel, and the corresponding priority bit Is the first value, the priority bit management means is provided for determining whether or not to draw this pixel according to the comparison result of the Z data comparison means.

【0014】本発明の図形処理システムは、上記図形描
画プロセッサと、図形の頂点座標を出力する座標出力装
置と、Zデータを与えられて格納するZバッファメモリ
と、フレームデータと、各々の画素毎に設定されたプラ
イオリティビットとを対応付けて格納するフレームバッ
ファメモリとを備えている。
A graphic processing system of the present invention comprises the above graphic drawing processor, a coordinate output device for outputting the vertex coordinates of a graphic, a Z buffer memory for receiving Z data and storing the same, frame data, and each pixel. And a frame buffer memory for storing the priority bit set in the above in association with each other.

【0015】前記フレームバッファメモリは、フレーム
データと、各々のフレームデータに対応するプライオリ
ティデータとを関連付けた位置関係で格納するものであ
ってもよい。
The frame buffer memory may store the frame data and the priority data corresponding to each frame data in a positional relation associated with each other.

【0016】また、前記プライオリティビット管理手段
はさらに、前記フレームバッファメモリから前記フレー
ムバッファメモリ制御手段を介して読み出されたフレー
ムデータを与えられて保持する表示データバッファと、
所定のカラーを示すカラーデータを保持するカラーレジ
スタと、前記表示データバッファから読み出されたフレ
ームデータを表示のために出力するとき、対応するプラ
イオリティビットが前記第1の値である場合は、前記フ
レームデータに替えて前記カラーレジスタに保持された
前記カラーデータを出力し、対応するプライオリティビ
ットが前記第2の値である場合は前記フレームデータを
出力するセレクタとを有してもよい。
Further, the priority bit management means further includes a display data buffer for receiving and holding frame data read from the frame buffer memory via the frame buffer memory control means,
When outputting the frame data read from the display data buffer for display, the color register holding color data indicating a predetermined color, when the corresponding priority bit is the first value, the A selector that outputs the color data held in the color register instead of the frame data and outputs the frame data when the corresponding priority bit has the second value may be provided.

【0017】ここで、プライオリティビットは、フレー
ムバッファメモリの替わりにZバッファメモリに格納さ
れ、Zバッファメモリ制御手段により書き込み及び読み
出しが制御されてもよい。
Here, the priority bit may be stored in the Z buffer memory instead of the frame buffer memory, and the writing and reading may be controlled by the Z buffer memory control means.

【0018】あるいは、フレームデータ、Zデータ、及
びプライオリティビットは同じバッファメモリに格納さ
れ、バッファメモリ制御手段により書き込み及び読み出
しが制御されてもよい。
Alternatively, the frame data, the Z data, and the priority bit may be stored in the same buffer memory, and writing and reading may be controlled by the buffer memory control means.

【0019】[0019]

【発明の実施の形態】以下、本発明の一実施の形態につ
いて図面を参照して説明を行う。
BEST MODE FOR CARRYING OUT THE INVENTION An embodiment of the present invention will be described below with reference to the drawings.

【0020】図1に、第1の実施の形態による図形描画
プロセッサ10と、図形描画プロセッサ10がアクセス
するZバッファメモリ16及びフレームバッファメモリ
17を配置した構成を示す。
FIG. 1 shows a configuration in which a graphic drawing processor 10 according to the first embodiment and a Z buffer memory 16 and a frame buffer memory 17 accessed by the graphic drawing processor 10 are arranged.

【0021】図形描画プロセッサ10は、生成器11、
Z比較器12、プライオリティビット管理器13、Zバ
ッファメモリ制御器14、及びフレームバッファメモリ
制御器15を備えている。生成器11は、図示されてい
ないCPUやDSP(digitalsignal processor)等の装
置から各図形毎に頂点座標を与えられて、線形補間法等
を用いて2次元投影面上の各画素毎のxy座標と、各画
素の奥行きを示すZデータと、各画素を塗りつぶす色を
示すフレームデータとを生成して出力する。
The graphic drawing processor 10 includes a generator 11,
A Z comparator 12, a priority bit manager 13, a Z buffer memory controller 14, and a frame buffer memory controller 15 are provided. The generator 11 is given vertice coordinates for each figure from a device such as a CPU or DSP (digital signal processor) not shown, and uses a linear interpolation method or the like to obtain xy coordinates for each pixel on a two-dimensional projection plane. And Z data indicating the depth of each pixel and frame data indicating the color for filling each pixel are generated and output.

【0022】Zバッファメモリ制御器14は、Zデータ
を与えられて格納するZバッファメモリ16への書き込
み(描画)及び読み出し(表示)を制御する。
The Z buffer memory controller 14 controls writing (drawing) and reading (displaying) to the Z buffer memory 16 which receives and stores Z data.

【0023】フレームバッファメモリ17はダブルバッ
ファ構成であり、図形描画プロセッサ11からフレーム
データを与えられて書き込まれる描画用バッファメモリ
と、描画されたフレームデータを表示用に読み出して、
図示されていないDAC(digital analog convertor)
を介して表示パネル装置に与える表示用バッファメモリ
とを、それぞれ1フレーム分備え、フレーム毎に描画用
と表示用とが切り替わるように構成されている。さらに
本実施の形態では、各々の画素毎に既に描画がなされた
か否かを示すためのプライオリティビットを、フレーム
バッファメモリ17が各々の画素のフレームデータに対
応付けた状態で格納している。
The frame buffer memory 17 has a double buffer structure. The drawing buffer memory is written with the frame data given from the graphic drawing processor 11, and the drawn frame data is read out for display.
DAC (digital analog converter) not shown
A display buffer memory provided to the display panel device via one is provided for each frame, and the display and the display are switched for each frame. Further, in the present embodiment, the priority bit for indicating whether or not drawing has already been performed for each pixel is stored in the frame buffer memory 17 in a state of being associated with the frame data of each pixel.

【0024】具体的には、図5に示されたように、描画
用又は表示用に、それぞれ1フレーム分のフレームデー
タを格納するプレーン71、72が設けられ、それぞれ
のプレーン71、72に対応してプライオリティビット
用のプレーン73、74が設けられている。
Specifically, as shown in FIG. 5, planes 71 and 72 for storing one frame of frame data are provided for drawing or display, and the planes 71 and 72 correspond to the planes 71 and 72, respectively. Then, planes 73 and 74 for priority bits are provided.

【0025】そして、同一ページにある画素集合に対す
るプライオリティビットは、連続した領域に格納され
る。また、プライオリティビットは、同一のページ内の
フレームデータと関連付けられた位置関係になるように
格納される。
The priority bits for the pixel sets on the same page are stored in consecutive areas. Further, the priority bits are stored so as to have a positional relationship associated with the frame data in the same page.

【0026】フレームバッファメモリ制御器15は、こ
のようなフレームバッファメモリ17に対するフレーム
データ及びプライオリティビットの書き込みと読み出し
を制御する。
The frame buffer memory controller 15 controls the writing and reading of the frame data and the priority bit with respect to the frame buffer memory 17.

【0027】Z比較器12は、同一フレームにおいて、
Zバッファメモリ16に既に描画済みで格納されており
Zバッファメモリ制御器14を介して与えられたZデー
タと、これから新たに描画するために生成器11から生
成されて与えられたZデータとを各画素毎に与えられて
比較しその結果を出力する。
In the same frame, the Z comparator 12
The Z data already drawn and stored in the Z buffer memory 16 and given through the Z buffer memory controller 14 and the Z data generated and given by the generator 11 for new drawing from now on are given. It is given for each pixel and compared, and the result is output.

【0028】プライオリティビット管理器13は、動作
モードを予め設定され、設定されたモードに応じてZ比
較器12、Zバッファメモリ制御器14、フレームバッ
ファメモリ制御器15の動作を制御するためのフラグを
出力すると共に、フレームバッファメモリ17に格納さ
れフレームバッファメモリ制御器15を介して与えられ
たプライオリティビットについて、後述するようなチェ
ック及び管理を行う。
The priority bit manager 13 has a preset operation mode, and a flag for controlling the operations of the Z comparator 12, the Z buffer memory controller 14, and the frame buffer memory controller 15 according to the set mode. And the priority bit stored in the frame buffer memory 17 and given via the frame buffer memory controller 15 is checked and managed as described later.

【0029】プライオリティビット管理器13は、図2
に示されるように、モードレジスタ21、フラグ生成器
22、プライオリティビットバッファ23を有してい
る。
The priority bit manager 13 is shown in FIG.
As shown in FIG. 3, it has a mode register 21, a flag generator 22, and a priority bit buffer 23.

【0030】モードレジスタ21は、プライオリティビ
ットの書き込みを行うか否かを示すプライオリティビッ
トライト(以下、PWという)、プライオリティビット
のチェックを行うか否かを示すプライオリティビットチ
ェック(以下、PCという)、Zデータの比較を行うか
否かを示すZコンパリゾン(以下、ZCという)、プラ
イオリティビットチェックとZ比較との優先度を示すプ
ライオリティZコンパリゾン(以下、PZCという)と
いうモードを示すデータを保持している。このようなモ
ードレジスタ21に、描画を開始する前に予め値が設定
されることで、後述するいずれかの動作モードが選択さ
れる。
The mode register 21 has a priority bit write (hereinafter referred to as PW) indicating whether or not a priority bit is written, a priority bit check (hereinafter referred to as PC) indicating whether or not a priority bit is checked, It holds data indicating a mode called Z-comparison (hereinafter, referred to as ZC) indicating whether to compare Z data, and priority Z-comparison (hereinafter referred to as PZC) indicating priority between priority bit check and Z comparison. There is. A value is set in advance in such a mode register 21 before starting drawing, so that one of the operation modes described later is selected.

【0031】ここで、PWが1の場合には、画素を描画
するたびにプライオリティビットを1にして、プライオ
リティビットの読み出しを行う前に、フレームデータバ
ッファメモリ制御器15がフレームバッファ17に書き
戻す。PWが0の場合には、プライオリティビットは予
め設定された値に固定される。
Here, when PW is 1, the priority bit is set to 1 each time a pixel is drawn, and the frame data buffer memory controller 15 writes back to the frame buffer 17 before reading the priority bit. . When PW is 0, the priority bit is fixed to a preset value.

【0032】さらに、PZCが0の場合は、プライオリ
ティビットのチェックを優先する。プライオリティビッ
トが0の場合は、Z比較の結果にかかわらず、その画素
を描画し、プライオリティビットが1の場合は、Z比較
の結果に応じて画素を描画するか否かを判断する。
Further, when PZC is 0, the priority bit check is prioritized. When the priority bit is 0, the pixel is drawn regardless of the result of the Z comparison, and when the priority bit is 1, it is determined whether or not the pixel is drawn according to the result of the Z comparison.

【0033】逆に、PZCが1の場合はZ比較を優先す
る。プライオリティビットが1の場合は、Z比較の結果
にかかわらずその画素を描画せず、プライオリティビッ
トが0の場合はZ比較の結果に応じて画素の描画を行う
か否かを判断する。
On the contrary, when PZC is 1, Z comparison is prioritized. When the priority bit is 1, the pixel is not drawn regardless of the result of the Z comparison, and when the priority bit is 0, it is determined whether or not the pixel is drawn according to the result of the Z comparison.

【0034】プライオリティビットバッファ23は、フ
レームバッファメモリ制御器15から、後述するよう
に、例えば16ビットをひとまとめにして与えられたプ
ライオリティビットを一時的に保持する。より詳細に
は、生成器11から出力された2次元xy座標で指定さ
れる画素に対応したひとまとめのプライオリティビット
が、プライオリティビットバッファ23に保持される。
The priority bit buffer 23 temporarily holds the priority bits given from the frame buffer memory controller 15 as a group of 16 bits, for example, as will be described later. More specifically, the priority bit buffer 23 holds a group of priority bits corresponding to the pixels designated by the two-dimensional xy coordinates output from the generator 11.

【0035】フラグ生成器22は、モードレジスタ21
のPW、PC、ZC、PZCの値と、プライオリティビ
ットバッファ23から読み出したプライオリティビット
23aを用いて所定の論理動作を行い、Z比較を行うか
否かを示すZ比較フラグ22aをZバッファメモリ制御
器14に出力し、フレームバッファ17のうちの描画バ
ッファにフレームデータを画素毎に書き込むか否かを示
す画素ライトフラグ22bをフレームバッファメモリ制
御器15に出力する。Z比較を行うZ比較フラグ22a
をZ比較器12に出力したときは、Z比較器12から出
力されたZ比較結果12aを受け取る。ここで、動作モ
ードには以下のようなものがある。 1. PC=0、ZC=0の場合、Z比較を行うことな
く、当該画素のフレームデータをフレームバッファメモ
リに書き込む。 2. PC=1、ZC=0の場合、Z比較は行わず、プ
ライオリティビットが0の時に書き込む。 3. PC=0、ZC=1の場合、Z比較を行い、この
比較結果に応じて、書き込むか否かを判断する。 4. PC=1、ZC=1、PZC=0の場合、プライ
オリティビットチェックを優先する。即ち、プライオリ
ティビットが0ならばZ比較を行うことなく画素を書き
込む。 5. PC=1、ZC=1、PZC=1の場合、Z比較
が優先する。Z比較を行って、Zデータが図形の奥行き
が手前にあることを示し、かつプライオリティビットが
0でまだ当該画素は書かれていないことが示されていた
ときにのみ、画素の書き込みを行う。他の場合には、書
き込みは行わない。
The flag generator 22 includes a mode register 21.
PW, PC, ZC, and PZC values and the priority bit 23a read from the priority bit buffer 23 are used to perform a predetermined logical operation, and a Z comparison flag 22a indicating whether or not to perform Z comparison is set in the Z buffer memory control. The pixel write flag 22b, which indicates whether to write the frame data for each pixel in the drawing buffer of the frame buffer 17, is output to the frame buffer memory controller 15. Z comparison flag 22a for Z comparison
Is output to the Z comparator 12, the Z comparison result 12a output from the Z comparator 12 is received. Here, there are the following operation modes. 1. When PC = 0 and ZC = 0, the frame data of the pixel is written in the frame buffer memory without performing Z comparison. 2. When PC = 1 and ZC = 0, Z comparison is not performed and writing is performed when the priority bit is 0. 3. When PC = 0 and ZC = 1, Z comparison is performed, and it is determined whether or not to write according to the comparison result. 4. When PC = 1, ZC = 1 and PZC = 0, priority bit check is given priority. That is, if the priority bit is 0, the pixel is written without performing Z comparison. 5. When PC = 1, ZC = 1, PZC = 1, Z comparison has priority. The pixel is written only when the Z comparison indicates that the Z data is in front of the depth of the figure, and the priority bit is 0 indicating that the pixel has not been written yet. In other cases, writing is not performed.

【0036】このような構成を備えた本実施の形態にお
ける動作について、以下に述べる。
The operation of this embodiment having such a configuration will be described below.

【0037】先ず、生成器11に、当該多角形の頂点座
標が与えられ、投影面上の2次元xy座標データと、Z
データとが生成され、またそれぞれの画素を塗りつぶす
べきRGBデータに相当するフレームデータが生成され
て出力される。Z比較器12にZデータ11aが与えら
れ、フレームデータ11bがフレームバッファメモリ制
御器15に出力される。
First, the vertex coordinates of the polygon are given to the generator 11, and the two-dimensional xy coordinate data on the projection plane and Z
Data and the frame data corresponding to the RGB data for filling each pixel are generated and output. The Z data 11a is given to the Z comparator 12, and the frame data 11b is output to the frame buffer memory controller 15.

【0038】プライオリティビット管理器13は、プラ
イオリティビットの読み出し要求を、フレームバッファ
メモリ制御器15に与える。フレームバッファメモリ制
御器15は、この要求に基づき、フレームバッファメモ
リ17に格納されているプライオリティビットをある程
度の単位でまとめて読み出してプライオリティビット管
理器13のプライオリティビットバッファ23に与えて
保持させる。ここで、プライオリティビットは画素毎に
1ビットずつのデータとして設定されているが、対応す
る画素毎のそれぞれのフレームデータは、通常8、1
6、32、…、ビットを有している。そこで、例えば、
フレームデータが16ビットであるとすると、x方向に
連続した16画素分のプライオリティビットをひとまと
めにして読み出し、プライオリティビットレジスタ23
に保持しておく。
The priority bit manager 13 sends a request for reading priority bits to the frame buffer memory controller 15. Based on this request, the frame buffer memory controller 15 collectively reads the priority bits stored in the frame buffer memory 17 in units of a certain amount, gives them to the priority bit buffer 23 of the priority bit manager 13, and holds them. Here, the priority bit is set as 1-bit data for each pixel, but the frame data for each corresponding pixel is normally 8 or 1.
, 32, ..., Bits. So, for example,
Assuming that the frame data has 16 bits, priority bits for 16 pixels consecutive in the x direction are collectively read out and stored in the priority bit register 23.
To be kept.

【0039】モードレジスタ21のPWが1の場合に
は、画素を描画する毎にプライオリティビットを書き替
える必要がある。そこで、当該プライオリティビットが
格納されているプライオリティビットバッファ23の対
応するビットを1にし、このプライオリティビットを読
み出す前に、プライオリティビットバッファ23の内容
23bをフレームバッファメモリ制御器23を介してフ
レームバッファメモリ15に与えて書き替えておく。P
Wが0の場合は、上述したようにプライオリティビット
は予め設定された値を保持する。
When the PW of the mode register 21 is 1, it is necessary to rewrite the priority bit every time a pixel is drawn. Therefore, the corresponding bit of the priority bit buffer 23 in which the priority bit is stored is set to 1, and the content 23b of the priority bit buffer 23 is read via the frame buffer memory controller 23 before reading this priority bit. Give to 15 and rewrite. P
When W is 0, the priority bit holds a preset value as described above.

【0040】プライオリティビットバッファ23に保持
されたプライオリティビット23aが読み出されると、
フラグ生成器22に与えられる。モードレジスタ21の
PCが1の場合は、フラグ生成器22は画素毎にプライ
オリティビットをチェックする。モードレジスタ21の
ZCが1の場合は、Z比較を行うことを示すZ比較フラ
グ22aをZバッファメモリ制御器14に出力する。さ
らに、フラグ生成器22は、画素の描画を行うと判断し
たときは画素描画フラグ22bをZバッファメモリ制御
器14とフレームバッファメモリ制御器15とに出力す
る。
When the priority bit 23a held in the priority bit buffer 23 is read,
It is given to the flag generator 22. When the PC of the mode register 21 is 1, the flag generator 22 checks the priority bit for each pixel. When ZC of the mode register 21 is 1, a Z comparison flag 22a indicating that Z comparison is performed is output to the Z buffer memory controller 14. Further, the flag generator 22 outputs the pixel drawing flag 22b to the Z buffer memory controller 14 and the frame buffer memory controller 15 when it determines that the pixel is drawn.

【0041】Zバッファメモリ制御器14は、Z比較を
行うZ比較フラグ22aを受け取った場合は、それぞれ
の画素に対応するZデータをZバッファメモリ16から
読み出して、このデータ14aをZ比較器12に与え
る。さらに、Zバッファメモリ制御器14は、画素を描
画することを示す画素描画フラグ22bを受け取ったと
きは、生成器11が生成したZ値をZバッファメモリ1
6に与えて書き込む。
When the Z buffer memory controller 14 receives the Z comparison flag 22a for Z comparison, the Z data corresponding to each pixel is read from the Z buffer memory 16 and this data 14a is read by the Z comparator 12. Give to. Furthermore, when the Z buffer memory controller 14 receives the pixel drawing flag 22b indicating that a pixel is drawn, the Z buffer memory controller 14 sets the Z value generated by the generator 11 to the Z buffer memory 1.
Give to 6 and write.

【0042】フレームバッファメモリ制御器15は、フ
ラグ生成器22から画素を描画することを示す画素描画
フラグ22bを受け取ったときは、生成器11が生成し
たフレームデータをフレームバッファメモリ15に与え
て描画する。
When the frame buffer memory controller 15 receives the pixel drawing flag 22b indicating that the pixel is drawn from the flag generator 22, the frame buffer memory controller 15 gives the frame data generated by the generator 11 to the frame buffer memory 15 and draws the frame data. To do.

【0043】以上の本実施の形態による図形描画プロセ
ッサを用いることで、次のような処理を行うことができ
る。 1. フロントトウバック処理 プライオリティビットをチェックしながら描画すべきと
きは画素の描画を行い、描画した場合にはプライオリテ
ィビットを1にする。
By using the graphic drawing processor according to the present embodiment described above, the following processing can be performed. 1. Front toeback process When drawing is performed while checking the priority bit, a pixel is drawn, and when drawing is performed, the priority bit is set to 1.

【0044】この処理を行うときは、モードレジスタ2
1を、PW=1、PC=1、ZC=0に設定する。各フ
レームの描画を開始する前に、初期設定としてプライオ
リティビットを全て0にしておく。Zソート方式を用い
て、手前にある図形から奥にある図形へと順に描画を行
っていく。 2. ステンシルチェック処理 プライオリティビットを保持するバッファメモリ(後述
するように、フレームバッファメモリ17又はZバッフ
ァメモリ16のいずれかを用いる)に設定されたプレー
ンに、図6に示されたように、図形を描く領域82と描
かない領域81とを示したステンシルパターン80を予
め設定しておく。図形を描かない領域81は、既に図形
は描画されておりこの上に描画を行わないという扱いを
するため、プライオリティビットを1に設定しておく。
図形を描く領域82はプライオリティビットを0にす
る。
When performing this processing, the mode register 2
1 is set to PW = 1, PC = 1, ZC = 0. Before the drawing of each frame is started, all priority bits are set to 0 as an initial setting. Using the Z sort method, drawing is performed in order from the figure in the front to the figure in the back. 2. Stencil check process Drawing a figure as shown in FIG. 6 on the plane set in the buffer memory holding the priority bit (either the frame buffer memory 17 or the Z buffer memory 16 is used as described later). The stencil pattern 80 indicating the area 82 and the non-drawn area 81 is set in advance. In the area 81 where no graphic is drawn, the priority bit is set to 1 in order to handle that the graphic has already been drawn and drawing is not performed on it.
In the area 82 for drawing a figure, the priority bit is set to 0.

【0045】この処理を行う場合、モードレジスタ21
はPW=0、PC=1に設定する。即ち、図形を領域8
2に描画した場合にもプライオリティビットは0のまま
にしておく。プライオリティビットのチェックは、領域
81に図形を描かないようにするために行う。
When performing this processing, the mode register 21
Sets PW = 0 and PC = 1. That is, the figure
Even when drawing to 2, the priority bit remains 0. The priority bit is checked so that no graphic is drawn in the area 81.

【0046】ZCは0、1のいずれでもよいが、ZCを
1にしたときはPZC=1に設定する必要がある。即
ち、プライオリティビットが1である領域81は、Z比
較の結果にかかわらず描画しない。プライオリティビッ
トが0である領域82では、Z比較の結果に応じて描画
するか否かを判断する。 3. Z無限遠フラグチェック処理 Zバッファリングと併用する処理である。最も奥にある
図形(背景)の奥行きをZ無限遠とし、プライオリティ
ビット0がこのZ無限遠を示すフラグとする。そして、
この奥行きよりも手前にあるプライオリティビット1の
図形についてのみZ比較を行う。
ZC may be 0 or 1, but when ZC is set to 1, it is necessary to set PZC = 1. That is, the area 81 in which the priority bit is 1 is not drawn regardless of the result of the Z comparison. In the area 82 in which the priority bit is 0, it is determined whether or not to draw according to the result of the Z comparison. 3. Z infinity flag check process This process is used in combination with Z buffering. The depth of the deepest figure (background) is Z infinity, and the priority bit 0 is a flag indicating this Z infinity. And
The Z comparison is performed only for the graphic of priority bit 1 located before this depth.

【0047】モードレジスタ21を、PW=1、PC=
1、ZC=1、PZC=0に設定する。各フレーム毎
に、描画の前に予めプライオリティビットを0に設定し
ておく。Zバッファメモリの内容については、フレーム
毎の描画開始前に予めクリアする必要はない。即ち、各
画素について1ビットで表現できるプライオリティビッ
トを格納するプライオリティビットプレーンについての
みクリアしておけば、1画素当たり8、16、32…と
いうようにビット幅が大きいZプレーンをクリアする必
要はない。これにより、処理の高速化が可能となる。 4. 部分的Zバッファリング処理 Zバッファメモリに用意されているZデータのビット幅
が例えば1画素当たり8ビットというように小さく、例
えば24ビットで定義されているZ空間の全てを表すこ
とができないような場合に、Z空間を複数の部分Z空間
に分割し、それぞれにZデータを持たせて、プライオリ
ティビットを用いながら描画を行っていく。
The mode register 21 is set to PW = 1, PC =
1. Set ZC = 1 and PZC = 0. Prior to drawing, the priority bit is set to 0 for each frame. It is not necessary to clear the contents of the Z buffer memory in advance before starting drawing for each frame. That is, if only the priority bit plane that stores the priority bit that can be expressed by 1 bit for each pixel is cleared, it is not necessary to clear the Z plane having a large bit width such as 8, 16, 32, ... For each pixel. . As a result, the processing speed can be increased. 4. Partial Z buffering processing The bit width of the Z data prepared in the Z buffer memory is as small as 8 bits per pixel, for example, it cannot represent the entire Z space defined by 24 bits. In this case, the Z space is divided into a plurality of partial Z spaces, Z data is given to each of them, and drawing is performed using priority bits.

【0048】モードレジスタ21は、PW=1、PC=
1、ZC=1、PZC=1に設定する。Z空間を複数の
部分Z空間に分割し、それぞれの部分Z空間毎に、当該
空間に入ることが保証されている多角形の集合を予め定
義する。フレームバッファメモリ内の全てのプライオリ
ティビットを0にクリアしておく。そして、最も奥にあ
る部分Z空間に含まれる多角形の集合について、この部
分Z空間内でZバッファリングを行いながら描画してい
く。次にフレームバッファメモリ17内の全てのプライ
オリティビットを0にクリアする。最も奥から2番目に
ある部分Z空間に含まれる多角形の集合について、この
空間内でZバッファリングを行いながら描画していく。
このような手順で、順にそれぞれの部分Z空間に含まれ
る多角形の描画を行っていき、最も手前にある部分Z空
間についての処理が終わると当該フレームの描画が完成
する。
The mode register 21 has PW = 1 and PC =
1. Set ZC = 1 and PZC = 1. The Z space is divided into a plurality of partial Z spaces, and for each of the partial Z spaces, a set of polygons guaranteed to enter the space is defined in advance. All the priority bits in the frame buffer memory are cleared to 0. Then, the polygon set included in the innermost partial Z space is drawn while performing Z buffering in this partial Z space. Next, all the priority bits in the frame buffer memory 17 are cleared to 0. A polygon set included in the second partial Z space from the innermost side is drawn while Z buffering is performed in this space.
With such a procedure, the polygons included in the respective partial Z spaces are sequentially drawn, and when the process for the partial Z space in the foreground is completed, the drawing of the frame is completed.

【0049】この部分的Zバッファリング処理は、上述
したように全てのZ空間を表現するだけのビット幅をZ
データに割り当てることができない場合に有効である。
また、Zデータのビット数を大きくとることができるよ
うな場合であっても、この処理を採用してアクセスする
Zデータのビット数を小さくすることで高速化を図るこ
とができる。
In this partial Z buffering process, as described above, the bit width enough to represent all Z spaces is set to Z.
This is useful when it cannot be assigned to data.
Even in the case where the number of bits of Z data can be increased, the speed can be increased by adopting this process to reduce the number of bits of Z data to be accessed.

【0050】本発明の第2の実施の形態について、以下
に述べる。本実施の形態による図形描画プロセッサは、
図3に示された図形描画プロセッサ40のような構成を
有し、このプロセッサ40を用いた本実施の形態による
図形処理システムは、プロセッサ40の他に、CPU1
40、Zバッファメモリ141、及びフレームバッファ
メモリ142を備えている。
The second embodiment of the present invention will be described below. The graphic drawing processor according to the present embodiment is
A graphic processing system according to the present embodiment having a configuration such as the graphic drawing processor 40 shown in FIG.
40, a Z buffer memory 141, and a frame buffer memory 142.

【0051】CPU140は、システム全体の画像処理
及び管理を行うものであるが、図形の描画に関する処理
としては、多角形の頂点座標を図形描画プロセッサ40
に与える。ここで、CPUの替わりに、DSP等の他の
装置を用いて頂点座標を出力させてもよい。この情報
は、図形描画プロセッサ40内のバスインターフェース
ブロック41を介して生成器42に与えられる。
The CPU 140 performs image processing and management of the entire system. As processing for drawing a figure, the vertex coordinates of the polygon are calculated by the figure drawing processor 40.
Give to. Here, instead of the CPU, another device such as a DSP may be used to output the vertex coordinates. This information is provided to the generator 42 via the bus interface block 41 in the graphic drawing processor 40.

【0052】生成器42は、与えられた頂点座標を用い
て、線形補間法等を適用して2次元投影面上の各画素毎
のxy座標と、Zデータと、フレームデータとを生成し
て出力する。
The generator 42 uses the given vertex coordinates to apply a linear interpolation method or the like to generate xy coordinates for each pixel on the two-dimensional projection plane, Z data, and frame data. Output.

【0053】Zバッファメモリ制御器45は、Zデータ
を格納するZバッファメモリ141への書き込み及び読
み出しを制御する。フレームバッファメモリ制御器46
は、フレームデータを格納するフレームバッファメモリ
142への書き込み及び読み出しを制御する。また、フ
レームバッファメモリ142は上述したように描画用と
表示用とを備えるダブルバッファ構成であり、プライオ
リティビットは、各々の画素毎のフレームデータに対応
付けた状態で、描画用メモリと表示用メモリにそれぞれ
格納されている。フレームバッファメモリ制御器46
は、フレームバッファメモリ142に対して、フレーム
データとプライオリティビットの書き込みと読み出しの
制御を行う。
The Z buffer memory controller 45 controls writing to and reading from the Z buffer memory 141 for storing Z data. Frame buffer memory controller 46
Controls writing to and reading from the frame buffer memory 142 that stores frame data. Further, the frame buffer memory 142 has a double buffer structure including a drawing memory and a display memory as described above, and the priority bit is associated with the frame data for each pixel, and the drawing memory and the display memory are associated with each other. Stored in each. Frame buffer memory controller 46
Controls the writing and reading of frame data and priority bits with respect to the frame buffer memory 142.

【0054】Z比較器43は、Zバッファメモリ141
に格納されているZデータをZバッファメモリ制御器4
5を介して与えられ、生成器42から生成されて与えら
れたZデータと比較しその結果を出力する。
The Z comparator 43 has a Z buffer memory 141.
Z data stored in the Z buffer memory controller 4
5 and is generated from the generator 42 and is compared with the supplied Z data, and the result is output.

【0055】プライオリティビット管理器44は、Zバ
ッファメモリ制御器45、フレームバッファメモリ制御
器46の制御、またプライオリティビットが1であるか
否かをチェックし、画素毎に描画したときに1にするな
どの管理を行う。プライオリティビット管理器44の詳
細な構成は図4に示されるようであり、モードレジスタ
51、フラグ生成器52、プライオリティビットバッフ
ァ53が設けられている。
The priority bit manager 44 checks the control of the Z buffer memory controller 45 and the frame buffer memory controller 46, and also checks whether the priority bit is 1, and sets it to 1 when drawing for each pixel. Etc. are managed. The detailed configuration of the priority bit manager 44 is as shown in FIG. 4, and is provided with a mode register 51, a flag generator 52, and a priority bit buffer 53.

【0056】モードレジスタ51は、上述したPW、P
C、ZC、PZCを示すデータを保持している。
The mode register 51 has the above-mentioned PW and P
It holds data indicating C, ZC, and PZC.

【0057】フラグ生成器52は、モードレジスタ51
のPW、PC、ZC、PZCの値と、Z比較器43から
出力されたZ比較結果43aと、プライオリティビット
バッファ53から読み出したプライオリティビット53
aを用いて、Z比較フラグ52aをZバッファメモリ制
御器45に出力し、画素ライトフラグ52bを、Zデー
タバッファメモリ制御器45及びフレームバッファメモ
リ制御器46に出力する。
The flag generator 52 includes a mode register 51.
Values of PW, PC, ZC, and PZC, the Z comparison result 43a output from the Z comparator 43, and the priority bit 53 read from the priority bit buffer 53.
Using a, the Z comparison flag 52a is output to the Z buffer memory controller 45, and the pixel write flag 52b is output to the Z data buffer memory controller 45 and the frame buffer memory controller 46.

【0058】図形描画プロセッサ40は、さらにカラー
レジスタ48、セレクタ49及び表示データバッファ4
7を備えている。
The graphic drawing processor 40 further includes a color register 48, a selector 49 and a display data buffer 4.
7 is provided.

【0059】表示データバッファ47は、フレームバッ
ファメモリ142からフレームバッファメモリ制御器4
6を介して読み出されたフレームデータ及びプライオリ
ティビット46bを与えられて保持する。カラーレジス
タ48は、予め設定されたバックグランドのカラーデー
タを保持している。
The display data buffer 47 includes the frame buffer memory 142 to the frame buffer memory controller 4.
The frame data read via 6 and the priority bit 46b are given and held. The color register 48 holds preset background color data.

【0060】セレクタ49は、プライオリティビットを
チェックしながら、表示データバッファ47から出力さ
れたフレームデータ47aと、カラーレジスタ48から
出力されたカラーデータ48aとを選択し、いずれか一
方をデータ49aとしてDAC143に出力する。
The selector 49 selects the frame data 47a output from the display data buffer 47 and the color data 48a output from the color register 48 while checking the priority bit, and one of them is used as the data 49a and the DAC 143 is selected. Output to.

【0061】このような構成により、描画が終了した
後、描画用フレームバッファメモリが表示用フレームバ
ッファメモリに切り替わり、データ49aがDAC14
3を介して表示パネル装置へ出力される。このとき、描
画サイクルで描画された画素については書き込まれたフ
レームデータ49aを表示し、描画されなかったバック
グランドについては、カラーレジスタ48に保持された
カラーが表示される。
With such a configuration, after the drawing is completed, the drawing frame buffer memory is switched to the display frame buffer memory, and the data 49a is converted into the DAC14.
3 to the display panel device. At this time, the written frame data 49a is displayed for the pixel drawn in the drawing cycle, and the color held in the color register 48 is displayed for the background not drawn.

【0062】本実施の形態において、図形の描画を行う
ときの動作は、上述した第1の実施の形態と同様であ
り、説明を省略する。本実施の形態では、上述した1.
フロントトウバック処理、2.ステンシルチェック処
理、3.Z無限遠フラグチェック処理、4.部分的Zバ
ッファリング処理の処理の他に、次のような処理が可能
である。この処理は、描画用フレームバッファメモリへ
の1フレーム分の描画が終了した後、このメモリが表示
用フレームバッファメモリに切り替わり、表示動作を行
う時の処理に関するものである。 5. フレームバッファの高速クリア処理 プライオリティビットを用いることで、フレームバッフ
ァを高速にクリアすることができる。フレーム毎に描画
を開始する前に、フレームバッファメモリ142内のプ
ライオリティビットを全て0にクリアしておく。フレー
ムバッファメモリ142内のフレームデータはクリアす
る必要はない。プライオリティビットを用いて描画を行
っていき、描画された画素のプライオリティビットを1
とする。描画フレームバッファメモリの描画が終了する
と、このメモリが表示バッファメモリに切り替わって表
示のためにフレームデータが読み出される。このとき
に、表示目的で読み出されたフレームデータに対するプ
ライオリティビットが1の場合は、当該画素は描画され
たことを示すものである。そこで、描画された画素につ
いては、セレクタ49の切り替え動作によって、この読
み出されたフレームデータをDAC143に出力する。
プライオリティビットが0の場合には、当該画素は描画
されなかったことを示すものであり、フレームバッファ
メモリ142に前回のサイクルで描画されて残っていた
フレームデータを出力するのではなく、カラーレジスタ
48に保持されているバックグランドのカラーデータを
出力する。これにより、フレームデータをフレーム毎に
描画を開始する前に全てクリアする必要がなくなる。上
述したように、プライオリティビットは画素毎に1ビッ
ト設ければよいが、フレームデータは8、16、32、
…ビットが必要である。よって、プライオリティビット
のみをクリアすればよいことで、高速処理が可能とな
る。
In this embodiment, the operation for drawing a graphic is the same as that in the above-described first embodiment, and a description thereof will be omitted. In the present embodiment, the above 1.
Front toeback processing, 2. Stencil check processing, 3. 3. Z infinity flag check processing, In addition to the processing of the partial Z buffering processing, the following processing is possible. This process relates to the process when the memory is switched to the display frame buffer memory and the display operation is performed after the drawing of one frame in the drawing frame buffer memory is completed. 5. High-speed clearing process of frame buffer The frame buffer can be cleared at high speed by using the priority bit. Before starting drawing for each frame, all priority bits in the frame buffer memory 142 are cleared to 0. It is not necessary to clear the frame data in the frame buffer memory 142. Drawing is performed using priority bits, and the priority bit of the drawn pixel is set to 1
And When the drawing of the drawing frame buffer memory is completed, this memory is switched to the display buffer memory and the frame data is read out for display. At this time, if the priority bit for the frame data read out for display purposes is 1, it indicates that the pixel is drawn. Therefore, for the drawn pixel, the read frame data is output to the DAC 143 by the switching operation of the selector 49.
When the priority bit is 0, it indicates that the pixel is not drawn, and the frame register memory 142 does not output the frame data that was drawn and remained in the previous cycle, but rather outputs the color register 48. The background color data stored in is output. This eliminates the need to clear all frame data before starting drawing frame by frame. As described above, one priority bit may be provided for each pixel, but the frame data is 8, 16, 32,
… I need a bit. Therefore, only the priority bit needs to be cleared, which enables high-speed processing.

【0063】このフレームバッファの高速クリア処理
は、描画された画素のプライオリティビットは1で、描
画されなかった画素のプライオリティビットは0として
フレームバッファメモリ142にフレームデータととも
に格納されていなければならない。従って、上記処理1
乃至4のうち、1.フロントトウバック処理と、2.Z
バッファリング処理と併用することは可能であるが、
3.ステンシルチェック処理や、4.部分的Zバッファ
リング処理と併用することはできない。
In this high-speed clearing process of the frame buffer, the priority bit of the drawn pixel is set to 1 and the priority bit of the pixel not drawn is set to 0 and stored in the frame buffer memory 142 together with the frame data. Therefore, the above processing 1
Out of 4 to 1. Front toeback processing and 2. Z
It is possible to use it together with the buffering process,
3. Stencil check processing, 4. It cannot be used in combination with the partial Z-buffering process.

【0064】第1及び第2の実施の形態では、いずれも
Zデータはフレームバッファメモリ15、142内にフ
レームデータと共に格納される。これに対し、図7に示
された第3の実施の形態では、Zデータバッファメモリ
及びフレームバッファメモリの替わりにローカルメモリ
93を備えている。図形描画プロセッサ92の内部構成
は、上記図形描画プロセッサ10又は40と同様であ
り、それぞれ、Zバッファメモリ制御器14及びフレー
ムバッファメモリ制御器15、又はZバッファメモリ制
御器45及びフレームバッファメモリ制御器46が同一
のローカルメモリ93内に設けられたZデータプレーン
とフレームデータプレーンとをアクセスする。他のCP
U91、DAC94は第2の実施の形態におけるCPU
140、DAC143と同様のものであり、説明を省略
する。
In both the first and second embodiments, Z data is stored in the frame buffer memories 15 and 142 together with the frame data. On the other hand, in the third embodiment shown in FIG. 7, a local memory 93 is provided instead of the Z data buffer memory and the frame buffer memory. The internal structure of the graphic drawing processor 92 is the same as that of the graphic drawing processor 10 or 40. The Z buffer memory controller 14 and the frame buffer memory controller 15, or the Z buffer memory controller 45 and the frame buffer memory controller, respectively. 46 accesses the Z data plane and the frame data plane provided in the same local memory 93. Other CP
U91 and DAC94 are CPUs in the second embodiment
140 and the DAC 143, which are similar to those in FIG.

【0065】ローカルメモリ93は、図8のように構成
されている。フレームデータを格納する領域であるフレ
ームデータプレーン101及び102と、Zデータを格
納するZデータプレーン103と、プライオリティビッ
トを格納することが可能なプレーン104〜106が設
けられている。プレーン104は、フレームデータプレ
ーン101内のフレームデータに対応付けてプライオリ
ティビットを格納する領域、プレーン105はフレーム
データプレーン102内のフレームデータに対応付けて
プライオリティビットを格納する領域、プレーン106
はZデータプレーン103内のZデータに対応付けてプ
ライオリティビットを格納する領域である。
The local memory 93 is constructed as shown in FIG. Frame data planes 101 and 102, which are areas for storing frame data, a Z data plane 103 for storing Z data, and planes 104 to 106 capable of storing priority bits are provided. A plane 104 is an area for storing priority bits in association with the frame data in the frame data plane 101, a plane 105 is an area for storing priority bits in association with the frame data in the frame data plane 102, and a plane 106.
Is an area for storing priority bits in association with Z data in the Z data plane 103.

【0066】プライオリティビットは、プレーン104
〜106のうち、動作モードに応じて任意の場所に格納
することができる。例えば、上記処理1.フロントトウ
バック処理、2.ステンシルチェック処理のように、Z
バッファリングを行わない場合は、Zデータと関連付け
て格納する必要はないので、プレーン106にプライオ
リティビットは格納せず、プレーン104及び105の
少なくともいずれか一方に格納する。これにより、プレ
ーン106を設ける必要がないので、フレームデータ用
のプレーン101、102及びプライオリティビット1
04、105により大きい領域を割り当てることができ
る。しかし、上述した処理のうち、5.フレームバッフ
ァの高速クリア処理を行うためには、描画用フレームバ
ッファメモリ用のプレーン101又は102と、表示用
フレームバッファメモリ用のプレーン102又は101
の両方にプライオリティビットを関連付けて格納する必
要がある。このため、プレーン104及び105の両方
にプライオリティビットが格納される。
The priority bit is the plane 104.
It can be stored in any place among the above-mentioned items depending on the operation mode. For example, the above processing 1. Front toeback processing, 2. Like the stencil check process, Z
When the buffering is not performed, it is not necessary to store the data in association with the Z data, so the priority bit is not stored in the plane 106, but is stored in at least one of the planes 104 and 105. This eliminates the need to provide the plane 106, so that the planes 101 and 102 for frame data and the priority bit 1
Larger areas can be allocated to 04 and 105. However, among the above-mentioned processes, 5. In order to perform the high-speed clear processing of the frame buffer, the plane 101 or 102 for the drawing frame buffer memory and the plane 102 or 101 for the display frame buffer memory
It is necessary to store the priority bit in association with both of them. Therefore, priority bits are stored in both planes 104 and 105.

【0067】また、上記処理のうち、3.Z無限遠フラ
グ処理や4.部分的Zバッファリング処理のように、Z
バッファリングを行う場合は、Zデータプレーン103
に対応付けられたプレーン106にプライオリティビッ
トが格納される。
Among the above processes, 3. Z infinity flag processing and 4. Like the partial Z buffering process, Z
When performing buffering, the Z data plane 103
The priority bit is stored in the plane 106 associated with.

【0068】上記第1、第2又は第3の実施の形態によ
れば、同一の構成により、Zソート方式に基づくフロン
トトウバック処理、Zバッファリング処理、ステンシル
チェック処理、部分的Zバッファリング処理、フレーム
バッファの高速クリア処理のいずれかを選択して高速に
実行することが可能である。
According to the first, second or third embodiment, the same structure is used to perform front toeback processing, Z buffering processing, stencil check processing, partial Z buffering processing based on the Z sort method. It is possible to execute at high speed by selecting any of the high-speed clear processing of the frame buffer.

【0069】上述した実施の形態はいずれも一例であ
り、本発明を限定するものではない。例えば、プライオ
リティビット管理手段は、必ずしも図2、図4に示され
るような構成と同じである必要はなく、設定されたモー
ドに応じてZ比較手段、Zバッファメモリ手段、フレー
ムバッファメモリ手段を制御するものであればよい。。
The above-mentioned embodiments are merely examples, and do not limit the present invention. For example, the priority bit management means does not necessarily have the same configuration as shown in FIGS. 2 and 4, and controls the Z comparison means, Z buffer memory means, frame buffer memory means according to the set mode. Anything can be used. .

【0070】[0070]

【発明の効果】以上説明したように、本発明の図形描画
プロセッサ及び図形処理システムは、画素毎に設けられ
描画が行われたか否かを示すプライオリティビットを用
いることでZソートによるフロントトウバック処理を効
率良く行い、またZバッファリング処理(Z無限遠フラ
グチェック処理)を行う場合にも、図形が重なった意味
のあるZデータについてのみZデータの比較を行うこと
で、処理の高速化を図ることができ、さらには同一の構
成で動作モードを切り替えることで、ステンシルチェッ
ク処理、部分的Zバッファ処理を実現し、またフレーム
データをクリアする替わりにプライオリティビットをク
リアすることで、フレームバッファのクリア処理を高速
化することが可能である。
As described above, the graphic drawing processor and the graphic processing system of the present invention use the priority bit, which is provided for each pixel and indicates whether or not drawing is performed, to thereby perform the front toeback process by the Z sort. Efficiently, and when performing Z buffering processing (Z infinity flag check processing) as well, by comparing Z data only for meaningful Z data with overlapping figures, the processing speed is increased. Furthermore, by switching the operation mode with the same configuration, stencil check processing and partial Z buffer processing are realized, and by clearing the priority bit instead of clearing the frame data, the frame buffer can be cleared. It is possible to speed up the processing.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の第1の実施の形態による図形描画プロ
セッサと、Zバッファメモリ及びフレームバッファメモ
リの構成を示したブロック図。
FIG. 1 is a block diagram showing a configuration of a graphic drawing processor, a Z buffer memory and a frame buffer memory according to a first embodiment of the present invention.

【図2】同図形描画プロセッサの詳細な構成を示したブ
ロック図。
FIG. 2 is a block diagram showing a detailed configuration of the graphic drawing processor.

【図3】本発明の第2の実施の形態による図形描画プロ
セッサと、同図形描画プロセッサを用いた図形処理シス
テムの構成を示したブロック図。
FIG. 3 is a block diagram showing a configuration of a graphic drawing processor according to a second embodiment of the present invention and a graphic processing system using the graphic drawing processor.

【図4】同図形描画プロセッサの詳細な構成を示したブ
ロック図。
FIG. 4 is a block diagram showing a detailed configuration of the graphic drawing processor.

【図5】同図形描画プロセッサの有するフレームバッフ
ァメモリの構成を示した説明図。
FIG. 5 is an explanatory diagram showing a configuration of a frame buffer memory included in the graphic drawing processor.

【図6】第1又は第2の実施の形態により実現可能なス
テンシルチェック処理で用いられるステンシルパターン
を示した説明図。
FIG. 6 is an explanatory diagram showing a stencil pattern used in the stencil check processing that can be realized by the first or second embodiment.

【図7】本発明の第3の実施の形態による図形処理シス
テムの構成を示したブロック図。
FIG. 7 is a block diagram showing the configuration of a graphic processing system according to a third embodiment of the present invention.

【図8】同図形処理システムにおけるローカルメモリの
構成を示した説明図。
FIG. 8 is an explanatory diagram showing a configuration of a local memory in the graphic processing system.

【符号の説明】[Explanation of symbols]

10、40、92 図形描画プロセッサ 11 生成器 12 Z比較器 13 プライオリティビット管理器 14 Zバッファメモリ制御器 15 フレームバッファメモリ制御器 16 Zバッファメモリ 17 フレームバッファメモリ 21、51 モードレジスタ 22、52 フラグ生成器 23、53 プライオリティビットバッファ 41 バスI/Fブロック 42 生成器 43 Z比較器 44 プライオリティビット管理器 45 Zバッファメモリ制御器 46 フレームバッファメモリ制御器 47 表示データバッファ 48 カラーレジスタ 49 セレクタ 71、101 フレームデータプレーン0 72、102 フレームデータプレーン1 73、104 プライオリティビットプレーン0 74、105 プライオリティビットプレーン1 80 ステンシルパターン 93 ローカルメモリ 94、143 DAC 103 Zデータプレーン 106 プライオリティビットプレーン 141 Zバッファメモリ 142 フレームバッファメモリ 10, 40, 92 Graphic drawing processor 11 Generator 12 Z comparator 13 Priority bit manager 14 Z buffer memory controller 15 Frame buffer memory controller 16 Z buffer memory 17 Frame buffer memory 21, 51 Mode register 22, 52 Flag generation Device 23, 53 Priority bit buffer 41 Bus I / F block 42 Generator 43 Z comparator 44 Priority bit manager 45 Z buffer memory controller 46 Frame buffer memory controller 47 Display data buffer 48 Color register 49 Selector 71, 101 frame Data plane 0 72, 102 Frame Data plane 1 73, 104 Priority bit plane 0 74, 105 Priority bit plane 1 80 Stencil pattern 93 Local memory 94, 143 DAC 103 Z data plane 106 Priority bit plane 141 Z buffer memory 142 Frame buffer memory

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】図形の頂点座標を与えられて、画素毎に座
標と、奥行きを示すZデータと、フレームデータとを生
成する生成手段と、 前記Zデータを与えられて格納するZバッファメモリへ
の書き込み及び読み出しを制御するZバッファメモリ制
御手段と、 前記フレームデータと、各々の画素毎に設定されたプラ
イオリティビットとを対応付けて格納するフレームバッ
ファメモリへの書き込み及び読み出しを制御するフレー
ムバッファメモリ制御手段と、 前記Zバッファメモリに格納されており、前記Zバッフ
ァメモリ制御手段により読み出されたZデータと、前記
生成手段により生成されたZデータとを与えられて比較
し、比較結果を出力するZ比較手段と、 第1、第2、第3の動作モードのうち、いずれかを設定
するモード設定手段を有し、設定された動作モードに従
って前記Z比較手段、Zバッファメモリ制御手段、フレ
ームバッファメモリ制御手段を制御するプライオリティ
ビット管理手段であって、 前記第1の動作モードが設定されているときは、各々の
画素に対応するプライオリティビットが第1の値である
場合、前記生成器が生成したフレームデータを前記フレ
ームバッファメモリ制御手段が前記フレームバッファメ
モリに書き込むことでこの画素を描画し、前記プライオ
リティビットが第2の値である場合は描画せず、 前記第2の動作モードが設定されているときは、各々の
画素に対応するプライオリティビットが前記第1の値で
ある場合、対応する画素に関する前記Zデータ比較手段
の比較結果にかかわらず、前記生成器が生成したフレー
ムデータを前記フレームバッファメモリ制御手段が前記
フレームバッファメモリに書き込むことでこの画素を描
画し、対応する前記プライオリティビットが前記第2の
値である場合、前記Zデータ比較手段の比較結果に応じ
てこの画素を描画するか否かを判断し、 前記第3の動作モードが設定されているときは、各々の
画素に対応するプライオリティビットが前記第2の値で
ある場合、対応する画素に関する前記Zデータ比較手段
の比較結果にかかわらずこの画素を描画せず、対応する
プライオリティビットが前記第1の値である場合、前記
Zデータ比較手段の比較結果に応じてこの画素を描画す
るか否かを判断する、前記プライオリティビット管理手
段と、 を備えたことを特徴とする図形描画プロセッサ。
1. A generation means for generating coordinates of each figure, Z data indicating depth and Z data indicating depth, and frame data, and a Z buffer memory for storing the Z data. Buffer memory control means for controlling writing and reading of the frame data, and a frame buffer memory for controlling writing and reading to and from the frame buffer memory for storing the frame data in association with the priority bit set for each pixel The control means and the Z data stored in the Z buffer memory and read by the Z buffer memory control means are compared with the Z data generated by the generation means, and the comparison result is output. And a mode setting means for setting any one of the first, second and third operation modes. A priority bit managing means for controlling the Z comparing means, the Z buffer memory controlling means, and the frame buffer memory controlling means according to the set operation mode, each of which is provided when the first operation mode is set. When the priority bit corresponding to the pixel of is a first value, the frame buffer memory control unit writes the frame data generated by the generator into the frame buffer memory to draw this pixel, and the priority bit is When the second value is the second value, the drawing is not performed. When the second operation mode is set, when the priority bit corresponding to each pixel is the first value, the Z for the corresponding pixel is set. Regardless of the comparison result of the data comparison means, the frame data generated by the generator is converted into the frame data. The frame buffer memory control means draws this pixel by writing it in the frame buffer memory, and when the corresponding priority bit has the second value, draws this pixel according to the comparison result of the Z data comparison means. When the third operation mode is set, if the priority bit corresponding to each pixel is the second value, the Z data comparison means of the corresponding pixel is determined. This pixel is not drawn regardless of the comparison result, and when the corresponding priority bit has the first value, it is determined whether or not to draw this pixel according to the comparison result of the Z data comparison means. A graphic drawing processor comprising: priority bit management means;
【請求項2】図形の頂点座標を出力する座標出力装置
と、 Zデータを与えられて格納するZバッファメモリと、 フレームデータと、各々の画素毎に設定されたプライオ
リティビットとを対応付けて格納するフレームバッファ
メモリと、 前記座標出力装置から出力された頂点座標を与えられ
て、描画処理を行う図形描画プロセッサであって、 前記頂点情報を与えられて画素毎に座標と、奥行きを示
すZデータと、フレームデータとを生成する生成手段
と、 前記ZバッファメモリへのZデータの書き込み及び読み
出しを制御するZバッファメモリ制御手段と、 前記フレームバッファメモリへのフレームデータ及びプ
ライオリティビットの書き込み及び読み出しを制御する
フレームバッファメモリ制御手段と、 前記Zバッファメモリに格納されており、前記Zバッフ
ァメモリ制御手段により読み出されたZデータと、前記
生成手段により生成されたZデータとを与えられて比較
し、比較結果を出力するZデータ比較手段と、 第1、第2、第3の動作モードのうち、いずれかを設定
するモード設定手段を有し、設定された動作モードに従
って前記Z比較手段、Zバッファメモリ制御手段、フレ
ームバッファメモリ制御手段を制御するプライオリティ
ビット管理手段であって、 前記第1の動作モードが設定されているときは、各々の
画素に対応するプライオリティビットが第1の値である
場合、前記生成器が生成したフレームデータを前記フレ
ームバッファメモリ制御手段が前記フレームバッファメ
モリに書き込むことでこの画素を描画し、前記プライオ
リティビットが第2の値である場合は描画せず、 前記第2の動作モードが設定されているときは、各々の
画素に対応するプライオリティビットが前記第1の値で
ある場合、対応する画素に関する前記Zデータ比較手段
の比較結果にかかわらず、前記生成器が生成したフレー
ムデータを前記フレームバッファメモリ制御手段が前記
フレームバッファメモリに書き込むことでこの画素を描
画し、対応する前記プライオリティビットが前記第2の
値である場合、前記Zデータ比較手段の比較結果に応じ
てこの画素を描画するか否かを判断し、 前記第3の動作モードが設定されているときは、各々の
画素に対応するプライオリティビットが前記第2の値で
ある場合、対応する画素に関する前記Zデータ比較手段
の比較結果にかかわらずこの画素を描画せず、対応する
プライオリティビットが前記第1の値である場合、前記
Zデータ比較手段の比較結果に応じてこの画素を描画す
るか否かを判断する、前記プライオリティビット管理手
段と、を有する前記図形描画プロセッサと、 を備えたことを特徴とする図形処理システム。
2. A coordinate output device for outputting the vertex coordinates of a figure, a Z buffer memory for receiving Z data and storing the same, frame data, and priority bits set for each pixel are stored in association with each other. A Z-data indicating a coordinate and a depth for each pixel when the vertex information is given to the frame buffer memory and a figure drawing processor that receives the vertex coordinates output from the coordinate output device and performs drawing processing. Generating means for generating frame data, Z buffer memory control means for controlling writing and reading of Z data to and from the Z buffer memory, and writing and reading frame data and priority bits to and from the frame buffer memory. Frame buffer memory control means for controlling, and stored in the Z buffer memory The Z data read by the Z buffer memory control means and the Z data generated by the generation means are given and compared, and Z data comparison means for outputting a comparison result are provided. A priority bit management which has a mode setting means for setting any one of the second and third operation modes and controls the Z comparison means, Z buffer memory control means and frame buffer memory control means according to the set operation mode. When the first operation mode is set and the priority bit corresponding to each pixel has a first value, the frame data generated by the generator is controlled by the frame buffer memory control unit. Means draws this pixel by writing to the frame buffer memory, the priority bit being a second value If the priority bit corresponding to each pixel has the first value when the second operation mode is set, the comparison result of the Z data comparison unit regarding the corresponding pixel is not drawn. Regardless of the above, the frame buffer memory control means writes the frame data generated by the generator into the frame buffer memory to draw this pixel, and when the corresponding priority bit is the second value, Whether to draw this pixel is determined according to the comparison result of the Z data comparison means, and when the third operation mode is set, the priority bit corresponding to each pixel is set to the second value. , This pixel is not drawn regardless of the comparison result of the Z data comparison means for the corresponding pixel, and the corresponding priority And the priority value management unit determines whether or not to draw this pixel according to the comparison result of the Z data comparison unit, the graphic drawing processor including: A graphic processing system comprising:
【請求項3】前記フレームバッファメモリは、フレーム
データと、各々のフレームデータに対応するプライオリ
ティデータとを関連付けた位置関係で格納することを特
徴とする請求項2記載の図形処理システム。
3. The graphic processing system according to claim 2, wherein the frame buffer memory stores the frame data and the priority data corresponding to each frame data in a positional relationship associated with each other.
【請求項4】前記プライオリティビット管理手段は、さ
らに、 前記フレームバッファメモリから前記フレームバッファ
メモリ制御手段を介して読み出されたフレームデータを
与えられて保持する表示データバッファと、 所定のカラーを示すカラーデータを保持するカラーレジ
スタと、 前記表示データバッファから読み出されたフレームデー
タを表示のために出力するとき、対応するプライオリテ
ィビットが前記第1の値である場合は、前記フレームデ
ータに替えて前記カラーレジスタに保持された前記カラ
ーデータを出力し、対応するプライオリティビットが前
記第2の値である場合は前記フレームデータを出力する
セレクタと、 を有することを特徴とする請求項1記載の図形描画プロ
セッサ。
4. The priority bit management means further indicates a display data buffer for receiving and holding frame data read from the frame buffer memory via the frame buffer memory control means, and a predetermined color. When outputting the frame data read from the display data buffer for display, the color register holding the color data, and when the corresponding priority bit has the first value, replace it with the frame data. 2. The graphic according to claim 1, further comprising: a selector that outputs the color data held in the color register, and outputs the frame data when a corresponding priority bit has the second value. Drawing processor.
【請求項5】図形の頂点座標を与えられて、画素毎に座
標と、奥行きを示すZデータと、フレームデータとを生
成する生成手段と、 前記Zデータと、各々の画素毎に設定されたプライオリ
ティビットとを対応付けて格納するZバッファメモリへ
の書き込み及び読み出しを制御するZバッファメモリ制
御手段と、 前記フレームデータを格納するフレームバッファメモリ
への書き込み及び読み出しを制御するフレームバッファ
メモリ制御手段と、 前記Zバッファメモリに格納されており、前記Zバッフ
ァメモリ制御手段により読み出されたZデータと、前記
生成手段により生成されたZデータとを与えられて比較
し、比較結果を出力するZ比較手段と、 第1、第2、第3の動作モードのうち、いずれかを設定
するモード設定手段を有し、設定された動作モードに従
って前記Z比較手段、Zバッファメモリ制御手段、フレ
ームバッファメモリ制御手段を制御するプライオリティ
ビット管理手段であって、 前記第1の動作モードが設定されているときは、各々の
画素に対応するプライオリティビットが第1の値である
場合、前記生成器が生成したフレームデータを前記フレ
ームバッファメモリ制御手段が前記フレームバッファメ
モリに書き込むことでこの画素を描画し、前記第2の値
である場合は描画せず、 前記第2の動作モードが設定されているときは、各々の
画素に対応するプライオリティビットが前記第1の値で
ある場合、対応する画素に関する前記Zデータ比較手段
の比較結果にかかわらず、前記生成器が生成したフレー
ムデータを前記フレームバッファメモリ制御手段が前記
フレームバッファメモリに書き込むことでこの画素を描
画し、対応する前記プライオリティビットが前記第2の
値である場合、前記Zデータ比較手段の比較結果に応じ
てこの画素を描画するか否かを判断し、 前記第3の動作モードが設定されているときは、各々の
画素に対応するプライオリティビットが前記第2の値で
ある場合、対応する画素に関する前記Zデータ比較手段
の比較結果にかかわらずこの画素を描画せず、対応する
プライオリティビットが前記第1の値である場合、前記
Zデータ比較手段の比較結果に応じてこの画素を描画す
るか否かを判断する、前記プライオリティビット管理手
段と、 を備えたことを特徴とする図形描画プロセッサ。
5. A generation means for generating a coordinate for each pixel, Z data indicating a depth, and frame data, given the vertex coordinates of a figure, the Z data, and the Z data set for each pixel. Z buffer memory control means for controlling writing and reading to and from a Z buffer memory that stores priority bits in association with each other, and frame buffer memory control means for controlling writing and reading to and from the frame buffer memory that stores the frame data. , Z comparison stored in the Z buffer memory and read by the Z buffer memory control means and the Z data generated by the generation means are compared, and a comparison result is output. Means and a mode setting means for setting any one of the first, second and third operation modes. A priority bit managing means for controlling the Z comparing means, the Z buffer memory controlling means, and the frame buffer memory controlling means according to the selected operation mode, wherein when the first operation mode is set, When the corresponding priority bit has the first value, the frame buffer memory control unit writes the frame data generated by the generator into the frame buffer memory to draw this pixel, and the second value is the second value. When the second operation mode is set, when the priority bit corresponding to each pixel has the first value, the comparison result of the Z data comparison unit regarding the corresponding pixel Irrespective of the above, the frame data generated by the generator is transferred to the frame buffer memory control means by the This pixel is drawn by writing it in the frame buffer memory, and when the corresponding priority bit has the second value, it is determined whether or not this pixel is drawn according to the comparison result of the Z data comparison means. , When the third operation mode is set, and the priority bit corresponding to each pixel has the second value, this pixel is irrespective of the comparison result of the Z data comparison means for the corresponding pixel. When the corresponding priority bit is the first value without drawing, the priority bit managing means for judging whether or not to draw this pixel according to the comparison result of the Z data comparing means, A graphic drawing processor characterized by being provided.
【請求項6】図形の頂点座標を出力する座標出力装置
と、 Zデータと、各々の画素毎に設定されたプライオリティ
ビットとを対応付けて格納するZバッファメモリと、 フレームデータを格納するフレームバッファメモリと、 前記座標出力装置から出力された頂点座標を与えられ
て、描画処理を行う図形描画プロセッサであって、 前記頂点情報を与えられて画素毎に座標と、奥行きを示
すZデータと、フレームデータとを生成する生成手段
と、 前記ZバッファメモリへのZデータの書き込み及び読み
出しを制御するZバッファメモリ制御手段と、 前記フレームバッファメモリへのフレームデータ及びプ
ライオリティビットの書き込み及び読み出しを制御する
フレームバッファメモリ制御手段と、 前記Zバッファメモリに格納されており、前記Zバッフ
ァメモリ制御手段により読み出されたZデータと、前記
生成手段により生成されたZデータとを与えられて比較
し、比較結果を出力するZデータ比較手段と、 第1、第2、第3の動作モードのうち、いずれかを設定
するモード設定手段を有し、設定された動作モードに従
って前記Z比較手段、Zバッファメモリ制御手段、フレ
ームバッファメモリ制御手段を制御するプライオリティ
ビット管理手段であって、 前記第1の動作モードが設定されているときは、各々の
画素に対応するプライオリティビットが第1の値である
場合、前記生成器が生成したフレームデータを前記フレ
ームバッファメモリ制御手段が前記フレームバッファメ
モリに書き込むことでこの画素を描画し、前記プライオ
リティビットが第2の値である場合は描画せず、 前記第2の動作モードが設定されているときは、各々の
画素に対応するプライオリティビットが前記第1の値で
ある場合、対応する画素に関する前記Zデータ比較手段
の比較結果にかかわらず、前記生成器が生成したフレー
ムデータを前記フレームバッファメモリ制御手段が前記
フレームバッファメモリに書き込むことでこの画素を描
画し、対応する前記プライオリティビットが前記第2の
値である場合、前記Zデータ比較手段の比較結果に応じ
てこの画素を描画するか否かを判断し、 前記第3の動作モードが設定されているときは、各々の
画素に対応するプライオリティビットが前記第2の値で
ある場合、対応する画素に関する前記Zデータ比較手段
の比較結果にかかわらずこの画素を描画せず、対応する
プライオリティビットが前記第1の値である場合、前記
Zデータ比較手段の比較結果に応じてこの画素を描画す
るか否かを判断する、前記プライオリティビット管理手
段と、を有する前記図形描画プロセッサと、 を備えたことを特徴とする図形処理システム。
6. A coordinate output device for outputting the vertex coordinates of a figure, a Z buffer memory for storing Z data and priority bits set for each pixel in association with each other, and a frame buffer for storing frame data. A graphics drawing processor that performs drawing processing by being given the vertex coordinates output from the coordinate output device, and is provided with the vertex information, coordinates for each pixel, Z data indicating depth, and a frame. Generating means for generating data, Z buffer memory control means for controlling writing and reading of Z data to and from the Z buffer memory, and a frame for controlling writing and reading of frame data and priority bits to and from the frame buffer memory A buffer memory control means, which is stored in the Z buffer memory, The Z data read by the Z buffer memory control means and the Z data generated by the generation means are compared and output, and the Z data comparison means outputs the comparison result. It is a priority bit management means for controlling the Z comparison means, the Z buffer memory control means and the frame buffer memory control means according to the set operation mode. Then, when the first operation mode is set and the priority bit corresponding to each pixel has a first value, the frame buffer memory control means stores the frame data generated by the generator. Draw this pixel by writing it in the frame buffer memory, and if the priority bit has a second value, draw When the priority bit corresponding to each pixel is the first value when the second operation mode is set, regardless of the comparison result of the Z data comparison unit regarding the corresponding pixel, When the frame buffer memory control unit writes the frame data generated by the generator into the frame buffer memory to draw this pixel, and when the corresponding priority bit has the second value, the Z data comparison unit It is determined whether or not this pixel is drawn according to the comparison result of 1., and when the third operation mode is set, when the priority bit corresponding to each pixel is the second value, This pixel is not drawn regardless of the comparison result of the Z data comparison means for the corresponding pixel, and the corresponding priority bit is If it is a first value, the graphic drawing processor having the priority bit managing means for judging whether or not to draw this pixel according to the comparison result of the Z data comparing means, Figure processing system characterized by.
【請求項7】前記Zバッファメモリは、Zデータと、各
々のZデータに対応するプライオリティデータとを関連
付けた位置関係で格納することを特徴とする請求項6記
載の図形処理システム。
7. The graphic processing system according to claim 6, wherein the Z buffer memory stores Z data and priority data corresponding to each Z data in a positional relation associated with each other.
【請求項8】図形の頂点座標を与えられて、画素毎に座
標と、奥行きを示すZデータと、フレームデータとを生
成する生成手段と、 前記Zデータと、前記フレームデータと、各々の画素毎
に設定されたプライオリティビットとを対応付けて格納
するバッファメモリに対し、前記Zデータ、前記フレー
ムデータ及びプライオリティビットの書き込み及び読み
出しを制御するバッファメモリ制御手段と、 前記バッファメモリに格納されており、前記バッファメ
モリ制御手段により読み出されたZデータと、前記生成
手段により生成されたZデータとを与えられて比較し、
比較結果を出力するZ比較手段と、 第1、第2、第3の動作モードのうち、いずれかを設定
するモード設定手段を有し、設定された動作モードに従
って前記Z比較手段、Zバッファメモリ制御手段、フレ
ームバッファメモリ制御手段を制御するプライオリティ
ビット管理手段であって、 前記第1の動作モードが設定されているときは、各々の
画素に対応するプライオリティビットが第1の値である
場合、前記生成器が生成したフレームデータを前記フレ
ームバッファメモリ制御手段が前記バッファメモリに書
き込むことでこの画素を描画し、第2の値である場合は
描画せず、 前記第2の動作モードが設定されているときは、各々の
画素に対応するプライオリティビットが前記第1の値で
ある場合、対応する画素に関する前記Zデータ比較手段
の比較した結果にかかわらず、前記生成器が生成したフ
レームデータを前記バッファメモリ制御手段が前記バッ
ファメモリに書き込むことでこの画素を描画し、対応す
るプライオリティビットが前記第2の値である場合、前
記Zデータ比較手段の比較結果に応じてこの画素を描画
するか否かを判断し、 前記第3の動作モードが設定されているときは、各々の
画素に対応するプライオリティビットが前記第2の値で
ある場合、対応する画素に関する前記Zデータ比較手段
の比較した結果にかかわらずこの画素を描画せず、対応
するプライオリティビットが前記第1の値である場合、
前記Zデータ比較手段の比較結果に応じてこの画素を描
画するか否かを判断する、前記プライオリティビット管
理手段と、 を備えたことを特徴とする図形描画プロセッサ。
8. A generation unit for generating coordinates, Z data indicating depth, and frame data for each pixel, given the vertex coordinates of the figure, the Z data, the frame data, and each pixel. A buffer memory controlling unit that controls writing and reading of the Z data, the frame data, and a priority bit is stored in the buffer memory, which stores the Z-data, the frame data, and the priority bit in a buffer memory that stores the priority bit in association with each other. , The Z data read by the buffer memory control means and the Z data generated by the generation means are given and compared,
It has a Z comparison means for outputting a comparison result and a mode setting means for setting any one of the first, second and third operation modes, and the Z comparison means and Z buffer memory according to the set operation mode. Priority bit management means for controlling the control means and the frame buffer memory control means, wherein when the first operation mode is set and the priority bit corresponding to each pixel has a first value, The frame buffer memory control unit writes the frame data generated by the generator in the buffer memory to draw this pixel. If the pixel value is the second value, the pixel is not drawn, and the second operation mode is set. , If the priority bit corresponding to each pixel has the first value, the Z data comparison procedure for the corresponding pixel is performed. Irrespective of the result of the comparison, the buffer memory control unit writes the frame data generated by the generator into the buffer memory to draw this pixel, and when the corresponding priority bit is the second value, Whether or not to draw this pixel is determined according to the comparison result of the Z data comparison means, and when the third operation mode is set, the priority bit corresponding to each pixel is set to the second priority bit. If the value is a value, this pixel is not drawn regardless of the comparison result of the Z data comparison means for the corresponding pixel, and the corresponding priority bit is the first value,
A graphic drawing processor, comprising: the priority bit management means for determining whether or not to draw this pixel according to the comparison result of the Z data comparison means.
【請求項9】図形の頂点座標を出力する座標出力装置
と、 Zデータと、フレームデータと、各々の画素毎に設定さ
れたプライオリティビットとを対応付けて格納するバッ
ファメモリと、 前記座標出力装置から出力された頂点座標を与えられ
て、描画処理を行う図形描画プロセッサであって、 前記頂点情報を与えられて画素毎に座標と、奥行きを示
すZデータと、フレームデータとを生成する生成手段
と、 前記バッファメモリへのZデータ、フレームデータ及び
プライオリティビットの書き込み及び読み出しを制御す
るバッファメモリ制御手段と、 前記バッファメモリに格納されており、前記バッファメ
モリ制御手段により読み出されたZデータと、前記生成
手段により生成されたZデータとを与えられて比較し、
比較結果を出力するZデータ比較手段と、 第1、第2、第3の動作モードのうち、いずれかを設定
するモード設定手段を有し、設定された動作モードに従
って前記Z比較手段、バッファメモリ制御手段を制御す
るプライオリティビット管理手段であって、 前記第1の動作モードが設定されているときは、各々の
画素に対応するプライオリティビットが第1の値である
場合、前記生成器が生成したフレームデータを前記バッ
ファメモリ制御手段が前記バッファメモリに書き込むこ
とでこの画素を描画し、前記プライオリティビットが第
2の値である場合は描画せず、 前記第2の動作モードが設定されているときは、各々の
画素に対応するプライオリティビットが前記第1の値で
ある場合、対応する画素に関する前記Zデータ比較手段
の比較結果にかかわらず、前記生成器が生成したフレー
ムデータを前記バッファメモリ制御手段が前記バッファ
メモリに書き込むことでこの画素を描画し、対応する前
記プライオリティビットが前記第2の値である場合、前
記Zデータ比較手段の比較結果に応じてこの画素を描画
するか否かを判断し、 前記第3の動作モードが設定されているときは、各々の
画素に対応するプライオリティビットが前記第2の値で
ある場合、対応する画素に関する前記Zデータ比較手段
の比較結果にかかわらずこの画素を描画せず、対応する
プライオリティビットが前記第1の値である場合、前記
Zデータ比較手段の比較結果に応じてこの画素を描画す
るか否かを判断する、前記プライオリティビット管理手
段と、を有する前記図形描画プロセッサと、 を備えたことを特徴とする図形処理システム。
9. A coordinate output device for outputting vertex coordinates of a figure, a buffer memory for storing Z data, frame data, and priority bits set for each pixel in association with each other, and the coordinate output device. A graphics drawing processor that performs drawing processing by receiving the vertex coordinates output from the generating means, and generates the coordinates, the Z data indicating the depth, and the frame data for each pixel by receiving the vertex information. Buffer memory control means for controlling writing and reading of Z data, frame data and priority bits to and from the buffer memory, and Z data stored in the buffer memory and read by the buffer memory control means. , Comparing with the Z data generated by the generating means,
It has a Z data comparison means for outputting a comparison result and a mode setting means for setting any one of the first, second and third operation modes, and the Z comparison means and the buffer memory according to the set operation mode. Priority bit management means for controlling the control means, wherein when the first operation mode is set, the priority bit corresponding to each pixel has a first value generated by the generator. When the pixel is drawn by writing frame data in the buffer memory by the buffer memory control unit, and when the priority bit has a second value, it is not drawn, and when the second operation mode is set. When the priority bit corresponding to each pixel has the first value, the comparison result of the Z data comparison means for the corresponding pixel is Irrespective of the above, when the frame data generated by the generator is written in the buffer memory by the buffer memory control unit to draw this pixel and the corresponding priority bit is the second value, the Z data Whether or not to draw this pixel is determined according to the comparison result of the comparing means, and when the third operation mode is set, the priority bit corresponding to each pixel is the second value. In this case, this pixel is not drawn regardless of the comparison result of the Z data comparison means regarding the corresponding pixel, and when the corresponding priority bit is the first value, this pixel is determined according to the comparison result of the Z data comparison means. And a graphic drawing processor having the priority bit management means for determining whether or not to draw a pixel. Characteristic graphic processing system.
【請求項10】前記バッファメモリは、フレームデータ
とこのフレームデータにそれぞれ対応するプライオリテ
ィデータとを関連付けた位置関係で格納し、又は/及
び、ZデータとこのZデータにそれぞれ対応するプライ
オリティデータとを関連付けた位置関係で格納すること
を特徴とする請求項9記載の図形処理システム。
10. The buffer memory stores the frame data and the priority data respectively corresponding to the frame data in an associated positional relationship, and / or stores the Z data and the priority data respectively corresponding to the Z data. The graphic processing system according to claim 9, wherein the graphic processing system is stored in an associated positional relationship.
JP01680496A 1996-02-01 1996-02-01 Graphic drawing processor and graphic processing system Expired - Fee Related JP3233566B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP01680496A JP3233566B2 (en) 1996-02-01 1996-02-01 Graphic drawing processor and graphic processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP01680496A JP3233566B2 (en) 1996-02-01 1996-02-01 Graphic drawing processor and graphic processing system

Publications (2)

Publication Number Publication Date
JPH09212681A true JPH09212681A (en) 1997-08-15
JP3233566B2 JP3233566B2 (en) 2001-11-26

Family

ID=11926348

Family Applications (1)

Application Number Title Priority Date Filing Date
JP01680496A Expired - Fee Related JP3233566B2 (en) 1996-02-01 1996-02-01 Graphic drawing processor and graphic processing system

Country Status (1)

Country Link
JP (1) JP3233566B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115035875A (en) * 2022-08-10 2022-09-09 武汉凌久微电子有限公司 Method and device for prefetching video memory of GPU (graphics processing Unit) display controller with three-gear priority

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115035875A (en) * 2022-08-10 2022-09-09 武汉凌久微电子有限公司 Method and device for prefetching video memory of GPU (graphics processing Unit) display controller with three-gear priority
CN115035875B (en) * 2022-08-10 2022-11-15 武汉凌久微电子有限公司 Method and device for prefetching video memory of GPU (graphics processing Unit) display controller with three-gear priority

Also Published As

Publication number Publication date
JP3233566B2 (en) 2001-11-26

Similar Documents

Publication Publication Date Title
JP2662168B2 (en) Systems and methods for managing graphics system rendering context data
KR100421623B1 (en) Hardware architecture for image generation and manipulation
US5457775A (en) High performance triangle interpolator
US6151034A (en) Graphics hardware acceleration method, computer program, and system
US5038297A (en) Method and apparatus for clearing a region of Z-buffer
US7612781B2 (en) Memory control method of graphic processor unit
US5193148A (en) Method and apparatus for pixel clipping source and destination windows in a graphics system
JPH0348370A (en) Memory access control circuit
US6181346B1 (en) Graphics system
JPH08212382A (en) Z-buffer tag memory constitution
US6072506A (en) Method and apparatus for improved graphics picking using auxiliary buffer information
JPH0371277A (en) Method and device for plotting surface model
JPH09231385A (en) Method and device for rastering object
EP0486195A2 (en) Computer graphics system
CA2055784C (en) Hierarchical memory controller
US5339394A (en) I/O register protection circuit
JPH09212681A (en) Graphic drawing processor and graphic processing system
EP0551251B1 (en) Method and apparatus for clearing a region of a z-buffer
JP2003132347A (en) Image processor
US5903280A (en) Image display apparatus that reduces necessary memory capacity for operation
JP3067458B2 (en) 3D graphics drawing device
JP4195953B2 (en) Image processing device
JPH1031750A (en) Graphics command distributing method and graphics system therefor
JPH04131895A (en) Digital color video system for supplying fast pixeldata for raster display using dirty bit
JPH10261095A (en) Device and method for processing image

Legal Events

Date Code Title Description
FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070921

Year of fee payment: 6

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080921

Year of fee payment: 7

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080921

Year of fee payment: 7

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090921

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees