JP4325038B2 - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP4325038B2
JP4325038B2 JP29891899A JP29891899A JP4325038B2 JP 4325038 B2 JP4325038 B2 JP 4325038B2 JP 29891899 A JP29891899 A JP 29891899A JP 29891899 A JP29891899 A JP 29891899A JP 4325038 B2 JP4325038 B2 JP 4325038B2
Authority
JP
Japan
Prior art keywords
data
circuit
texture
processing
pixel
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
Application number
JP29891899A
Other languages
Japanese (ja)
Other versions
JP2001118056A (en
Inventor
辰己 光下
裕幸 小沢
俊男 堀岡
謙士朗 荒瀬
悦和 黒瀬
睦弘 大森
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP29891899A priority Critical patent/JP4325038B2/en
Publication of JP2001118056A publication Critical patent/JP2001118056A/en
Application granted granted Critical
Publication of JP4325038B2 publication Critical patent/JP4325038B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、小規模な構成で高画質な画像を提供できる画像処理装置に関する。
【0002】
【従来の技術】
種々のCAD(Computer Aided Design) システムや、アミューズメント装置などにおいて、コンピュータグラフィックスがしばしば用いられている。特に、近年の画像処理技術の進展に伴い、3次元コンピュータグラフィックスを用いたシステムが急速に普及している。
このような3次元コンピュータグラフィックスでは、各画素(ピクセル)に対応する色を決定するときに、各画素の色の値を計算し、この計算した色の値を、当該画素に対応するディスプレイバッファ(フレームバッファ)のアドレスに書き込むレンダリング(Rendering) 処理を行う。
レンダリング処理の手法の一つに、ポリゴン(Polygon)レンダリングがある。この手法では、立体モデルを三角形の単位図形(ポリゴン)の組み合わせとして表現しておき、このポリゴンを単位として描画を行なうことで、表示画面の色を決定する。
【0003】
ポリゴンレンダリングでは、物理座標系における三角形の各頂点についての、座標(x,y,z)と、色データ(R,G,B)と、張り合わせのイメージパターンを示すテクスチャデータの同次座標(s,t)および同次項qの値とを三角形の内部で補間する処理が行われる。
ここで、同次項qは、簡単にいうと、拡大縮小率のようなもので、実際のテクスチャバッファのUV座標系における座標、すなわち、テクスチャ座標データ(U,V)は、同次座標(s,t)を同次項qで除算した(s/q,t/q)=(u,v)に、それぞれテクスチャサイズUSIZEおよびVSIZEを乗じた乗算結果に応じたものとなる。
【0004】
このようなポリゴンレンダリングを用いた3次元コンピュータグラフィックシステムでは、描画を行う際に、テクスチャデータをテクスチャバッファから読み出し、この読み出したテクスチャデータを、立体モデルの表面に張り付け、リアリティの高い画像データを得るテクスチャマッピング処理を行う。
なお、立体モデルについてテクスチャマッピングを行なうと、各画素毎に、張り付けを行なうテクスチャデータが示す画像の拡大縮小率が変化する。
【0005】
ところで、テクスチャマッピングを行なう際に、高画質を得る手法として、MIP(Multum In Parvo) MAP(複数解像度テクスチャ)フィルタリングがある。
このMIPMAPフィルタリングは、図22に示すように、複数の異なる縮小率のそれぞれに対応した、複数のフィルタ処理済みのテクスチャデータ200,201,202,203を予め用意し、各画素の縮小率204に対応したテクスチャデータを選択205することで、縮小率204に応じた最適なテクスチャデータ206を使用するものであり、イメージの縮小に伴う情報欠落に起因するエイリアシングの影響を抑制できる。
【0006】
以下、上述したMIPMAPフィルタリングを採用した従来の3次元コンピュータグラフィックシステムを説明する。
図23は、従来の3次元コンピュータグラフィックシステムの構成を説明するための図、図24は図23に示すテクスチャマッピング装置210における処理のフローチャートである。
図23に示すように、従来の3次元コンピュータグラフィックシステムでは、それぞれ異なる半導体チップ内に組み込まれたテクスチャマッピング装置210、テクスチャバッファ211およびディスプレイバッファ213が、配線を介して相互に接続されている。
【0007】
以下、テクスチャマッピング装置210における処理を説明する。
ステップS1:先ず、テクスチャマッピング装置210は、三角形の各頂点についての同次座標および同次項を示す(s1,t1,q1),(s2,t2,q2),(s3,t3,q3)データを入力する。
ステップS2:次に、テクスチャマッピング装置210は、入力した各頂点の(s1,t1,q1),(s2,t2,q2),(s3,t3,q3)データを線形補間して、三角形の内部の各画素の同次座標および同次項を示す(s,t,q)データを求める。
【0008】
ステップS3:テクスチャマッピング装置210は、内蔵した縮小率算出装置212において、三角形の内部の各画素の(s,t,q)データから、各画素の縮小率lodを求める。
ステップS4:テクスチャマッピング装置210は、各画素の(s,t,q)データについて、sデータをqデータで除算したuデータと、tデータをqデータで除算したvデータとを算出し、テクスチャ座標データ(u,v)を求める。
次に、テクスチャマッピング装置210は、縮小率算出装置212で算出した縮小率lodと、テクスチャ座標データ(u,v)とから、テクスチャバッファ211における物理アドレスであるテクスチャアドレス(U,V)を求める。
【0009】
ステップS5:テクスチャマッピング装置210は、テクスチャアドレス(U,V)をテクスチャバッファ211に出力し、テクスチャデータ(R,G,B)を読み出す。
ステップS6:テクスチャマッピング装置210は、ステップS5で読み出しテクスチャデータに所定の処理を施した画素データS210をディスプレイバッファ213に書き込む。
これにより、テクスチャバッファ211に記憶されている、複数の異なる縮小率のそれぞれに対応した複数のテクスチャデータのうち、縮小率lodに対応したテクスチャデータについてのアクセスが実現される。
【0010】
また、高速な描画を実現するために、複数の画素について並行してテクスチャマッピング処理を行い、それらの画素データをディスプレイバッファに同時に書き込む高速テクスチャマッピング装置がある。
このような高速テクスチャマッピング装置では、図25に示すように、三角形の頂点についての(s1,t1,q1),(s2,t2,q2),(s3,t3,q3)データを、n個のテクスチャマッピング装置2101 〜210n で並行して処理し、その処理結果である画素データS2101 〜S210n をディスプレイバッファに同時に書き込む。
すなわち、複数の画素についてのテクスチャマッピング処理が並行して(同時に)行なわれる。
【0011】
なお、テクスチャマッピング処理は、単位図形である三角形を単位として行なわれ、テクスチャデータの縮小率などの処理条件が三角形を単位として決定され、同時に処理が行なわれる複数の画素のうち、当該三角形の内側に位置する画素についての処理結果のみが有効とされ、当該三角形の外側に位置する画素についての処理結果は無効とされる。
【0012】
【発明が解決しようとする課題】
しかしながら、上述した従来の3次元コンピュータグラフィックシステムでは、テクスチャマッピング装置210と、テクスチャバッファ211およびディスプレイバッファ213との間のデータ転送速度が、システム全体の処理能力を高める上でのボトルネックになっていた。
【0013】
また、上述した従来の3次元コンピュータグラフィックシステムでは、テクスチャマッピング装置210、テクスチャバッファ211およびディスプレイバッファ213が異なる半導体チップ内に組み込まれているため、システムが大規模化するという問題がある。
【0014】
また、縮小率lodを求める演算には、多数の乗算および除算が含まれており、膨大な演算量を要する。
従って、図25に示すように、n個のテクスチャマッピング装置2101 〜210n の各々に、縮小率算出装置2121 〜212n を内蔵すると、高速処理は実現できるが、装置が大規模化していまうという問題がある。
このような問題を解決するために、並行して処理を行なう複数のテクスチャマッピング装置のうち、一のテクスチャマッピング装置にのみ縮小率算出装置を内蔵し、当該テクスチャマッピン装置の処理対象となる画素を縮小率を求める上での代表点とし、当該縮小率算出装置で求められた縮小率を、全てのテクスチャマッピング装置で用いる方法が考えられる。
この場合には、同時に処理を行なう複数の画素のうち、代表点となる画素の位置が固定となる。
従って、同時に処理が行なわれる複数の画素のうちに、前述した単位図形である三角形の外側に位置する画素が代表点となる可能性がある。
しかしながら、当該三角形の内側と外側とでは、縮小率が大きく異なることがあり、処理対象となっている三角形の外側に位置する画素が代表点となると、当該三角形の内側に位置する画素について、最適なテクスチャデータを選択できない。その結果、画質が大きく低下するという問題がある。
【0015】
本発明は上述した従来技術の問題点に鑑みてなされ、小規模な装置構成で、高画質を安定して提供できる画像処理装置を提供することを目的とする。
【0016】
【課題を解決するための手段】
本発明によれば、共通の処理条件が適用される複数の画素からなる単位図形を組み合わせて表示モデルを表現し、必要に応じてテクスチャデータを用いて前記画素に対応する画素データを生成する画像処理装置において、
前記表示モデルは立体モデルであり、
前記単位図形が三角形であり、
表示データと、同一のパターンについて相互に異なる縮小率に対応した複数のテクスチャデータとを記憶する記憶回路と、
同時に処理を行おうとする複数の画素データに対して共通して用いられる縮小率を算出する縮小率算出回路と、
前記算出された縮小率に対応する前記テクスチャデータを前記記憶回路から読み出す読み出し回路と、
前記読み出されたテクスチャデータを用いて前記複数の画素データの処理を同時に行って表示データを生成する画像処理回路と、
前記生成された表示データを前記記憶回路に書き込む書き込み回路と、
前記同時に処理を行おうとする複数の画素データに対応する画素のうち、処理対象となっている前記単位図形の内側に位置する画素のなかから代表点となる画素を決定する代表点決定回路と
を有し、
前記縮小率算出回路は、下記式に基づいて前記縮小率を示すLODを実質的に算出するため、
LOD=Clamp(((log 1/q)+maxe)
<<L+K)
ここで、
LODは、整数部と少数部とで構成され、符号なしの縮小率を示す記号であり、
Clampは、下記のクランプ回路においてクランプすることを示す記号であり、
qは、前記同次項を示す記号であり、
maxeは、前記処理対象となっている前記単位図形の頂点の同次座標(s,t)および同次項qの最大指数を示す整数部のみからなるデータであり、
<<Lは、下記のシフト回路においてデータをLビットシフトすることを示すものであり、
Kは、整数部と少数部とで構成され、符号有りで、下記の加算回路において加算に使用するデータであり、
前記同次項データqを正規化して指数qeおよび仮数qmを生成する正規化回路と、
前記指数qeと前記仮数qmとをビット結合したデータを、前記データLが示す値だけMSB(Most Significant Bit)に向けてシフトする第1のシフト回路と、
前記第1のシフト回路の出力を反転する第1の反転回路と、
前記仮数qmを入力して、「log ({1,qm})−qm」を示すデータμを出力するデータ出力手段と、
前記データmaxeと前記データμとをビット結合したデータを、前記データLが示す値だけMSBに向けてシフトする第2のシフト回路と、
前記第2のシフト回路の出力を反転する第2の反転回路と、
前記データKと2進数の「10」とをビット結合したデータと、前記第1の反転回路の出力と、前記第2の反転回路の出力とを加算する加算回路と、
前記加算回路の出力を所定ビット内にクランプ処理して前記縮小率LODを生成するクランプ回路と
を有し、
前記読み出し回路は、前記同時に処理が行われる複数の画素データの各々について、前記決定された縮小率、前記同次座標(s,t)および同次項qによって特定されるテクスチャデータを前記記憶回路から読み出す
画像処理装置が提供される。
【0038】
【発明の実施の形態】
以下、本実施形態においては、家庭用ゲーム機などに適用される、任意の3次元物体モデルに対する所望の3次元画像をCRT(Cathode Ray Tube)などのディスプレイ上に高速に表示する3次元コンピュータグラフィックシステムに、本発明の画像処理装置を適用した場合について説明する。
図1は、本実施形態の3次元コンピュータグラフィックシステム1のシステム構成図である。
3次元コンピュータグラフィックシステム1は、立体モデルを単位図形である三角形(ポリゴン)の組み合わせとして表現し、このポリゴンを描画することで表示画面の各画素の色を決定し、ディスプレイに表示するポリゴンレンダリング処理を行うシステムである。
また、3次元コンピュータグラフィックシステム1では、平面上の位置を表現する(x,y)座標の他に、奥行きを表すz座標を用いて3次元物体を表し、この(x,y,z)の3つの座標で3次元空間の任意の一点を特定する。
【0039】
図1に示すように、3次元コンピュータグラフィックシステム1は、メインメモリ2、I/Oインタフェース回路3、メインプロセッサ4およびレンダリング回路5が、メインバス6を介して接続されている。
ここで、レンダリング回路5が、本発明の画像処理装置に対応している。
以下、各構成要素の機能について説明する。
メインプロセッサ4は、例えば、ゲームの進行状況などに応じて、メインメモリ2から必要なグラフィックデータを読み出し、このグラフィックデータに対してクリッピング(Clipping)処理、ライティング(Lighting)処理およびジオメトリ(Geometry)処理などを行い、ポリゴンレンダリングデータを生成する。メインプロセッサ4は、ポリゴンレンダリングデータS4を、メインバス6を介してレンダリング回路5に出力する。
I/Oインタフェース回路3は、必要に応じて、外部からポリゴンレンダリングデータを入力し、これをメインバス6を介してレンダリング回路5に出力する。
【0040】
ここで、ポリゴンレンダリングデータは、ポリゴンの各3頂点の(x,y,z,R,G,B,COEblend ,s,t,q,COEfog )のデータを含んでいる。
ここで、(x,y,z)データは、ポリゴンの頂点の3次元座標を示し、(R,G,B)データは、それそれ当該3次元座標における赤、緑、青の輝度値を示している。
データCOEblend は、これから描画する画素と、ディスプレイバッファ21に既に記憶されている画素とのR,G,Bデータのブレンド(混合)係数を示している。
(s,t,q)データのうち、(s,t)は、対応するテクスチャの同次座標を示しており、qは同次項を示している。ここで、「s/q」および「t/q」に、それぞれテクスチャサイズUSIZEおよびVSIZEを乗じてテクスチャ座標データ(u,v)が得られる。テクスチャバッファ20に記憶されたテクスチャデータへのアクセスは、テクスチャ座標データ(u,v)を用いて行われる。
データCOEfog は、フォギング処理において用いられる混合係数を示している。
【0041】
以下、レンダリング回路5について詳細に説明する。
図1に示すように、レンダリング回路5は、DDA(Digital Differential Anarizer) セットアップ回路10、トライアングルDDA回路11、テクスチャエンジン回路12、メモリI/F回路13、CRTコントローラ回路14、RAMDAC回路15、DRAM16、SRAM17およびクロック信号生成回路18を有し、これらが一つの半導体チップ内に混載されている。
ここで、テクスチャエンジン回路12およびDRAM16によって、本発明の画像処理装置が構成される。DRAM16が本発明の記憶回路に対応している。レンダリング回路5では、上述したように、各構成要素を一つの半導体チップ内に混載することで、各構成要素間でのデータ伝送の高速化による高性能化、並びに回路規模の縮小化を図れる。
【0042】
DRAM16は、テクスチャバッファ20、ディスプレイバッファ21、zバッファ22およびテクスチャCLUTバッファ23として機能する。
また、クロック信号生成回路18からのクロック信号S18は、レンダリング回路5内の各構成要素を駆動する信号として用いられる。
【0043】
DRAM16
DRAM16は、テクスチャデータを記憶するテクスチャバッファ20、CRTに出力してディスプレイに表示する表示データを記憶するディスプレイバッファ21、zデータを記憶するzバッファ22およびカラールックアップデータを記憶するテクスチャCLUTバッファ23として機能する。
【0044】
DDAセットアップ回路10
DDAセットアップ回路10は、後段のトライアングルDDA回路11において物理座標系上の三角形の各頂点の値を線形補間して、三角形の内部の各画素の色と深さ情報を求めるに先立ち、ポリゴンレンダリングデータS4が示す(z,R,G,B,COEblend ,s,t,q,COEfog )データについて、三角形の辺と水平方向の差分などを求めるセットアップ演算を行う。
このセットアップ演算は、具体的には、開始点の値と終点の値と、開始点と終点との距離を用いて、単位長さ移動した場合における、求めようとしている値の変分を算出する。
【0045】
すなわち、DDAセットアップ回路10は、各画素について、(s,t,q)データのx方向の変分であるdsdx,dtdx,dqdxと、y方向の変分であるdsdy,dtdy,dqdyとを生成する。
DDAセットアップ回路10は、算出した変分データS10をトライアングルDDA回路11に出力する。
【0046】
トライアングルDDA回路11
トライアングルDDA回路11は、DDAセットアップ回路10から入力した変分データS10を用いて、三角形内部の各画素における線形補間された(z,R,G,B,COEblend ,s,t,q,COEfog )データを算出する。
また、トライアングルDDA回路11は、並行して処理を行う8画素について、処理対象となる三角形の内部に位置するか否かを示すそれぞれ1ビットの有効ビットデータI1 〜I8 を生成する。
有効ビットデータI1 〜I8 は、例えば、三角形の内部に位置する画素について「1」とし、三角形の外部に位置する画素について「0」とする。
具体的には、図2に示すように、x,y座標系に位置する三角形250について有効ビットデータI1 〜I8 が決定される。
なお、図2において、実線は、同時に処理が行なわれる8(=2×4)画素が属する矩形領域を示している。
トライアングルDDA回路11は、各画素の(x,y)データと、当該(x,y)座標における(z,R,G,B,COEblend ,s,t,q,COEfog )データと、有効ビットデータI1 〜I8 と、処理対象となる三角形の頂点のs,t,qデータの最大指数を示すmaxeデータS11cとを、DDAデータS11としてテクスチャエンジン回路12に出力する。
ここで、後述する図4に示す(R,G,B)データS11bおよび(s,t,q)データS11a1 〜S11a8 が、(z,R,G,B,COEblend ,s,t,q,COEfog )データから得られる。
本実施形態では、トライアングルDDA回路11は、並行して処理を行う矩形内に位置する8(=2×4)画素分を単位として、DDAデータS11をテクスチャエンジン回路12に出力する。
【0047】
テクスチャエンジン回路12
テクスチャエンジン回路12は、テクスチャデータの縮小率の選択処理、「s/q」および「t/q」の算出処理、テクスチャ座標データ(u,v)の算出処理、テクスチャアドレス(U,V)の算出処理、テクスチャバッファ20からの(R,G,B,tα)データの読み出し処理、MIPMAP処理、および、テクスチャファンクション処理を順に、例えばパイプライン方式で行う。
なお、テクスチャエンジン回路12は、所定の矩形領域内に位置する8画素についての処理を同時に並行して行う。
また、テクスチャエンジン回路12は、処理対象の三角形内に位置する画素については同じパターンのテクスチャデータを用いる。但し、選択するテクスチャデータの縮小率は、同時に処理を行う矩形領域内に位置する8画素を単位として決定する。
【0048】
テクスチャエンジン回路12は、SRAM17あるいはテクスチャバッファ20から読み出した(R,G,B)データS17を用いて、MIPMAP(複数解像度テクスチャ)処理やテクスチャファンクション処理を行う。
【0049】
MIPMAP処理では、(R,G,B)データS17から2次元上の所望の位置の画素の(R,G,B)データを算出する4点近傍補間処理と、縮小率LOD(Level Of Detail) のレベルを補間するレベル補間処理とが行われる。
SRAM17およびテクスチャバッファ20には、例えば、図3に示すように、MIPMAPに基づいた複数の縮小率に対応したテクスチャデータ、すなわち、縮小率1.0のレベルのテクスチャデータ100と、縮小率LODが2.0のレベルのテクスチャデータ101と、縮小率LODが3.0のレベルのテクスチャデータ102とが記憶されている。
そして、何れの縮小率LODのテクスチャデータを用いるかは、所定のアルゴリズムを用いて前記ポリゴン単位で算出された縮小率LODを用いて決定される。
なお、テクスチャデータ100,101,102は、既にフィルタリング処理が施され、イメージの縮小などに伴う情報欠落に起因するエイリアシングの影響が抑制された表示パターンを示すデータである。
【0050】
先ず、テクスチャエンジン回路12で行われるMIPMAP処理の4点近傍補間処理について説明する。
4点近傍補間処理では、テクスチャデータを割り当てる画素の座標から、当該座標の4近傍の点の(R,G,B)データを求める。
例えば、縮小率LODが1.0の場合には、SRAM17あるいはテクスチャバッファ20からテクスチャエンジン回路12に、図3に示すテクスチャデータ100の(R,G,B)データS17が読み出される。
そして、図3に示す位置pixel0の(R,G,B)データである4点近傍補間データCpixel0を、当該位置pixel0の4近傍点A0,B0,C0,D0の(R,G,B)データCA0,CB0,CC0,CD0を用いて、下記式(3)〜(5)に基づいて求める。
このとき、(R,G,B)データCA0,CB0,CC0,CD0は、テクスチャデータ100の(R,G,B)データS17から得られる。
なお、下記式(3)〜(5)において、a,bは、それぞれ位置pixel0のu座標,v座標の小数部を示している。
【0051】
【数3】
AB0 =CB0×a+CA0×(1−a) …(3)
【0052】
【数4】
CD0 =CD0×a+CC0×(1−a) …(4)
【0053】
【数5】
pixel0=CCD0 ×b+CAB0 ×(1−b) …(5)
【0054】
次に、縮小率のレベル補間処理について説明する。
ここでは、tri−linearと呼ばれるレベル補間処理を例示して説明する。
例えば、縮小率LODが1.5である場合には、テクスチャエンジン回路12は、上述したように、縮小率LODが1.0のテクスチャデータ100を用いて位置pixel0の4点近傍補間データCpixel0を算出すると共に、縮小率LODが2.0のテクスチャデータ101を用いて、テクスチャデータ100上の位置pixel0に対応したテクスチャデータ101上の位置pixel1の4点近傍補間データCpixel1を算出する。次に、4点近傍補間データCpixel0とCpixel1とを線形補間して、縮小率LODが1.5のレベル補間データCpixel を算出する。
【0055】
すなわち、前述した4点近傍補間データCpixel0の算出処理に続いて、SRAM17あるいはテクスチャバッファ20からテクスチャエンジン回路12に、図3に示すテクスチャデータ101の(R,G,B)データS17が読み出される。
そして、テクスチャエンジン回路12は、図3における位置pixel1の(R,G,B)データである4点近傍補間データCpixel1を、当該位置pixel1の4近傍点A1,B1,C1,D1の(R,G,B)データCA1,CB1,CC1,CD1を用いて、下記式(6)〜(8)に基づいて求める。
このとき、(R,G,B)データCA1,CB1,CC1,CD1は、テクスチャデータ101の(R,G,B)データS17から得られる。
なお、下記式(6)〜(8)において、c,dは、それぞれ位置pixel1のu,v座標の小数部を示している。
【0056】
【数6】
AB1 =CB1×c+CA1×(1−c) …(6)
【0057】
【数7】
CD1 =CD1×c+CC1×(1−c) …(7)
【0058】
【数8】
pixel1=CCD1 ×d+CAB1 ×(1−d) …(8)
【0059】
次に、テクスチャエンジン回路12は、下記式(9)を用いて、テクスチャデータ100と101との間のレベル補間を行い、レベル補間後の対応する位置(画素)の(R,G,B)データであるレベル補間データCpixel を求める。なお、下記式(9)において、ミップマップ係数COEmipmapは縮小率LODの小数部0.5を示している。
【0060】
【数9】
pixel =Cpixel1×COEmipmap+Cpixel0×(1−COEmipmap
…(9)
【0061】
次に、テクスチャエンジン回路12で行われるテクスチャファンクション処理について説明する。
テクスチャエンジン回路12で行われるテクスチャファンクション処理には、例えば、モジュレート(Modulate)処理、デカル(Decal) 処理、ハイライト(Highlight) 、フォギング(Fogging) 処理、アルファブレンディング (α Blending)処理などがある。
ここで、モジュレート処理は、テクスチャデータが示す色でフラグメントデータが示す色の変調を行う処理である。
なお、本実施形態では、フラグメントデータは、トライアングルDDA回路11から入力したDDAデータS11に含まれる(R,G,B)データS11bである。
デカル処理は、テクスチャデータが示す色でフラグメントデータが示す色を置き換える処理である。
ハイライト処理は、ハイライト効果を出すために乗算結果に加算データHiを加算する処理である。
フォギング処理は、遠くの物体をぼかす効果を出す処理である。
アルファブレンディング処理は、ソースデータが示す色とディスティネーションデータが示す色とを所定の混合比で混合する処理である。
ここで、ソースデータが示す色は図1に示すディスプレイバッファ21に記憶されているデータが示す色であり、ディスティネーションデータが示す色はディスプレイバッファ21に描画しようとするデータが示す色である。
【0062】
これらのテクスチャファンクション処理は、テクスチャデータをCtex 、フラグメントデータをCflag、ハイライト処理の加算データをHiとし、モジュレート処理後のデータをCmod 、デカル処理後のデータをCdcl 、ハイライト処理後のデータをChgh とすると、下記式(10)〜(12)のように表せる。
なお、式(12)において、Hiは、ハイライト用の加算データを示している。
【0063】
【数10】
mod =Ctex ×Cflag …(10)
【0064】
【数11】
dcl =Ctex …(11)
【0065】
【数12】
hgh =Ctex ×Cflag+Hi …(12)
【0066】
また、フォギング処理およびアルファブレンディング処理は、フラグメントデータをCflag、フォグデータをCfog 、フォグ係数データをCOEfog 、ソース(カラー)データをCsrc 、デスティネーション(カラー)データをCdst 、ブレンディング係数をCOEblend とし、フォギング処理後のデータをCfogged、ブレンディング処理後のデータをCblend とすると、以下式(13),(14)で示される。
【0067】
【数13】
fogged=Cflag×COEfog +Cfog ×(1−COEfog
…(13)
【0068】
【数14】
blend =Csrc ×COEblend +Cdst ×(1−COEblend
…(14)
【0069】
上述したように、式(9)〜(14)で示されるMIPMAP処理のレベル補間処理とテクスチャファンクション処理とは、データA,B,COE、CおよびDを用いた下記式(15)で表現できる。
本実施形態では、このことを利用して、後述するように、LIP回路61をレベル補間処理とテクスチャファンクション処理とで共用する。
【0070】
【数15】
D=A×COE+B(1−COE) …(15)
【0071】
図4は、テクスチャエンジン回路12の部分回路図である。
図4に示すように、テクスチャエンジン回路12は、例えば、縮小率演算回路50、読み出し回路51、LIP(Linear Inter Polator)回路52,53,54、LIP/テクスチャファンクション回路55を有する。
ここで、縮小率演算回路50が本発明の縮小率演算回路に対応し、読み出し回路51が本発明の読み出し回路に対応し、LIP回路52,53,54およびLIP/テクスチャファンクション回路55が本発明の画像処理回路に対応している。
テクスチャエンジン回路12内の各構成要素は、図1に示すクロック信号発生回路18からのクロック信号S18に基づいて動作する。
テクスチャエンジン回路12は、図4に示す構成を用いて、MIMAP処理、モジュレート処理、デカル処理、ハイライト処理、フォギング処理、テクスチャブレンディング処理およびアルファブレンディング処理などの一部あるいは全てを行う。
【0072】
以下、図4に示すテクスチャエンジン回路12の構成要素について詳細に説明する。
〔代表点決定回路301〕
代表点決定回路301は、トライアングルDDA回路11から入力した、DDAデータS11に含まれる有効ビットデータI1 〜I8 から、代表点となる画素を決定し、当該決定した代表点を示す代表点指示データS301をstq選択回路302に出力する。
具体的には、代表点決定回路301は、同時に処理される2行×4列の8画素のうち、処理対象となっている三角形の内部に位置するもののなかで、当該8画素が配置される矩形領域の中心に最も近い画素が代表点として決定する。
【0073】
図5は、代表点決定回路301における代表点決定処理のフローチャートである。
ステップS11:先ず、代表点決定回路301は、有効ビットデータI1 〜I8 に、「1」を示すものが少なくとも一つ存在するかを判断し、存在すれば、ステップS12の処理を実行する。
ステップS12:代表点決定回路301は、有効ビットデータI1 〜I8 のうち、「1」を示すものが一つであるか否かを判断し、一つである場合には、ステップS15に示す処理を実行する。ステップS15では、「1」を示す有効ビットデータに対応する画素を代表点として決定する。
【0074】
ステップS13:代表点決定回路301は、有効ビットデータI1 〜I8 に「1」を示すものが2つ以上ある場合に、「1」を示す有効ビットデータに対応する画素のうち、当該同時に処理が行なわれる画素が配置される矩形領域の中心に最も近い画素を、代表点として決定する。
このとき、当該矩形領域の中心に最も近い画素が複数ある場合には、これらのx座標が同じであるか否かが判断され、これらのx座標が異なる場合には、ステップS16に示す処理が実行される。ステップS16では、当該矩形領域の中心に最も近い複数の画素のうち、x座標が最も小さいものが、代表点として決定される。
【0075】
ステップS14:代表点決定回路301は、前記矩形領域の中心に最も近い画素が複数あり、しかも、これらのx座標が同じ場合には、これら複数の画素のうち、y座標が最も小さいものを代表点として決定する。
【0076】
以下、代表点決定回路301における代表点の決定を具体例を挙げて説明する。
図6は、代表点決定回路301における代表点の決定を説明するための図である。
有効ビットデータI1 〜I8 に対応する画素の配置を図6(A)に示すように設定する。ここで、同時に処理が実行される画素の矩形領域の中心はAである。
例えば、図6(B)に示すように、有効ビットデータI4 のみが「1」の場合には、代表点決定回路301は、有効ビットデータI4 に対応する画素を代表点として決定する。
【0077】
また、図6(C)に示すように、有効ビットデータI6 およびI7 が「1」であり、これに対応する画素のx座標が異なる場合には、x座標が小さい有効ビットデータI6 に対応する画素を代表点として決定する。
また、図6(D)に示すように、有効ビットデータI3 およびI7 が「1」であり、これに対応する画素のx座標が同じ場合には、y座標が小さい有効ビットデータI7 に対応する画素を代表点として決定する。
さらに、図6(E)に示すように、有効ビットデータI2 ,I3 ,I6 およびI7 が「1」である場合には、x座標およびy座標が最も小さい、有効ビットデータI6 に対応する画素を代表点として決定する。
【0078】
また、前述した図2に示す三角形250については8画素単位に、図5に示すアルゴリズムに基づいて、図7に示すように代表点が決定される。図7では、「1」が丸印で囲まれている画素が代表点になる。
このように、代表点決定回路301において、有効ビットデータI1 〜I8 に基づいて、同時に処理を行なう複数画素のうち処理対象となっている三角形の内側に位置する画素のなかから代表点を動的に決定するため、代表点を当該三角形の内側に確実に決定することができる。
その結果、当該三角形の内側に位置する画素について、適切なテクスチャデータを確実に選択でき、高い画質を安定して提供できる。
また、本実施形態で、8画素について同時処理を行なうが、縮小率演算回路301を1つ設ければよく、装置が大規模化することはない。
【0079】
〔qデータ選択回路302〕
qデータ選択回路302は、DDAデータS11に含まれる8画素分の(s,t,q)データS11a1 〜S11a8 を入力し、これらのうち、代表点指示データS301によって示される画素に対応するqデータを選択し、これをqデータS302として縮小率演算回路304に出力する。
【0080】
〔縮小率演算回路304〕
縮小率演算回路304は、トライアングルDDA回路11からのmaxeデータS11cと、q選択回路302からのqデータS302とに基づいて、テクスチャデータの縮小率LODを算出する。
ここで、maxeデータS11cは、例えば図2に示すような処理対象の三角形の頂点のs,t,qデータの指数のうち、最大の指数を示している。
このように、縮小率演算回路304では、代表点決定回路301において代表点として決定された画素のqデータと、maxeデータS11cとを用いて縮小率を算出し、これを縮小率LODとして読み出し回路51に出力する。
【0081】
ここで、縮小率LODは、元画像のテクスチャデータを、どの程度縮小したものであるかを示すものであり、元画像の縮小率を1/1とした場合には、1/2,1/4,1/8,・・・となる。
縮小率演算回路304における縮小率LODの演算処理は、下記式(16)で示される。
【0082】
【数16】
LOD=Clamp(((log2 1/q)−maxe)<<L+K)
…(16)
【0083】
上記式(16)において、
LOD:縮小率を示し、整数部3ビット、小数点部4ビット、符号無し(unsigned)のデータ、
maxe:図2に示す三角形の頂点のs,t,qの最大指数を示し、整数部8ビット、符号無し(unsigned)のデータ、
q:整数部10ビット、小数部5ビット、符号有り(signed)のデータ、
L:2ビット、符号無しのデータ、Lの最大値は10進数の「3」
K:整数部8ビット、小数部4ビット、符号有りのデータ
【0084】
以下、縮小率演算回路50について詳細に説明する。
図8は、縮小率演算回路50の構成図である。
図8に示すように、縮小率演算回路50は、例えば、プライオリティエンコーダ101、シフト回路102、シフト回路201,202、テーブル203、インバータ204,205、加算回路206およびクランプ回路109を有する。
ここで、プライオリティエンコーダ101およびシフト回路102が本発明の正規化回路に対応し、シフト回路201が本発明の第1のシフト回路に対応し、インバータ204が本発明の第1の反転回路に対応し、テーブル203が本発明のデータ出力手段に対応し、シフト回路202が本発明の第2のシフト回路に対応し、インバータ205が本発明の第2の反転回路に対応し、加算回路206が本発明の加算回路に対応し、クランプ回路109が本発明のクランプ回路に対応している。
縮小率演算回路50は、前記式(16)の演算を行い、その演算結果である縮小率LODを図4に示す読み出し回路51に出力する。
【0085】
プライオリティエンコーダ101は、図4に示すqデータ選択回路302から入力したqデータの対数値「log2 q」を求め、当該2の対数値「log2 q」の整数値「int(log2 q)」、すなわち指数qeをデータaとしてシフト回路102,201に出力する。
【0086】
シフト回路102は、図4に示すqデータ選択回路302から入力したデータqを、プライオリティエンコーダ101から入力した指数qeだけ、LSBに向けてシフト演算した結果の小数部であるデータqmを、データb2としてシフト回路201およびテーブル203に出力する。
【0087】
プライオリティエンコーダ101が出力したデータaと、シフト回路102が出力したデータb2とはビット結合され、その結果であるデータ{a,b2}がシフト回路201に出力される。
【0088】
シフト回路201は、入力したデータ{a,b2}を、入力したデータLだけ、MSBに向けてシフト演算した結果であるデータδ2をインバータ204に出力する。
【0089】
インバータ204は、データδ2を反転し、その結果であるデータ ̄δ2を加算回路206に出力する。
【0090】
テーブル203は、データqmと、「log2 ({1,qm})−qm」との対応表を備え、シフト回路102から入力したデータqm(=b2)をキーとして、当該データqmに対応する「log2 ({1,qm})−qm」を対応表から得て、これをデータμとしてシフト回路202に出力する。
なお、テーブル203の代わりに、入力したデータqmを用いて、「log2 ({1,qm})−qm」を自動的に生成するプログラムを用いてもよい。
【0091】
トライアングルDDA回路11から入力したmaxeデータS11cと、テーブル203から出力されたデータμとは、maxeデータS11cを整数部とし、小数部が7ビットとなるようにデータμの前に(000)を結合して小数部として結合され、当該ビット結合後のデータ{maxe,3’b0,μ}がシフト回路202に出力される。ここで、「3’b0」は、Verilog−HDLの表記で、3ビットの2進数の0を意味する。
【0092】
シフト回路202は、入力したデータ{maxe,3’b0,μ}を、入力したデータLだけ、MSBに向けてシフト演算した結果であるγ2をインバータ205に出力する。
【0093】
インバータ205は、データγ2を反転し、その結果であるデータ ̄γ2を加算回路206に出力する。
【0094】
また、データKと「10」とが、小数部が7ビットとなるように「10」の前に1ビットの「0」を加えて結合され、当該ビット結合後のデータ{K,3’b0,10}が加算回路206に出力される。
【0095】
加算回路206は、データ{K,3’b0,10}と、データ ̄δ2と、データ ̄γ2とを加算して、その加算結果であるε2をクランプ回路109に出力する。
【0096】
クランプ回路109は、加算回路206から入力したデータε2を、整数部3ビット、小数部4ビットのデータにクランプし(丸め込み)、その結果を縮小率LODとして図4に示す読み出し回路51に出力する。
【0097】
図8に示す縮小率演算回路50では、入力したデータqmに対応するμ(=「log2 ({1,qm})−qm」)を出力する図8に示すテーブル203を用いて、整数部のみからなるmaxeデータS11cと、小数部のみからなるデータμとをビット結合することで、maxeデータS11cに関しての加算処理を削減している。これにより、縮小率演算回路50によれば、ゲート数の削減および演算処理の高速化を図れる。
また、縮小率演算回路50では、前記式(16)における「log2 (1/q)」の小数部bと仮数qmの上位4ビット(=2-4)とが近似することと、縮小率LODの7ビットの小数部のうち下位4ビットの精度を決定付ける「log2 (1/q)」の7ビットの小数部のうち下位4ビットをテーブル203を用いて得ることで、縮小率LODの誤差の要因となる前記式(16)に示す「log2 (1/q)」の誤差を2-7にでき、データLが最大値「3」である場合でも、縮小率LODの誤差を2-4程度にできる。
【0098】
図9は、図8に示す縮小率演算回路50における処理を説明するための図である。
以下、図9を参照しながら、図8に示す縮小率演算回路50の動作を具体例を用いて説明する。
ここでは、以下に示す値を用いて、前記式(16)の演算処理を縮小率演算回路50において行う場合を例示する。
【0099】
q=(0001001110.10100):
maxe=(00000001.0000000):
L=(01):
K=(00010011.0000):
【0100】
q選択回路302が出力したqデータS302であるq(0001001110.10100)が、図8に示すプライオリティエンコーダ101およびシフト回路102に入力される。
次に、プライオリティエンコーダ101において、q(0001001110.10100)の指数qe(000110)が求められ、当該指数qe(000110)のMSB側に(00)を付加した8ビットのデータであるa(00000110)が出力される。
【0101】
次に、シフト回路102において、a(0001001110.10100)が、a(00000110)だけ、MSB側に向けてシフトされ、シフト後の小数部である仮数qm(0011101)が、データb2としてテーブル203に出力される。
次に、テーブル203において、仮数qm(0011101)に対応する4ビットのデータμ(「log2 ({1,qm})−qm」)であるμ(1000)が得られ、μ(1000)が出力される。
【0102】
次に、トライアングルDDA回路11から入力したデータmaxe(00000001)とデータμ(1000)とが、小数部が7ビットとなるようにデータμの前に(000)を結合して小数部として結合され、当該ビット結合後のデータ{maxe,3’b0,μ}=(00000001.0001000)がシフト回路202に出力される。
【0103】
次に、シフト回路202において、入力したデータ{maxe,3’b0,μ}=(00000001.0001000)を、入力したデータL=(01)だけ、MSBに向けてシフト演算した結果であるγ2(00000010.0010000)がインバータ205に出力される。
次に、インバータ205において、データγ2(00000010.0010000)が反転され、その結果であるデータ ̄γ2(11111101.1101111)が加算回路206に出力される。
【0104】
また、プライオリティエンコーダ101が出力したデータa(00000110)と、シフト回路102が出力したデータb2(0011101)とがビット結合され、その結果であるデータ{a,b2}=(00000110.0011101)がシフト回路201に出力される。
【0105】
次に、シフト回路201において、データ{a,b2}=(00000110.0011101)が、入力したデータL(01)だけ、MSBに向けてシフト演算され、その結果であるデータδ2(00001100.0111010)がインバータ204に出力される。
【0106】
次に、インバータ204において、データδ2(00001100.0111010)が反転され、その結果であるデータ ̄δ2(11110011.1000101)が加算回路206に出力される。
【0107】
また、データK(00010011.0000)と「10」とが、小数部が7ビットとなるように「10」の前に1ビットの「0」を加えて結合され、当該ビット結合後のデータ{K,3’b0,10}=(00010011.0000010)が加算回路206に出力される。
【0108】
次に、加算回路206において、データ{K,3’b0,10}と、データ ̄δ2と、データ ̄γ2とが加算され、その加算結果であるε2(00000100.0110110)がクランプ回路109に出力される。
【0109】
次に、クランプ回路109において、加算回路206から入力したデータε2が、整数部3ビット、小数部4ビットのデータにクランプされ(丸め込まれ)、その結果である(100.0110)が縮小率LODとして図4に示す読み出し回路51に出力される。
【0110】
〔読み出し回路51〕
読み出し回路51は、DDAデータS11に含まれる(s,t,q)データと、縮小率LODと、所定のテクスチャサイズUSIZEおよびVSIZEとに基づいて算出したアドレス(u,v)を用いて、SRAM17あるいはテクスチャバッファ20内のアドレスから(R,G,B)データを読み出し、これをテクスチャデータとしてLIP回路52,53に出力する。
このとき、読み出し回路51は、縮小率演算回路50から入力した縮小率LODの小数部が0でない場合には、縮小率LODの前後の整数部に対応する縮小率を持つ2個のテクスチャデータをそれぞれクロック信号S18の1クロックサイクルで順に読み出してLIP回路52,53に出力する。
【0111】
〔LIP回路52,53〕
LIP回路52は、演算対象となっている画素について、前述した式(3)に相当する4点近傍補間処理の演算を1クロックサイクル内に行って補間データS52を生成し、補間データS52をLIP回路54に出力する。
続いて、LIP回路52は、演算対象となっている画素について、前述した式(6)に相当する4点近傍補間処理の演算を1クロックサイクル内に行って補間データS52を生成し、補間データS52をLIP回路54に出力する。
【0112】
LIP回路53は、演算対象となっている画素について、前述した式(4)に相当する4点近傍補間処理の演算を1クロックサイクル内に行って補間データS53を生成し、補間データS53をLIP回路54に出力する。
続いて、LIP回路53は、演算対象となっている画素について、前述した式(7)に相当する4点近傍補間処理の演算を1クロックサイクル内に行って補間データS53を生成し、補間データS53をLIP回路54に出力する。
LIP回路53の演算は、LIP回路52の演算と並行して行われる。
【0113】
〔LIP回路54〕
LIP回路54は、LIP回路52および53からの補間データS52,S53を用いて、前述した式(5)に相当する4点近傍補間処理の演算を1クロックサイクル内に行って4点近傍補間データCpixel0を生成し、4点近傍補間データCpixel0をLIP/テクスチャファンクション回路55に出力する。
このとき、LIP回路54は、縮小率LODの小数部が0でない場合には、補間データS52,S53を用いて、レベル補間処理に用いる4点近傍補間データCpixel0と4点近傍補間データCpixel1とを順に生成する。
例えば、縮小率LODが前述したように1.5である場合には、LIP回路54は、上記式(5)に基づいて4点近傍補間データCpixel0を1クロックサイクルで生成した後に、上記式(8)に基づいて4点近傍補間データCpixel1を1クロックサイクルで生成する。
なお、LIP回路52,53,54の構成および処理は、後述するLIP回路61の構成および処理と基本的に同じである。
【0114】
〔LIP/テクスチャファンクション回路55〕
図10は、LIP/テクスチャファンクション回路55の構成図である。
LIP/テクスチャファンクション回路55は、LIP回路54からの4点近傍補間データCpixel0(必要に応じて4点近傍補間データCpixel1)を用いて、MIMAP処理のレベル補間処理と、モジュレート処理、デカル処理、ハイライト処理、フォギング処理、テクスチャブレンディング処理およびアルファブレンディング処理などのテクスチャファンクション処理の一部あるいは全てを行う。
具体的には、LIP/テクスチャファンクション回路55は、縮小率LODの小数部が0である場合には、LIP回路54から入力した4点近傍補間データCpixel0を用いて、テクスチャファンクション処理のうち必要な処理を行う。
また、LIP/テクスチャファンクション回路55は、縮小率の小数部が0でない場合には、LIP回路54から入力した4点近傍補間データCpixel0,Cpixel1を用いてレベル補間処理を行った後に、テクスチャファンクション処理のうち必要な処理を行う。
【0115】
LIP/テクスチャファンクション回路55は、図10に示すように、前処理回路60、LIP回路61およびレジスタ62を有する。
前処理回路60は、図10に示すように、モードコントローラ70、レジスタ74、マルチプレクサ75〜78およびレジスタ85〜88を有する。
モードコントローラ70は、図10に示すように、デコーダ71、カウンタ72およびデコーダ73を有する。
【0116】
デコーダ71は、カウンタ72のカウント値を監視し、カウンタ72のカウント値が「0」になったタイミングで、LIP回路61を共用する処理の数に応じた初期値「0」,「1」または「2」をセットする。
例えば、デコーダ71は、LIP回路61で一つの処理のみを行う場合には初期値「0」をカウンタ72にセットし、2個の処理でLIP回路61を共用する場合には初期値「1」をセットし、3個の処理でLIP回路61を共用する場合にはカウント値「2」をセットする。
なお、本実施形態では、カウント値72にセットする初期値として「0」,「1」および「2」を用いる場合を例示するが、当該初期値の値は、LIP回路61を共用する処理の数に応じて任意に設定可能である。
デコーダ71は、例えば図1に示すメインプロセッサ4あるいはテクスチャエンジン回路12内の図示しない主コントローラからファンクションモードデータFMDを入力する。
ファンクションモードデータFMDは、各クロックサイクル毎に、例えば図11に示すモード「1」〜「8」を指定し、後述するように、各モードに応じたデータをLIP回路61に入力するための制御に用いられる。すなわち、ファンクションモードデータFMDに基づいて、LIP回路61が行う処理の内容が決定される。図11の内容について、後に詳細に説明する。
デコーダ71は、例えば、ファンクションモードデータFMDに基づいて、LIP回路61において1個のモードの処理が終了する度に、カウンタ72のカウント値を1だけ減少させる。
【0117】
デコーダ73は、図1に示すメインプロセッサ4あるいはテクスチャエンジン回路12内の図示しない主コントローラからファンクションモードデータFMDおよびフォグイネーブルデータFEDを入力する。
また、デコーダ73は、LIP回路54あるいは読み出し回路51からミップマップ番号データMNDを入力する。
【0118】
ファンクションモードデータFMDは、前述したように、各クロックサイクル毎に、例えば図11に示すモード「1」〜「8」を指定し、後述するように、各モードに応じたデータをLIP回路61に入力するための制御に用いられる。図11に示す例では、LIP回路61において、MIPMAP処理のレベル補間処理、モジュレート処理、ハイライト処理、デカル処理およびフォギング処理を行う行う場合を例示している。
この場合に、図11に示すように、例えば、モジュール処理およびハイライト処理は、当該処理のみが行われるか、あるいは、MIPMAP処理のレベル補間処理に続いて行われるかによって異なるモードが付されている。また、フォギング処理も、当該処理のみが行われるか、あるいは、モジュレート処理に続いて行われるかによって異なるモードが付されている。これは、図10に示すLIP回路61の処理結果をフィードバックしてレジスタ88に書き込むか否かをデコーダ73において決定する必要があるためである。
なお、図11に示すモードは一例であり、その他にも種々のモードを指定することが可能である。
【0119】
また、フォグイネーブルデータFEDは、例えば、フォギング処理を行う場合には論理値「1」を示し、フォギング処理を行わない場合には論理値「0」を示している。
【0120】
また、ミップマップ番号データMNDは、LIP回路61においてレベル補間処理を行わない場合(縮小率LODの小数部が0である場合)の4点近傍補間データCpixel0を入力するタイミングと、レベル補間処理を行う場合の4点近傍補間データCpixel1を入力するタイミングとで論理値「1」を示す。
また、ミップマップ番号データMNDは、レベル補間処理を行う場合の4点近傍補間データCpixel0を入力するタイミングで論理値「0」を示す。
ミップマップ番号データMNDは、後述するように、デコーダ73によるマルチプレクサ77,78の制御に用いられる。
【0121】
デコーダ73は、ファンクションモードデータFMD、ミップマップ番号データMNDおよびフォグイネーブルデータFEDに基づいて、ファンクションモードデータFMDが指定した処理をLIP回路61が行うのに必要なデータをLIP回路61に供給するように、マルチプレクサ75〜78を制御する。
【0122】
具体的には、デコーダ73は、ミップマップ番号データMNDが論理値「0」を示す間は、LIP回路54から入力した4点近傍補間データCpixel0をレジスタ87に出力しないように、マルチプレクサ77を制御する。このとき、4点近傍補間データCpixel0は、レジスタ74に書き込まれる。
また、デコーダ73は、ファンクションモードデータFMDが図11に示す「1」を示しており、LIP回路61がMIPMAP処理のレベル補間処理を行う場合には、ミップマップ番号データMNDが論理値「1」を示す間に、レジスタ74から読み出した4点近傍補間データCpixel0をレジスタ88に出力し、LIP回路54から入力した4点近傍補間データCpixel1をレジスタ87に出力するように、マルチプレクサ78,77を制御する。
また、デコーダ73は、ファンクションモードデータFMDが図11に示す「1」を示し、ミップマップ番号データMNDが論理値「1」を示す間に、図4に示す縮小率演算回路50から入力したミップマップ係数COEmipmapを、レジスタ86に出力するように、マルチプレクサ76を制御する。それと同時に、デコーダ73は、論理値「0」をレジスタ85に出力するように、マルチプレクサ75を制御する。
これにより、4点近傍補間データCpixel0,Cpixel1およびミップマップ係数COEmipmapが、それぞれレジスタ88,87,86に同時に書き込まれ、LIP回路61において、4点近傍補間データCpixel0,Cpixel1を用いたレベル補間処理が行われる。
【0123】
図12は、LIP回路54から図10に示すモードコントローラ70への4点近傍補間データCpixel0,Cpixel1の入力タイミングと、LIP/テクスチャファンクション回路55におけるレベル補間処理の実行タイミングとを説明するためのタイミングチャートである。
図12において、同一の(a),(b),(c)が付されたデータは、同じレベル補間処理に係わるデータを示している。
【0124】
例えば、図12(A)に示すクロック信号S18に基づいて、図12(B)に示すタイミングで、LIP回路54からLIP/テクスチャファンクション回路55に入力されたレベル補間の対象となる4点近傍補間データCpixel0がレジスタ74に記憶される。
そして、次のクロックサイクルで、レジスタ74から読み出された4点近傍補間データCpixel0が、マルチプレクサ78およびレジスタ88を介して、LIP回路61のINA 端子に出力されると共に、LIP回路54から入力した4点近傍補間データCpixel1が、マルチプレクサ77およびレジスタ87を介して、LIP回路61のINB 端子に出力される。
そして、次のクロックサイクルで、図12(C)に示すように、LIP回路61において、ミップマップデータCpixel0,Cpixel1を用いたレベル補間処理が行われる。
図12(C)から分かるように、LIP回路52,53,54を用いて行われるMIPMAP処理の4点近傍補間処理のスループットは2クロックサイクルであるのに対して、LIP回路61ではMIMAP処理のレベル補間処理が1クロックサイクルで行われる。従って、LIP回路61において、レベル補間処理のみを行う場合には、LIP回路61に処理を行わない空き時間が生じる。当該実施形態では、後述するように、当該空き時間を利用して、LIP回路61にテクスチャファンクション処理を行わせる。すなわち、MIPMAP処理の4点近傍補間処理と、テクスチャファンクション処理とをインターリーブする。
【0125】
また、デコーダ73は、ファンクションモードデータFMDが図11に示す「2」を示しており、LIP回路61がモジュレート処理のみを行う場合には、対応する1クロックサイクルの間、LIP回路54から入力した4点近傍補間データCpixel0をレジスタ74を介してレジスタ88に出力し、トライアングルDDA回路11から入力したDDAデータS11に含まれる(R,G,B)データS11b(フラグメントデータCflag)をレジスタ86に出力するように、マルチプレクサ78,76を制御する。
また、同時に、デコーダ73は、レジスタ87に論理値「0」を出力し、レジスタ85に論理値「0」を出力するように、マルチプレクサ77,75を制御する。
【0126】
また、デコーダ73は、ファンクションモードデータFMDが図11に示す「3」を示しており、LIP回路61がMIPMAP処理のレベル補間処理に続いてモジュレート処理を行う場合には、対応する1クロックサイクルの間、LIP回路61のOUT端子からフィードバックされたレベル補間データをレジスタ88に出力し、フラグメントデータCflagをレジスタ86に出力するように、マルチプレクサ78,76を制御する。
また、同時に、デコーダ73は、レジスタ87に論理値「0」を出力し、レジスタ85に論理値「0」を出力するように、マルチプレクサ77,75を制御する。
【0127】
また、デコーダ73は、ファンクションモードデータFMDが図11に示す「4」を示しており、LIP回路61がハイライト処理のみを行う場合には、対応する1クロックサイクルの間、LIP回路54から入力した4点近傍補間データCpixel0をレジスタ78を介してレジスタ88に出力し、トライアングルDDA回路11から入力したDDAデータS11に含まれる(R,G,B)データS11b(フラグメントデータCflag)をレジスタ86に出力するように、マルチプレクサ78,76を制御する。
また、同時に、デコーダ73は、レジスタ87に論理値「0」を出力し、メインプロセッサ4あるいはテクスチャエンジン回路12内の図示しない主コントローラから入力したハイライト演算の加算データHiをレジスタ85に出力するように、マルチプレクサ77,75を制御する。
【0128】
また、デコーダ73は、ファンクションモードデータFMDが図11に示す「5」を示しており、LIP回路61がMIPMAP処理のレベル補間処理に続いてハイライト処理を行う場合には、対応する1クロックサイクルの間、LIP回路61のOUT端子からフィードバックされたレベル補間データをレジスタ88に出力し、フラグメントデータCflagをレジスタ86に出力するように、マルチプレクサ78,76を制御する。
また、同時に、デコーダ73は、レジスタ87に論理値「0」を出力し、メインプロセッサ4あるいはテクスチャエンジン回路12内の図示しない主コントローラから入力したハイライト演算の加算データHiをレジスタ85に出力するように、マルチプレクサ77,75を制御する。
【0129】
また、デコーダ73は、ファンクションモードデータFMDが図11に示す「6」を示しており、LIP回路61がデカル処理のみを行う場合には、対応する1クロックサイクルの間、LIP回路54から入力した4点近傍補間データCpixel0をレジスタ78を介してレジスタ88に出力し、論理値「0xff(0xFFと同じ )」をレジスタ86に出力するように、マルチプレクサ78,76を制御する。
また、同時に、デコーダ73は、レジスタ87に論理値「0」を出力し、レジスタ85に論理値「0」を出力するように、マルチプレクサ77,75を制御する。
【0130】
また、デコーダ73は、ファンクションモードデータFMDが図11に示す「7」を示しており、LIP回路61がフォギング処理のみを行う場合には、対応する1クロックサイクルの間、トライアングルDDA回路11から入力したDDAデータS11に含まれる(R,G,B)データS11b(フラグメントデータCflag)をレジスタ74を介してレジスタ88に出力し、例えば図示しないフォグレジスタに設定されたフォグデータCfog をレジスタ87に出力するように、マルチプレクサ78,77を制御する。
また、同時に、デコーダ73は、トライアングルDDA回路11から入力したDDAデータS11に含まれるフォギング係数COEfog をレジスタ86に出力するように、マルチプレクサ76を制御する。
また、同時に、デコーダ73は、論理値「0」をレジスタ85に出力するように、マルチプレクサ75を制御する。
【0131】
また、デコーダ73は、ファンクションモードデータFMDが図11に示す「8」を示しており、LIP回路61がモジュレート処理に続いてフォギング処理を行う場合には、対応する1クロックサイクルの間、LIP回路61のOUT端子からフィードバックされたレベル補間データをレジスタ88に出力し、図示しないフォグレジスタから読み出したフォグデータCfog をレジスタ87に出力するように、マルチプレクサ78,77を制御する。
また、同時に、デコーダ73は、トライアングルDDA回路11から入力したDDAデータS11に含まれるフォギング係数COEfog をレジスタ86に出力するように、マルチプレクサ76を制御する。
また、同時に、デコーダ73は、論理値「0」をレジスタ85に出力するように、マルチプレクサ75を制御する。
【0132】
また、デコーダ73は、MIMPAP処理のレベル補間処理と、2以上のテクスチャファンクション処理とでLIP回路61を共用する場合、すなわち合計3以上の処理でLIP回路61を共用する場合には、共用する処理の数に応じたクロックサイクルの間、例えば図4に示す読み出し回路51および図1に示すトライアングルDDA回路11にウェイト(待ち)指示を出力する。
例えば、レベル補間処理と、2個のテクスチャファンクション処理とでLIP回路61を共用する場合には、LIP回路61が2番目のテクスチャファンクション処理を処理している1クロックサイクルの間、ウェイト指示を読み出し回路51およびトライアングルDDA回路11に出力する。
【0133】
LIP回路61は、前記式(15)の演算を行う場合に、それぞれ8ビットのデータA,B,COEおよびCを、INA 端子、INB 端子、INcoe 端子およびINC 端子からそれぞれ入力し、8ビットのデータDをOUT端子から出力する。
【0134】
LIP回路61は、図13に示すように、補正データF、データCOEの対応するビットの論理値に基づいてデータAまたはBを選択した部分積out_0〜out_7、および、積和演算項であるデータCを、シフトさせて加算することで、前記式(15)に示す演算を行う。
【0135】
補正データFは、データCOE=0xFF(COE=1.0)の場合には、データAを、それ以外の場合にはデータBを選択した値を持つ。
補正データFは、8ビットのうち全ビットが論理値「1」の場合に、「1」と見るシステムにおいて、例えば、下記式(17)に示す演算を、下記式(18)となるように補正するために用いられる。すなわち、「X×1.0=X」となるように補正を行う。
【0136】
【数17】
0xFF×0xFF=0xFE …(17)
【0137】
【数18】
0xFF×0xFF=0xFF …(18)
【0138】
部分積out_0〜out_7は、それぞれデータCOEのビット0〜7が、論理値「1」であればデータAを示し、論理値「0」であればデータBを示している。
ここで、データCOEのLSBをビット0とし、MSBをビット7とする。
部分積out_n(0≦n≦7)は、例えば、図14に示すように、8個のマルチプレクサ800 〜807 を用いて生成される。
具体的には、0≦m≦7とした場合に、マルチプレクサ80m に、データAのビットmのビットデータA〔m〕と、データBのビットmのビットデータB〔m〕と、データCOEのnのビットデータCOE〔n〕とを入力し、ビットデータCOE〔n〕が論理値「1」であればビットデータA〔m〕を選択して、ビットデータout_n〔m〕として出力する。
なお、ビットデータout_n〔0〕〜out_n〔7〕によって、部分積out_nが構成される。
【0139】
部分積out_nは、MSBに向けて、nビットだけシフトされた後に、wallace_tree型のアーキテクチャを採用した加算回路81に出力される。
また、積和演算項であるデータCは、8ビット×8ビットの乗算結果の上位8ビットに加算されるように、図13に示すように、MSBに向けて8ビットシフトされた後に加算回路81に出力される。
【0140】
加算回路81は、wallace_tree型のアーキテクチャを採用しており、入力を3個づつ集めて和と桁上げの2個の出力に絞り込み、最終的に加算回路82において2入力加算器を用いて加算を行うことを可能にする。
これにより、補正データFおよび積和演算項Cによる部分積が追加されても、回路規模は殆ど増加せず、加算速度も殆ど落とさずにすむ。
【0141】
図15は、wallace_tree型のアーキテクチャを採用した加算回路8の部分構成図である。
図15では、図13に示す矢印92,93,94に示される図中縦方向のビットデータの加算を行う構成のみを示し、それ以外の加算を行う部分は省略してある。
図13に示す矢印91に示される図中縦方向のビットデータの加算は、加算回路82において行われる。
図15に示すように、加算回路81は、加算器1000 〜1006 を有する。
加算器1000 は、矢印92の加算を行い、補正データFのビット1と、部分積out_0のビット1と、部分積out_1のビット0との加算を行い、和Sumを加算回路82に出力し、桁上げCarryを加算器1001 に出力する。
【0142】
加算器1001 ,1002 ,1003 は、矢印93の部分の加算を行う。
加算器1001 は、補正データFのビット2と、部分積out_0のビット2との加算を行い、和Sumを加算器1003 に出力し、桁上げCarryを加算器1004 に出力する。
加算器1002 は、部分積out_1のビット1と、部分積out_2のビット0との加算を行い、和Sumを加算器1003 に出力し、桁上げCarryを加算器1005 に出力する。
加算器1003 は、加算器1001 からの桁上げCarryと、加算器1002 からの桁上げCarryとを加算し、和Sumおよび桁上げCarryを加算回路82に出力する。
【0143】
加算器1004 ,1005 ,1006 は、矢印94の部分の加算を行う。
加算器1004 は、補正データFのビット3と、部分積out_0のビット3との加算を行い、和Sumを加算器1006 に出力し、桁上げCarryを後段の加算器に出力する。
加算器1005 は、部分積out_1のビット2と、部分積out_2のビット1との加算を行い、和Sumを加算器1006 に出力し、桁上げCarryを後段の加算器に出力する。
加算器1006 は、加算器1004 からの桁上げCarryと、加算器1005 からの桁上げCarryとを加算し、和Sumおよび桁上げCarryを加算回路82に出力する。
【0144】
加算回路82は、補正データFのビット0および部分積out_0のビット0、加算回路81から入力した和Sumおよび桁上げCarryを、複数の2入力の加算器を用いて加算して、上記式(15)の演算結果である16ビットのデータを算出し、当該16ビットのデータのうち上位8ビットをデータDとして出力する。
LIP回路61は、例えば、図10に示すカウンタ72がカウント値「0」を示す場合には、当該算出したデータDを図4に示すOUT端子からレジスタ62に出力し、それ以外の場合には、当該算出したデータDを図4に示すマルチプレクサ78にフィードバックする。
【0145】
以下、図10に示すテクスチャエンジン回路12の動作形態について説明する。
第1の動作形態
本動作形態では、MIPMAP処理のレベル補間処理と、モジュレート処理とでLIP回路61を共用する場合を説明する。
この場合には、図1に示すメインプロセッサ4あるいはテクスチャエンジン回路12内の図示しない主コントローラから図10に示すデコーダ71,73に、1クロックサイクル毎に、モード「1」および「3」を交互に示すファンクションモードデータFMDが出力される。
また、デコーダ71は、カウンタ72のカウント値の初期値として「1」を設定し、カウンタ72のカウント値が「0」になる度に、カウンタ72に「1」を設定する。
【0146】
具体的には、例えば、第1のクロックサイクルで、図4に示すLIP回路54からの4点近傍補間データCpixel0がレジスタ74に書き込まれる。
また、カウンタ72のカウント値に「1」がセットされる。
【0147】
次に、第1のクロックサイクルに続く第2のクロックサイクルで、ファンクションモードデータFMDがモード「1」を示し、4点近傍補間データCpixel0がレジスタ74から読み出されて、マルチプレクサ78およびレジスタ88を介してLIP回路61のINA 端子に出力される。それと同時に、図4に示すLIP回路54からの4点近傍補間データCpixel1が、マルチプレクサ77およびレジスタ87を介してLIP回路61のINB 端子に出力される。
それと同時に、図4に示す縮小率演算回路50からのデータCOEmipmapが、マルチプレクサ76およびレジスタ86を介してLIP回路61のINcoeff に出力される。
そして、LIP回路54において、上記式(9)に示す演算が行われ、レベル補間データCpixel が算出される。
そして、カウンタ72がカウント値が「1」であるため、レベル補間データCpixel がマルチプレクサ78にフィードバックされる。
そして、カウンタ72のカウント値が減少して「0」になる。
【0148】
次に、第3のクロックサイクルで、ファンクションモードデータFMDがモード「3」を示し、図4に示すLIP回路54からの次の画素に係わる4点近傍補間データがレジスタ74に書き込まれる。
それと同時に、第2のクロックサイクルで算出されたレベル補間データCpixel (=式(10)のCtex に対応)がマルチプレクサ78およびレジスタ88を介してLIP回路61のINA 端子に出力される。
それと同時に、トライアングルDDA回路11からのDDAデータS11に含まれる(R,G,B)データS11b(フラグメントカラー値Cflag)が、マルチプレクサ76およびレジスタ86を介してLIP回路61のINcoeff に出力される。
そして、LIP回路54において、上記式(10)に示す演算が行われ、モジュレート処理後のカラー値Cmod が算出される。
そして、カウンタ72のカウント値が「0」であるため、LIP回路61のOUT端子からレジスタ62にカラー値Cmod が出力される。
カラー値Cmod は、レジスタ62から読み出されて画素データS12として後段のメモリI/F回路13に出力される。
そして、カウンタ72のカウント値に「1」がセットされる。
以後、上述した第2のクロックサイクルの処理と、第3のクロックサイクルの処理とが交互に繰り返される。
【0149】
以上説明したように、本動作形態では、MIPMAP処理のレベル補間処理と、モジュレート処理とでLIP回路61とでLIP回路61を共用できる。そのため、レベル補間処理用の回路とモジュレート処理用の回路とを直列に接続した場合に比べて回路規模を縮小できる。また、本実施形態では、MIPMAP処理の4点近傍補間処理は1系統で2クロックサイクルかけて行われ、当該処理に係わる回路規模は従来と同じである。
また、本動作例では、LIP回路61において、レベル補間処理を行わない空き時間に、モジュレート処理を行うため、処理時間が長期化することはない。
【0150】
第2の動作形態
本動作形態では、MIPMAP処理のレベル補間処理と、モジュレート処理と、フォギング処理とでLIP回路61を共用する場合を説明する。
この場合には、図1に示すメインプロセッサ4あるいはテクスチャエンジン回路12内の図示しない主コントローラから図10に示すデコーダ71,73に、1クロックサイクル毎に、モード「1」、「3」、「8」を順に繰り返して示すファンクションモードデータFMDが出力される。
また、デコーダ71は、カウンタ72のカウント値の初期値として「2」をセットし、カウンタ72のカウント値が「0」になる度に、カウンタ72に「2」をセットする。
【0151】
具体的には、例えば、第1のクロックサイクルで、図4に示すLIP回路54からの4点近傍補間データCpixel0がレジスタ74に書き込まれる。
そして、カウンタ72のカウント値に「2」がセットされる。
【0152】
次に、第2のクロックサイクルで、ファンクションモードデータFMDがモード「1」を示し、4点近傍補間データCpixel0がレジスタ74から読み出されて、マルチプレクサ78およびレジスタ88を介してLIP回路61のINA 端子に出力される。それと同時に、図4に示すLIP回路54からの4点近傍補間データCpixel1が、マルチプレクサ77およびレジスタ87を介してLIP回路61のINB 端子に出力される。
それと同時に、図4に示す縮小率演算回路50からのデータCOEmipmapが、マルチプレクサ76およびレジスタ86を介してLIP回路61のINcoeff に出力される。
そして、LIP回路54において、上記式(9)に示す演算が行われ、レベル補間データCpixel が算出される。
そして、カウンタ72がカウント値が「2」であるため、レベル補間データCpixel がマルチプレクサ78にフィードバックされる。
そして、カウンタ72のカウント値が減少して「1」になる。
【0153】
次に、第3のクロックサイクルで、ファンクションモードデータFMDがモード「3」を示し、図4に示すLIP回路54からの次の画素に係わる4点近傍補間データCpixel0がレジスタ74に書き込まれる。
それ同時に、第2のクロックサイクルで算出されたレベル補間データCpixel (式(10)のCtex に対応)がマルチプレクサ78およびレジスタ88を介してLIP回路61のINA 端子に出力される。
それと同時に、トライアングルDDA回路11からのDDAデータS11に含まれる(R,G,B)データS11b(フラグメントカラー値Cflag)が、マルチプレクサ76およびレジスタ86を介してLIP回路61のINcoeff に出力される。
そして、LIP回路54において、上記式(10)に示す演算が行われ、モジュレート処理後のカラー値Cmod が算出される。
そして、カラー値Cmod は、カウンタ72がカウント値が「1」であるため、マルチプレクサ78にフィードバックされる。
そして、カウンタ72のカウント値が減少して「0」になる。
また、4点近傍補間データCpixel0の出力を1クロックサイクルだけ待つことを指示するウェイト指示が図4に示す読み出し回路51に出力され、フラグメントデータCflagの出力を1クロックサイクルだけ待つことを指示するウェイト指示が図1に示すトライアングルDDA回路11に出力される。
【0154】
次に、第4のクロックサイクルで、ファンクションモードデータFMDがモード「8」を示し、フォグイネーブルデータFEDが論理値「1」であれば、第3のクロックサイクルで算出されたカラー値Cmod (式(13)のCflagに対応)が、マルチプレクサ78およびレジスタ88を介してLIP回路61のINA 端子に出力される。
それと同時に、例えば、図示しないフォグレジスタから読み出したフォグデータCfog が、マルチプレクサ77およびレジスタ87を介して、LIP回路61のINB 端子に出力される。
それと同時に、例えば、トライアングルDDA回路11からのDDAデータS11に含まれるフォギング係数COEfog が、マルチプレクサ76およびレジスタ86を介して、LIP回路61のINcoeff 端子に出力される。
そして、LIP回路54において、上記式(13)に示す演算が行われ、フォギング処理後のカラー値Cfoggedが算出される。
そして、カウンタ72のカウント値が「0」であるため、LIP回路61のOUT端子からレジスタ62にカラー値Cfoggedが出力される。
カラー値Cfoggedは、レジスタ62から読み出されて画素データS12として後段のメモリI/F回路13に出力される。
以後、上述した第2のクロックサイクルの処理と、第3のクロックサイクルの処理と、第4のクロックサイクルの処理とが交互に繰り返される。
【0155】
以上説明したように、本動作形態では、MIPMAP処理のレベル補間処理と、モジュレート処理とでLIP回路61と、フォギング処理とでLIP回路61を共用できる。そのため、レベル補間処理用の回路とモジュレート処理用の回路とを直列に接続した場合に比べてゲート数を少なくでき、回路規模を縮小できる。
【0156】
このように、テクスチャエンジン回路12では、MIMPAP処理のレベル補間処理と、テクスチャファンクション処理とで図10に示すLIP回路61を共用することで、回路規模を縮小できる。この場合に、レベル補間処理と、1個のテクスチャファンクション処理とでLIP回路61を共用した場合には、処理時間が長期化することはない。
【0157】
また、テクスチャエンジン回路12では、図4に示すLIP回路52,53,61において、図13に示すように補正データFを用いて演算を行うため、全ビットが論理値「1」の場合に「1」と見なすシステムにおいて、上記式(15)のCOEが「1.0」の場合の演算を、回路規模を殆ど増大させることなく、正確に行うことができる。
すなわち、補正を行わないで適切な結果を得るために、1ビット増やして9ビットを用い、「0x100」を「1」と見なすと、前段のパイプレジスタのゲート数増加を招き、全体的にゲートを増加させることになるが、本実施形態では、ビット数を増やす必要がなく、このような問題は生じない。
【0158】
なお、テクスチャエンジン回路12は、フルカラー方式の場合には、SRAM17あるいはテクスチャバッファ20から読み出した(R,G,B)データを直接用いる。一方、テクスチャエンジン回路12は、インデックスカラー方式の場合には、予め作成したカラールックアップテーブル(CLUT)をテクスチャCLUTバッファ23から読み出して、内蔵するSRAMに転送および記憶し、このカラールックアップテーブルを用いて、SRAM17あるいはテクスチャバッファ20から読み出したカラーインデックスに対応する(R,G,B)データを得る。
【0159】
メモリI/F回路13
メモリI/F回路13は、テクスチャエンジン回路12から入力した画素データS12に対応するzデータと、zバッファ22に記憶されているzデータとの比較を行い、入力した画素データS12によって描画される画像が、前回、ディスプレイバッファ21に書き込まれた画像より、手前(視点側)に位置するか否かを判断し、手前に位置する場合には、画像データS12に対応するzデータでzバッファ22に記憶されたzデータを更新する。
【0160】
CRTコントローラ回路14
CRTコントローラ回路14は、与えられた水平および垂直同期信号に同期して、図示しないCRTに表示するアドレスを発生し、ディスプレイバッファ21から表示データを読み出す要求をメモリI/F回路13に出力する。この要求に応じて、メモリI/F回路13は、ディスプレイバッファ21から一定の固まりで表示データを読み出す。CRTコントローラ回路14は、ディスプレイバッファ21から読み出した表示データを記憶するFIFO(First In First Out)回路を内蔵し、一定の時間間隔で、RAMDAC回路15に、RGBのインデックス値を出力する。
【0161】
RAMDAC回路15
RAMDAC回路15は、各インデックス値に対応するR,G,Bデータを記憶しており、CRTコントローラ回路14から入力したRGBのインデックス値に対応するデジタル形式のR,G,Bデータを、D/Aコンバータに転送し、アナログ形式のR,G,Bデータを生成する。RAMDAC回路15は、この生成されたR,G,BデータをCRTに出力する。
【0162】
レンダリング回路5の実現手法
以下、本実施形態に係る同一半導体チップ内に混載されるレンダリング回路5のロジック回路とDRAM16およびSRAM17等からなる2次メモリとの好適な構成、配置および配線方法について、図16〜図18に関連付けて説明する。
【0163】
本実施形態においては、DRAM16は、たとえば図16に示すように、4つのDRAMモジュール1471〜1474に分割されており、メモリI/F回路13には、各DRAMモジュール1471〜1474に対応したメモリコントローラ1441〜1444、並びにこれらメモリコントローラ1441にデータを分配するディストリビュータ1445が設けられている。
そして、メモリI/F回路13は、各DRAMモジュール1471〜1474に対して、図16に示すように、ピクセルデータを、表示領域において隣接した部分は、異なるDRAMモジュールとなるように配置する。
これにより、三角形のような平面を描画する場合には面で同時に処理できることになるため、それぞれのDRAMモジュールの動作確率は非常に高くなっている。
【0164】
前述した描画処理においては、最終的にはピクセルの一つ一つのアクセスにまで集約されてくることになる。したがって、ピクセル一つ一つの処理が同時並行処理されることにより、描画性能は並行処理の数だけ増加できることが理想である。
そのために、3次元コンピュータグラフィックスシステム1におけるメモリシステムを構成するメモリI/F回路13においても、同時並行処理が行える構成がとられている。
【0165】
グラフィック描画処理においては、前述したように、ピクセルに打ち込むところの処理回路は、DRAMと頻繁にデータのやりとりを行う必要があることがわかる。
そのため、本実施形態では、図17に示すように、ピクセル処理を制御する機能ブロックであるピクセル処理モジュール1446,1447,1448,1449をメモリコントローラから物理的に分離し、かつ、これらピクセル処理モジュール1446,1447,1448,1449を対応するDRAMモジュール1471,1472,1473,1474の近くに配置(近接配置)している。
【0166】
ピクセル処理モジュール1446,1447,1448,1449は、(R,G,B)カラーのリード(Read)/モディファイ(Modify)/ライト(Write)処理および、隠面処理のための以前に描画している深さデータと、今から描画しようとしているデータの深さを比較して、その結果により書き戻したりする作業に関する処理を全て行う。
これら作業をすべてピクセル処理モジュール1446,1447,1448,1449で行うことで、DRAMモジュール1471,1472,1473,1474との配線長が短いモジュール内で、DRAMとのやりとりを完結することが可能となる。
そのため、DRAMとの配線数、すなわち、転送のビット数を多くとっても、面積に対する配線が占める割合を、少なく抑えることができることから、動作速度向上および、配線面積の縮小化が可能となっている。
【0167】
ディストリビュータ等を含むDRAM間制御モジュール1450に関しては、描画処理としての、DDAセットアップ回路10のDDAセットアップ演算、トライアングルDDA回路11のトライアングルDDA演算、テクスチャエンジン回路12のテクスチャ貼り付け、並びに、CRTコントロール回路14による表示処理等に比較して、それぞれのDRAMモジュール(DRAM+ピクセル処理)との関連も強く、DRAMモジュール1471,1472,1473,1474との間の信号線が最も多くなるところである。
そのため、DRAM間制御モジュール1450は、それぞれのDRAMモジュール1471,1472,1473,1474の中心付近に配置して、最長配線長ができるだけ短くなるように考慮している。
【0168】
また、ピクセル処理モジュール1446,1447,1448,1449とDRAM間制御モジュール1450との接続のための信号入出力端子については、図17に示すように、それぞれのピクセル処理モジュール1446,1447,1448,1449における入出力端子を同じにするのではなく、個々のピクセル処理モジュールと、DRAM間制御モジュール1450間が最適(最短)に配線されるように、個々のピクセル処理モジュールにおける信号の入出力端子位置を調整してある。
【0169】
具体的には、ピクセル処理モジュール1446は、図17においてモジュール下縁部の右端側に入出力端子T1446aが形成されている。そして、この入出力端子T1446aがDRAM間制御モジュール1450の上縁部の左端側に形成された入出力端子T1450aと対向するように配置されて、両端子T1446aおよびT1450aが最短距離をもって接続されている。
そして、ピクセル処理モジュール1446には、図17において上縁部の中央部にDRAMモジュール1471との接続用入出力端子T1446bが形成されている。
【0170】
ピクセル処理モジュール1447は、図17においてモジュール下縁部の左端側に入出力端子T1447aが形成されている。そして、この入出力端子T1447aがDRAM間制御モジュール1450の上縁部の右端側に形成された入出力端子T1450bと対向するように配置されて、両端子T1447aおよびT1450bが最短距離をもって接続されている。
そして、ピクセル処理モジュール1447には、図17において上縁部の中央部にDRAMモジュール1472との接続用入出力端子T1447bが形成されている。
【0171】
ピクセル処理モジュール1448は、図17においてモジュール上縁部の右端側に入出力端子T1448aが形成されている。そして、この入出力端子T1448aがDRAM間制御モジュール1450の下縁部の左端側に形成された入出力端子T1450cと対向するように配置されて、両端子T1448aおよびT1450cが最短距離をもって接続されている。
そして、ピクセル処理モジュール1448には、図17において下縁部の中央部にDRAMモジュール1473との接続用入出力端子T1448bが形成されている。
【0172】
ピクセル処理モジュール1449は、図17においてモジュール上縁部の左端側に入出力端子T1449aが形成されている。そして、この入出力端子T1449aがDRAM間制御モジュール1450の下縁部の右端側に形成された入出力端子T1450dと対向するように配置されて、両端子T1449aおよびT1450dが最短距離をもって接続されている。
そして、ピクセル処理モジュール1449には、図17において下縁部の中央部にDRAMモジュール1474との接続用入出力端子T1449bが形成されている。
【0173】
なお、ピクセル処理モジュール1446,1447,1448,1449は、各DRAMモジュール1471,1472,1473,1474からDRAM間制御モジュール1450に至る経路を、上記のようにして最適な長さにしても、処理速度要求が満足できない処理に関しては、たとえばレジスタで分断した少なくとも1段のパイプライン処理をとり得、所望の処理速度を達成できるように構成されている。
【0174】
また、本実施形態に係るDRAMモジュール1471〜1474は図18に示すように構成されている。なお、ここでは、DRAMモジュール1471を例に説明するが、他のDRAMモジュール1472〜1474も同様の構成を有することから、その説明は省略する。
【0175】
DRAMモジュール1471は、図18に示すように、メモリセルがマトリクス状に配置され、ロウアドレスRA、カラムアドレスCAに基づいて選択される図示しないワード線およびビット線を通してアクセスされるDRAMコア1480、ロウデコーダ1481、センスアンプ1482、カラムデコーダ1483、およびSRAM等からなるいわゆるキャッシュメモリと同様の機能を備えた2次メモリ1484を有している。
【0176】
本実施形態のように、DRAMモジュール毎に、グラフィックス描画におけるピクセル処理を制御する機能ブロックとしてのピクセル処理モジュール1446〜1449と、DRAMモジュールの2次メモリ1484とがDRAMモジュールに近接配置されている。
そして、この場合、DRAMのいわゆる長辺方向が、DRAMコア1480のカラム方向になるように配置されている。
【0177】
図18の構成においてランダムな読み出し(リード)に関して見てみると、ピクセル処理モジュール1446から制御信号と必要なアドレス信号S1446が、アドレス制御パスからDRAMモジュール1471に供給され、それをもとに、ロウアドレスRAとカラムアドレスCAが生成され、所望のロウに相当するDRAMのデータがセンスアンプ1482を通して読み出される。
センスアンプ1480を通ったデータは所望のカラムアドレスCAに従って、カラムデコーダにて必要なカラムが集約され、ランダムアクセスポートから所望のロウ/カラムに対応した、DRAMのデータD1471がパスを介してピクセル処理モジュール1446に転送される。
【0178】
2次メモリにデータを書き込む場合は、ピクセル処理モジュール1446から制御信号と必要なアドレス信号S1446が、アドレス制御パスからDRAMモジュール1471に供給され、それをもとにロウアドレスのみが生成され、1ロウ分のデータが一気にDRAM16からSRAM17等からなる2次メモリ1484に書き込まれる。
この場合、DRAMのいわゆる長辺方向が、DRAMコア1480のカラム方向になるように配置されていることから、ロウ方向に配置する場合に比較して、ロウアドレス指定のみで、そのロウアドレスに対応している1ロウ分のデータを、一度に2次メモリ1484にロードできるビット数が格段に増加する。
【0179】
また、テクスチャ処理モジュールとしてのテクスチャエンジン回路143への2次メモリ(SRAM)1484からのデータD1484の読み込みは、テクスチャエンジン回路143から、制御信号と必要なアドレス信号が、アドレス制御パスからDRAMに供給され、それに対応したデータD1484がデータパスを介してテクスチャエンジン回路143へ転送される。
【0180】
また、本実施形態においては、図18に示すように、ピクセル処理モジュールとDRAMモジュールの2次メモリとが、それぞれ互いにDRAMモジュールの長辺側の同一側に近接配置されている。
これにより、ピクセル処理モジュールとDRAMモジュールの2次メモリへのデータは、同一のセンスアンプを使うことができるため、DRAMコア1480の面積増加を最小限に抑えて2ポート化することが可能となっている。
【0181】
以下、3次元コンピュータグラフィックシステム1の全体動作について説明する。
ポリゴンレンダリングデータS4が、メインバス6を介してメインプロセッサ4からDDAセットアップ回路10に出力され、DDAセットアップ回路10において、ポリゴンの辺と水平方向の差分などを示す変分データS10が生成される。
この変分データS10は、トライアングルDDA回路11に出力され、トライアングルDDA回路11において、ポリゴン内部の各画素における線形補間された(z,R,G,B,COEblend ,s,t,q,COEfog )データが算出される。そして、この算出された(z,R,G,B,COEblend ,s,t,q,COEfog )データと、ポリゴンの各頂点の(x,y)データとが、DDAデータS11として、トライアングルDDA回路11からテクスチャエンジン回路12に出力される。
【0182】
次に、図4に示すテクスチャエンジン回路12の代表点決定回路301において代表点が決定され、当該代表点を示す代表点指示データS301に基づいて代表点決定回路301においてqデータS302が選択される。
次に、図4および図8に示す縮小率演算回路50において、qデータS302およびmaxeデータS11cを用いて縮小率LODが算出される。
次に、図4に示すテクスチャエンジン回路12の第2のバッファメモリ51において、DDAデータS11に含まれる(s,t,q)データS11a1 〜S11a8 について、sデータをqデータで除算する演算と、tデータをqデータで除算する演算とが行われる。
そして、除算結果「s/q」および「t/q」に、それぞれテクスチャサイズUSIZEおよびVSIZEが乗算され、テクスチャ座標データ(u,v)が生成される。
次に、第2のバッファメモリ51によって、前記生成されたテクスチャ座標データ(u,v)を含む読み出し要求が出力され、メモリI/F回路13を介して、DRAM16あるいはSRAM17に記憶された(R,G,B)データS17が読み出される。
そして、このとき、上述したように、図4および図10に示す構成を用いて、前述したMIPMAP処理およびテクスチャファンクション処理が行われ、画素データS12が生成される。
この画素データS12は、テクスチャエンジン回路12からメモリI/F回路13に出力される。
【0183】
そして、メモリI/F回路13において、テクスチャエンジン回路12から入力した画素データS12に対応するzデータと、zバッファ22に記憶されているzデータとの比較が行なわれ、入力した画素データS12によって描画される画像が、前回、ディスプレイバッファ21に書き込まれた画像より、手前(視点側)に位置するか否かが判断され、手前に位置する場合には、画像データS12がディスプレイバッファ21に書き込まれると共に、対応するzデータでzバッファ22に記憶されたzデータが更新される。
【0184】
本発明は上述した第1実施形態には限定されない。
例えば、上述した実施形態では、図5に示すモード「1」〜「8」を指定するファンクションモードデータFMDに基づいて、LIP回路61が動作する場合を例示したが、例えば、LIP回路61がアルファブレンディング処理を行うようにしてもよい。
【0185】
また、LIP回路61を共用する処理の内容および数は任意である。例えば、LIP回路61において、テクスチャファンクション処理として、デカル処理やアルファブレンディング処理などを行うようにしてもよい。
【0186】
第2実施形態
本実施形態の3次元コンピュータグラフィックシステム501は、基本的に前述した第1実施形態の3次元コンピュータグラフィックシステム1と同じであるが、図1に示すテクスチャエンジン回路12およびメモリI/F回路13においてパイプライン処理を行う点に特徴を有している。
以下、3次元コンピュータグラフィックシステム501の構成要素の機能のうち、前述した第1実施形態の3次元コンピュータグラフィックシステム1と異なる点を説明する。
【0187】
DDAセットアップ回路10
また、DDAセットアップ回路10は、同時に処理を行う8画素のそれぞれについて、処理対象となる三角形の内部に位置するか否かを示す1ビットの有効指示データvalを決定する。具体的には、有効指示データvalは、三角形の内部に位置する画素について「1」とし、三角形の外部に位置する画素について「0」とする。
DDAセットアップ回路10は、算出した変分データS10と、各画素の有効指示データvalとをトライアングルDDA回路11に出力する。
【0188】
トライアングルDDA回路11
トライアングルDDA回路11は、DDAセットアップ回路10から入力した変分データS10を用いて、三角形内部の各画素の線形補間された(z,R,G,B,α,s,t,q)データを算出する。
トライアングルDDA回路11は、各画素の(x,y)データと、当該(x,y)座標の画素についての(z,R,G,B,α,s,t,q,val)データとを、DDAデータ(補間データ)S11としてテクスチャエンジン回路12に出力する。
本実施形態では、トライアングルDDA回路11は、並行して処理を行う矩形内に位置する8画素分のDDAデータS11を単位としてテクスチャエンジン回路12に出力する。
【0189】
ここで、DDAデータS11の(z,R,G,B,α,s,t,q,val)データは、図19に示すように、161ビットのデータである。
具体的には、R,G,B,αデータがそれぞれ8ビットであり、z,s,t,qデータがそれぞれ32ビットであり、valデータが1ビットである。
なお、以下、並行して処理を行う8画素についての(z,R,G,B,α,s,t,q,val)データのうち、valデータをvalデータS2201 〜S2208 とし、(z,R,G,B,α,s,t,q)データを被演算データS2211 〜S2218 とする。
すなわち、トライアングルDDA回路11は、8画素分の(x,y)データと、valデータS2201 〜S2208 と、被演算データS2211 〜S2218 からなるDDAデータS11を図1に示すテクスチャエンジン回路12に出力する。
【0190】
テクスチャエンジン回路12およびメモリI/F回路13
テクスチャエンジン回路12による、DDAデータS11を用いた、縮小率LODの算出処理と、「s/q」および「t/q」の算出処理、テクスチャ座標データ(u,v)の算出処理、および、テクスチャバッファ20からの(R,G,B,α)データの読み出し処理と、メモリI/F回路13によるz比較処理とを、図3に示す演算ブロック200,201,202,204,205でパイプライン方式で順に実行する。
ここで、演算ブロック199,200,201,202,204,205は、それぞれ8個の演算サブブロックを内蔵しており、8画素分の演算処理を並行して行う。
ここで、テクスチャエンジン回路12が演算ブロック199,200,201,202を内蔵し、メモリI/F回路13が演算ブロック204を内蔵している。
また、演算ブロック199は図4に示す縮小率演算回路50、代表点決定回路301およびqデータ選択回路302に対応し、演算ブロック200,201,202は図4に示す読み出し回路51に対応し、演算ブロック203は図4に示すLIP回路52,53,54およびLIP/テクスチャファンクション回路55に対応している。
なお、LIP/テクスチャファンクション回路55では、例えば、MIMAP処理のレベル補間処理と、モジュレート処理、デカル処理、ハイライト処理、フォギング処理、テクスチャブレンディング処理およびアルファブレンディング処理などのテクスチャファンクション処理のうち一の処理が選択的に行われる。
【0191】
〔演算ブロック199〕
演算ブロック199は、第1実施形態で説明した縮小率演算回路304、代表点決定回路301およびqデータ選択回路302に対応する処理を行ってテクスチャデータの縮小率LODを算出して演算ブロック200に出力する。
縮小率LODは、演算ブロック200,201,202,203に順にシフトされる。
また、演算ブロック199は、トライアングルDDA回路11から入力したDDAデータS11を後段の演算ブロック200に出力する。
演算ブロック199は、valデータS2201 〜S2208 が示す値とは無関係に常に動作する。
【0192】
〔演算ブロック200〕
演算ブロック200は、DDAデータS11に含まれる(s,t,q)データを用いて、sデータをqデータで除算する演算と、tデータをqデータで除算する演算とを行う。
演算ブロック200は、図20に示すように、8個の演算サブブロック2001 〜2008 を内蔵する。
ここで、演算サブブロック2001 は、被演算データS2211 およびvalデータS2201 を入力し、valデータS2201 が「1」、すなわち有効であることを示す場合には、「s/q」および「t/q」を算出し、その算出結果を除算結果S2001 として演算ブロック201の演算サブブロック2011 に出力する。
【0193】
また、演算サブブロック2001 は、valデータS2201 が「0」、すなわち無効であることを示す場合には、演算は行わず、除算結果S2001 を出力しないか、あるいは、所定の仮値を示す除算結果S2001 を演算ブロック201の演算サブブロック2011 に出力する。
また、演算サブブロック2001 は、valデータS2201 を後段の演算サブブロック2011 に出力する。
なお、演算サブブロック2002 〜2008 も、それぞれ対応する画素について、演算サブブロック2001 と同じ演算を行い、それぞれ除算結果S2002 〜S2008 およびvalデータS2202 〜S2208 を後段の演算ブロック201の演算サブブロック2012 〜2018 にそれぞれ出力する。
【0194】
図21は、演算サブブロック2001 の内部構成図である。
なお、図3に示す、全ての演算サブブロックは、基本的に、図21に示す構成をしている。
図21に示すように、演算サブブロック2001 は、クロックイネーブラ2101 、データ用フリップフロップ222、プロセッサエレメント223およびフラグ用フリップフロップ224を有する。
クロックイネーブラ2101 は、システムクロック信号S225を基準としたタイミングでvalデータS2201 を入力し、valデータS2201 のレベルを検出する。そして、クロックイネーブラ2101 は、valデータS2201 が、「1」である場合には、例えば、クロック信号S2101 にパルス発生させ、「0」である場合には、クロック信号S2101 にパルス発生させない。
【0195】
データ用フリップフロップ222は、クロック信号S2101 のパルスを検出すると、被演算データS2211 を取り込み、プロセッサエレメント223に出力する。
プロセッサエレメント223は、入力した被演算データS2211 を用いて前述した除算を行い、除算結果S2001 を演算サブブロック2011 のデータ用フリップフロップ222に出力する。
フラグ用フリップフロップ224は、システムクロック信号S225を基準としたタイミングで、valデータS2201 を取り込み、後段の演算ブロック201の演算サブブロック2011 のフラグ用フリップフロップ224に出力する。
なお、図21に示すシステムクロック信号S225は、図20に示す演算ブロック199、並びに全ての演算サブブロック2001 〜2008 ,2011 〜2018 ,2021 〜2028 ,2041 〜2048 のクロックイネーブラおよびフラグ用フリップフロップ224に供給される。
すなわち、演算サブブロック2001 〜2008 ,2011 〜2018 ,2021 〜2028 ,2041 〜2048 における処理は同期して行われ、同一の演算ブロックに内蔵された8個の演算サブブロックは並行して処理を行う。
【0196】
〔演算ブロック201〕
演算ブロック201は、演算サブブロック2011 〜2018 を有し、演算ブロック200から入力した除算結果S2001 〜S2008 が示す「s/q」および「t/q」に、それぞれテクスチャサイズUSIZEおよびVSIZEを乗じて、テクスチャ座標データ(u,v)を生成する。
演算サブブロック2011 〜2018 は、それぞれクロックイネーブラ2111 〜2118 によりvalデータS2201 〜S2208 のレベル検出を行った結果、当該レベルが「1」の場合にのみ演算を行い、それぞれ演算結果であるテクスチャ座標データS2011 〜S2018 を、演算ブロック202の演算サブブロック2021 〜2028 に出力する。
【0197】
〔演算ブロック202〕
演算ブロック202は、演算サブブロック2021 〜2028 を有し、メモリI/F回路13を介して、SRAM17あるいはDRAM16に、演算ブロック201で生成したテクスチャ座標データ(u,v)を含む読み出し要求を出力し、メモリI/F回路13を介して、SRAM17あるいはテクスチャバッファ20に記憶されているテクスチャデータを読み出すことで、(u,v)データに対応したテクスチャアドレスに記憶された(R,G,B,α)データS17を得る。
なお、テクスチャバッファ20には、MIPMAP(複数解像度テクスチャ)などの複数の縮小率に対応したテクスチャデータが記憶されている。ここで、何れの縮小率のテクスチャデータを用いるかは、所定のアルゴリズムを用いて、前記三角形を単位として決定される。
また、SRAM17には、テクスチャバッファ20に記憶されているテクスチャデータのコピーが記憶されている。
演算サブブロック2021 〜2028 は、それぞれクロックイネーブラ2121 〜2128 によりvalデータS2201 〜S2208 のレベル検出を行った結果、当該レベルが「1」の場合にのみ読み出し処理を行い、それぞれ読み出した(R,G,B,α)データS17を、(R,G,B,α)データS2021 〜S2028 として、それぞれ演算ブロック203の演算サブブロック2031 〜2038 に出力する。
【0198】
なお、テクスチャエンジン回路12は、フルカラー方式の場合には、テクスチャバッファ20から読み出した(R,G,B,α)データを直接用いる。一方、テクスチャエンジン回路12は、インデックスカラー方式の場合には、予め作成したカラールックアップテーブル(CLUT)をテクスチャCLUTバッファ23から読み出して、内蔵するSRAMに転送および記憶し、このカラールックアップテーブルを用いて、テクスチャバッファ20から読み出したカラーインデックスに対応する(R,G,B)データを得る。
【0199】
〔演算ブロック203〕
演算ブロック203は、演算サブブロック2031 〜2038 を有し、図4に示すLIP回路52,53,54およびLIP/テクスチャファンクション回路55を用いて、例えば、MIMAP処理のレベル補間処理と、モジュレート処理、デカル処理、ハイライト処理、フォギング処理、テクスチャブレンディング処理およびアルファブレンディング処理などのテクスチャファンクション処理のうち一の処理を選択的に行う。
【0200】
そして、演算ブロック203は、処理結果である(R,G,B,α)データS2031 〜S2038 を、演算ブロック204に出力する。
演算サブブロック2031 〜2038 は、それぞれクロックイネーブラ2131 〜2138 によりvalデータS2201 〜S2208 のレベル検出を行った結果、当該レベルが「1」の場合にのみ混合テクスチャファンクション処理および(R,G,B,α)データS2031 〜S2038 の出力を行う。
【0201】
〔演算ブロック204〕
演算ブロック204は、演算サブブロック2041 〜2048 を有し、入力した(R,G,B,α)データS2031 〜S2038 について、zバッファ22に記憶されたzデータの内容を用いて、z比較を行い、(R,G,B,α)データS2031 〜S2038 によって描画する画像が、前回、ディスプレイバッファ21に描画した値よりも手前(視点側)に位置する場合には、zバッファ22を更新すると共に、(R,G,B,α)データS2031 〜S2038 を、(R,G,B,α)データS2041 〜S2048 として、ディスプレイバッファ21に書き込む。
演算サブブロック2041 〜2048 は、それぞれクロックイネーブラ2141 〜2148 によりvalデータS2201 〜S2208 のレベル検出を行った結果、当該レベルが「1」の場合にのみ上述したz比較およびディスプレイバッファ21への書き込みを行う。
なお、メモリI/F回路13によるDRAM16に対してのアクセスは、16画素について同時に行なわれる。
【0202】
以下、3次元コンピュータグラフィックシステム501の全体動作について説明する。
ポリゴンレンダリングデータS4が、メインバス6を介してメインプロセッサ4からDDAセットアップ回路10に出力され、DDAセットアップ回路10において、三角形の辺と水平方向の差分などを示す変分データS10が生成される。
この変分データS10は、トライアングルDDA回路11に出力され、トライアングルDDA回路11において、三角形内部の各画素における線形補間された(z,R,G,B,α,s,t,q)データが算出される。そして、この算出された(z,R,G,B,α,s,t,q)データと、三角形の各頂点の(x,y)データとが、DDAデータS11として、トライアングルDDA回路11からテクスチャエンジン回路12に出力される。
【0203】
次に、テクスチャエンジン回路12およびメモリI/F回路13において、DDAデータS11を用いて、縮小率LODの算出処理、「s/q」および「t/q」の算出処理、テクスチャ座標データ(u,v)の算出処理、テクスチャバッファ20からのデジタルデータとしての(R,G,B,α)データの読み出し処理、テクスチャファンクション処理、および、z比較処理が、図20に示す演算ブロック199,200,201,202,,203,204でパイプライン方式で順に実行される。
【0204】
次に、図1に示すテクスチャエンジン回路12およびメモリI/F回路13のパイプライン処理の動作について説明する。
ここでは、例えば、図7に示す矩形251内の8画素について同時処理する場合を考える。この場合には、valデータS2201 ,S2202 ,S2203 ,S2205 ,S2206 が「0」を示し、valデータS2204 ,S2207 ,S2208 が「1」を示している。
【0205】
そして、valデータS2201 〜S2208 および被演算データS2211 〜S2218 が、演算ブロック199に入力され、演算ブロック199において、I7 の画素を代表点として縮小率LODが算出され、当該算出された縮小率LOD、valデータS2201 〜S2208 および被演算データS2211 〜S2218 が演算ブロック200に出力される。
【0206】
次に、valデータS2201 〜S2208 および被演算データS2211 〜S2218 が、それぞれ対応する演算サブブロック2001 〜2008 のクロックイネーブラ2101 〜2108 に入力される。
そして、クロックイネーブラ2101 〜2108 において、それぞれvalデータS2201 〜S2208 のレベルが検出される。具体的には、クロックイネーブラ2104 ,2107 ,2108 において「1」が検出され、クロックイネーブラ2101 ,2102 ,2103 ,2105 ,2106 において「0」が検出される。
その結果、演算サブブロック2004 ,2007 ,2008 においてのみ、被演算データS2214 ,S2217 ,S2218 を用いて、「s/q」および「t/q」が算出され、当該除算結果S2004 ,S2007 ,S2008 が演算ブロック201の演算ブロック2014 ,2017 ,2018 に出力される。
一方、演算サブブロック2001 ,2002 ,2003 ,2005 ,2006 では、除算は行なわれない。
また、除算結果S2004 ,S2007 ,S2008 の出力と同期して、valデータS2201 〜S2208 が、演算ブロック201の演算サブブロック2011 〜2018 に出力される。
【0207】
次に、演算サブブロック2011 〜2018 のクロックイネーブラ2101 〜2108 において、それぞれvalデータS2201 〜S2208 のレベルが検出される。
そして、この検出結果に基づいて、演算サブブロック2014 ,2017 ,2018 においてのみ、除算結果S2004 ,S2007 ,S2008 が示す「s/q」および「t/q」に、それぞれテクスチャサイズUSIZEおよびVSIZEを乗じて、テクスチャ座標データS2024 ,S2027 ,S2028 が生成され、それぞれ演算ブロック202の演算サブブロック2024 ,2027 ,2028 に出力される。
一方、演算サブブロック2011 ,2012 ,2013 ,2015 ,2016 では、演算は行なわれない。
また、テクスチャ座標データS2024 ,S2027 ,S2028 の出力と同期して、valデータS2201 〜S2208 が、演算ブロック202の演算サブブロック2021 〜2028 に出力される。
【0208】
次に、演算サブブロック2021 〜2028 のクロックイネーブラ2121 〜2128 において、それぞれvalデータS2201 〜S2208 のレベルが検出される。
そして、この検出結果に基づいて、演算サブブロック2024 ,2027 ,2028 においてのみ、SRAM17あるいはテクスチャバッファ20に記憶されているテクスチャデータの読み出し処理が行なわれ、(s,t)データに対応したテクスチャアドレスに記憶された(R,G,B,α)データが読み出される。そして、この読み出した(R,G,B,α)データS2024 ,S2027 ,S2028 が、演算ブロック204の演算サブブロック2034 ,2037 ,2038 に出力される。
一方、演算サブブロック2021 ,2022 ,2023 ,2025 ,2026 では、読み出し処理は行なわれない。
また、(R,G,B,α)データS2024 ,S2027 ,S2028 の出力と同期して、valデータS2201 〜S2208 が、演算ブロック203の演算サブブロック2031 〜2038 に出力される。
【0209】
次に、演算サブブロック2031 〜2038 のクロックイネーブラ2121 〜2128 において、それぞれvalデータS2201 〜S2208 のレベルが検出される。
そして、この検出結果に基づいて、演算サブブロック2034 ,2037 ,2038 においてのみ、テクスチャファンクション処理が行われ、それによって得られた(R,G,B,α)データS2034 ,2037 ,2038 を、演算ブロック204に出力する。
一方、演算サブブロック2031 ,2032 ,2033 ,2035 ,2036 では、テクスチャファンクション処理は行なわれない。
【0210】
次に、演算サブブロック2041 〜2048 のクロックイネーブラ2141 〜2148 において、それぞれvalデータS2201 〜S2208 のレベルが検出される。
そして、この検出結果に基づいて、演算サブブロック2044 ,2047 ,2048 においてのみ、(R,G,B,α)データS2034 ,S2037 ,S2038 について、zバッファ22に記憶されたzデータの内容を用いて、z比較が行なわれ、(R,G,B,α)データS2034 ,S2037 ,S2038 によって描画する画像が、前回、ディスプレイバッファ21に描画した値よりも手前に位置する場合には、zバッファ22が更新されると共に、(R,G,B,α)データS2034 ,S2037 ,S2038 がディスプレイバッファ21に書き込まれる。
【0211】
すなわち、テクスチャエンジン回路12およびメモリI/F回路13では、図6に示す矩形251の画素について同時に処理を行なう場合に、三角形250の外に位置する画素についての処理は行なわない。すなわち、図6に示す矩形251内の画素についての演算を行なっている間は、演算サブブロック2001 ,2002 ,2003 ,2005 ,2006 ,2011 ,2012 ,2013 ,2015 ,2016 ,2021 ,2022 ,2023 ,2025 ,2026 ,2041 ,2042 ,2043 ,2045 ,2046 は停止した状態になり、これらの演算サブブロックは電力を消費しない。
【0212】
以上説明したように、3次元コンピュータグラフィックシステム501は、前述した第1実施形態の3次元コンピュータグラフィックシステム1の効果に加えて以下に示す効果をさらに有する
すなわち、3次元コンピュータグラフィックシステム501によれば、テクスチャエンジン回路12におけるパイプライン処理において、同時処理する8画素のうち、処理対象となる三角形の外部に位置する画素についての演算は行なわないようにすることができる。
そのため、テクスチャエンジン回路12における消費電力を大幅に低減できる。その結果、3次元コンピュータグラフィックシステム501の電源として、簡単かつ安価なものを用いることができる。
なお、テクスチャエンジン回路12は、図20および図21に示すように、各演算サブブロックに、クロックイネーブラおよび1ビットのフラグ用フリップフロップを組み込むことで、上述した機能を実現するが、クロックイネーブラおよび1ビットのフラグ用フリップフロップの回路規模は小さいため、テクスチャエンジン回路12の回路規模が大幅に増大することはない。
【0213】
本発明は上述した実施形態には限定されない。
上述した実施形態では、同時に処理を行おうとする複数の画素データについて共通の縮小率を用いて記憶回路からテクスチャデータを読み出す場合を例示したが、前記複数の画素データについての個別に縮小率を算出する複数の縮小率算出回路を設けてもよい。この場合に、読み出し回路は、同時に処理を行おうとする複数の画素データにそれぞれ対応した複数設けられ、記憶回路、複数の縮小率算出回路および複数の読み出し回路が一つの半導体チップに混載される。
また、読み出し回路によって読み出したテクスチャデータを用いて同時に処理を行って複数の表示データを生成する複数の画像処理回路と、当該生成した表示データをDRAMなどの記憶回路に書き込む複数の書き込み回路とをさらに設け、記憶回路、複数の縮小率算出回路、複数の読み出し回路、複数の画像処理回路および複数の書き込み回路を一つの半導体チップに混載してもよい。
【0214】
【発明の効果】
以上説明したように、本発明の画像処理装置によれば、小規模な装置構成で、高画質を安定して提供できる。
【図面の簡単な説明】
【図1】図1は、本発明の実施形態の3次元コンピュータグラフィックシステムの構成図である。
【図2】図2は、図1に示すDDAセットアップ回路における有効ビットデータの生成方法を説明するための図である。
【図3】図3は、図1に示すSARAMおよひテクスチャバッファに記憶されているMIPMAP処理に用いられるテクスチャデータを説明するための図である。
【図4】図4は、図1に示すテクスチャエンジン回路の構成図である。
【図5】図5は、図4に示す代表点決定回路における処理のフローチャートである。
【図6】図6は、図4に示す代表点決定回路における処理を説明するための図である。
【図7】図7は、図2に示す三角形を処理対象としている場合の代表点の具体例を説明するための図である。
【図8】図8は、図4に示す縮小率算出回路の構成図である。
【図9】図9は、図8に示す縮小率算出回路の処理内容を説明するための図である。
【図10】図10は、図4に示すLIP/テクスチャファンクション回路の構成図である。
【図11】図11は、各モードにおいて、LIP回路に入力されるデータを説明するための図である。
【図12】図12は、LIP回路からLIP/テクスチャファンクション回路へのミップマップデータの入力タイミングおよびレベル補間処理の実行タイミングを説明するための図である。
【図13】図13は、図4に示すLIP回路の処理を説明するための図である。
【図14】図14は、図4に示すLIP回路の処理を説明するための図である。
【図15】図15は、図13に示す前段の加算回路の部分構成図である。
【図16】図16は、図1に示すDRAMに対してのデータ格納方法を説明するための図である。
【図17】図17は、図1に示すレンダリング回路のロジック回路とDARAMおよび2次メモリとの好適な構成、配置および配線方法を説明するための図である。
【図18】図18は、図17に示すDRAMモジュールの構成を説明するための図である。
【図19】図19は、本発明の第2実施形態の3次元コンピュータグラフィックシステムにおいて、図1に示すトライアングルDDA回路から出力されるDDAデータのフォーマットを説明するための図である。
【図20】図20は、本発明の第2実施形態の3次元コンピュータグラフィックシステムにおけるテクスチャエンジン回路およびメモリI/F回路の部分構成図である。
【図21】図21は、図20に示す演算サブブロックの構成図である。
【図22】図22は、MIPMAPフィルタリング処理を説明するための図である。
【図23】図23は、従来の一般的なテクスチャマッピング装置を説明するための図である。
【図24】図24は、図23に示すテクスチャマッピング装置における処理のフローチャートである。
【図25】図25は、高速処理を実現するテクスチャマッピング装置を説明するための図である。
【符号の説明】
1…3次元コンピュータグラフィックシステム、2…メインメモリ、3…I/Oインタフェース回路、4…メインプロセッサ、5…レンダリング回路、10…DDAセットアップ回路、11…トライアングルDDA回路、12…テクスチャエンジン回路、13…メモリI/F回路、14…CRTコントローラ回路、15…RAMDAC回路、16…DRAM、17…SRAM、20…テクスチャバッファ、21…ディスプレイバッファ、22…Zバッファ、23…テクスチャCLUTバッファ、301…代表点決定回路、302…stq選択回路、50…縮小率演算回路、51…テクスチャデータ読み出し回路、55…LIP/テクスチャファンクション回路
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing apparatus capable of providing a high-quality image with a small configuration.
[0002]
[Prior art]
Computer graphics are often used in various CAD (Computer Aided Design) systems and amusement machines. In particular, with the recent development of image processing technology, systems using three-dimensional computer graphics are rapidly spreading.
In such 3D computer graphics, when determining the color corresponding to each pixel (pixel), the color value of each pixel is calculated, and the calculated color value is used as the display buffer corresponding to the pixel. Rendering processing to write to the (frame buffer) address.
One of the rendering processing methods is polygon rendering. In this method, a three-dimensional model is expressed as a combination of triangular unit graphics (polygons), and the color of the display screen is determined by drawing with the polygon as a unit.
[0003]
In polygon rendering, the coordinates (x, y, z), color data (R, G, B), and the homogeneous coordinates (s of texture data indicating the image pattern of pasting for each vertex of the triangle in the physical coordinate system. , T) and the value of the homogeneous term q are interpolated inside the triangle.
Here, simply speaking, the homogeneous term q is like an enlargement / reduction ratio, and the coordinates in the UV coordinate system of the actual texture buffer, that is, the texture coordinate data (U, V), are represented by the homogeneous coordinates (s , T) divided by the homogeneous term q and (s / q, t / q) = (u, v) are multiplied by the texture sizes USIZE and VSIZE, respectively, according to the multiplication results.
[0004]
In such a three-dimensional computer graphic system using polygon rendering, when drawing is performed, texture data is read from the texture buffer, and the read texture data is pasted on the surface of the three-dimensional model to obtain highly realistic image data. Perform texture mapping.
When texture mapping is performed on the stereo model, the enlargement / reduction ratio of the image indicated by the texture data to be pasted changes for each pixel.
[0005]
By the way, there is MIP (Multum In Parvo) MAP (Multiple Resolution Texture) filtering as a technique for obtaining high image quality when performing texture mapping.
In this MIPMAP filtering, as shown in FIG. 22, a plurality of filtered texture data 200, 201, 202, 203 corresponding to each of a plurality of different reduction ratios are prepared in advance, and the reduction ratio 204 of each pixel is set. By selecting 205 corresponding texture data, the optimum texture data 206 corresponding to the reduction ratio 204 is used, and the influence of aliasing due to information loss accompanying image reduction can be suppressed.
[0006]
Hereinafter, a conventional three-dimensional computer graphic system employing the above-described MIPMAP filtering will be described.
FIG. 23 is a diagram for explaining the configuration of a conventional three-dimensional computer graphic system, and FIG. 24 is a flowchart of processing in the texture mapping apparatus 210 shown in FIG.
As shown in FIG. 23, in a conventional three-dimensional computer graphic system, a texture mapping device 210, a texture buffer 211, and a display buffer 213 incorporated in different semiconductor chips are connected to each other via wiring.
[0007]
Hereinafter, processing in the texture mapping apparatus 210 will be described.
Step S1: First, the texture mapping device 210 obtains (s1, t1, q1), (s2, t2, q2), (s3, t3, q3) data indicating homogeneous coordinates and homogeneous terms for each vertex of the triangle. input.
Step S2: Next, the texture mapping apparatus 210 linearly interpolates (s1, t1, q1), (s2, t2, q2), (s3, t3, q3) data of each input vertex, (S, t, q) data indicating the homogeneous coordinates and the homogeneous terms of each pixel are obtained.
[0008]
Step S3: The texture mapping device 210 obtains the reduction rate lod of each pixel from the (s, t, q) data of each pixel inside the triangle in the built-in reduction rate calculation device 212.
Step S4: The texture mapping apparatus 210 calculates u data obtained by dividing s data by q data and v data obtained by dividing t data by q data for (s, t, q) data of each pixel, and texture Coordinate data (u, v) is obtained.
Next, the texture mapping device 210 obtains a texture address (U, V) that is a physical address in the texture buffer 211 from the reduction rate lod calculated by the reduction rate calculation device 212 and the texture coordinate data (u, v). .
[0009]
Step S5: The texture mapping device 210 outputs the texture address (U, V) to the texture buffer 211 and reads the texture data (R, G, B).
Step S6: The texture mapping apparatus 210 writes pixel data S210 obtained by performing predetermined processing on the read texture data in step S5 to the display buffer 213.
Thereby, access to the texture data corresponding to the reduction rate lod among the plurality of texture data stored in the texture buffer 211 and corresponding to each of a plurality of different reduction rates is realized.
[0010]
In order to realize high-speed drawing, there is a high-speed texture mapping apparatus that performs texture mapping processing on a plurality of pixels in parallel and simultaneously writes the pixel data in a display buffer.
In such a high-speed texture mapping apparatus, as shown in FIG. 25, (s1, t1, q1), (s2, t2, q2), (s3, t3, q3) data about the vertices of a triangle are converted into n pieces of data. Texture mapping device 2101~ 210nThe pixel data S210 that is the processing result is processed in parallel with1~ S210nAre simultaneously written to the display buffer.
That is, texture mapping processing for a plurality of pixels is performed in parallel (simultaneously).
[0011]
Note that the texture mapping process is performed in units of triangles that are unit graphics, and processing conditions such as the reduction rate of texture data are determined in units of triangles, and among the plurality of pixels that are processed simultaneously, the inside of the triangle Only the processing result for the pixel located at is valid, and the processing result for the pixel located outside the triangle is invalid.
[0012]
[Problems to be solved by the invention]
However, in the above-described conventional three-dimensional computer graphic system, the data transfer speed between the texture mapping apparatus 210, the texture buffer 211, and the display buffer 213 is a bottleneck for increasing the processing capacity of the entire system. It was.
[0013]
Further, in the conventional three-dimensional computer graphic system described above, the texture mapping device 210, the texture buffer 211, and the display buffer 213 are incorporated in different semiconductor chips.
[0014]
In addition, the calculation for obtaining the reduction ratio lod includes a large number of multiplications and divisions and requires a huge amount of calculation.
Accordingly, as shown in FIG. 25, n texture mapping devices 210 are provided.1~ 210n, The reduction rate calculation device 2121~ 212nHowever, there is a problem that the scale of the device is increasing.
In order to solve such a problem, among a plurality of texture mapping devices that perform processing in parallel, only one texture mapping device incorporates a reduction rate calculation device, and a pixel to be processed by the texture mapping device is determined. A method of using the reduction rate obtained by the reduction rate calculation device as a representative point for obtaining the reduction rate in all the texture mapping devices can be considered.
In this case, the position of the pixel serving as the representative point among the plurality of pixels that are processed simultaneously is fixed.
Therefore, a pixel located outside the triangle that is the unit graphic described above may be a representative point among a plurality of pixels that are processed simultaneously.
However, the reduction ratio may be greatly different between the inside and outside of the triangle, and when the pixel located outside the triangle to be processed is the representative point, the pixel located inside the triangle is optimal. Cannot select the correct texture data. As a result, there is a problem that the image quality is greatly reduced.
[0015]
The present invention has been made in view of the above-described problems of the prior art, and an object thereof is to provide an image processing apparatus that can stably provide high image quality with a small-scale apparatus configuration.
[0016]
[Means for Solving the Problems]
  According to the present invention, an image that represents a display model by combining unit graphics composed of a plurality of pixels to which common processing conditions are applied, and generates pixel data corresponding to the pixels using texture data as necessary. In the processing device,
  The display model is a three-dimensional model;
  The unit figure is a triangle;
  A storage circuit for storing display data and a plurality of texture data corresponding to different reduction ratios for the same pattern;
  A reduction ratio calculation circuit for calculating a reduction ratio commonly used for a plurality of pixel data to be processed simultaneously;
  A readout circuit for reading out the texture data corresponding to the calculated reduction ratio from the storage circuit;
  An image processing circuit that generates display data by simultaneously processing the plurality of pixel data using the read texture data;
  A writing circuit for writing the generated display data into the storage circuit;
  A representative point determination circuit for determining a pixel as a representative point from among the pixels corresponding to the plurality of pixel data to be processed at the same time, among the pixels located inside the unit graphic to be processed;
  Have
  The reduction rate calculation circuit substantially calculates LOD indicating the reduction rate based on the following formula,
    LOD = Clamp (((log 2 1 / q) + maxe)
                                                      << L + K)
      here,
      LOD is composed of an integer part and a decimal part, and is a symbol indicating an unsigned reduction rate,
      Clamp is a symbol indicating clamping in the following clamp circuit,
      q is a symbol indicating the homogeneous term,
      maxe is data consisting only of an integer part indicating the maximum coordinate of the homogeneous coordinates (s, t) and the homogeneous term q of the vertex of the unit graphic to be processed;
      << L indicates that data is shifted by L bits in the shift circuit described below.
      K is composed of an integer part and a decimal part, is signed, and is data used for addition in the following addition circuit,
  A normalization circuit that normalizes the homogeneous term data q to generate an exponent qe and a mantissa qm;
  A first shift circuit that shifts data obtained by bit-combining the exponent qe and the mantissa qm toward a MSB (Most Significant Bit) by a value indicated by the data L;
  A first inverting circuit for inverting the output of the first shift circuit;
  Enter the mantissa qm and enter "log 2 Data output means for outputting data μ indicating ({1, qm}) − qm ”;
  A second shift circuit that shifts data obtained by bit-combining the data maxe and the data μ toward the MSB by a value indicated by the data L;
  A second inverting circuit for inverting the output of the second shift circuit;
  An addition circuit for adding the data obtained by bit-combining the data K and the binary number “10”, the output of the first inversion circuit, and the output of the second inversion circuit;
  A clamp circuit for clamping the output of the adder circuit within a predetermined bit to generate the reduction ratio LOD;
  Have
  The readout circuit receives texture data specified by the determined reduction ratio, the homogeneous coordinates (s, t), and the homogeneous term q from the storage circuit for each of the plurality of pixel data to be processed simultaneously. read out,
  An image processing apparatus is provided.
[0038]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, in this embodiment, a three-dimensional computer graphic that displays a desired three-dimensional image of an arbitrary three-dimensional object model applied to a home game machine or the like on a display such as a CRT (Cathode Ray Tube) at high speed. A case where the image processing apparatus of the present invention is applied to the system will be described.
FIG. 1 is a system configuration diagram of a three-dimensional computer graphic system 1 of the present embodiment.
The three-dimensional computer graphic system 1 represents a three-dimensional model as a combination of triangles (polygons) that are unit figures, draws this polygon, determines the color of each pixel on the display screen, and displays the polygon on the display It is a system that performs.
Further, in the three-dimensional computer graphic system 1, in addition to the (x, y) coordinates representing the position on the plane, the z coordinate representing the depth is used to represent a three-dimensional object, and this (x, y, z) An arbitrary point in the three-dimensional space is specified by three coordinates.
[0039]
As shown in FIG. 1, a three-dimensional computer graphic system 1 includes a main memory 2, an I / O interface circuit 3, a main processor 4, and a rendering circuit 5 connected via a main bus 6.
Here, the rendering circuit 5 corresponds to the image processing apparatus of the present invention.
Hereinafter, the function of each component will be described.
The main processor 4 reads out necessary graphic data from the main memory 2 according to the progress of the game, for example, and performs clipping processing, lighting processing, and geometry processing on the graphic data. Etc. to generate polygon rendering data. The main processor 4 outputs the polygon rendering data S4 to the rendering circuit 5 via the main bus 6.
The I / O interface circuit 3 inputs polygon rendering data from the outside as required, and outputs it to the rendering circuit 5 via the main bus 6.
[0040]
Here, the polygon rendering data includes (x, y, z, R, G, B, COE at each of the three vertices of the polygon.blend, S, t, q, COEfog) Data.
Here, (x, y, z) data indicates the three-dimensional coordinates of the vertices of the polygon, and (R, G, B) data indicates the red, green, and blue luminance values in the three-dimensional coordinates. ing.
Data COEblendIndicates a blend coefficient of R, G, B data of a pixel to be drawn from now and a pixel already stored in the display buffer 21.
Of the (s, t, q) data, (s, t) indicates the homogeneous coordinates of the corresponding texture, and q indicates the homogeneous term. Here, “s / q” and “t / q” are multiplied by the texture sizes USIZE and VSIZE, respectively, to obtain texture coordinate data (u, v). Access to the texture data stored in the texture buffer 20 is performed using the texture coordinate data (u, v).
Data COEfogIndicates a mixing coefficient used in the fogging process.
[0041]
Hereinafter, the rendering circuit 5 will be described in detail.
As shown in FIG. 1, the rendering circuit 5 includes a DDA (Digital Differential Anarizer) setup circuit 10, a triangle DDA circuit 11, a texture engine circuit 12, a memory I / F circuit 13, a CRT controller circuit 14, a RAMDAC circuit 15, a DRAM 16, An SRAM 17 and a clock signal generation circuit 18 are included, and these are mounted together in one semiconductor chip.
Here, the texture engine circuit 12 and the DRAM 16 constitute an image processing apparatus of the present invention. The DRAM 16 corresponds to the memory circuit of the present invention. In the rendering circuit 5, as described above, by embedding each component in one semiconductor chip, it is possible to achieve high performance by reducing the data transmission speed between the components and to reduce the circuit scale.
[0042]
The DRAM 16 functions as a texture buffer 20, a display buffer 21, a z buffer 22, and a texture CLUT buffer 23.
The clock signal S18 from the clock signal generation circuit 18 is used as a signal for driving each component in the rendering circuit 5.
[0043]
DRAM16
The DRAM 16 includes a texture buffer 20 that stores texture data, a display buffer 21 that stores display data that is output to the CRT and displayed on the display, a z buffer 22 that stores z data, and a texture CLUT buffer 23 that stores color lookup data. Function.
[0044]
DDA setup circuit 10
Prior to obtaining the color and depth information of each pixel inside the triangle by linearly interpolating the value of each vertex of the triangle on the physical coordinate system in the triangle DDA circuit 11 at the subsequent stage, the DDA setup circuit 10 generates polygon rendering data. S4 indicates (z, R, G, B, COEblend, S, t, q, COEfog) Perform a setup calculation for the data to find the difference between the sides of the triangle and the horizontal direction.
Specifically, this set-up calculation uses the start point value, end point value, and distance between the start point and end point to calculate the variation of the value to be obtained when the unit length is moved. .
[0045]
That is, the DDA setup circuit 10 generates, for each pixel, dsdx, dtdx, dqdx, which are variations in the x direction of (s, t, q) data, and dsdy, dtdy, dqdy, which are variations in the y direction. To do.
The DDA setup circuit 10 outputs the calculated variation data S10 to the triangle DDA circuit 11.
[0046]
Triangle DDA circuit 11
The triangle DDA circuit 11 uses the variation data S10 input from the DDA setup circuit 10 and linearly interpolates (z, R, G, B, COE) at each pixel inside the triangle.blend, S, t, q, COEfog) Calculate the data.
In addition, the triangle DDA circuit 11 has 1 bit of effective bit data I indicating whether or not eight pixels that are processed in parallel are positioned inside a triangle to be processed.1~ I8Is generated.
Effective bit data I1~ I8Is, for example, “1” for a pixel located inside the triangle and “0” for a pixel located outside the triangle.
Specifically, as shown in FIG. 2, the effective bit data I for a triangle 250 located in the x, y coordinate system.1~ I8Is determined.
In FIG. 2, a solid line indicates a rectangular area to which 8 (= 2 × 4) pixels to be processed simultaneously belong.
The triangle DDA circuit 11 includes (x, y) data of each pixel and (z, R, G, B, COE in the (x, y) coordinates.blend, S, t, q, COEfog) Data and valid bit data I1~ I8And maxe data S11c indicating the maximum exponent of the s, t, and q data of the vertices of the triangle to be processed are output to the texture engine circuit 12 as DDA data S11.
Here, (R, G, B) data S11b and (s, t, q) data S11a shown in FIG.1~ S11a8Is (z, R, G, B, COEblend, S, t, q, COEfog) Obtained from the data.
In this embodiment, the triangle DDA circuit 11 outputs the DDA data S11 to the texture engine circuit 12 in units of 8 (= 2 × 4) pixels located in a rectangle that performs processing in parallel.
[0047]
Texture engine circuit 12
The texture engine circuit 12 selects the texture data reduction rate, calculates “s / q” and “t / q”, calculates the texture coordinate data (u, v), and determines the texture address (U, V). The calculation process, the (R, G, B, tα) data reading process from the texture buffer 20, the MIPMAP process, and the texture function process are sequentially performed by, for example, a pipeline method.
Note that the texture engine circuit 12 simultaneously performs processing for eight pixels located in a predetermined rectangular area in parallel.
The texture engine circuit 12 uses the same pattern of texture data for pixels located within the processing target triangle. However, the reduction ratio of the texture data to be selected is determined in units of 8 pixels located in the rectangular area to be processed simultaneously.
[0048]
The texture engine circuit 12 performs MIPMAP (multiple resolution texture) processing and texture function processing using the (R, G, B) data S17 read from the SRAM 17 or the texture buffer 20.
[0049]
In the MIPMAP processing, 4-point neighborhood interpolation processing for calculating (R, G, B) data of a pixel at a desired position in two dimensions from (R, G, B) data S17, and a reduction rate LOD (Level Of Detail). Level interpolation processing is performed to interpolate the levels.
In the SRAM 17 and the texture buffer 20, for example, as shown in FIG. 3, texture data corresponding to a plurality of reduction ratios based on MIPMAP, that is, texture data 100 at a reduction ratio of 1.0 and a reduction ratio LOD are stored. The texture data 101 at the level of 2.0 and the texture data 102 at the level of the reduction ratio LOD of 3.0 are stored.
Which reduction rate LOD texture data is to be used is determined using the reduction rate LOD calculated in units of polygons using a predetermined algorithm.
Note that the texture data 100, 101, and 102 are data indicating display patterns that have been subjected to filtering processing and suppressed the influence of aliasing due to information loss due to image reduction or the like.
[0050]
First, the 4-point neighborhood interpolation process of the MIPMAP process performed by the texture engine circuit 12 will be described.
In the 4-point neighborhood interpolation process, (R, G, B) data of points near 4 of the coordinates are obtained from the coordinates of the pixels to which the texture data is assigned.
For example, when the reduction ratio LOD is 1.0, the (R, G, B) data S17 of the texture data 100 shown in FIG. 3 is read from the SRAM 17 or the texture buffer 20 to the texture engine circuit 12.
Then, 4-point neighborhood interpolation data C, which is (R, G, B) data at position pixel0 shown in FIG.pixel0(R, G, B) data C of the four neighboring points A0, B0, C0, D0 of the position pixel0A0, CB0, CC0, CD0Is obtained based on the following formulas (3) to (5).
At this time, (R, G, B) data CA0, CB0, CC0, CD0Is obtained from the (R, G, B) data S17 of the texture data 100.
In the following formulas (3) to (5), a and b indicate the decimal part of the u coordinate and v coordinate of the position pixel0, respectively.
[0051]
[Equation 3]
CAB0= CB0× a + CA0× (1-a) (3)
[0052]
[Expression 4]
CCD0= CD0× a + CC0× (1-a) (4)
[0053]
[Equation 5]
Cpixel0= CCD0Xb + CAB0× (1-b) (5)
[0054]
Next, reduction level level interpolation processing will be described.
Here, a level interpolation process called tri-linear will be described as an example.
For example, when the reduction ratio LOD is 1.5, the texture engine circuit 12 uses the texture data 100 with the reduction ratio LOD of 1.0 as described above to use the 4-point neighboring interpolation data C at the position pixel0.pixel0And the four-point neighboring interpolation data C at the position pixel1 on the texture data 101 corresponding to the position pixel0 on the texture data 100 using the texture data 101 with the reduction ratio LOD of 2.0.pixel1Is calculated. Next, 4-point neighborhood interpolation data Cpixel0And Cpixel1Are linearly interpolated to obtain level interpolation data C with a reduction ratio LOD of 1.5.pixelIs calculated.
[0055]
That is, the 4-point neighborhood interpolation data C described abovepixel0Following this calculation process, the (R, G, B) data S17 of the texture data 101 shown in FIG.
Then, the texture engine circuit 12 generates 4-point neighboring interpolation data C, which is (R, G, B) data at the position pixel1 in FIG.pixel1, (R, G, B) data C of the four neighboring points A1, B1, C1, D1 of the position pixel1A1, CB1, CC1, CD1Is obtained based on the following formulas (6) to (8).
At this time, (R, G, B) data CA1, CB1, CC1, CD1Is obtained from the (R, G, B) data S17 of the texture data 101.
In the following formulas (6) to (8), c and d indicate the decimal part of the u and v coordinates of the position pixel1, respectively.
[0056]
[Formula 6]
CAB1= CB1× c + CA1× (1-c) (6)
[0057]
[Expression 7]
CCD1= CD1× c + CC1× (1-c) (7)
[0058]
[Equation 8]
Cpixel1= CCD1Xd + CAB1× (1-d) (8)
[0059]
Next, the texture engine circuit 12 performs level interpolation between the texture data 100 and 101 using the following equation (9), and (R, G, B) of the corresponding position (pixel) after the level interpolation. Level interpolation data C that is datapixelAsk for. In the following equation (9), the mipmap coefficient COEmipmapIndicates the decimal part 0.5 of the reduction ratio LOD.
[0060]
[Equation 9]
Cpixel= Cpixel1× COEmipmap+ Cpixel0× (1-COEmipmap)
... (9)
[0061]
Next, texture function processing performed by the texture engine circuit 12 will be described.
The texture function processing performed in the texture engine circuit 12 includes, for example, modulation processing, decal processing, highlight processing, fogging processing, alpha blending processing, and the like. .
Here, the modulation process is a process of modulating the color indicated by the fragment data with the color indicated by the texture data.
In the present embodiment, the fragment data is (R, G, B) data S11b included in the DDA data S11 input from the triangle DDA circuit 11.
The decal process is a process for replacing the color indicated by the fragment data with the color indicated by the texture data.
The highlight process is a process of adding the addition data Hi to the multiplication result in order to produce a highlight effect.
The fogging process is a process that produces an effect of blurring a distant object.
The alpha blending process is a process of mixing the color indicated by the source data and the color indicated by the destination data at a predetermined mixing ratio.
Here, the color indicated by the source data is the color indicated by the data stored in the display buffer 21 shown in FIG. 1, and the color indicated by the destination data is the color indicated by the data to be drawn in the display buffer 21.
[0062]
These texture function processes convert texture data into Ctex, Fragment data into CflagThe addition data of the highlight processing is Hi, and the data after the modulation processing is Cmod, C after decal processingdclThe data after highlight processing is ChghThen, it can be expressed as the following formulas (10) to (12).
In Expression (12), Hi indicates addition data for highlighting.
[0063]
[Expression 10]
Cmod= Ctex× Cflag                              (10)
[0064]
## EQU11 ##
Cdcl= Ctex                                      ... (11)
[0065]
[Expression 12]
Chgh= Ctex× Cflag+ Hi (12)
[0066]
In addition, the fogging process and the alpha blending process convert the fragment data into Cflag, Fog data is Cfog, Fog coefficient datafog, Source (color) data Csrc, Destination (color) data to Cdst, COE blending coefficientblendAnd the data after fogging is Cfogged, C after blending datablendThen, the following equations (13) and (14) are given.
[0067]
[Formula 13]
Cfogged= Cflag× COEfog+ Cfog× (1-COEfog)
... (13)
[0068]
[Expression 14]
Cblend= Csrc× COEblend+ Cdst× (1-COEblend)
... (14)
[0069]
As described above, the level interpolation process and the texture function process of the MIPMAP process expressed by the expressions (9) to (14) can be expressed by the following expression (15) using the data A, B, COE, C, and D. .
In the present embodiment, utilizing this, the LIP circuit 61 is shared by the level interpolation process and the texture function process, as will be described later.
[0070]
[Expression 15]
D = A * COE + B (1-COE) (15)
[0071]
FIG. 4 is a partial circuit diagram of the texture engine circuit 12.
As shown in FIG. 4, the texture engine circuit 12 includes, for example, a reduction ratio calculation circuit 50, a readout circuit 51, LIP (Linear Inter Polator) circuits 52, 53, and 54, and a LIP / texture function circuit 55.
Here, the reduction ratio calculation circuit 50 corresponds to the reduction ratio calculation circuit of the present invention, the read circuit 51 corresponds to the read circuit of the present invention, and the LIP circuits 52, 53, 54 and the LIP / texture function circuit 55 correspond to the present invention. It corresponds to the image processing circuit.
Each component in the texture engine circuit 12 operates based on the clock signal S18 from the clock signal generation circuit 18 shown in FIG.
The texture engine circuit 12 performs part or all of MIMAP processing, modulation processing, decal processing, highlight processing, fogging processing, texture blending processing, and alpha blending processing, using the configuration shown in FIG.
[0072]
Hereinafter, the components of the texture engine circuit 12 shown in FIG. 4 will be described in detail.
[Representative point determination circuit 301]
The representative point determination circuit 301 receives the valid bit data I included in the DDA data S11 input from the triangle DDA circuit 11.1~ I8Then, a pixel to be a representative point is determined, and representative point instruction data S301 indicating the determined representative point is output to the stq selection circuit 302.
Specifically, the representative point determination circuit 301 arranges 8 pixels among 8 pixels of 2 rows × 4 columns that are processed at the same time among those located inside the triangle to be processed. The pixel closest to the center of the rectangular area is determined as the representative point.
[0073]
FIG. 5 is a flowchart of representative point determination processing in the representative point determination circuit 301.
Step S11: First, the representative point determination circuit 301 determines that the valid bit data I1~ I8Then, it is determined whether there is at least one indicating “1”, and if it exists, the process of step S12 is executed.
Step S12: The representative point determination circuit 301 uses the valid bit data I1~ I8Of these, it is determined whether or not there is only one indicating “1”. If there is one, the processing shown in step S15 is executed. In step S15, a pixel corresponding to valid bit data indicating “1” is determined as a representative point.
[0074]
Step S13: The representative point determination circuit 301 uses the valid bit data I1~ I8If there are two or more indicating “1” in the pixel, the pixel closest to the center of the rectangular area where the pixel to be processed simultaneously is arranged among the pixels corresponding to the effective bit data indicating “1”. Determined as a representative point.
At this time, if there are a plurality of pixels closest to the center of the rectangular area, it is determined whether or not these x coordinates are the same. If these x coordinates are different, the processing shown in step S16 is performed. Executed. In step S16, the pixel having the smallest x coordinate among the plurality of pixels closest to the center of the rectangular area is determined as the representative point.
[0075]
Step S14: When there are a plurality of pixels closest to the center of the rectangular area and these x coordinates are the same, the representative point determination circuit 301 represents the pixel with the smallest y coordinate among the plurality of pixels. Determine as a point.
[0076]
Hereinafter, the determination of the representative point in the representative point determination circuit 301 will be described with a specific example.
FIG. 6 is a diagram for explaining representative point determination in the representative point determination circuit 301.
Effective bit data I1~ I8The pixel arrangement corresponding to is set as shown in FIG. Here, A is the center of the rectangular area of the pixels to be processed simultaneously.
For example, as shown in FIG.FourIf only one is “1”, the representative point determination circuit 301 determines that the valid bit data IFourThe pixel corresponding to is determined as a representative point.
[0077]
As shown in FIG. 6C, the effective bit data I6And I7Is “1” and the x-coordinates of the corresponding pixels are different, the effective bit data I having a small x-coordinate6The pixel corresponding to is determined as a representative point.
As shown in FIG. 6D, the effective bit data IThreeAnd I7Is “1” and the corresponding pixel has the same x-coordinate, the effective bit data I having a small y-coordinate7The pixel corresponding to is determined as a representative point.
Further, as shown in FIG. 6E, the effective bit data I2, IThree, I6And I7Is "1", the effective bit data I having the smallest x-coordinate and y-coordinate6The pixel corresponding to is determined as a representative point.
[0078]
Further, for the triangle 250 shown in FIG. 2, the representative points are determined in units of 8 pixels as shown in FIG. 7 based on the algorithm shown in FIG. In FIG. 7, a pixel in which “1” is circled is a representative point.
In this way, the representative point determination circuit 301 performs the effective bit data I1~ I8In order to dynamically determine the representative point from the pixels located inside the triangle to be processed among a plurality of pixels to be processed simultaneously, the representative point is surely determined inside the triangle. be able to.
As a result, appropriate texture data can be reliably selected for the pixels located inside the triangle, and high image quality can be stably provided.
In this embodiment, simultaneous processing is performed for 8 pixels, but only one reduction rate calculation circuit 301 is required, and the apparatus does not become large-scale.
[0079]
[Q data selection circuit 302]
The q data selection circuit 302 includes (s, t, q) data S11a for 8 pixels included in the DDA data S11.1~ S11a8Among these, q data corresponding to the pixel indicated by the representative point instruction data S301 is selected, and this is output to the reduction ratio calculation circuit 304 as q data S302.
[0080]
[Reduction ratio calculation circuit 304]
The reduction ratio calculation circuit 304 calculates the texture data reduction ratio LOD based on the maxe data S11c from the triangle DDA circuit 11 and the q data S302 from the q selection circuit 302.
Here, the maxe data S11c indicates the maximum index among the indices of the s, t, and q data of the vertices of the triangle to be processed as shown in FIG.
As described above, the reduction ratio calculation circuit 304 calculates the reduction ratio using the q data of the pixel determined as the representative point by the representative point determination circuit 301 and the maxe data S11c, and reads this as the reduction ratio LOD. To 51.
[0081]
Here, the reduction ratio LOD indicates how much the texture data of the original image is reduced. When the reduction ratio of the original image is 1/1, 1/2, 1 / 4, 1/8,...
The reduction rate LOD calculation processing in the reduction rate calculation circuit 304 is expressed by the following equation (16).
[0082]
[Expression 16]
LOD = Clamp (((log21 / q) −maxe) << L + K)
... (16)
[0083]
In the above formula (16),
LOD: Indicates reduction ratio, integer part 3 bits, decimal point part 4 bits, unsigned data,
maxe: indicates the maximum exponent of s, t, q of the vertices of the triangle shown in FIG. 2, integer part 8 bits, unsigned data,
q: integer part 10 bits, decimal part 5 bits, signed data,
L: 2 bits, unsigned data, the maximum value of L is decimal number “3”
K: integer part 8 bits, decimal part 4 bits, signed data
[0084]
Hereinafter, the reduction ratio calculation circuit 50 will be described in detail.
FIG. 8 is a configuration diagram of the reduction ratio calculation circuit 50.
As illustrated in FIG. 8, the reduction ratio calculation circuit 50 includes, for example, a priority encoder 101, a shift circuit 102, shift circuits 201 and 202, a table 203, inverters 204 and 205, an adder circuit 206, and a clamp circuit 109.
Here, the priority encoder 101 and the shift circuit 102 correspond to the normalization circuit of the present invention, the shift circuit 201 corresponds to the first shift circuit of the present invention, and the inverter 204 corresponds to the first inversion circuit of the present invention. The table 203 corresponds to the data output means of the present invention, the shift circuit 202 corresponds to the second shift circuit of the present invention, the inverter 205 corresponds to the second inversion circuit of the present invention, and the adder circuit 206 Corresponding to the adder circuit of the present invention, the clamp circuit 109 corresponds to the clamp circuit of the present invention.
The reduction ratio calculation circuit 50 performs the calculation of the equation (16) and outputs the reduction ratio LOD as the calculation result to the reading circuit 51 shown in FIG.
[0085]
The priority encoder 101 uses the log data “log” of the q data input from the q data selection circuit 302 shown in FIG.2q ”and the logarithmic value of“ log ”22q "integer value" int (log2q) ", that is, the exponent qe is output to the shift circuits 102 and 201 as data a.
[0086]
The shift circuit 102 converts the data qm, which is the decimal part of the result of shifting the data q input from the q data selection circuit 302 shown in FIG. 4 toward the LSB by the exponent qe input from the priority encoder 101, and the data b2 To the shift circuit 201 and the table 203.
[0087]
The data “a” output from the priority encoder 101 and the data “b2” output from the shift circuit 102 are bit-coupled, and the resulting data {a, b2} is output to the shift circuit 201.
[0088]
The shift circuit 201 outputs data δ2 that is a result of shifting the input data {a, b2} by the input data L toward the MSB to the inverter 204.
[0089]
The inverter 204 inverts the data δ2 and outputs the result data  ̄δ2 to the adder circuit 206.
[0090]
The table 203 includes data qm and “log”2({1, qm}) − qm ”, and“ log ”corresponding to the data qm using the data qm (= b2) input from the shift circuit 102 as a key.2({1, qm}) − qm ”is obtained from the correspondence table, and is output to the shift circuit 202 as data μ.
In addition, instead of the table 203, the input data qm is used and “log”2A program that automatically generates ({1, qm}) − qm ”may be used.
[0091]
The maxe data S11c input from the triangle DDA circuit 11 and the data μ output from the table 203 are combined with (000) before the data μ so that the maxe data S11c is an integer part and the decimal part is 7 bits. Then, they are combined as a decimal part, and the data {maxe, 3′b0, μ} after the bit combination is output to the shift circuit 202. Here, “3′b0” means Verilog-HDL notation and means 3-bit binary number 0.
[0092]
The shift circuit 202 outputs to the inverter 205 γ2 that is the result of shifting the input data {maxe, 3′b0, μ} by the input data L toward the MSB.
[0093]
The inverter 205 inverts the data γ2 and outputs the result data  ̄γ2 to the adder circuit 206.
[0094]
Further, data K and “10” are combined by adding “0” of 1 bit before “10” so that the decimal part becomes 7 bits, and the data {K, 3′b0 after the bit combination is combined. , 10} is output to the adder circuit 206.
[0095]
The adder circuit 206 adds the data {K, 3′b0, 10}, the data  ̄δ2, and the data  ̄γ2, and outputs the addition result ε2 to the clamp circuit 109.
[0096]
The clamp circuit 109 clamps (rounds) the data ε2 input from the adder circuit 206 to data of an integer part 3 bits and a decimal part 4 bits, and outputs the result as a reduction ratio LOD to the readout circuit 51 shown in FIG. .
[0097]
In the reduction ratio calculation circuit 50 shown in FIG. 8, μ (= “log” corresponding to the input data qm.2Using the table 203 shown in FIG. 8 that outputs ({1, qm}) − qm ”), the maxe data S11c consisting only of the integer part and the data μ consisting only of the fractional part are bit-coupled, and maxe The addition process for the data S11c is reduced. Thereby, according to the reduction ratio calculation circuit 50, it is possible to reduce the number of gates and speed up the calculation process.
In the reduction ratio calculation circuit 50, “log” in the equation (16) is used.2(1 / q) "fractional part b and upper 4 bits of mantissa qm (= 2-Four) And the accuracy of the lower 4 bits of the 7-bit decimal part of the reduction ratio LOD is determined as “log”2By obtaining the lower 4 bits of the 7-bit decimal part of (1 / q) "using the table 203, the" log "shown in the above equation (16) that causes an error in the reduction ratio LOD2(1 / q) "error is 2-7Even if the data L is the maximum value “3”, the error of the reduction ratio LOD is 2-FourTo the extent possible.
[0098]
FIG. 9 is a diagram for explaining processing in the reduction ratio calculation circuit 50 shown in FIG.
Hereinafter, the operation of the reduction ratio calculation circuit 50 shown in FIG. 8 will be described using a specific example with reference to FIG.
Here, a case where the calculation process of the equation (16) is performed in the reduction ratio calculation circuit 50 using the following values will be exemplified.
[0099]
q = (0001001110.10100):
maxe = (00000001.0000000):
L = (01):
K = (00010011.0000):
[0100]
q (0001001110.10100) which is q data S302 output from the q selection circuit 302 is input to the priority encoder 101 and the shift circuit 102 shown in FIG.
Next, in the priority encoder 101, an exponent qe (000110) of q (0001001110.10100) is obtained, and a (00000110) which is 8-bit data obtained by adding (00) to the MSB side of the exponent qe (000110). Is output.
[0101]
Next, in the shift circuit 102, a (0001001110.10100) is shifted toward the MSB side by a (00000110), and the mantissa qm (0011101) that is the fractional part after the shift is stored in the table 203 as data b2. Is output.
Next, in the table 203, 4-bit data μ (“log” corresponding to the mantissa qm (0011101) is stored.2Μ (1000) which is ({1, qm}) − qm ″) is obtained, and μ (1000) is output.
[0102]
Next, data maxe (00000001) and data μ (1000) input from the triangle DDA circuit 11 are combined as a decimal part by combining (000) before the data μ so that the decimal part becomes 7 bits. The data {maxe, 3′b0, μ} = (00000001.0001000) after the bit combination is output to the shift circuit 202.
[0103]
Next, the shift circuit 202 shifts the input data {maxe, 3′b0, μ} = (00000001.0001000) by the input data L = (01) toward the MSB γ2 ( 000000010.0010000) is output to the inverter 205.
Next, in the inverter 205, the data γ2 (000000010.0010000) is inverted, and the result data  ̄γ2 (11111101.1101111) is output to the adder circuit 206.
[0104]
Also, the data a (00000110) output from the priority encoder 101 and the data b2 (0011101) output from the shift circuit 102 are bit-coupled, and the resulting data {a, b2} = (000001110.0011101) is shifted. It is output to the circuit 201.
[0105]
Next, in the shift circuit 201, the data {a, b2} = (000000110.0011101) is shifted by only the input data L (01) toward the MSB, and the resulting data δ2 (00001100.0111010) Is output to the inverter 204.
[0106]
Next, in the inverter 204, the data δ2 (00001100.0111010) is inverted, and the resulting data  ̄δ2 (11110011.1000101) is output to the adder circuit 206.
[0107]
Further, data K (00010011.0000) and “10” are combined by adding “0” of 1 bit before “10” so that the decimal part becomes 7 bits, and the data { K, 3′b0,10} = (00010011.0000010) is output to the adder circuit 206.
[0108]
Next, the adder circuit 206 adds the data {K, 3′b0, 10}, the data 2δ2, and the data  ̄γ2, and outputs the addition result ε2 (00000100.0110110) to the clamp circuit 109. Is done.
[0109]
Next, in the clamp circuit 109, the data ε2 input from the adder circuit 206 is clamped (rounded) to the data of the integer part 3 bits and the decimal part 4 bits, and the result (100.0110) is the reduction ratio LOD. Is output to the readout circuit 51 shown in FIG.
[0110]
[Read circuit 51]
The read circuit 51 uses the address (u, v) calculated based on the (s, t, q) data included in the DDA data S11, the reduction ratio LOD, and the predetermined texture sizes USIZE and VSIZE. Alternatively, (R, G, B) data is read from the address in the texture buffer 20 and output to the LIP circuits 52 and 53 as texture data.
At this time, when the decimal part of the reduction ratio LOD input from the reduction ratio calculation circuit 50 is not 0, the reading circuit 51 outputs two texture data having a reduction ratio corresponding to the integer parts before and after the reduction ratio LOD. Each is read out sequentially in one clock cycle of the clock signal S18 and output to the LIP circuits 52 and 53.
[0111]
[LIP circuits 52 and 53]
The LIP circuit 52 generates the interpolation data S52 by performing the calculation of the four-point neighborhood interpolation processing corresponding to the above-described equation (3) within one clock cycle for the pixel to be calculated, and the interpolation data S52 is LIP. Output to the circuit 54.
Subsequently, the LIP circuit 52 performs the calculation of the four-point neighborhood interpolation processing corresponding to the above-described equation (6) within one clock cycle for the pixel to be calculated to generate the interpolation data S52, and the interpolation data S52 is output to the LIP circuit 54.
[0112]
The LIP circuit 53 generates the interpolation data S53 by performing the calculation of the 4-point neighborhood interpolation processing corresponding to the above-described equation (4) within one clock cycle for the pixel to be calculated, and the interpolation data S53 is LIP. Output to the circuit 54.
Subsequently, the LIP circuit 53 performs the calculation of the 4-point neighborhood interpolation processing corresponding to the above-described equation (7) for the pixel to be calculated within one clock cycle to generate the interpolation data S53, and the interpolation data S53 is output to the LIP circuit 54.
The operation of the LIP circuit 53 is performed in parallel with the operation of the LIP circuit 52.
[0113]
[LIP circuit 54]
The LIP circuit 54 uses the interpolation data S52 and S53 from the LIP circuits 52 and 53 to perform the calculation of the four-point neighborhood interpolation processing corresponding to the above-described equation (5) within one clock cycle, thereby obtaining the four-point neighborhood interpolation data. Cpixel0And four-point neighborhood interpolation data Cpixel0Is output to the LIP / texture function circuit 55.
At this time, if the fractional part of the reduction ratio LOD is not 0, the LIP circuit 54 uses the interpolation data S52 and S53 and uses the four-point neighboring interpolation data C used for the level interpolation processing.pixel0And 4-point interpolation data Cpixel1Are generated in order.
For example, when the reduction ratio LOD is 1.5 as described above, the LIP circuit 54 calculates the 4-point neighborhood interpolation data C based on the above equation (5).pixel0Is generated in one clock cycle, and then the four-point neighborhood interpolation data C is calculated based on the above equation (8).pixel1Are generated in one clock cycle.
The configuration and processing of the LIP circuits 52, 53, and 54 are basically the same as the configuration and processing of the LIP circuit 61 described later.
[0114]
[LIP / texture function circuit 55]
FIG. 10 is a configuration diagram of the LIP / texture function circuit 55.
The LIP / texture function circuit 55 receives the four-point neighborhood interpolation data C from the LIP circuit 54.pixel0(If necessary, 4-point neighborhood interpolation data Cpixel1) Is used to perform part or all of the MIMAP processing level interpolation processing and the texture function processing such as modulation processing, decal processing, highlight processing, fogging processing, texture blending processing and alpha blending processing.
Specifically, the LIP / texture function circuit 55, when the fractional part of the reduction ratio LOD is 0, the 4-point neighboring interpolation data C input from the LIP circuit 54.pixel0Is used to perform necessary processing of texture function processing.
Further, the LIP / texture function circuit 55, when the fractional part of the reduction ratio is not 0, the 4-point neighborhood interpolation data C input from the LIP circuit 54.pixel0, Cpixel1After performing level interpolation processing using, necessary processing of texture function processing is performed.
[0115]
As shown in FIG. 10, the LIP / texture function circuit 55 includes a preprocessing circuit 60, an LIP circuit 61, and a register 62.
As shown in FIG. 10, the preprocessing circuit 60 includes a mode controller 70, a register 74, multiplexers 75 to 78, and registers 85 to 88.
As shown in FIG. 10, the mode controller 70 includes a decoder 71, a counter 72, and a decoder 73.
[0116]
The decoder 71 monitors the count value of the counter 72, and at the timing when the count value of the counter 72 reaches “0”, the initial value “0”, “1” or the number corresponding to the number of processes sharing the LIP circuit 61 Set “2”.
For example, the decoder 71 sets the initial value “0” in the counter 72 when the LIP circuit 61 performs only one process, and the initial value “1” when the LIP circuit 61 is shared by two processes. When the LIP circuit 61 is shared by three processes, the count value “2” is set.
In this embodiment, the case where “0”, “1”, and “2” are used as the initial values to be set in the count value 72 is exemplified. However, the initial value is a value for processing that shares the LIP circuit 61. Any number can be set according to the number.
The decoder 71 receives function mode data FMD from, for example, the main processor 4 shown in FIG. 1 or a main controller (not shown) in the texture engine circuit 12.
The function mode data FMD designates, for example, modes “1” to “8” shown in FIG. 11 for each clock cycle, and controls to input data corresponding to each mode to the LIP circuit 61 as will be described later. Used for. That is, the content of the process performed by the LIP circuit 61 is determined based on the function mode data FMD. The contents of FIG. 11 will be described in detail later.
For example, based on the function mode data FMD, the decoder 71 decreases the count value of the counter 72 by 1 each time processing of one mode is completed in the LIP circuit 61.
[0117]
The decoder 73 receives function mode data FMD and fog enable data FED from the main processor 4 or the main controller (not shown) in the texture engine circuit 12 shown in FIG.
The decoder 73 receives the mipmap number data MND from the LIP circuit 54 or the reading circuit 51.
[0118]
As described above, the function mode data FMD designates, for example, the modes “1” to “8” shown in FIG. 11 for each clock cycle, and sends data corresponding to each mode to the LIP circuit 61 as described later. Used for control to input. In the example illustrated in FIG. 11, the LIP circuit 61 exemplifies a case where the level interpolation process, the modulation process, the highlight process, the decal process, and the fogging process of the MIPMAP process are performed.
In this case, as shown in FIG. 11, for example, module processing and highlight processing are assigned different modes depending on whether only the processing is performed or the level interpolation processing of the MIPMAP processing is performed. Yes. Also, the fogging process has different modes depending on whether only the process or the modulation process is performed. This is because it is necessary for the decoder 73 to determine whether or not to feed back the processing result of the LIP circuit 61 shown in FIG.
Note that the mode shown in FIG. 11 is an example, and various other modes can be designated.
[0119]
For example, the fog enable data FED indicates a logical value “1” when the fogging process is performed, and indicates a logical value “0” when the fogging process is not performed.
[0120]
Further, the mipmap number data MND is the four-point neighboring interpolation data C when the LIP circuit 61 does not perform level interpolation processing (when the decimal part of the reduction ratio LOD is 0).pixel0And four-point neighboring interpolation data C when level interpolation processing is performed.pixel1Indicates a logical value “1”.
The mipmap number data MND is four-point neighboring interpolation data C when performing level interpolation processing.pixel0The logical value “0” is indicated at the timing of inputting “”.
The mipmap number data MND is used for controlling the multiplexers 77 and 78 by the decoder 73, as will be described later.
[0121]
Based on the function mode data FMD, the mipmap number data MND, and the fog enable data FED, the decoder 73 supplies the LIP circuit 61 with data necessary for the LIP circuit 61 to perform processing specified by the function mode data FMD. In addition, the multiplexers 75 to 78 are controlled.
[0122]
Specifically, the decoder 73 performs the 4-point neighborhood interpolation data C input from the LIP circuit 54 while the mipmap number data MND indicates the logical value “0”.pixel0The multiplexer 77 is controlled not to output the signal to the register 87. At this time, 4-point neighborhood interpolation data Cpixel0Is written into the register 74.
In the decoder 73, the function mode data FMD indicates “1” shown in FIG. 11, and when the LIP circuit 61 performs the level interpolation process of the MIPMAP process, the mipmap number data MND has the logical value “1”. 4 points neighboring interpolation data C read from the register 74pixel0Is output to the register 88 and the four-point neighborhood interpolation data C input from the LIP circuit 54 is output.pixel1Are output to the register 87, the multiplexers 78 and 77 are controlled.
Further, the decoder 73 receives the mips input from the reduction ratio calculation circuit 50 shown in FIG. 4 while the function mode data FMD shows “1” shown in FIG. 11 and the mipmap number data MND shows the logical value “1”. Map coefficient COEmipmapIs output to the register 86. The multiplexer 76 is controlled. At the same time, the decoder 73 controls the multiplexer 75 so as to output a logical value “0” to the register 85.
As a result, 4-point neighborhood interpolation data Cpixel0, Cpixel1And mipmap coefficient COEmipmapAre simultaneously written in the registers 88, 87 and 86, respectively, and in the LIP circuit 61, the 4-point neighborhood interpolation data Cpixel0, Cpixel1Level interpolation processing using is performed.
[0123]
12 shows four-point neighborhood interpolation data C from the LIP circuit 54 to the mode controller 70 shown in FIG.pixel0, Cpixel15 is a timing chart for explaining the input timing and the execution timing of the level interpolation processing in the LIP / texture function circuit 55.
In FIG. 12, data with the same (a), (b), and (c) indicate data related to the same level interpolation processing.
[0124]
For example, based on the clock signal S18 shown in FIG. 12A, four-point neighborhood interpolation that is the target of level interpolation input from the LIP circuit 54 to the LIP / texture function circuit 55 at the timing shown in FIG. Data Cpixel0Is stored in the register 74.
Then, in the next clock cycle, the 4-point neighborhood interpolation data C read from the register 74 is displayed.pixel0Is connected to the IN of the LIP circuit 61 via the multiplexer 78 and the register 88.A4-point neighborhood interpolation data C output from the LIP circuit 54 and output to the terminalpixel1Is connected to the IN of the LIP circuit 61 through the multiplexer 77 and the register 87.BOutput to the terminal.
Then, in the next clock cycle, as shown in FIG. 12C, in the LIP circuit 61, the mipmap data Cpixel0, Cpixel1Level interpolation processing using is performed.
As can be seen from FIG. 12C, the throughput of the 4-point neighborhood interpolation process of the MIPMAP process performed using the LIP circuits 52, 53, and 54 is 2 clock cycles, whereas the LIP circuit 61 performs the MIMAP process. Level interpolation processing is performed in one clock cycle. Accordingly, when only the level interpolation process is performed in the LIP circuit 61, a free time during which the process is not performed in the LIP circuit 61 occurs. In this embodiment, as will be described later, the LIP circuit 61 is caused to perform texture function processing using the idle time. That is, the 4-point neighborhood interpolation process of the MIPMAP process and the texture function process are interleaved.
[0125]
Further, in the decoder 73, when the function mode data FMD indicates “2” shown in FIG. 11 and the LIP circuit 61 performs only the modulation processing, the decoder 73 inputs from the LIP circuit 54 for the corresponding one clock cycle. 4-point neighborhood interpolation data Cpixel0Is output to the register 88 through the register 74, and (R, G, B) data S11b (fragment data C) included in the DDA data S11 input from the triangle DDA circuit 11 is output.flag) Is output to the register 86, the multiplexers 78 and 76 are controlled.
At the same time, the decoder 73 controls the multiplexers 77 and 75 to output the logical value “0” to the register 87 and output the logical value “0” to the register 85.
[0126]
In addition, when the function mode data FMD indicates “3” shown in FIG. 11 and the LIP circuit 61 performs the modulation process following the level interpolation process of the MIPMAP process, the decoder 73 corresponds to one clock cycle. During this period, the level interpolation data fed back from the OUT terminal of the LIP circuit 61 is output to the register 88, and the fragment data CflagThe multiplexers 78 and 76 are controlled so as to output to the register 86.
At the same time, the decoder 73 controls the multiplexers 77 and 75 to output the logical value “0” to the register 87 and output the logical value “0” to the register 85.
[0127]
Further, in the decoder 73, when the function mode data FMD indicates “4” shown in FIG. 11 and the LIP circuit 61 performs only the highlight processing, the decoder 73 inputs from the LIP circuit 54 for the corresponding one clock cycle. 4-point neighborhood interpolation data Cpixel0Is output to the register 88 via the register 78, and (R, G, B) data S11b (fragment data C) included in the DDA data S11 input from the triangle DDA circuit 11 is output.flag) Is output to the register 86, the multiplexers 78 and 76 are controlled.
At the same time, the decoder 73 outputs a logical value “0” to the register 87, and outputs the addition data Hi of the highlight operation input from the main processor 4 or the main controller (not shown) in the texture engine circuit 12 to the register 85. Thus, the multiplexers 77 and 75 are controlled.
[0128]
In addition, when the function mode data FMD indicates “5” shown in FIG. 11 and the LIP circuit 61 performs the highlight process subsequent to the level interpolation process of the MIPMAP process, the decoder 73 corresponds to one clock cycle. During this period, the level interpolation data fed back from the OUT terminal of the LIP circuit 61 is output to the register 88, and the fragment data CflagThe multiplexers 78 and 76 are controlled so as to output to the register 86.
At the same time, the decoder 73 outputs a logical value “0” to the register 87, and outputs the addition data Hi of the highlight operation input from the main processor 4 or the main controller (not shown) in the texture engine circuit 12 to the register 85. Thus, the multiplexers 77 and 75 are controlled.
[0129]
Further, when the function mode data FMD indicates “6” shown in FIG. 11 and the LIP circuit 61 performs only the decal processing, the decoder 73 inputs from the LIP circuit 54 during the corresponding one clock cycle. 4-point interpolation data Cpixel0Is output to the register 88 via the register 78, and the multiplexers 78 and 76 are controlled so that the logical value “0xff (same as 0xFF)” is output to the register 86.
At the same time, the decoder 73 controls the multiplexers 77 and 75 to output the logical value “0” to the register 87 and output the logical value “0” to the register 85.
[0130]
Further, in the decoder 73, when the function mode data FMD indicates “7” shown in FIG. 11 and the LIP circuit 61 performs only fogging processing, the decoder 73 inputs from the triangle DDA circuit 11 for the corresponding one clock cycle. (R, G, B) data S11b (fragment data C) included in the DDA data S11flag) Is output to the register 88 via the register 74, for example, fog data C set in a fog register (not shown).fogAre output to the register 87, the multiplexers 78 and 77 are controlled.
At the same time, the decoder 73 performs the fogging coefficient COE included in the DDA data S11 input from the triangle DDA circuit 11.fogIs output to the register 86. The multiplexer 76 is controlled.
At the same time, the decoder 73 controls the multiplexer 75 so as to output the logical value “0” to the register 85.
[0131]
In the decoder 73, when the function mode data FMD indicates “8” shown in FIG. 11 and the LIP circuit 61 performs the fogging process following the modulation process, the decoder 73 performs the LIP for the corresponding one clock cycle. The level interpolation data fed back from the OUT terminal of the circuit 61 is output to the register 88, and the fog data C read from the fog register (not shown) is output.fogAre output to the register 87, the multiplexers 78 and 77 are controlled.
At the same time, the decoder 73 performs the fogging coefficient COE included in the DDA data S11 input from the triangle DDA circuit 11.fogIs output to the register 86. The multiplexer 76 is controlled.
At the same time, the decoder 73 controls the multiplexer 75 so as to output the logical value “0” to the register 85.
[0132]
Further, the decoder 73 is a shared process when the LIP circuit 61 is shared by the level interpolation process of the MIMPAP process and the two or more texture function processes, that is, when the LIP circuit 61 is shared by a total of three or more processes. For example, a wait instruction is output to the read circuit 51 shown in FIG. 4 and the triangle DDA circuit 11 shown in FIG.
For example, when the LIP circuit 61 is shared by the level interpolation process and the two texture function processes, the wait instruction is read during one clock cycle in which the LIP circuit 61 is processing the second texture function process. It outputs to the circuit 51 and the triangle DDA circuit 11.
[0133]
When the LIP circuit 61 performs the calculation of the equation (15), the 8-bit data A, B, COE, and C are respectively converted into INATerminal, INBTerminal, INcoeTerminal and INCEach is input from the terminal, and 8-bit data D is output from the OUT terminal.
[0134]
As shown in FIG. 13, the LIP circuit 61 includes correction data F, partial products out_0 to out_7 in which data A or B is selected based on logical values of corresponding bits of the data COE, and data that is a product-sum operation term. The calculation shown in the equation (15) is performed by shifting and adding C.
[0135]
The correction data F has a value in which the data A is selected when the data COE = 0xFF (COE = 1.0), and the data B is selected otherwise.
In the system in which the correction data F is viewed as “1” when all of the 8 bits have the logical value “1”, for example, the calculation shown in the following formula (17) is changed to the following formula (18). Used to correct. That is, correction is performed so that “X × 1.0 = X”.
[0136]
[Expression 17]
0xFF × 0xFF = 0xFE (17)
[0137]
[Formula 18]
0xFF × 0xFF = 0xFF (18)
[0138]
The partial products out_0 to out_7 indicate data A if bits 0 to 7 of the data COE are logical values “1”, and indicate data B if the logical values are “0”.
Here, the LSB of the data COE is bit 0 and the MSB is bit 7.
The partial product out_n (0 ≦ n ≦ 7) is, for example, as shown in FIG.0~ 807Is generated using
Specifically, when 0 ≦ m ≦ 7, the multiplexer 80mBit data A [m] of bit m of data A, bit data B [m] of bit m of data B, and bit data COE [n] of n of data COE are input, and bit data COE [ If n] is a logical value “1”, bit data A [m] is selected and output as bit data out_n [m].
Note that the partial product out_n is configured by the bit data out_n [0] to out_n [7].
[0139]
The partial product out_n is shifted by n bits toward the MSB, and then output to the adder circuit 81 adopting a wallace_tree type architecture.
Further, the data C as the product-sum operation term is shifted by 8 bits toward the MSB so as to be added to the upper 8 bits of the multiplication result of 8 bits × 8 bits, as shown in FIG. 81 is output.
[0140]
The adder circuit 81 employs a wallace_tree type architecture, collects three inputs and narrows them down to two outputs, a sum and a carry. Finally, the adder circuit 82 uses a two-input adder to perform addition. Make it possible to do.
As a result, even when the partial product based on the correction data F and the product-sum operation term C is added, the circuit scale is hardly increased and the addition speed is hardly reduced.
[0141]
FIG. 15 is a partial configuration diagram of the adder circuit 8 adopting the wallace_tree type architecture.
FIG. 15 shows only a configuration for adding bit data in the vertical direction in the figure indicated by arrows 92, 93, and 94 shown in FIG. 13, and the other parts for addition are omitted.
Addition of bit data in the vertical direction in the figure indicated by an arrow 91 shown in FIG.
As shown in FIG. 15, the adder circuit 81 includes an adder 100.0~ 1006Have
Adder 1000Performs addition of the arrow 92, adds bit 1 of the correction data F, bit 1 of the partial product out_0, and bit 0 of the partial product out_1, outputs the sum Sum to the adding circuit 82, and carries the carry Carry. Adder 1001Output to.
[0142]
Adder 1001, 1002, 100ThreePerforms the addition of the portion of the arrow 93.
Adder 1001Performs addition of bit 2 of the correction data F and bit 2 of the partial product out_0, and adds the sum Sum to the adder 100.ThreeAnd carry carry to adder 100FourOutput to.
Adder 1002Adds the bit 1 of the partial product out_1 and the bit 0 of the partial product out_2, and adds the sum Sum to the adder 100.ThreeAnd carry carry to adder 100FiveOutput to.
Adder 100ThreeIs the adder 1001Carry carry from, and adder 1002Are added to the carry carry, and the sum Sum and carry carry are output to the adder circuit 82.
[0143]
Adder 100Four, 100Five, 1006Performs the addition of the arrow 94 portion.
Adder 100FourPerforms addition of bit 3 of the correction data F and bit 3 of the partial product out_0, and adds the sum Sum to the adder 100.6And carry carry to the adder at the subsequent stage.
Adder 100FiveAdds the bit 2 of the partial product out_1 and the bit 1 of the partial product out_2, and adds the sum Sum to the adder 100.6And carry carry to the adder at the subsequent stage.
Adder 1006Is the adder 100FourCarry carry from, and adder 100FiveAre added to the carry carry, and the sum Sum and carry carry are output to the adder circuit 82.
[0144]
The adder 82 adds bit 0 of the correction data F, bit 0 of the partial product out_0, the sum Sum and the carry Carry input from the adder 81 using a plurality of 2-input adders, and adds the above formula ( 15-bit data, which is the calculation result of 15), is calculated, and the upper 8 bits of the 16-bit data are output as data D.
For example, when the counter 72 shown in FIG. 10 indicates the count value “0”, the LIP circuit 61 outputs the calculated data D from the OUT terminal shown in FIG. 4 to the register 62, and otherwise The calculated data D is fed back to the multiplexer 78 shown in FIG.
[0145]
Hereinafter, an operation mode of the texture engine circuit 12 shown in FIG. 10 will be described.
First mode of operation
In this operation mode, a case will be described in which the LIP circuit 61 is shared by the level interpolation processing of the MIPMAP processing and the modulation processing.
In this case, modes "1" and "3" are alternately switched from the main processor 4 shown in FIG. 1 or the main controller (not shown) in the texture engine circuit 12 to the decoders 71 and 73 shown in FIG. 10 every clock cycle. The function mode data FMD shown in FIG.
In addition, the decoder 71 sets “1” as the initial value of the count value of the counter 72, and sets “1” to the counter 72 every time the count value of the counter 72 becomes “0”.
[0146]
Specifically, for example, in the first clock cycle, the 4-point neighborhood interpolation data C from the LIP circuit 54 shown in FIG.pixel0Is written to the register 74.
Further, “1” is set to the count value of the counter 72.
[0147]
Next, in the second clock cycle following the first clock cycle, the function mode data FMD indicates the mode “1”, and the 4-point neighborhood interpolation data Cpixel0Is read from the register 74, and the IN of the LIP circuit 61 is passed through the multiplexer 78 and the register 88.AOutput to the terminal. At the same time, the four-point neighborhood interpolation data C from the LIP circuit 54 shown in FIG.pixel1IN of the LIP circuit 61 through the multiplexer 77 and the register 87.BOutput to the terminal.
At the same time, the data COE from the reduction ratio calculation circuit 50 shown in FIG.mipmapIN of the LIP circuit 61 through the multiplexer 76 and the register 86.coeffIs output.
Then, in the LIP circuit 54, the calculation shown in the above equation (9) is performed, and the level interpolation data CpixelIs calculated.
Since the counter 72 has a count value “1”, the level interpolation data CpixelIs fed back to the multiplexer 78.
Then, the count value of the counter 72 is decreased to “0”.
[0148]
Next, in the third clock cycle, the function mode data FMD indicates the mode “3”, and the 4-point neighborhood interpolation data relating to the next pixel from the LIP circuit 54 shown in FIG.
At the same time, the level interpolation data C calculated in the second clock cyclepixel(= C in formula (10)texCorresponds to IN of the LIP circuit 61 via the multiplexer 78 and the register 88.AOutput to the terminal.
At the same time, (R, G, B) data S11b (fragment color value C) included in the DDA data S11 from the triangle DDA circuit 11flag) Of the LIP circuit 61 through the multiplexer 76 and the register 86.coeffIs output.
In the LIP circuit 54, the calculation shown in the above equation (10) is performed, and the color value C after the modulation processing is performed.modIs calculated.
Since the count value of the counter 72 is “0”, the color value C is transferred from the OUT terminal of the LIP circuit 61 to the register 62.modIs output.
Color value CmodAre read from the register 62 and output to the memory I / F circuit 13 at the subsequent stage as pixel data S12.
Then, “1” is set to the count value of the counter 72.
Thereafter, the process of the second clock cycle and the process of the third clock cycle described above are alternately repeated.
[0149]
As described above, in this operation mode, the LIP circuit 61 can be shared by the LIP circuit 61 in the level interpolation process of the MIPMAP process and the modulation process. Therefore, the circuit scale can be reduced as compared with the case where the level interpolation processing circuit and the modulation processing circuit are connected in series. In this embodiment, the 4-point neighborhood interpolation process of the MIPMAP process is performed over 2 clock cycles in one system, and the circuit scale related to the process is the same as the conventional one.
Further, in this operation example, the LIP circuit 61 performs the modulation process in the idle time during which the level interpolation process is not performed, so that the processing time is not prolonged.
[0150]
Second operation mode
In this operation mode, a case will be described in which the LIP circuit 61 is shared by the level interpolation process of the MIPMAP process, the modulation process, and the fogging process.
In this case, the main processor 4 or the main controller (not shown) in the texture engine circuit 12 shown in FIG. 1 transfers the mode “1”, “3”, “ Function mode data FMD indicating “8” in order is output.
Further, the decoder 71 sets “2” as the initial value of the count value of the counter 72, and sets “2” to the counter 72 every time the count value of the counter 72 becomes “0”.
[0151]
Specifically, for example, in the first clock cycle, the 4-point neighborhood interpolation data C from the LIP circuit 54 shown in FIG.pixel0Is written to the register 74.
Then, “2” is set to the count value of the counter 72.
[0152]
Next, in the second clock cycle, the function mode data FMD indicates the mode “1”, and the 4-point neighborhood interpolation data Cpixel0Is read from the register 74, and the IN of the LIP circuit 61 is passed through the multiplexer 78 and the register 88.AOutput to the terminal. At the same time, four-point neighborhood interpolation data C from the LIP circuit 54 shown in FIG.pixel1IN of the LIP circuit 61 through the multiplexer 77 and the register 87.BOutput to the terminal.
At the same time, the data COE from the reduction ratio calculation circuit 50 shown in FIG.mipmapIN of the LIP circuit 61 through the multiplexer 76 and the register 86.coeffIs output.
Then, in the LIP circuit 54, the calculation shown in the above equation (9) is performed, and the level interpolation data CpixelIs calculated.
Since the counter 72 has a count value “2”, the level interpolation data CpixelIs fed back to the multiplexer 78.
Then, the count value of the counter 72 is decreased to “1”.
[0153]
Next, in the third clock cycle, the function mode data FMD indicates the mode “3”, and the 4-point neighborhood interpolation data C relating to the next pixel from the LIP circuit 54 shown in FIG.pixel0Is written to the register 74.
At the same time, the level interpolation data C calculated in the second clock cyclepixel(C in formula (10)texCorresponds to IN of the LIP circuit 61 via the multiplexer 78 and the register 88.AOutput to the terminal.
At the same time, (R, G, B) data S11b (fragment color value C) included in the DDA data S11 from the triangle DDA circuit 11flag) Of the LIP circuit 61 through the multiplexer 76 and the register 86.coeffIs output.
In the LIP circuit 54, the calculation shown in the above equation (10) is performed, and the color value C after the modulation processing is performed.modIs calculated.
And the color value CmodThe counter 72 is fed back to the multiplexer 78 because the count value is “1”.
Then, the count value of the counter 72 is decreased to “0”.
Also, four-point neighboring interpolation data Cpixel0Is output to the read circuit 51 shown in FIG. 4 to instruct to wait for one clock cycle, and the fragment data Cflag1 is output to the triangle DDA circuit 11 shown in FIG.
[0154]
Next, in the fourth clock cycle, if the function mode data FMD indicates the mode “8” and the fog enable data FED is the logical value “1”, the color value C calculated in the third clock cycle is displayed.mod(C in formula (13)flagCorresponds to IN of the LIP circuit 61 via the multiplexer 78 and the register 88.AOutput to the terminal.
At the same time, for example, fog data C read from a fog register (not shown)fogIs connected to the IN of the LIP circuit 61 through the multiplexer 77 and the register 87.BOutput to the terminal.
At the same time, for example, the fogging coefficient COE included in the DDA data S11 from the triangle DDA circuit 11fogThrough the multiplexer 76 and the register 86, the IN of the LIP circuit 61coeffOutput to the terminal.
In the LIP circuit 54, the calculation shown in the above equation (13) is performed, and the color value C after the fogging process is performed.foggedIs calculated.
Since the count value of the counter 72 is “0”, the color value C is transferred from the OUT terminal of the LIP circuit 61 to the register 62.foggedIs output.
Color value CfoggedAre read from the register 62 and output to the memory I / F circuit 13 at the subsequent stage as pixel data S12.
Thereafter, the process of the second clock cycle, the process of the third clock cycle, and the process of the fourth clock cycle described above are alternately repeated.
[0155]
As described above, in this operation mode, the LIP circuit 61 can be shared by the level interpolation process of the MIPMAP process and the modulation process, and the LIP circuit 61 can be shared by the fogging process. Therefore, the number of gates can be reduced and the circuit scale can be reduced as compared with the case where the level interpolation processing circuit and the modulation processing circuit are connected in series.
[0156]
Thus, in the texture engine circuit 12, the circuit scale can be reduced by sharing the LIP circuit 61 shown in FIG. 10 for the level interpolation process of the MIMPAP process and the texture function process. In this case, if the LIP circuit 61 is shared by the level interpolation process and one texture function process, the processing time is not prolonged.
[0157]
In the texture engine circuit 12, since the LIP circuits 52, 53, and 61 shown in FIG. 4 perform the calculation using the correction data F as shown in FIG. 13, when all the bits are the logical value “1”, In the system that is regarded as “1”, the calculation when the COE of the above equation (15) is “1.0” can be accurately performed without substantially increasing the circuit scale.
That is, in order to obtain an appropriate result without performing correction, if 9 bits are used by increasing 1 bit and “0x100” is regarded as “1”, the number of gates of the pipe register in the previous stage is increased, and the entire gate is gated. However, in this embodiment, it is not necessary to increase the number of bits, and such a problem does not occur.
[0158]
Note that the texture engine circuit 12 directly uses the (R, G, B) data read from the SRAM 17 or the texture buffer 20 in the case of the full color system. On the other hand, in the case of the index color system, the texture engine circuit 12 reads a color lookup table (CLUT) created in advance from the texture CLUT buffer 23, transfers and stores it in the built-in SRAM, and stores this color lookup table. In this way, (R, G, B) data corresponding to the color index read from the SRAM 17 or the texture buffer 20 is obtained.
[0159]
Memory I / F circuit 13
The memory I / F circuit 13 compares the z data corresponding to the pixel data S12 input from the texture engine circuit 12 with the z data stored in the z buffer 22, and is rendered by the input pixel data S12. It is determined whether or not the image is positioned on the near side (viewpoint side) with respect to the previous image written in the display buffer 21. If the image is positioned on the near side, the z buffer 22 is used with z data corresponding to the image data S12. The z data stored in is updated.
[0160]
CRT controller circuit 14
The CRT controller circuit 14 generates an address to be displayed on a CRT (not shown) in synchronization with the applied horizontal and vertical synchronization signals, and outputs a request for reading display data from the display buffer 21 to the memory I / F circuit 13. In response to this request, the memory I / F circuit 13 reads display data from the display buffer 21 in a certain chunk. The CRT controller circuit 14 includes a FIFO (First In First Out) circuit that stores display data read from the display buffer 21 and outputs RGB index values to the RAMDAC circuit 15 at regular time intervals.
[0161]
RAMDAC circuit 15
The RAMDAC circuit 15 stores R, G, B data corresponding to each index value, and converts the digital R, G, B data corresponding to the RGB index value input from the CRT controller circuit 14 to D / Transfer to the A converter to generate R, G, B data in analog format. The RAMDAC circuit 15 outputs the generated R, G, B data to the CRT.
[0162]
Realization method of rendering circuit 5
Hereinafter, a preferred configuration, arrangement, and wiring method of the logic circuit of the rendering circuit 5 and the secondary memory including the DRAM 16 and the SRAM 17 that are mixedly mounted in the same semiconductor chip according to the present embodiment will be described with reference to FIGS. I will explain.
[0163]
In the present embodiment, for example, as shown in FIG. 16, the DRAM 16 is divided into four DRAM modules 1471 to 1474, and the memory I / F circuit 13 includes memory controllers corresponding to the DRAM modules 1471 to 1474. 1441 to 1444 and a distributor 1445 for distributing data to these memory controllers 1441 are provided.
Then, as shown in FIG. 16, the memory I / F circuit 13 arranges the pixel data for each of the DRAM modules 1471 to 1474 so that adjacent portions in the display area are different DRAM modules.
As a result, when a plane such as a triangle is drawn, processing can be performed simultaneously on the plane, so that the operation probability of each DRAM module is very high.
[0164]
In the above-described drawing process, the pixels are finally aggregated to access each pixel. Therefore, it is ideal that the rendering performance can be increased by the number of parallel processes by processing each pixel individually in parallel.
Therefore, the memory I / F circuit 13 that constitutes the memory system in the three-dimensional computer graphics system 1 is also configured to perform simultaneous parallel processing.
[0165]
In the graphic drawing process, as described above, it can be seen that the processing circuit for driving into the pixel needs to frequently exchange data with the DRAM.
Therefore, in the present embodiment, as shown in FIG. 17, the pixel processing modules 1446, 1447, 1448, and 1449, which are functional blocks that control pixel processing, are physically separated from the memory controller, and these pixel processing modules 1446 are used. , 1447, 1448, 1449 are arranged (closely arranged) in the vicinity of the corresponding DRAM modules 1471, 1472, 1473, 1474.
[0166]
Pixel processing modules 1446, 1447, 1448, 1449 have drawn before for (R, G, B) color read / modify / write processing and hidden surface processing. The depth data is compared with the depth of data that is about to be drawn, and all the processes related to the work of writing back according to the result are performed.
All of these operations are performed by the pixel processing modules 1446, 1447, 1448, and 1449, so that the exchange with the DRAM can be completed in a module having a short wiring length with the DRAM modules 1471, 1472, 1473, and 1474. .
For this reason, even if the number of wirings to the DRAM, that is, the number of transfer bits is increased, the ratio of the wiring to the area can be reduced, so that the operation speed can be improved and the wiring area can be reduced.
[0167]
Regarding the inter-DRAM control module 1450 including a distributor and the like, the DDA setup calculation of the DDA setup circuit 10, the triangle DDA calculation of the triangle DDA circuit 11, the texture pasting of the texture engine circuit 12, and the CRT control circuit 14 as drawing processing Compared with the display processing or the like according to the above, the relation with each DRAM module (DRAM + pixel processing) is strong, and the number of signal lines between the DRAM modules 1471, 1472, 1473, 1474 is the largest.
Therefore, the inter-DRAM control module 1450 is arranged near the center of each DRAM module 1471, 1472, 1473, 1474 so that the longest wiring length is as short as possible.
[0168]
As for signal input / output terminals for connection between the pixel processing modules 1446, 1447, 1448, 1449 and the inter-DRAM control module 1450, as shown in FIG. 17, the respective pixel processing modules 1446, 1447, 1448, 1449 are provided. The input / output terminal positions of signals in the individual pixel processing modules are arranged so that the individual pixel processing modules and the inter-DRAM control module 1450 are optimally (shortest) wired. It has been adjusted.
[0169]
Specifically, in the pixel processing module 1446, an input / output terminal T1446a is formed on the right end side of the module lower edge portion in FIG. The input / output terminal T1446a is arranged so as to face the input / output terminal T1450a formed on the left end side of the upper edge portion of the inter-DRAM control module 1450, and the terminals T1446a and T1450a are connected with the shortest distance. .
In the pixel processing module 1446, an input / output terminal T1446b for connection to the DRAM module 1471 is formed at the center of the upper edge in FIG.
[0170]
In the pixel processing module 1447, an input / output terminal T1447a is formed on the left end side of the lower edge of the module in FIG. The input / output terminal T1447a is disposed so as to face the input / output terminal T1450b formed on the right end side of the upper edge portion of the inter-DRAM control module 1450, and the two terminals T1447a and T1450b are connected with the shortest distance. .
In the pixel processing module 1447, an input / output terminal T1447b for connection to the DRAM module 1472 is formed at the center of the upper edge in FIG.
[0171]
In the pixel processing module 1448, an input / output terminal T1448a is formed on the right end side of the upper edge of the module in FIG. The input / output terminal T1448a is arranged to face the input / output terminal T1450c formed on the left end side of the lower edge portion of the inter-DRAM control module 1450, and the two terminals T1448a and T1450c are connected with the shortest distance. .
In the pixel processing module 1448, an input / output terminal T1448b for connection to the DRAM module 1473 is formed at the center of the lower edge in FIG.
[0172]
In the pixel processing module 1449, an input / output terminal T1449a is formed on the left end side of the upper edge of the module in FIG. The input / output terminal T1449a is arranged to face the input / output terminal T1450d formed on the right end of the lower edge of the inter-DRAM control module 1450, and the two terminals T1449a and T1450d are connected with the shortest distance. .
In the pixel processing module 1449, an input / output terminal T1449b for connection to the DRAM module 1474 is formed at the center of the lower edge in FIG.
[0173]
Note that the pixel processing modules 1446, 1447, 1448, and 1449 have the processing speed even if the paths from the DRAM modules 1471, 1472, 1473, and 1474 to the inter-DRAM control module 1450 have the optimum length as described above. For processing that cannot satisfy the requirements, for example, at least one stage of pipeline processing divided by a register can be taken, and a desired processing speed can be achieved.
[0174]
Further, the DRAM modules 1471 to 1474 according to the present embodiment are configured as shown in FIG. Here, the DRAM module 1471 is described as an example, but the other DRAM modules 1472 to 1474 have the same configuration, and thus the description thereof is omitted.
[0175]
As shown in FIG. 18, the DRAM module 1471 includes a DRAM core 1480 in which memory cells are arranged in a matrix and accessed through a word line and a bit line (not shown) selected based on a row address RA and a column address CA. A secondary memory 1484 having a function similar to a so-called cache memory including a decoder 1481, a sense amplifier 1482, a column decoder 1483, and an SRAM or the like is provided.
[0176]
As in the present embodiment, for each DRAM module, pixel processing modules 1446 to 1449 as functional blocks that control pixel processing in graphics rendering and a secondary memory 1484 of the DRAM module are arranged in proximity to the DRAM module. .
In this case, the so-called long side direction of the DRAM is arranged to be the column direction of the DRAM core 1480.
[0177]
Looking at random reading (reading) in the configuration of FIG. 18, a control signal and a necessary address signal S1446 are supplied from the pixel processing module 1446 to the DRAM module 1471 from the address control path. Address RA and column address CA are generated, and DRAM data corresponding to a desired row is read through sense amplifier 1482.
The data passed through the sense amplifier 1480 is aggregated by the column decoder in accordance with the desired column address CA, and the DRAM data D1471 corresponding to the desired row / column from the random access port is subjected to pixel processing via the path. Transferred to module 1446.
[0178]
When data is written to the secondary memory, a control signal and a necessary address signal S1446 are supplied from the pixel processing module 1446 to the DRAM module 1471 from the address control path, and only a row address is generated based on the control signal. Minutes of data at a time are written from the DRAM 16 to the secondary memory 1484 including the SRAM 17 and the like.
In this case, since the so-called long side direction of the DRAM is arranged so as to be the column direction of the DRAM core 1480, it corresponds to the row address only by specifying the row address as compared with the case of arranging in the row direction. The number of bits that can be loaded into the secondary memory 1484 at a time for the data for one row is greatly increased.
[0179]
In addition, when the data D1484 is read from the secondary memory (SRAM) 1484 to the texture engine circuit 143 as the texture processing module, the control signal and the necessary address signal are supplied from the texture engine circuit 143 to the DRAM from the address control path. The corresponding data D1484 is transferred to the texture engine circuit 143 via the data path.
[0180]
Further, in the present embodiment, as shown in FIG. 18, the pixel processing module and the secondary memory of the DRAM module are arranged close to each other on the same side of the long side of the DRAM module.
As a result, since the same sense amplifier can be used for the data to the secondary memory of the pixel processing module and the DRAM module, it is possible to reduce the increase in the area of the DRAM core 1480 to two ports. ing.
[0181]
Hereinafter, the overall operation of the three-dimensional computer graphic system 1 will be described.
Polygon rendering data S4 is output from the main processor 4 to the DDA setup circuit 10 via the main bus 6, and the DDA setup circuit 10 generates variation data S10 indicating the difference between the sides of the polygon and the horizontal direction.
The variation data S10 is output to the triangle DDA circuit 11, and the triangle DDA circuit 11 linearly interpolates (z, R, G, B, COE) at each pixel inside the polygon.blend, S, t, q, COEfog) The data is calculated. And this calculated (z, R, G, B, COEblend, S, t, q, COEfog) Data and (x, y) data of each vertex of the polygon are output from the triangle DDA circuit 11 to the texture engine circuit 12 as DDA data S11.
[0182]
Next, a representative point is determined by the representative point determination circuit 301 of the texture engine circuit 12 shown in FIG. 4, and the q data S302 is selected by the representative point determination circuit 301 based on the representative point instruction data S301 indicating the representative point. .
Next, in the reduction ratio calculation circuit 50 shown in FIGS. 4 and 8, the reduction ratio LOD is calculated using the q data S302 and the maxe data S11c.
Next, in the second buffer memory 51 of the texture engine circuit 12 shown in FIG. 4, (s, t, q) data S11a included in the DDA data S11.1~ S11a8, The operation of dividing the s data by the q data and the operation of dividing the t data by the q data are performed.
The division results “s / q” and “t / q” are multiplied by the texture sizes USIZE and VSIZE, respectively, to generate texture coordinate data (u, v).
Next, a read request including the generated texture coordinate data (u, v) is output from the second buffer memory 51 and stored in the DRAM 16 or the SRAM 17 via the memory I / F circuit 13 (R , G, B) Data S17 is read out.
At this time, as described above, the above-described MIPMAP processing and texture function processing are performed using the configuration shown in FIGS. 4 and 10, and pixel data S12 is generated.
The pixel data S12 is output from the texture engine circuit 12 to the memory I / F circuit 13.
[0183]
Then, the memory I / F circuit 13 compares the z data corresponding to the pixel data S12 input from the texture engine circuit 12 with the z data stored in the z buffer 22, and the input pixel data S12 It is determined whether or not the image to be drawn is positioned in front (viewpoint side) of the previous image written in the display buffer 21. If the image is positioned in front, the image data S12 is written in the display buffer 21. In addition, the z data stored in the z buffer 22 is updated with the corresponding z data.
[0184]
The present invention is not limited to the first embodiment described above.
For example, in the above-described embodiment, the case where the LIP circuit 61 operates based on the function mode data FMD specifying the modes “1” to “8” illustrated in FIG. 5 is illustrated. You may make it perform a blending process.
[0185]
The contents and number of processes sharing the LIP circuit 61 are arbitrary. For example, the LIP circuit 61 may perform a decal process or an alpha blending process as the texture function process.
[0186]
Second embodiment
The three-dimensional computer graphic system 501 of this embodiment is basically the same as the three-dimensional computer graphic system 1 of the first embodiment described above, but in the texture engine circuit 12 and the memory I / F circuit 13 shown in FIG. It is characterized in that pipeline processing is performed.
Hereinafter, of the functions of the components of the three-dimensional computer graphic system 501, differences from the three-dimensional computer graphic system 1 of the first embodiment will be described.
[0187]
DDA setup circuit 10
Further, the DDA setup circuit 10 determines 1-bit valid instruction data val indicating whether or not each of the eight pixels to be processed simultaneously is positioned inside the triangle to be processed. Specifically, the valid instruction data val is “1” for a pixel located inside the triangle and “0” for a pixel located outside the triangle.
The DDA setup circuit 10 outputs the calculated variation data S10 and the valid instruction data val of each pixel to the triangle DDA circuit 11.
[0188]
Triangle DDA circuit 11
The triangle DDA circuit 11 uses the variational data S10 input from the DDA setup circuit 10 to obtain linearly interpolated (z, R, G, B, α, s, t, q) data of each pixel inside the triangle. calculate.
The triangle DDA circuit 11 generates (x, y) data for each pixel and (z, R, G, B, α, s, t, q, val) data for the pixel at the (x, y) coordinate. The DDA data (interpolated data) S11 is output to the texture engine circuit 12.
In the present embodiment, the triangle DDA circuit 11 outputs to the texture engine circuit 12 DDA data S11 for eight pixels located in a rectangle that performs processing in parallel.
[0189]
Here, (z, R, G, B, α, s, t, q, val) data of the DDA data S11 is 161-bit data as shown in FIG.
Specifically, R, G, B, and α data are each 8 bits, z, s, t, and q data are each 32 bits, and val data is 1 bit.
Hereinafter, among the (z, R, G, B, α, s, t, q, val) data for 8 pixels that are processed in parallel, the val data is the val data S220.1~ S2208And (z, R, G, B, α, s, t, q) data is processed data S221.1~ S2218And
That is, the triangle DDA circuit 11 includes (x, y) data for 8 pixels and val data S220.1~ S2208And operand data S2211~ S22181 is output to the texture engine circuit 12 shown in FIG.
[0190]
Texture engine circuit 12 and memory I / F circuit 13
A process of calculating a reduction ratio LOD using the DDA data S11 by the texture engine circuit 12, a process of calculating "s / q" and "t / q", a process of calculating texture coordinate data (u, v), and The processing of reading (R, G, B, α) data from the texture buffer 20 and the z comparison processing by the memory I / F circuit 13 are piped by the operation blocks 200, 201, 202, 204, 205 shown in FIG. Execute sequentially in line mode.
Here, each of the operation blocks 199, 200, 201, 202, 204, and 205 incorporates 8 operation sub-blocks, and performs operation processing for 8 pixels in parallel.
Here, the texture engine circuit 12 includes calculation blocks 199, 200, 201, and 202, and the memory I / F circuit 13 includes a calculation block 204.
The arithmetic block 199 corresponds to the reduction ratio arithmetic circuit 50, the representative point determination circuit 301, and the q data selection circuit 302 shown in FIG. 4, and the arithmetic blocks 200, 201, and 202 correspond to the readout circuit 51 shown in FIG. The arithmetic block 203 corresponds to the LIP circuits 52, 53, and 54 and the LIP / texture function circuit 55 shown in FIG.
In the LIP / texture function circuit 55, for example, one of the MIMAP processing level interpolation processing and the texture function processing such as modulation processing, decal processing, highlight processing, fogging processing, texture blending processing, and alpha blending processing. Processing is performed selectively.
[0191]
[Calculation block 199]
The calculation block 199 performs processing corresponding to the reduction ratio calculation circuit 304, the representative point determination circuit 301, and the q data selection circuit 302 described in the first embodiment, calculates the reduction ratio LOD of the texture data, and stores it in the calculation block 200. Output.
The reduction ratio LOD is sequentially shifted to the operation blocks 200, 201, 202, and 203.
The calculation block 199 outputs the DDA data S11 input from the triangle DDA circuit 11 to the calculation block 200 at the subsequent stage.
The operation block 199 is composed of val data S220.1~ S2208Always works regardless of the value indicated by.
[0192]
[Calculation block 200]
The arithmetic block 200 performs an operation of dividing the s data by the q data and an operation of dividing the t data by the q data using the (s, t, q) data included in the DDA data S11.
As shown in FIG. 20, the calculation block 200 includes eight calculation sub-blocks 200.1~ 2008Built in.
Here, the arithmetic sub-block 2001Is the operation data S2211And val data S2201And val data S2201Is “1”, that is, indicates that it is valid, “s / q” and “t / q” are calculated, and the calculation result is divided into results S200.1As a calculation sub-block 201 of the calculation block 2011Output to.
[0193]
Also, the calculation sub-block 2001The val data S2201Is “0”, that is, when it is invalid, the calculation is not performed and the division result S2001Or a division result S200 indicating a predetermined provisional value.1The calculation sub-block 201 of the calculation block 2011Output to.
Also, the calculation sub-block 2001The val data S2201In the subsequent computation sub-block 2011Output to.
Note that the calculation sub-block 2002~ 2008Also, for each corresponding pixel, the computation sub-block 2001The same operation is performed, and each division result S2002~ S2008And val data S2202~ S2208Are calculated in the operation sub-block 201 of the operation block 201 in the subsequent stage.2~ 2018Respectively.
[0194]
FIG. 21 shows an operation sub-block 200.1FIG.
Note that all the arithmetic sub-blocks shown in FIG. 3 basically have the configuration shown in FIG.
As shown in FIG. 21, the computation sub-block 2001The clock enabler 2101, A data flip-flop 222, a processor element 223, and a flag flip-flop 224.
Clock enabler 2101The val data S220 is a timing based on the system clock signal S225.1And val data S2201Detect the level. And the clock enabler 2101The val data S2201Is "1", for example, the clock signal S2101When the pulse signal is "0", the clock signal S210 is generated.1Do not generate pulses.
[0195]
The data flip-flop 222 receives the clock signal S210.1Is detected, the operation data S221 is detected.1Is output to the processor element 223.
The processor element 223 receives the input operation data S221.1Is used to perform the above-described division, and the division result S2001The operation sub-block 2011To the data flip-flop 222.
The flag flip-flop 224 receives the val data S220 at a timing based on the system clock signal S225.1And the calculation sub-block 201 of the calculation block 201 in the subsequent stage1To the flag flip-flop 224.
Note that the system clock signal S225 shown in FIG. 21 is sent from the arithmetic block 199 shown in FIG.1~ 2008, 2011~ 2018, 2021~ 2028, 2041~ 2048To the clock enabler and flag flip-flop 224.
That is, the arithmetic sub-block 2001~ 2008, 2011~ 2018, 2021~ 2028, 2041~ 2048The processes in are performed synchronously, and the eight calculation sub-blocks built in the same calculation block perform the processes in parallel.
[0196]
[Calculation block 201]
The operation block 201 is an operation sub-block 201.1~ 2018And the division result S200 input from the operation block 2001~ S2008Is multiplied by the texture sizes USIZE and VSIZE, respectively, to generate texture coordinate data (u, v).
Arithmetic sub-block 2011~ 2018Are the clock enablers 2111~ 2118Val data S2201~ S2208As a result of the level detection, the calculation is performed only when the level is “1”, and the texture coordinate data S201 as the calculation result is obtained.1~ S2018, The calculation sub-block 202 of the calculation block 2021~ 2028Output to.
[0197]
[Calculation block 202]
The calculation block 202 is divided into calculation sub-blocks 202.1~ 2028And outputs a read request including the texture coordinate data (u, v) generated by the calculation block 201 to the SRAM 17 or the DRAM 16 via the memory I / F circuit 13, and passes through the memory I / F circuit 13. By reading the texture data stored in the SRAM 17 or the texture buffer 20, (R, G, B, α) data S17 stored at the texture address corresponding to the (u, v) data is obtained.
The texture buffer 20 stores texture data corresponding to a plurality of reduction ratios such as MIPMAP (multi-resolution texture). Here, which reduction rate of texture data is used is determined in units of the triangles using a predetermined algorithm.
The SRAM 17 stores a copy of the texture data stored in the texture buffer 20.
Arithmetic sub-block 2021~ 2028Are clock enablers 212 respectively.1~ 2128Val data S2201~ S2208As a result of the level detection, the read process is performed only when the level is “1”, and the read (R, G, B, α) data S17 is converted into (R, G, B, α) data S202.1~ S2028Respectively, the calculation sub-block 203 of the calculation block 2031~ 2038Output to.
[0198]
The texture engine circuit 12 directly uses the (R, G, B, α) data read from the texture buffer 20 in the case of the full color system. On the other hand, in the case of the index color system, the texture engine circuit 12 reads a color lookup table (CLUT) created in advance from the texture CLUT buffer 23, transfers and stores it in the built-in SRAM, and stores this color lookup table. In this way, (R, G, B) data corresponding to the color index read from the texture buffer 20 is obtained.
[0199]
[Calculation block 203]
The calculation block 203 is a calculation sub-block 203.1~ 20384 and using the LIP circuit 52, 53, 54 and the LIP / texture function circuit 55 shown in FIG. 4, for example, level interpolation processing of MIMAP processing, modulation processing, decal processing, highlight processing, fogging processing, One of the texture function processes such as the texture blending process and the alpha blending process is selectively performed.
[0200]
Then, the operation block 203 has (R, G, B, α) data S203 as a processing result.1~ S2038Is output to the calculation block 204.
Arithmetic sub-block 2031~ 2038Are the clock enablers 213 respectively.1~ 2138Val data S2201~ S2208As a result of performing the level detection, the mixed texture function process and the (R, G, B, α) data S203 are performed only when the level is “1”.1~ S2038Is output.
[0201]
[Calculation block 204]
The calculation block 204 is a calculation sub-block 204.1~ 2048And input (R, G, B, α) data S2031~ S2038Z is compared using the contents of the z data stored in the z buffer 22 to obtain (R, G, B, α) data S203.1~ S2038When the image drawn by is positioned before (the viewpoint side) the value drawn in the display buffer 21 last time, the z buffer 22 is updated and (R, G, B, α) data S203 is updated.1~ S2038(R, G, B, α) data S2041~ S2048As shown in FIG.
Arithmetic sub-block 2041~ 2048The clock enabler 2141~ 2148Val data S2201~ S2208As a result of the level detection, the above-described z comparison and writing to the display buffer 21 are performed only when the level is “1”.
Note that the memory I / F circuit 13 accesses the DRAM 16 simultaneously for 16 pixels.
[0202]
The overall operation of the three-dimensional computer graphic system 501 will be described below.
Polygon rendering data S4 is output from the main processor 4 to the DDA setup circuit 10 via the main bus 6, and the DDA setup circuit 10 generates variation data S10 indicating the difference between the sides of the triangle and the horizontal direction.
The variation data S10 is output to the triangle DDA circuit 11, where the linearly interpolated (z, R, G, B, α, s, t, q) data in each pixel inside the triangle is obtained. Calculated. Then, the calculated (z, R, G, B, α, s, t, q) data and (x, y) data of each vertex of the triangle are used as DDA data S11 from the triangle DDA circuit 11. It is output to the texture engine circuit 12.
[0203]
Next, the texture engine circuit 12 and the memory I / F circuit 13 use the DDA data S11 to calculate the reduction ratio LOD, the calculation processing of “s / q” and “t / q”, the texture coordinate data (u , V) calculation processing, (R, G, B, α) data reading processing as digital data from the texture buffer 20, texture function processing, and z comparison processing are performed in operation blocks 199, 200 shown in FIG. , 201, 202, 203, 204 are sequentially executed in a pipeline manner.
[0204]
Next, the pipeline processing operations of the texture engine circuit 12 and the memory I / F circuit 13 shown in FIG. 1 will be described.
Here, for example, consider a case where 8 pixels in a rectangle 251 shown in FIG. 7 are processed simultaneously. In this case, the val data S2201, S2202, S220Three, S220Five, S2206Indicates “0” and the val data S220Four, S2207, S2208Indicates “1”.
[0205]
And the val data S2201~ S2208And operand data S2211~ S2218Is input to the arithmetic block 199, and in the arithmetic block 199, I7The reduction ratio LOD is calculated with the pixel of the representative point as a representative point, and the calculated reduction ratio LOD and val data S220 are calculated.1~ S2208And operand data S2211~ S2218Is output to the calculation block 200.
[0206]
Next, the val data S2201~ S2208And operand data S2211~ S2218Are corresponding computation sub-blocks 200, respectively.1~ 2008The clock enabler 2101~ 2108Is input.
And the clock enabler 2101~ 2108Respectively, the val data S2201~ S2208Levels are detected. Specifically, the clock enabler 210Four, 2107, 2108"1" is detected at the clock enabler 2101, 2102, 210Three, 210Five, 2106"0" is detected at.
As a result, the operation sub-block 200Four, 2007, 2008Only in the operation data S221Four, S2217, S2218Are used to calculate “s / q” and “t / q”, and the division result S200Four, S2007, S2008Is the calculation block 201 of the calculation block 201.Four, 2017, 2018Is output.
On the other hand, the calculation sub-block 2001, 2002, 200Three, 200Five, 2006Then no division is performed.
Also, the division result S200Four, S2007, S2008In synchronization with the output of the val data S2201~ S2208Is the calculation sub-block 201 of the calculation block 201.1~ 2018Is output.
[0207]
Next, the computation sub-block 2011~ 2018The clock enabler 2101~ 2108Respectively, the val data S2201~ S2208Levels are detected.
Then, based on the detection result, the computation sub-block 201Four, 2017, 2018Only in divide result S200Four, S2007, S2008Is multiplied by the texture sizes USIZE and VSIZE, respectively, to indicate the texture coordinate data S202.Four, S2027, S2028Are generated, and the calculation sub-blocks 202 of the calculation blocks 202 are generated.Four, 2027, 2028Is output.
On the other hand, the operation sub-block 2011, 2012, 201Three, 201Five, 2016Then, no operation is performed.
The texture coordinate data S202Four, S2027, S2028In synchronization with the output of the val data S2201~ S2208Is a calculation sub-block 202 of the calculation block 202.1~ 2028Is output.
[0208]
Next, the computation sub-block 2021~ 2028The clock enabler 2121~ 2128Respectively, the val data S2201~ S2208Levels are detected.
Based on the detection result, the calculation sub-block 202Four, 2027, 2028Only, the texture data stored in the SRAM 17 or the texture buffer 20 is read out, and the (R, G, B, α) data stored in the texture address corresponding to the (s, t) data is read out. . The read (R, G, B, α) data S202Four, S2027, S2028Is a calculation sub-block 203 of the calculation block 204.Four, 2037, 2038Is output.
On the other hand, the calculation sub-block 2021, 2022, 202Three, 202Five, 2026Then, the reading process is not performed.
In addition, (R, G, B, α) data S202Four, S2027, S2028In synchronization with the output of the val data S2201~ S2208Is a calculation sub-block 203 of the calculation block 203.1~ 2038Is output.
[0209]
Next, the computation sub-block 2031~ 2038The clock enabler 2121~ 2128Respectively, the val data S2201~ S2208Levels are detected.
Based on the detection result, the arithmetic sub-block 203Four, 2037, 2038Only, the texture function processing is performed, and the (R, G, B, α) data S203 obtained thereby.Four, 2037, 2038Is output to the calculation block 204.
On the other hand, the calculation sub-block 2031, 2032, 203Three, 203Five, 2036Then, texture function processing is not performed.
[0210]
Next, the computation sub-block 2041~ 2048The clock enabler 2141~ 2148Respectively, the val data S2201~ S2208Levels are detected.
Based on the detection result, the calculation sub-block 204Four, 2047, 2048Only in (R, G, B, α) data S203Four, S2037, S2038Z is compared using the contents of the z data stored in the z buffer 22 to obtain (R, G, B, α) data S203.Four, S2037, S2038When the image drawn by is positioned before the previous value drawn in the display buffer 21, the z buffer 22 is updated and the (R, G, B, α) data S203 is updated.Four, S2037, S2038Is written into the display buffer 21.
[0211]
That is, in the texture engine circuit 12 and the memory I / F circuit 13, when processing is simultaneously performed on the pixels of the rectangle 251 shown in FIG. 6, processing is not performed on the pixels located outside the triangle 250. That is, while the calculation is performed on the pixels in the rectangle 251 shown in FIG.1, 2002, 200Three, 200Five, 2006, 2011, 2012, 201Three, 201Five, 2016, 2021, 2022, 202Three, 202Five, 2026, 2041, 2042, 204Three, 204Five, 2046Is stopped and these computing sub-blocks do not consume power.
[0212]
As described above, the three-dimensional computer graphic system 501 further has the following effects in addition to the effects of the three-dimensional computer graphic system 1 of the first embodiment described above.
That is, according to the three-dimensional computer graphic system 501, in the pipeline processing in the texture engine circuit 12, the calculation is not performed on the pixels located outside the triangle to be processed among the eight pixels to be simultaneously processed. be able to.
Therefore, power consumption in the texture engine circuit 12 can be significantly reduced. As a result, a simple and inexpensive power source for the three-dimensional computer graphic system 501 can be used.
As shown in FIGS. 20 and 21, the texture engine circuit 12 implements the above-described functions by incorporating a clock enabler and a 1-bit flag flip-flop into each arithmetic sub-block. Since the circuit scale of the 1-bit flag flip-flop is small, the circuit scale of the texture engine circuit 12 does not increase significantly.
[0213]
The present invention is not limited to the embodiment described above.
In the above-described embodiment, the case where texture data is read from the storage circuit using a common reduction ratio for a plurality of pixel data to be processed simultaneously is described. A plurality of reduction rate calculation circuits may be provided. In this case, a plurality of readout circuits are provided respectively corresponding to a plurality of pixel data to be processed simultaneously, and a storage circuit, a plurality of reduction rate calculation circuits, and a plurality of readout circuits are mixedly mounted on one semiconductor chip.
In addition, a plurality of image processing circuits that simultaneously process using the texture data read by the reading circuit to generate a plurality of display data, and a plurality of writing circuits that write the generated display data to a storage circuit such as a DRAM. Further, a storage circuit, a plurality of reduction ratio calculation circuits, a plurality of reading circuits, a plurality of image processing circuits, and a plurality of writing circuits may be mounted on one semiconductor chip.
[0214]
【The invention's effect】
As described above, according to the image processing apparatus of the present invention, high image quality can be stably provided with a small-scale apparatus configuration.
[Brief description of the drawings]
FIG. 1 is a configuration diagram of a three-dimensional computer graphic system according to an embodiment of the present invention.
FIG. 2 is a diagram for explaining a method for generating effective bit data in the DDA setup circuit shown in FIG. 1;
FIG. 3 is a diagram for explaining texture data used for the MIPMAP processing stored in the SARAM and the texture buffer shown in FIG. 1;
4 is a configuration diagram of a texture engine circuit shown in FIG. 1. FIG.
FIG. 5 is a flowchart of processing in the representative point determination circuit shown in FIG. 4;
6 is a diagram for explaining processing in the representative point determination circuit shown in FIG. 4; FIG.
7 is a diagram for explaining a specific example of representative points when the triangle shown in FIG. 2 is a processing target. FIG.
FIG. 8 is a configuration diagram of a reduction ratio calculation circuit shown in FIG. 4;
FIG. 9 is a diagram for explaining the processing contents of the reduction ratio calculation circuit shown in FIG. 8;
FIG. 10 is a configuration diagram of the LIP / texture function circuit shown in FIG. 4;
FIG. 11 is a diagram for explaining data input to the LIP circuit in each mode;
FIG. 12 is a diagram for explaining the input timing of mipmap data from the LIP circuit to the LIP / texture function circuit and the execution timing of the level interpolation process;
FIG. 13 is a diagram for explaining processing of the LIP circuit shown in FIG. 4;
FIG. 14 is a diagram for explaining processing of the LIP circuit shown in FIG. 4;
15 is a partial configuration diagram of the previous stage adder circuit shown in FIG. 13;
16 is a diagram for explaining a data storage method for the DRAM shown in FIG. 1; FIG.
FIG. 17 is a diagram for explaining a preferable configuration, arrangement, and wiring method of the logic circuit of the rendering circuit shown in FIG. 1, the DARAM, and the secondary memory.
FIG. 18 is a diagram for explaining the configuration of the DRAM module shown in FIG. 17;
FIG. 19 is a diagram for explaining the format of DDA data output from the triangle DDA circuit shown in FIG. 1 in the three-dimensional computer graphic system according to the second embodiment of the present invention.
FIG. 20 is a partial configuration diagram of a texture engine circuit and a memory I / F circuit in the three-dimensional computer graphic system according to the second embodiment of the present invention.
FIG. 21 is a configuration diagram of a calculation sub block shown in FIG. 20;
FIG. 22 is a diagram for explaining MIPMAP filtering processing;
FIG. 23 is a diagram for explaining a conventional general texture mapping apparatus;
FIG. 24 is a flowchart of processing in the texture mapping apparatus shown in FIG.
FIG. 25 is a diagram for explaining a texture mapping apparatus that realizes high-speed processing;
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 ... Three-dimensional computer graphic system, 2 ... Main memory, 3 ... I / O interface circuit, 4 ... Main processor, 5 ... Rendering circuit, 10 ... DDA setup circuit, 11 ... Triangle DDA circuit, 12 ... Texture engine circuit, 13 ... Memory I / F circuit, 14 ... CRT controller circuit, 15 ... RAMDAC circuit, 16 ... DRAM, 17 ... SRAM, 20 ... Texture buffer, 21 ... Display buffer, 22 ... Z buffer, 23 ... Texture CLUT buffer, 301 ... Representative Point determination circuit, 302... Stq selection circuit, 50... Reduction ratio calculation circuit, 51... Texture data read circuit, 55 .. LIP / texture function circuit

Claims (6)

共通の処理条件が適用される複数の画素からなる単位図形を組み合わせて表示モデルを表現し、必要に応じてテクスチャデータを用いて前記画素に対応する画素データを生成する画像処理装置において、
前記表示モデルは立体モデルであり、
前記単位図形が三角形であり、
表示データと、同一のパターンについて相互に異なる縮小率に対応した複数のテクスチャデータとを記憶する記憶回路と、
同時に処理を行おうとする複数の画素データに対して共通して用いられる縮小率を算出する縮小率算出回路と、
前記算出された縮小率に対応する前記テクスチャデータを前記記憶回路から読み出す読み出し回路と、
前記読み出されたテクスチャデータを用いて前記複数の画素データの処理を同時に行って表示データを生成する画像処理回路と、
前記生成された表示データを前記記憶回路に書き込む書き込み回路と、
前記同時に処理を行おうとする複数の画素データに対応する画素のうち、処理対象となっている前記単位図形の内側に位置する画素のなかから代表点となる画素を決定する代表点決定回路と
を有し、
前記縮小率算出回路は、下記式に基づいて前記縮小率を示すLODを実質的に算出するため、
LOD=Clamp(((log 1/q)+maxe)
<<L+K)
ここで、
LODは、整数部と少数部とで構成され、符号なしの縮小率を示す記号であり、
Clampは、下記のクランプ回路においてクランプすることを示す記号であり、
qは、前記同次項を示す記号であり、
maxeは、前記処理対象となっている前記単位図形の頂点の同次座標(s,t)および同次項qの最大指数を示す整数部のみからなるデータであり、
<<Lは、下記のシフト回路においてデータをLビットシフトすることを示すものであり、
Kは、整数部と少数部とで構成され、符号有りで、下記の加算回路において加算に使用するデータであり、
前記同次項データqを正規化して指数qeおよび仮数qmを生成する正規化回路と、
前記指数qeと前記仮数qmとをビット結合したデータを、前記データLが示す値だけMSB(Most Significant Bit)に向けてシフトする第1のシフト回路と、
前記第1のシフト回路の出力を反転する第1の反転回路と、
前記仮数qmを入力して、「log ({1,qm})−qm」を示すデータμを出力するデータ出力手段と、
前記データmaxeと前記データμとをビット結合したデータを、前記データLが示す値だけMSBに向けてシフトする第2のシフト回路と、
前記第2のシフト回路の出力を反転する第2の反転回路と、
前記データKと2進数の「10」とをビット結合したデータと、前記第1の反転回路の出力と、前記第2の反転回路の出力とを加算する加算回路と、
前記加算回路の出力を所定ビット内にクランプ処理して前記縮小率LODを生成するクランプ回路と
を有し、
前記読み出し回路は、前記同時に処理が行われる複数の画素データの各々について、前記決定された縮小率、前記同次座標(s,t)および同次項qによって特定されるテクスチャデータを前記記憶回路から読み出す
画像処理装置。
In an image processing apparatus that represents a display model by combining unit graphics composed of a plurality of pixels to which common processing conditions are applied, and generates pixel data corresponding to the pixels using texture data as necessary.
The display model is a three-dimensional model;
The unit figure is a triangle;
A storage circuit for storing display data and a plurality of texture data corresponding to different reduction ratios for the same pattern;
A reduction ratio calculation circuit for calculating a reduction ratio commonly used for a plurality of pixel data to be processed simultaneously;
A readout circuit for reading out the texture data corresponding to the calculated reduction ratio from the storage circuit;
An image processing circuit that generates display data by simultaneously processing the plurality of pixel data using the read texture data;
A writing circuit for writing the generated display data into the storage circuit;
A representative point determination circuit for determining a pixel as a representative point from among the pixels corresponding to the plurality of pixel data to be processed at the same time, among the pixels located inside the unit graphic to be processed ; Have
The reduction rate calculation circuit substantially calculates LOD indicating the reduction rate based on the following formula,
LOD = Clamp (((log 2 1 / q) + maxe)
<< L + K)
here,
LOD is composed of an integer part and a decimal part, and is a symbol indicating an unsigned reduction rate,
Clamp is a symbol indicating clamping in the following clamp circuit,
q is a symbol indicating the homogeneous term,
maxe is data consisting only of an integer part indicating the maximum coordinate of the homogeneous coordinates (s, t) and the homogeneous term q of the vertex of the unit graphic to be processed;
<< L indicates that data is shifted by L bits in the shift circuit described below.
K is composed of an integer part and a decimal part, is signed, and is data used for addition in the following addition circuit,
A normalization circuit that normalizes the homogeneous term data q to generate an exponent qe and a mantissa qm;
A first shift circuit that shifts data obtained by bit-combining the exponent qe and the mantissa qm toward a MSB (Most Significant Bit) by a value indicated by the data L;
A first inverting circuit for inverting the output of the first shift circuit;
Data output means for inputting the mantissa qm and outputting data μ indicating “log 2 ({1, qm}) − qm”;
A second shift circuit that shifts data obtained by bit-combining the data maxe and the data μ toward the MSB by a value indicated by the data L;
A second inverting circuit for inverting the output of the second shift circuit;
An addition circuit for adding the data obtained by bit-combining the data K and the binary number “10”, the output of the first inversion circuit, and the output of the second inversion circuit;
A clamp circuit for clamping the output of the adder circuit within a predetermined bit to generate the reduction ratio LOD;
Have
The readout circuit receives texture data specified by the determined reduction ratio, the homogeneous coordinates (s, t), and the homogeneous term q from the storage circuit for each of the plurality of pixel data to be simultaneously processed. Read ,
Image processing device.
前記記憶回路、前記縮小率算出回路、前記読み出し回路、前記画像処理回路、前記書き込み回路および前記代表点決定回路が一つの半導体チップ内に混載されている、The storage circuit, the reduction ratio calculation circuit, the readout circuit, the image processing circuit, the writing circuit, and the representative point determination circuit are mounted together in one semiconductor chip;
請求項1に記載の画像処理装置。The image processing apparatus according to claim 1.
前記同時に処理が実行される複数の画素データに対応する画素のうち、処理対象となっている前記単位図形の内側に位置する画素の処理結果のみを有効なものとして用いる
請求項2に記載の画像処理装置。
The image according to claim 2, wherein among the pixels corresponding to the plurality of pixel data to be processed simultaneously, only the processing result of the pixel located inside the unit graphic to be processed is used as an effective one. Processing equipment.
前記画像処理回路は、
第1の縮小率の表示パターンを示す第1のテクスチャデータを補間して2次元上の所定位置の画素に対応する第1の画素データを算出し、第2の縮小率の表示パターンを示す第2のテクスチャデータを補間して前記画素に対応する第2の画素データを算出する第1の補間処理を行う第1の画像処理回路と、
前記第1の画素データと前記第2の画素データとを用いて第2の補間処理を行って、前記第1の縮小率と前記第2の縮小率との間の第3の縮小率の表示パターンに応じた前記画素に対応する第3の画素データを算出する第2の画像処理回路と
を有し、
前記第2の画像処理回路は、前記第2の補間処理を前記第1の補間処理に比べて短時間で行える場合に、前記第3の画素データをフィードバックし、当該フィードバックした前記第3の画素データを用いて所定の画像処理を行う
請求項1または2に記載の画像処理装置。
The image processing circuit includes:
The first texture data indicating the display pattern of the first reduction ratio is interpolated to calculate the first pixel data corresponding to the pixel at a predetermined position in two dimensions, and the second display pattern of the second reduction ratio is shown. A first image processing circuit for performing a first interpolation process for interpolating two texture data and calculating second pixel data corresponding to the pixels;
Display of a third reduction ratio between the first reduction ratio and the second reduction ratio by performing a second interpolation process using the first pixel data and the second pixel data. A second image processing circuit for calculating third pixel data corresponding to the pixel according to a pattern,
The second image processing circuit feeds back the third pixel data when the second interpolation processing can be performed in a shorter time than the first interpolation processing, and the fed back third pixel Perform predetermined image processing using data
The image processing apparatus according to claim 1 .
前記第1の画像処理回路は、前記第1の補間処理を複数回繰り返して行い、
前記第2の画像処理回路は、前記第2の補間処理および前記所定の画像処理を順次複数回繰り返して行う
請求項4に記載の画像処理装置。
The first image processing circuit repeatedly performs the first interpolation processing a plurality of times;
The second image processing circuit sequentially repeats the second interpolation processing and the predetermined image processing a plurality of times.
The image processing apparatus according to claim 4 .
前記第2の画像処理回路は、
前記所定の画像処理として、モジュレート処理、デカル処理、ハイライト処理、フォギング処理およびアルファブレンディング処理のうち少なくとも一の処理を行う
請求項4に記載の画像処理装置。
The second image processing circuit includes:
As the predetermined image processing, at least one of modulation processing, decal processing, highlight processing, fogging processing, and alpha blending processing is performed.
The image processing apparatus according to claim 4 .
JP29891899A 1999-10-20 1999-10-20 Image processing device Expired - Fee Related JP4325038B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP29891899A JP4325038B2 (en) 1999-10-20 1999-10-20 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP29891899A JP4325038B2 (en) 1999-10-20 1999-10-20 Image processing device

Publications (2)

Publication Number Publication Date
JP2001118056A JP2001118056A (en) 2001-04-27
JP4325038B2 true JP4325038B2 (en) 2009-09-02

Family

ID=17865872

Family Applications (1)

Application Number Title Priority Date Filing Date
JP29891899A Expired - Fee Related JP4325038B2 (en) 1999-10-20 1999-10-20 Image processing device

Country Status (1)

Country Link
JP (1) JP4325038B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4635379B2 (en) * 2001-05-30 2011-02-23 ソニー株式会社 Image processing device
JP4622165B2 (en) * 2001-06-15 2011-02-02 ソニー株式会社 Image memory control device, graphic operation device, and rendering processing method
JP5653541B2 (en) * 2012-01-27 2015-01-14 三菱電機株式会社 Drawing data generation apparatus and image drawing apparatus

Also Published As

Publication number Publication date
JP2001118056A (en) 2001-04-27

Similar Documents

Publication Publication Date Title
JP3860859B2 (en) Computer graphics system with high performance primitive clipping preprocessing
CA2272567C (en) Multiplier for performing 3d graphics interpolations
US20030122815A1 (en) Graphics system configured to determine triangle orientation by octant identification and slope comparison
US6172687B1 (en) Memory device and video image processing apparatus using the same
KR20080067840A (en) 3-dimensional graphics accelerator and method of distributing pixel thereof
US20040012611A1 (en) Anti-aliasing interlaced video formats for large kernel convolution
US6778188B2 (en) Reconfigurable hardware filter for texture mapping and image processing
JP4325038B2 (en) Image processing device
US5732248A (en) Multistep vector generation for multiple frame buffer controllers
JP3985321B2 (en) Arithmetic apparatus and image processing apparatus
JPH11345218A (en) Image processor and its method
JP4069486B2 (en) Memory circuit control device and graphic operation device
JP4300650B2 (en) Arithmetic processing circuit and method and image processing apparatus
JP4665268B2 (en) Image processing device
US6985153B2 (en) Sample request mechanism for supplying a filtering engine
JP4224887B2 (en) Signal processing apparatus and image processing apparatus
CA2261245C (en) Division circuit and graphic display processing apparatus
JP4042204B2 (en) Graphic operation apparatus and method
JP4622165B2 (en) Image memory control device, graphic operation device, and rendering processing method
JP4635379B2 (en) Image processing device
JPH11185052A (en) Device and method for calculating texture mapping coordinate of three-dimensional computer graphics
US20030164842A1 (en) Slice blend extension for accumulation buffering
EP0485833A2 (en) A method for executing graphics color saturating arithmetic instructions in a data processor
US20030169279A1 (en) Reconfigurable pixel computation unit
JP4386124B2 (en) Video signal processing apparatus and video signal processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060214

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090210

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090217

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090417

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: 20090519

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: 20090601

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

Free format text: PAYMENT UNTIL: 20120619

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120619

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120619

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130619

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees