JP4198899B2 - 3D graphics processing device - Google Patents
3D graphics processing device Download PDFInfo
- Publication number
- JP4198899B2 JP4198899B2 JP2001209730A JP2001209730A JP4198899B2 JP 4198899 B2 JP4198899 B2 JP 4198899B2 JP 2001209730 A JP2001209730 A JP 2001209730A JP 2001209730 A JP2001209730 A JP 2001209730A JP 4198899 B2 JP4198899 B2 JP 4198899B2
- Authority
- JP
- Japan
- Prior art keywords
- circuit
- bits
- polygon
- setup circuit
- setup
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Image Processing (AREA)
- Image Generation (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、3Dグラフィックス処理装置のセットアップ回路に関する。
【0002】
【従来の技術】
3Dグラフィックス処理装置は、ポリゴン内部の位置の変化量に対するパラメータの変化量を計算するセットアップ回路と、ラスタライジング、即ち、ベクトルや線要素からなるグラフィックオブジェクトをドット形式に変換するDDA( Digital Differential Analyzer )処理回路と、ドットマトリックスを構成する各ピクセルについて最終的な色情報や奥行き情報などを求めるピクセルパイプライン回路とを備えている。
【0003】
3Dグラフィックス処理装置を構成するこれらの回路のうち、セットアップ回路の演算量は、ポリゴンの大きさに比例して多くなる。従来の3Dグラフィックス処理装置では、演算量が多い大きなポリゴンに対しては、高精度のセットアップ回路、即ち、多ビットを一度に処理できる大きなビット数を有する演算器から構成されるセットアップ回路を用いて演算を行っていた。
【0004】
しかし、大きなビット数を有する演算器のサイズは、必然的に大きくなる。この場合、当然に、セットアップ回路の面積も、大きくなる。セットアップ回路の面積が大きくなると、例えば、3Dグラフィックス処理装置が形成されるチップのサイズが大きくなるため、コストの増大などの問題が生じる。
【0005】
図11は、従来のセットアップ回路を示している。
【0006】
セットアップ回路11は、ポリゴンの頂点座標A(x0,y0),B(x1,y1),C(x2,y2)及び頂点パラメータA(p0),B(p1),C(p2)に基づいて、ポリゴン内部の位置の変化量に対するパラメータの変化量(dp/dx,dp/dy)を求める。このパラメータの変化量は、DDA処理回路12に供給される。
【0007】
セットアップ回路11は、ポリゴンの頂点座標の差分求める加算器1と、ポリゴンの頂点パラメータの差分を求める加算器2と、1/e0を求める乗算器3、加算器4及び除算器5と、頂点座標の差分と頂点パラメータの差分とを乗算する乗算器6と、乗算器6の出力信号を加算する加算器7と、加算器7の出力信号と1/e0とを乗算してポリゴン内部の位置の変化量に対するパラメータの変化量を求める乗算器8とから構成される。
【0008】
このようなセットアップ回路11では、仕様として予め決定されたポリゴンの最大サイズとパラメータ(色情報、奥行き情報など)に基づいて、各演算器1,2,・・・8のビット数(又は演算精度)が決定される。即ち、セットアップ回路11を構成する各演算器1,2,・・・8のビット数は、最大サイズのポリゴンのdp/dx及びdp/dyを1回の演算で求めることができるビット数に設定される。
【0009】
例えば、最大サイズのポリゴンの頂点座標が16ビット、頂点パラメータが8ビットで表される場合には、加算器1は、16ビット、加算器2は、8ビット、乗算器3は、16×16ビット、加算器4は、32ビット、除算器5は、32ビット、乗算器6は、8×16ビット、加算器7は、20ビット、乗算器8は、20×32ビットとなる(従来では、演算器の演算精度は、そのビット数によって一義的に決まる)。
【0010】
【発明が解決しようとする課題】
このように、従来の3Dグラフィックス処理装置では、セットアップ回路を構成する各演算器のビット数は、最大サイズのポリゴンのdp/dx及びdp/dyを1回の演算(スループット=“1”)で処理することができるビット数に設定されていた。このため、セットアップ回路の面積(ハードサイズ)が大きくなり、コストの増大などの問題が生じていた。
【0011】
本発明の目的は、セットアップ回路を構成する各演算器のビット数を最大にしなくても、最大サイズのポリゴンのdp/dx及びdp/dyを演算する精度を確保できる3Dグラフィックス処理装置を提案することにある。
【0012】
本発明の3Dグラフィックス処理装置は、ポリゴン内部の位置の変化量に対するパラメータの変化量を計算するセットアップ回路と、前記セットアップ回路の出力信号をラスタライジングするDDA処理回路と、前記DDA処理回路の出力信号に基づいてピクセルに関する情報を求めるピクセルパイプライン回路とを備え、前記セットアップ回路は、N(Nは自然数)ビットの入力データの上位N−n(nは、自然数で、N>nを満たす)ビットをモニタし、前記上位N−nビットが全て同じ値である場合には、第1信号を出力し、前記上位N−nビットが異なる値を含む場合には、第2信号を出力する演算精度変更回路と、前記入力データが入力され、前記第1信号を受けると、前記入力データの演算を1回の動作により実行し、前記第2信号を受けると、前記入力データの演算を複数回の繰り返し動作により実行する演算器とを有し、前記セットアップ回路を構成する前記演算器は、nビットタイプの演算器であり、前記セットアップ回路のスループットは、前記演算器の演算精度にかかわらず、常に前記DDA処理回路のスループット以上であり、前記演算器に最も多く入力される前記入力データは、nビットデータである。
【0030】
【発明の実施の形態】
以下、図面を参照しながら、本発明の3Dグラフィックス処理装置について詳細に説明する。
【0031】
[概要]
3Dグラフィックス処理装置において、セットアップ回路を構成する各演算器のビット数を、仕様として予め決定された最大サイズのポリゴンのdp/dx及びdp/dyを1回の演算(スループット=“1”)で処理できるビット数に設定することは、セットアップ回路の面積の増大を招く。
【0032】
ところで、3Dグラフィックス処置においては、ポリゴンサイズやパラメータは、固定されるものではなく、度々、変化するものである。つまり、最大サイズのポリゴンが用いられることは少ない。通常は、最大でない所定サイズのポリゴンが高頻度で使用されており、それ以外のサイズのポリゴンが使用されることは希である。
【0033】
そこで、まず、本発明の3Dグラフィックス処理装置では、セットアップ回路を構成する各演算器のビット数は、高頻度で使用される最大でない所定サイズのポリゴンのdp/dx及びdp/dyを所定のスループット(例えば、スループット=“1”)で処理できるビット数に設定する。
【0034】
この場合、従来の3Dグラフィックス処理装置では、所定サイズを超えるサイズのポリゴンのdp/dx及びdp/dyについては、セットアップ回路内の各演算器の演算精度(ビット数)が低すぎるため、これを処理することができない。
【0035】
そこで、本発明の3Dグラフィックス処理装置では、所定サイズを超えるサイズのポリゴンについては、セットアップ回路内の各演算器を複数回繰り返して使用することにより(各演算器の演算精度を高くすることにより)、dp/dx及びdp/dyの演算を実行する。
【0036】
ここで、所定のスループットとは、▲1▼ スループット=“1”、又は、▲2▼ セットアップ回路の出力信号を受けるDDA処理回路のスループット又はそれよりも高いスループットを意味する。
【0037】
これにより、セットアップ回路を構成する各演算器のビット数を最大にしなくても、最大サイズのポリゴンのdp/dx及びdp/dyを求めることができる。
【0038】
ところで、本発明の3Dグラフィックス処理装置では、上述のように、ポリゴンサイズやパラメータに応じて、各演算器を繰り返し使用する回数を変更している。この場合、所定サイズ以下のサイズのポリゴンについては、所定のスループット(例えば、スループット=“1”)で、dp/dx及びdp/dyを求めることができるが、高い演算精度が要求される所定サイズを超えるポリゴンについては、dp/dx及びdp/dyを求めるために、各演算器を繰り返し使用しなければならないため、セットアップ回路のスループットが低下する。
【0039】
しかし、この点は、通常の3Dグラフィックス処理装置においては、問題とはならない。
【0040】
例えば、図1に示すように、セットアップ回路11を構成する各演算器のビット数は、小さなポリゴン(高頻度で使用される所定サイズのポリゴン)を所定のスループット(例えば、DDA処理回路のスループット)で処理できるビット数に設定される。
【0041】
この場合、図2に示すように、その小さなポリゴンのサイズよりも大きなサイズのポリゴンを処理しようとすると、セットアップ回路11内の各演算器を繰り返し使用する回数が多くなるため、セットアップ回路11における演算時間が増え、そのスループットが低下する。
【0042】
しかし、図2に示すように、DDA処理回路12においても、大きなポリゴンを処理するために、スループットが低下する。つまり、大きなサイズのポリゴンを処理する場合には、DDA処理回路12におけるスループットが大幅に低下するため、セットアップ回路11のスループットがDDA処理回路12のスループットよりも低くならない限り、セットアップ回路11のスループットの低下は、問題とならない。
【0043】
従って、例えば、セットアップ回路11を構成する各演算器のビット数を最大にして、大きなポリゴンに対するセットアップ回路11のスループットを“1”(1回の演算で処理が終了すること)にしても、全く意味がない。
【0044】
このようなことから、本発明の3Dグラフィックス処理装置では、セットアップ回路を構成する各演算器のビット数は、最大にすることなく、高頻度で使用される最大でない所定サイズのポリゴンのdp/dx及びdp/dyを所定のスループットで求めることができるビット数に設定し、それよりも大きなサイズのポリゴンについては、セットアップ回路内の各演算器を複数回繰り返し使用し(各演算器の演算精度を変更し)、dp/dx及びdp/dyを求める。
【0045】
[第1実施の形態]
図3は、本発明の第1実施の形態に関わるセットアップ回路を示している。
【0046】
セットアップ回路11は、ポリゴンの頂点座標A(x0,y0),B(x1,y1),C(x2,y2)及び頂点パラメータA(p0),B(p1),C(p2)に基づいて、ポリゴン内部の位置の変化量に対するパラメータの変化量(dp/dx,dp/dy)を求める。このパラメータの変化量は、DDA処理回路12に供給される。
【0047】
セットアップ回路11は、図4に示すような計算を行う回路である。
【0048】
即ち、3点A(x0,y0),B(x1,y1),C(x2,y2)を結ぶことにより形成される三角形(ポリゴン)があり、この三角形の各点にパラメータA(p0),B(p1),C(p2)が与えられるものとする。この場合、三角形内部の位置の微小変化量に対するパラメータの変化量(dp/dx,dp/dy)は、式(1)〜(3)で与えられる。セットアップ回路11は、このパラメータの変化量(dp/dx,dp/dy)を計算する回路である。
【0049】
セットアップ回路11は、ポリゴンの頂点座標の差分求める加算器1Aと、ポリゴンの頂点パラメータの差分を求める加算器2Aと、1/e0を求める乗算器3A、加算器4A及び除算器5Aと、頂点座標の差分と頂点パラメータの差分とを乗算する乗算器6Aと、乗算器6Aの出力信号を加算する加算器7Aと、加算器7Aの出力信号と1/e0とを乗算してポリゴン内部の位置の変化量に対するパラメータの変化量を求める乗算器8Aとを有する。
【0050】
さらに、本発明では、セットアップ回路11は、演算精度変更回路10を有している。演算精度変更回路10は、頂点座標の差分(ポリゴンサイズの依存する)及び頂点パラメータの差分をモニタし、これらの差分(入力信号のビット数)に基づいて、各演算器3A,4A,5A,6A,7A,8Aの演算精度を変更する。
【0051】
各演算器3A,4A,5A,6A,7A,8Aのビット数は、高頻度で使用される最大でない所定サイズのポリゴンのdp/dx及びdp/dyを所定のスループットで処理できるビット数に固定されているため、演算精度の変更は、各演算器3A,4A,5A,6A,7A,8Aを繰り返し使用する回数を変更することにより行う。各演算器3A,4A,5A,6A,7A,8Aを繰り返し使用する回数を自由に変更できれば、各演算器3A,4A,5A,6A,7A,8Aのビット数が所定のビット数に固定されていても、最大サイズのポリゴンのdp/dx及びdp/dyを求めることができる。
【0052】
なお、各演算器3A,4A,5A,6A,7A,8Aを繰り返し使用する回数は、演算精度変更回路10により決定され、演算精度変更回路10から、演算精度制御線9を経由して、各演算器3A,4A,5A,6A,7A,8Aに伝達される。
【0053】
この場合、例えば、ポリゴンのサイズが小さいときには、セットアップ回路11は、低い精度を有していれば足りるため、例えば、各演算器3A,4A,5A,6A,7A,8Aを1回だけ動かすことにより、dp/dx及びdp/dyを計算することができる。このときのセットアップ回路11のスループットは、“1”となる。
【0054】
また、例えば、ポリゴンのサイズが大きいときには、セットアップ回路11には、高い精度が要求されるため、各演算器3A,4A,5A,6A,7A,8Aを複数回繰り返し動かすことにより、パラメータの変化量(dp/dx,dp/dy)を計算できる。但し、このときのセットアップ回路11のスループットは、低下する。
【0055】
このように、本発明のセットアップ回路によれば、各演算器3A,4A,5A,6A,7A,8Aのビット数は、高頻度で使用される最大でない所定サイズのポリゴンのdp/dx及びdp/dyを所定のスループットで処理できるビット数に固定されている。つまり、各演算器3A,4A,5A,6A,7A,8Aのビット数は、最大サイズのポリゴンのdp/dx及びdp/dyをスループット“1”で処理できる最大ビット数に固定されないため、セットアップ回路11の面積が大きくなることがなく、コストの増加を抑えることができる。
【0056】
例えば、本発明のセットアップ回路11では、最大サイズのポリゴンの頂点座標が16ビット、頂点パラメータが8ビットで表される場合においては、乗算器3Aは、8×8ビット、加算器4Aは、8ビット、除算器5Aは、8ビット、乗算器6Aは、8×8ビット、加算器7Aは、8ビット、乗算器8Aは、8×8ビットに設定される。
【0057】
なお、この場合、従来(図11)では、乗算器3は、16×16ビット、加算器4は、32ビット、除算器5は、32ビット、乗算器6は、8×16ビット、加算器7は、20ビット、乗算器8は、20×32ビットとなるため、本発明のセットアップ回路11によれば、大幅な回路面積の縮小が可能であることが分かる。
【0058】
一方、本発明のセットアップ回路11では、各演算器3A,4A,5A,6A,7A,8Aの演算精度の変更は、各演算器3A,4A,5A,6A,7A,8Aを繰り返し使用する回数を変更することにより行う。この場合、ポリゴンのサイズが大きくなればなるほど、各演算器3A,4A,5A,6A,7A,8Aを繰り返し使用する回数が増え、スループットが低下する。
【0059】
しかし、ポリゴンのサイズが大きくなることによるスループットの低下は、上述したように、DDA処理装置のスループットを下回らない限り、問題とはならない。
【0060】
図5は、演算精度変更回路の一例を示している。
【0061】
演算精度変更回路10は、簡単なロジック回路、例えば、AND回路、NOR回路及びOR回路の組み合せにより構成できる。例えば、頂点座標又は頂点パラメータが16ビットである場合には、図3の加算器2,3から出力される16ビットの出力信号(差分)の上位8ビットの値をモニタする。
【0062】
これら上位8ビットが全て同じ値(“0”又は“1”)である場合には、これら上位8ビットを使用していないことから、ポリゴンのサイズが小さいと判断され、OR回路の出力信号が“1”となる。この場合、図3の各演算器3A,4A,5A,6A,7A,8Aは、1回のみ動作するため、セットアップ回路の演算精度は、低くなるが、スループットは、“1”となる。
【0063】
一方、これら上位8ビットが全て同じ値(“0”又は“1”)でない場合には、これら上位8ビットを使用していることから、ポリゴンのサイズが大きいと判断され、OR回路の出力信号が“0”となる。この場合、図3の各演算器3A,4A,5A,6A,7A,8Aは、複数回繰り返して動作するため、セットアップ回路の演算精度は、高くなるが、スループットは、低下する。
【0064】
図6は、図3の乗算器3A及び加算器4Aのみを示したブロック図である。このブロック図に対応する従来のブロック図を、図7に示す。図6と図7を比較すると明らかなように、本発明の乗算器3Aのビット数は、従来の乗算器3のビット数の1/2になっており、また、本発明の加算器4Aのビット数は、従来の加算器4のビット数の1/2になっている。
【0065】
一般に、乗算器及び加算器は、そのビット数を2倍にすると、その面積が3倍になる。従って、本発明のセットアップ回路では、乗算器のサイズは、従来サイズの1/3、加算器のサイズは、従来サイズの1/3になる。また、本発明のセットアップ回路では、乗算器3A及び加算器4Aのビット数が、従来の乗算器3及び加算器4のビット数よりも小さくなるが、乗算器3A及び加算器4Aを複数回繰り返し動作させることにより、演算精度を高くすることができる。
【0066】
図8は、セットアップ回路の動作を示すフローチャートである。
【0067】
まず、演算精度変更回路は、頂点座標の差分又は頂点パラメータの差分に基づいて、各演算器に必要な演算精度を判定する。そして、この演算精度から、ポリゴン内の位置の変化量に対するパラメータの変化量を計算するために必要な各演算器の繰り返し動作回数(ループ回数)を決定する(ステップST1〜2)。
【0068】
このループ回数は、各演算器に伝達される。各演算器では、このループ回数に基づいてループ変数をセットする。ループ変数は、ループ回数がN(Nは、自然数)の場合には、N+1にセットされる(ステップST3)。
【0069】
この後、1回目の演算を行い、その演算が終了した後に、ループ変数を“1”減らす(ステップST4〜5)。ループ変数が“0”か否かをチェックし、“0”(ループ回数“0”)の場合には、各演算器における演算動作を終了させる(ステップST6)。ループ変数が“0”でない場合には、2回目の演算を行い、その演算が終了した後に、ループ変数を“1”減らす(ステップST4〜5)。
【0070】
そして、ループ変数が“0”になるまで、ステップST4〜6の動作を繰り返し行う。
【0071】
本発明のセットアップ回路では、各演算器のビット数が小さく設定されるため、その面積は小さい。また、各演算器の演算精度が低くて構わない場合には、例えば、ループ変数が“1”に設定され、高いスループットで演算処理が行われる。また、各演算器に関して、高い演算精度が必要な場合には、ループ変数を大きな値とし、必要な演算精度を確保する。この場合には、ループ変数の増加に応じて、スループットも低下する。
【0072】
[第2実施の形態]
図9は、本発明の第2実施の形態に関わるセットアップ回路の一部を示している。
【0073】
本例は、図3のセットアップ回路の点線で囲んだ部分、即ち、2つの乗算器と1つの加算器からなる演算器の変形例に関する。
【0074】
各乗算器は、8×8ビットタイプとなっており、その前段には、セレクタが配置される。セレクタは、2つの入力データ(各16ビット)のうちの1つを選択し、選択された入力データを乗算器に転送する。また、加算器は、16ビットタイプとなっており、その後段には、セレクタ及びレジスタからなる回路が配置される。
【0075】
コントローラ21は、演算精度変更回路から出力されるループ回数を表す信号に基づいて、ループ変数をセットする。コントローラ21は、ループ変数の値に基づいてセレクタを制御し、加算器の出力データを、その入力データとしてフィードバックさせるか否かを決定する。
【0076】
ループ回数“0”(ループ変数“1”)で演算処理が可能な場合には、演算精度は、低くなるが、スループットは、“1”となる。ループ回数“3”(ループ変数“4”)で演算処理を行う場合には、演算精度は、高くなるが、入力データの下位×下位、上位×下位、下位×上位、上位×上位の演算を行わなければならないため、スループットは、“1/4”となる。
【0077】
このような3Dグラフィックス処理装置においても、セットアップ回路を構成する各演算器のビット数を最大にしなくても、最大サイズのポリゴンのdp/dx及びdp/dyを演算できるため、製造コストの低下を実現できる。
【0078】
[第3実施の形態]
図10は、本発明の第3実施の形態に関わるセットアップ回路を示している。
【0079】
本例は、演算精度変更回路の変形例に関する。
【0080】
図3のセットアップ回路では、頂点座標の差分及び頂点パラメータの差分に基づいて各演算器の演算精度(ループ回数)を決定していたが、本例のセットアップ回路では、各演算器の演算精度(ループ回数)は、頂点座標の差分のみに基づいて決定する。
【0081】
また、各演算器の演算精度(ループ回数)を決定するに当たっては、複数の頂点座標の差分のうち、少なくとも1つの差分をモニタすればよい。
【0082】
当然に、図3のセットアップ回路においても、複数の頂点座標の差分のうちの少なくとも1つの差分及び複数の頂点パラメータの差分のうちの少なくとも1つの差分をモニタすればよいことになる。
【0083】
セットアップ回路11は、ポリゴンの頂点座標A(x0,y0),B(x1,y1),C(x2,y2)及び頂点パラメータA(p0),B(p1),C(p2)に基づいて、ポリゴン内部の位置の変化量に対するパラメータの変化量(dp/dx,dp/dy)を求める。このパラメータの変化量は、DDA処理回路12に供給される。セットアップ回路11は、図4に示すような計算を行う。
【0084】
セットアップ回路11は、ポリゴンの頂点座標の差分求める加算器1Aと、ポリゴンの頂点パラメータの差分を求める加算器2Aと、1/e0を求める乗算器3A、加算器4A及び除算器5Aと、頂点座標の差分と頂点パラメータの差分とを乗算する乗算器6Aと、乗算器6Aの出力信号を加算する加算器7Aと、加算器7Aの出力信号と1/e0とを乗算してポリゴン内部の位置の変化量に対するパラメータの変化量を求める乗算器8Aとを有する。
【0085】
さらに、本発明では、セットアップ回路11は、演算精度変更回路10を有している。演算精度変更回路10は、頂点座標の差分をモニタし、この差分に基づいて、各演算器3A,4A,5A,6A,7A,8Aの演算精度を変更する。
【0086】
各演算器3A,4A,5A,6A,7A,8Aのビット数は、高頻度で使用される最大でない所定サイズのポリゴンのdp/dx及びdp/dyを所定のスループットで処理できるビット数に固定されているため、演算精度の変更は、各演算器3A,4A,5A,6A,7A,8Aを繰り返し使用する回数を変更することにより行う。各演算器3A,4A,5A,6A,7A,8Aを繰り返し使用する回数を自由に変更できれば、各演算器3A,4A,5A,6A,7A,8Aのビット数が所定のビット数に固定されていても、最大サイズのポリゴンについてdp/dx及びdp/dyを求めることができる。
【0087】
なお、各演算器3A,4A,5A,6A,7A,8Aを繰り返し使用する回数は、演算精度変更回路10により決定され、演算精度変更回路10から、演算精度制御線9を経由して、各演算器3A,4A,5A,6A,7A,8Aに伝達される。
【0088】
このように、本発明のセットアップ回路によれば、各演算器3A,4A,5A,6A,7A,8Aのビット数は、高頻度で使用される最大でない所定サイズのポリゴンのdp/dx及びdp/dyを所定のスループットで処理できるビット数に固定されている。つまり、各演算器3A,4A,5A,6A,7A,8Aのビット数は、最大サイズのポリゴンのdp/dx及びdp/dyスループット“1”で処理するための最大ビット数に固定されないため、セットアップ回路11の面積が大きくなることがなく、コストの増加を抑えることができる。
【0089】
また、本発明のセットアップ回路11では、各演算器3A,4A,5A,6A,7A,8Aの演算精度の変更は、各演算器3A,4A,5A,6A,7A,8Aを繰り返し使用する回数を変更することにより行う。この場合、ポリゴンのサイズが大きくなればなるほど、各演算器3A,4A,5A,6A,7A,8Aを繰り返し使用する回数が増え、スループットが低下する。
【0090】
しかし、ポリゴンのサイズが大きくなることによるスループットの低下は、上述したように、DDA処理装置のスループットを下回らない限り、問題とはならない。
【0091】
[その他]
本発明は、3Dグラフィックス処理装置のセットアップ回路に適用するのが最も効果的であるが、本発明の原理は、これ以外の演算回路などに応用することも可能である。
【0092】
【発明の効果】
以上、説明したように、本発明によれば、セットアップ回路を構成する各演算器のビット数を最大にしなくても、最大サイズのポリゴンのdp/dx及びdp/dyを演算することができる精度を確保できる3Dグラフィックス処理装置を提供できる。
【図面の簡単な説明】
【図1】本発明のセットアップ回路を含むシステムの一例を示す図。
【図2】本発明のセットアップ回路を含むシステムの一例を示す図。
【図3】本発明の第1実施の形態に関わるセットアップ回路を示す図。
【図4】セットアップ回路が行う演算を説明する図。
【図5】演算精度変更回路の一例を示す図。
【図6】本発明のe0を求める回路を示す図。
【図7】従来のe0を求める回路を示す図。
【図8】本発明のセットアップ回路の動作を示す図。
【図9】本発明の第2実施の形態に関わるセットアップ回路の一部を示す図。
【図10】本発明の第3実施の形態に関わるセットアップ回路を示す図。
【図11】従来のセットアップ回路の一部を示す図。
【符号の説明】
1,1A,2,2A,4,4A,7,7A :加算器、
3,3A,6,6A,8,8A :乗算器、
5,5A :除算器、
9 :演算精度制御線、
10 :演算精度変更回路、
11 :セットアップ回路、
12 :DDA処理回路、
13 :ピクセルパイプライン回路、
21 :コントローラ。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a setup circuit for a 3D graphics processing apparatus.
[0002]
[Prior art]
The 3D graphics processing apparatus includes a setup circuit that calculates a change amount of a parameter with respect to a change amount of a position inside a polygon, and rasterizing, that is, a DDA (Digital Differential Analyzer) that converts a graphic object composed of a vector or a line element into a dot format. ) A processing circuit and a pixel pipeline circuit for obtaining final color information and depth information for each pixel constituting the dot matrix.
[0003]
Of these circuits constituting the 3D graphics processing apparatus, the amount of calculation of the setup circuit increases in proportion to the size of the polygon. In a conventional 3D graphics processing device, a high-precision setup circuit, that is, a setup circuit composed of an arithmetic unit having a large number of bits capable of processing many bits at once is used for a large polygon having a large amount of calculation. I was doing calculations.
[0004]
However, the size of an arithmetic unit having a large number of bits inevitably increases. In this case, of course, the area of the setup circuit also increases. If the area of the setup circuit increases, for example, the size of the chip on which the 3D graphics processing device is formed increases, which causes problems such as an increase in cost.
[0005]
FIG. 11 shows a conventional setup circuit.
[0006]
The
[0007]
The
[0008]
In such a
[0009]
For example, when the vertex coordinate of the maximum size polygon is represented by 16 bits and the vertex parameter is represented by 8 bits, the
[0010]
[Problems to be solved by the invention]
As described above, in the conventional 3D graphics processing apparatus, the number of bits of each arithmetic unit constituting the setup circuit is one calculation of the maximum size polygon dp / dx and dp / dy (throughput = “1”). Was set to the number of bits that can be processed. For this reason, the area (hardware size) of the setup circuit is increased, causing problems such as an increase in cost.
[0011]
The object of the present invention is to propose a 3D graphics processing apparatus capable of ensuring the accuracy of calculating dp / dx and dp / dy of a polygon of the maximum size without maximizing the number of bits of each arithmetic unit constituting the setup circuit. There is to do.
[0012]
The 3D graphics processing apparatus of the present invention includes a setup circuit that calculates a change amount of a parameter with respect to a change amount of a position inside a polygon, a DDA processing circuit that rasterizes an output signal of the setup circuit, and an output of the DDA processing circuit. A pixel pipeline circuit that obtains information related to the pixel based on the signal, and the setup circuit includes N (n is a natural number and N> n) of N (N is a natural number) input data. A bit is monitored, and when all the upper N−n bits have the same value, the first signal is output, and when the upper N−n bits include different values, the second signal is output. When the accuracy change circuit and the input data are inputted and the first signal is received, the calculation of the input data is executed by one operation, and the second When receiving the items, and an arithmetic unit for performing the repetitive operation of a plurality of times an operation of said input data, said set-up circuit The computing unit constituting Is An n-bit type arithmetic unit, and the throughput of the setup circuit is always regardless of the arithmetic accuracy of the arithmetic unit. More than the throughput of the DDA processing circuit Therefore, the input data that is input most frequently to the arithmetic unit is n-bit data. .
[0030]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, the 3D graphics processing apparatus of the present invention will be described in detail with reference to the drawings.
[0031]
[Overview]
In the 3D graphics processing apparatus, the number of bits of each computing unit constituting the setup circuit is calculated once for the maximum size polygon dp / dx and dp / dy determined as specifications (throughput = “1”). Setting the number of bits that can be processed by the method causes an increase in the area of the setup circuit.
[0032]
By the way, in the 3D graphics processing, the polygon size and parameters are not fixed, but often change. That is, the maximum size polygon is rarely used. Normally, polygons of a predetermined size that is not the maximum are frequently used, and polygons of other sizes are rarely used.
[0033]
Therefore, first, in the 3D graphics processing apparatus of the present invention, the number of bits of each arithmetic unit constituting the setup circuit is set to a predetermined number of polygons dp / dx and dp / dy which are not maximum and are used at a high frequency. The number of bits that can be processed with a throughput (for example, throughput = “1”) is set.
[0034]
In this case, in the conventional 3D graphics processing device, the calculation precision (number of bits) of each calculator in the setup circuit is too low for dp / dx and dp / dy of polygons having a size exceeding a predetermined size. Can't handle.
[0035]
Therefore, in the 3D graphics processing apparatus of the present invention, for polygons having a size exceeding a predetermined size, each arithmetic unit in the setup circuit is repeatedly used (by increasing the arithmetic accuracy of each arithmetic unit). ), Dp / dx and dp / dy.
[0036]
Here, the predetermined throughput means (1) throughput = “1”, or (2) the throughput of the DDA processing circuit that receives the output signal of the setup circuit or a higher throughput.
[0037]
Thereby, it is possible to obtain dp / dx and dp / dy of the polygon of the maximum size without maximizing the number of bits of each arithmetic unit constituting the setup circuit.
[0038]
By the way, in the 3D graphics processing apparatus of the present invention, as described above, the number of times each arithmetic unit is repeatedly used is changed according to the polygon size and parameters. In this case, dp / dx and dp / dy can be obtained with a predetermined throughput (for example, throughput = “1”) for a polygon having a size equal to or smaller than a predetermined size, but the predetermined size requires high calculation accuracy. For polygons that exceed, each computing unit must be used repeatedly to determine dp / dx and dp / dy, reducing the throughput of the setup circuit.
[0039]
However, this is not a problem in a normal 3D graphics processing apparatus.
[0040]
For example, as shown in FIG. 1, the number of bits of each arithmetic unit constituting the
[0041]
In this case, as shown in FIG. 2, when trying to process a polygon having a size larger than the size of the small polygon, the number of times each arithmetic unit in the
[0042]
However, as shown in FIG. 2, the
[0043]
Therefore, for example, even if the number of bits of each arithmetic unit constituting the
[0044]
For this reason, in the 3D graphics processing apparatus of the present invention, the number of bits of each arithmetic unit constituting the setup circuit is not maximized, and dp / d of a polygon of a predetermined size that is used at a high frequency is not maximized. dx and dp / dy are set to the number of bits that can be obtained with a predetermined throughput. For polygons of a larger size, each arithmetic unit in the setup circuit is repeatedly used multiple times (the arithmetic accuracy of each arithmetic unit). Dp / dx and dp / dy are obtained.
[0045]
[First Embodiment]
FIG. 3 shows a setup circuit according to the first embodiment of the present invention.
[0046]
The
[0047]
The
[0048]
That is, there are triangles (polygons) formed by connecting three points A (x0, y0), B (x1, y1), and C (x2, y2). A parameter A (p0), Assume that B (p1) and C (p2) are given. In this case, the change amount (dp / dx, dp / dy) of the parameter with respect to the minute change amount of the position inside the triangle is given by the equations (1) to (3). The
[0049]
The
[0050]
Further, in the present invention, the
[0051]
The number of bits of each of the
[0052]
It should be noted that the number of times each of the
[0053]
In this case, for example, when the polygon size is small, the
[0054]
Further, for example, when the polygon size is large, the
[0055]
As described above, according to the setup circuit of the present invention, the number of bits of each of the
[0056]
For example, in the
[0057]
In this case, in the conventional case (FIG. 11), the
[0058]
On the other hand, in the
[0059]
However, a decrease in throughput due to an increase in polygon size is not a problem unless the throughput of the DDA processing apparatus is lower than that described above.
[0060]
FIG. 5 shows an example of the calculation accuracy changing circuit.
[0061]
The arithmetic
[0062]
When these upper 8 bits are all the same value (“0” or “1”), since these upper 8 bits are not used, it is determined that the size of the polygon is small, and the output signal of the OR circuit is “1”. In this case, since the
[0063]
On the other hand, if these upper 8 bits are not all the same value (“0” or “1”), since these upper 8 bits are used, it is determined that the size of the polygon is large, and the output signal of the OR circuit Becomes “0”. In this case, each of the
[0064]
FIG. 6 is a block diagram showing only the
[0065]
In general, the area of the multiplier and adder is tripled when the number of bits is doubled. Therefore, in the setup circuit of the present invention, the size of the multiplier is 1/3 of the conventional size, and the size of the adder is 1/3 of the conventional size. In the setup circuit of the present invention, the number of bits of the
[0066]
FIG. 8 is a flowchart showing the operation of the setup circuit.
[0067]
First, the calculation accuracy changing circuit determines the calculation accuracy required for each calculator based on the difference in vertex coordinates or the difference in vertex parameters. Then, from this calculation accuracy, the number of repetition operations (the number of loops) of each calculator necessary for calculating the change amount of the parameter with respect to the change amount of the position in the polygon is determined (steps ST1 and ST2).
[0068]
This number of loops is transmitted to each arithmetic unit. Each arithmetic unit sets a loop variable based on the number of loops. The loop variable is set to N + 1 when the number of loops is N (N is a natural number) (step ST3).
[0069]
Thereafter, the first calculation is performed, and after the calculation is completed, the loop variable is decreased by “1” (steps ST4 to ST5). It is checked whether or not the loop variable is “0”. If it is “0” (the number of loops is “0”), the arithmetic operation in each arithmetic unit is terminated (step ST6). If the loop variable is not “0”, the second calculation is performed, and after the calculation is completed, the loop variable is decreased by “1” (steps ST4 to ST5).
[0070]
Then, the operations in steps ST4 to ST6 are repeated until the loop variable becomes “0”.
[0071]
In the setup circuit of the present invention, since the number of bits of each arithmetic unit is set small, the area is small. Further, when the calculation accuracy of each calculator may be low, for example, the loop variable is set to “1” and the calculation process is performed with high throughput. For each arithmetic unit, when a high calculation accuracy is required, the loop variable is set to a large value to ensure the required calculation accuracy. In this case, the throughput decreases as the loop variable increases.
[0072]
[Second Embodiment]
FIG. 9 shows a part of a setup circuit according to the second embodiment of the present invention.
[0073]
This example relates to a modified example of a computing unit including a part surrounded by a dotted line in the setup circuit of FIG. 3, that is, two multipliers and one adder.
[0074]
Each multiplier is an 8 × 8 bit type, and a selector is arranged in the preceding stage. The selector selects one of the two input data (16 bits each), and transfers the selected input data to the multiplier. The adder is a 16-bit type, and a circuit including a selector and a register is arranged in the subsequent stage.
[0075]
The
[0076]
When calculation processing is possible with the loop count “0” (loop variable “1”), the calculation accuracy is low, but the throughput is “1”. When the calculation process is performed with the number of loops “3” (loop variable “4”), the calculation accuracy is high, but the low-order x low-order, high-order x low-order, low-order high-order, high-order high-order calculation of the input data Since this must be done, the throughput is "1/4".
[0077]
Even in such a 3D graphics processing apparatus, since it is possible to calculate dp / dx and dp / dy of the polygon of the maximum size without maximizing the number of bits of each arithmetic unit constituting the setup circuit, the manufacturing cost is reduced. Can be realized.
[0078]
[Third Embodiment]
FIG. 10 shows a setup circuit according to the third embodiment of the present invention.
[0079]
This example relates to a modification of the calculation accuracy changing circuit.
[0080]
In the setup circuit of FIG. 3, the calculation accuracy (number of loops) of each arithmetic unit is determined based on the difference in vertex coordinates and the difference in vertex parameters, but in the setup circuit of this example, the calculation accuracy ( The number of loops) is determined based only on the vertex coordinate difference.
[0081]
In determining the calculation accuracy (number of loops) of each calculator, at least one difference among the plurality of vertex coordinate differences may be monitored.
[0082]
Naturally, in the setup circuit of FIG. 3, it is only necessary to monitor at least one difference among a plurality of vertex coordinate differences and at least one difference among a plurality of vertex parameter differences.
[0083]
The
[0084]
The
[0085]
Further, in the present invention, the
[0086]
The number of bits of each of the
[0087]
It should be noted that the number of times each of the
[0088]
As described above, according to the setup circuit of the present invention, the number of bits of each of the
[0089]
In the
[0090]
However, a decrease in throughput due to an increase in polygon size is not a problem unless the throughput of the DDA processing apparatus is lower than that described above.
[0091]
[Others]
The present invention is most effective when applied to a setup circuit of a 3D graphics processing apparatus, but the principle of the present invention can also be applied to other arithmetic circuits.
[0092]
【The invention's effect】
As described above, according to the present invention, it is possible to calculate dp / dx and dp / dy of a polygon of the maximum size without maximizing the number of bits of each arithmetic unit constituting the setup circuit. 3D graphics processing apparatus can be provided.
[Brief description of the drawings]
FIG. 1 is a diagram showing an example of a system including a setup circuit of the present invention.
FIG. 2 is a diagram showing an example of a system including a setup circuit of the present invention.
FIG. 3 is a diagram showing a setup circuit according to the first embodiment of the present invention.
FIG. 4 is a diagram for explaining a calculation performed by a setup circuit.
FIG. 5 is a diagram illustrating an example of a calculation accuracy changing circuit.
FIG. 6 is a diagram showing a circuit for obtaining e0 of the present invention.
FIG. 7 is a diagram showing a conventional circuit for obtaining e0.
FIG. 8 is a diagram showing the operation of the setup circuit of the present invention.
FIG. 9 is a diagram showing a part of a setup circuit according to a second embodiment of the present invention.
FIG. 10 is a diagram showing a setup circuit according to a third embodiment of the present invention.
FIG. 11 is a diagram showing a part of a conventional setup circuit.
[Explanation of symbols]
1, 1A, 2, 2A, 4, 4A, 7, 7A: adder,
3, 3A, 6, 6A, 8, 8A: a multiplier,
5, 5A: Divider,
9: Calculation accuracy control line,
10: Calculation accuracy changing circuit,
11: Setup circuit,
12: DDA processing circuit,
13: Pixel pipeline circuit,
21: Controller.
Claims (1)
前記セットアップ回路は、
N(Nは自然数)ビットの入力データの上位N−n(nは、自然数で、N>nを満たす)ビットをモニタし、前記上位N−nビットが全て同じ値である場合には、第1信号を出力し、前記上位N−nビットが異なる値を含む場合には、第2信号を出力する演算精度変更回路と、前記入力データが入力され、前記第1信号を受けると、前記入力データの演算を1回の動作により実行し、前記第2信号を受けると、前記入力データの演算を複数回の繰り返し動作により実行する演算器とを有し、
前記セットアップ回路を構成する前記演算器は、nビットタイプの演算器であり、
前記セットアップ回路のスループットは、前記演算器の演算精度にかかわらず、常に前記DDA処理回路のスループット以上であり、
前記演算器に最も多く入力される前記入力データは、nビットデータである
ことを特徴とする3Dグラフィックス処理装置。A setup circuit for calculating a change amount of a parameter with respect to a change amount of a position inside a polygon, a DDA processing circuit for rasterizing an output signal of the setup circuit, and a pixel for obtaining information on a pixel based on an output signal of the DDA processing circuit A pipeline circuit,
The setup circuit is
If the upper N−n (n is a natural number and satisfies N> n) bits of N (N is a natural number) input data is monitored and all the upper N−n bits have the same value, When one signal is output and the upper N−n bits include different values, a calculation accuracy changing circuit that outputs a second signal, and when the input data is input and the first signal is received, the input An arithmetic unit that performs an operation of data by a single operation and receives the second signal, and performs an operation of the input data by a plurality of repetitive operations;
The arithmetic unit constituting the setup circuit is an n-bit type arithmetic unit,
Throughput of the set-up circuit, regardless of the operation accuracy of said arithmetic unit, Ri always throughput or der of the DDA processing circuit,
3. The 3D graphics processing apparatus according to claim 1, wherein the input data input most frequently to the computing unit is n-bit data .
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2001209730A JP4198899B2 (en) | 2001-07-10 | 2001-07-10 | 3D graphics processing device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2001209730A JP4198899B2 (en) | 2001-07-10 | 2001-07-10 | 3D graphics processing device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2003029959A JP2003029959A (en) | 2003-01-31 |
| JP4198899B2 true JP4198899B2 (en) | 2008-12-17 |
Family
ID=19045347
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2001209730A Expired - Fee Related JP4198899B2 (en) | 2001-07-10 | 2001-07-10 | 3D graphics processing device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4198899B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4664169B2 (en) * | 2005-09-26 | 2011-04-06 | 三菱電機株式会社 | Graphic drawing apparatus and graphic drawing program |
-
2001
- 2001-07-10 JP JP2001209730A patent/JP4198899B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2003029959A (en) | 2003-01-31 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CA2099720C (en) | System and method for rendering bezier splines | |
| JP5294313B2 (en) | Bezier curve drawing device, Bezier curve drawing method and program | |
| JP2618951B2 (en) | 3D graphics processor | |
| US5241654A (en) | Apparatus for generating an arbitrary parameter curve represented as an n-th order Bezier curve | |
| US5237649A (en) | Method and system for acquiring interpolation points from straight short vectors representing figure in curve fitting | |
| JP4198899B2 (en) | 3D graphics processing device | |
| EP0680020B1 (en) | Apparatus and method for direct calculation of clip region outcodes | |
| JP4300001B2 (en) | Clipping device | |
| US7636095B2 (en) | Pixel delta interpolation method and apparatus | |
| US6373494B1 (en) | Signal processing apparatus and image processing apparatus | |
| JP3384470B2 (en) | Numerical value conversion device and method, and coordinate value integer conversion device and method | |
| JP2755289B2 (en) | Rendering method | |
| US6784895B1 (en) | Programmable multiple texture combine circuit for a graphics processing system and method for use thereof | |
| CN116227507A (en) | Arithmetic device for performing bilinear interpolation processing | |
| JP2674287B2 (en) | Graphic microcomputer | |
| JP4662412B2 (en) | Character graphic display device, character graphic display method, program, and recording medium | |
| US7151862B2 (en) | Image processing apparatus and method, storage medium, and program | |
| JPH02176879A (en) | Parameter curved line generator | |
| JP2001109613A (en) | Arithmetic unit | |
| CN115393167A (en) | Double-precision data truncation calculation structure in graphics processor and calculation method thereof | |
| JPH0368086A (en) | Linear interpolating circuit | |
| JP2012089947A (en) | Image reduction system | |
| JPS6329840A (en) | Bit arithmetic processing unit | |
| JPS62293484A (en) | Picture rotary circuit | |
| JPH02100770A (en) | Calculation process method for extent space of polyhedron |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20050314 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070327 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070528 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20080408 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080609 |
|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20080708 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080905 |
|
| A911 | Transfer of reconsideration by examiner before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20080911 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20080930 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20081002 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111010 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111010 Year of fee payment: 3 |
|
| LAPS | Cancellation because of no payment of annual fees |