JP2011044077A - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP2011044077A
JP2011044077A JP2009193060A JP2009193060A JP2011044077A JP 2011044077 A JP2011044077 A JP 2011044077A JP 2009193060 A JP2009193060 A JP 2009193060A JP 2009193060 A JP2009193060 A JP 2009193060A JP 2011044077 A JP2011044077 A JP 2011044077A
Authority
JP
Japan
Prior art keywords
unit
pixel
data
cache
texture
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.)
Withdrawn
Application number
JP2009193060A
Other languages
Japanese (ja)
Inventor
Takahiro Nozu
隆弘 野津
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2009193060A priority Critical patent/JP2011044077A/en
Publication of JP2011044077A publication Critical patent/JP2011044077A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To suppress the deterioration of processing performance in an image processing device. <P>SOLUTION: The image processing device includes: a memory unit 1 for storing texture data; a cache unit 2 for storing part of the texture data stored in the memory unit 1; a determination unit 3 which refers to the data stored in the cache unit 2 to determine whether a pixel that is an object to be drawn in future causes a cache mistake; and a retention unit 4 for retaining information for a plurality of pixels determined to cause the cache mistake by the determination unit 3. When data needed by a pixel whose information is held in the retention unit 4 are not stored in the cache unit 2, a data processing unit 5 takes a pixel succeeding to this pixel as the next drawing object. When data required by a pixel whose information is held in the retention unit 4 are stored in the cache unit 2, and this pixel is a pixel preceding to the current drawing position, the data processing unit 5 takes this pixel as the next drawing object. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

この発明は、テクスチャマッピング処理を行う画像処理装置に関する。   The present invention relates to an image processing apparatus that performs texture mapping processing.

従来、テクスチャマッピング処理を行う画像処理装置において、外部メモリが保持するテクスチャデータの一部を保持するキャッシュメモリを備える装置が知られている(例えば、特許文献1、特許文献2、特許文献3、特許文献4参照。)。このような画像処理装置において、例えば、テクスチャデータの使用率が境界値以上である場合に、キャッシュメモリを有効とし、境界値未満の場合に、キャッシュメモリを無効とする画像処理装置が知られている(例えば、特許文献1参照。)。また、テクスチャデータを記憶する主メモリを持つホストコンピュータ、テクスチャデータの一部を記憶するローカルメモリ(キャッシュメモリ)、および最も最近アクセスされたローカルメモリ中のテクセルを記憶するテクセル・データバッファを備える装置が知られている。この装置では、テクスチャデータはテクセル・データバッファからアクセスされるが、テクセル・データバッファに読み取るべきテクセルが存在しない場合に限ってローカルメモリに記憶されているテクセルがアクセスされる(例えば、特許文献2参照。)。また、ヒットまたはミスしたテクスチャデータリクエストに関連したアドレスをFIFO(First−In First−Out、先入れ先出し)メモリに格納し、(n+1)番目の未処理テクスチャリクエストミスに遭遇すると、テクスチャエンジンが停止する装置が知られている(例えば、特許文献3参照。)。また、テクスチャを記憶する主メモリと、最も新しく使用されたテクスチャを記憶するキャッシュメモリと、を備え、主メモリに対する記憶アクセスサイクルをキャッシュメモリに対する読み出しサイクルと並行して行う装置が知られている(例えば、特許文献4参照。)。   2. Description of the Related Art Conventionally, in an image processing apparatus that performs texture mapping processing, apparatuses including a cache memory that holds a part of texture data held by an external memory are known (for example, Patent Document 1, Patent Document 2, Patent Document 3, (See Patent Document 4). In such an image processing apparatus, for example, an image processing apparatus is known in which the cache memory is enabled when the usage rate of the texture data is equal to or higher than the boundary value, and the cache memory is disabled when the texture data usage rate is less than the boundary value. (For example, refer to Patent Document 1). An apparatus comprising a host computer having a main memory for storing texture data, a local memory (cache memory) for storing a part of texture data, and a texel data buffer for storing texels in the most recently accessed local memory It has been known. In this apparatus, texture data is accessed from the texel data buffer, but the texel stored in the local memory is accessed only when there is no texel to be read in the texel data buffer (for example, Patent Document 2). reference.). Also, an address associated with a hit or missed texture data request is stored in a FIFO (First-In First-Out) memory, and the texture engine stops when the (n + 1) th unprocessed texture request miss is encountered. Is known (for example, see Patent Document 3). There is also known an apparatus that includes a main memory that stores textures and a cache memory that stores the most recently used textures, and performs a storage access cycle for the main memory in parallel with a read cycle for the cache memory ( For example, see Patent Document 4.)

特開2008−59266号公報JP 2008-59266 A 特開平8−329260号公報JP-A-8-329260 特表2001−507152号公報JP-T-2001-507152 特表平9−510309号公報JP-T 9-510309

しかしながら、従来の技術では、キャッシュミスが発生すると、テクスチャデータを保持するメモリ(上記例では、外部メモリや主メモリに相当)から該当するテクスチャデータを読み出してキャッシュメモリに格納するまでの待ち時間が発生するため、処理性能が低下してしまうという問題点がある。   However, in the conventional technique, when a cache miss occurs, there is a waiting time until the texture data is read from the memory holding the texture data (in the above example, corresponding to the external memory or the main memory) and stored in the cache memory. Therefore, there is a problem that the processing performance is degraded.

処理性能の低下を抑制することができる画像処理装置を提供することを目的とする。   An object of the present invention is to provide an image processing apparatus capable of suppressing a decrease in processing performance.

この画像処理装置は、メモリ部、キャッシュ部、判定部、保持部およびデータ処理部を備える。メモリ部は、テクスチャデータを格納する。キャッシュ部は、メモリ部に格納されているテクスチャデータの一部を格納する。判定部は、キャッシュ部に格納されているデータを参照して将来描画の対象となるピクセルがキャッシュミスを起こすか否かを判定する。保持部は、判定部によりキャッシュミスを起こすと判定された複数のピクセルの情報を保持する。データ処理部は、保持部に情報が保持されているピクセルにより必要とされるデータがキャッシュ部に格納されていない場合に、当該ピクセルよりも後のピクセルを次の描画対象とする。データ処理部は、保持部に情報が保持されているピクセルにより必要とされるデータがキャッシュ部に格納されるときに当該ピクセルが現在の描画位置よりも前のピクセルである場合に、当該ピクセルを次の描画対象とする。   The image processing apparatus includes a memory unit, a cache unit, a determination unit, a holding unit, and a data processing unit. The memory unit stores texture data. The cache unit stores a part of the texture data stored in the memory unit. The determination unit refers to data stored in the cache unit to determine whether or not a pixel to be drawn in the future causes a cache miss. The holding unit holds information on a plurality of pixels determined to cause a cache miss by the determination unit. When data required by a pixel whose information is held in the holding unit is not stored in the cache unit, the data processing unit sets a pixel subsequent to the pixel as a next drawing target. When the data required by the pixel whose information is held in the holding unit is stored in the cache unit when the pixel is a pixel before the current drawing position, the data processing unit sets the pixel. The next drawing target.

この画像処理装置によれば、処理性能の低下を抑制することができるという効果を奏する。   According to this image processing apparatus, it is possible to suppress a decrease in processing performance.

実施例1にかかる画像処理装置を示すブロック図である。1 is a block diagram illustrating an image processing apparatus according to a first embodiment. 実施例2にかかる画像処理装置を含む画像処理システムを示すブロック図である。FIG. 3 is a block diagram illustrating an image processing system including an image processing apparatus according to a second embodiment. 実施例2にかかる画像処理装置を示すブロック図である。FIG. 6 is a block diagram illustrating an image processing apparatus according to a second embodiment. 実施例2にかかる画像処理装置のラスタライズ部を示すブロック図である。FIG. 10 is a block diagram illustrating a rasterizing unit of the image processing apparatus according to the second embodiment. 描画対象のピクセルとキャッシュの予測対象のピクセルとの関係を説明する図である。It is a figure explaining the relationship between the pixel of drawing object, and the pixel of prediction object of a cache. 実施例2にかかる画像処理装置のミスリスト部を示すブロック図である。FIG. 10 is a block diagram illustrating a miss list unit of the image processing apparatus according to the second embodiment. 実施例2にかかる画像処理装置のミスリスト部の格納情報の一例を示す説明図である。FIG. 10 is an explanatory diagram of an example of stored information in a miss list part of the image processing apparatus according to the second embodiment. 実施例2にかかる画像処理装置のリスト制御部の一例を示す回路図である。FIG. 10 is a circuit diagram illustrating an example of a list control unit of the image processing apparatus according to the second embodiment. 図8に示す回路の動作を説明する真理値表である。9 is a truth table for explaining the operation of the circuit shown in FIG. 実施例2にかかる画像処理装置のリスト制御部の一例を示す回路図である。FIG. 10 is a circuit diagram illustrating an example of a list control unit of the image processing apparatus according to the second embodiment. 図10に示す回路の動作を説明する真理値表である。11 is a truth table for explaining the operation of the circuit shown in FIG. 10. 図10に示す回路の動作を説明する真理値表である。11 is a truth table for explaining the operation of the circuit shown in FIG. 10. 図10に示す回路の動作を説明する真理値表である。11 is a truth table for explaining the operation of the circuit shown in FIG. 10. 図10に示す回路の動作を説明する真理値表である。11 is a truth table for explaining the operation of the circuit shown in FIG. 10. 図10に示す回路の動作を説明する真理値表である。11 is a truth table for explaining the operation of the circuit shown in FIG. 10. 図10に示す回路の動作を説明する真理値表である。11 is a truth table for explaining the operation of the circuit shown in FIG. 10. 図10に示す回路の動作を説明する真理値表である。11 is a truth table for explaining the operation of the circuit shown in FIG. 10. 図10に示す回路の動作を説明する真理値表である。11 is a truth table for explaining the operation of the circuit shown in FIG. 10. 図10に示す回路の動作を説明する真理値表である。11 is a truth table for explaining the operation of the circuit shown in FIG. 10. 図10に示す回路の動作を説明する真理値表である。11 is a truth table for explaining the operation of the circuit shown in FIG. 10. 図10に示す回路の動作を説明する真理値表である。11 is a truth table for explaining the operation of the circuit shown in FIG. 10. 図10に示す回路の動作を説明する真理値表である。11 is a truth table for explaining the operation of the circuit shown in FIG. 10. 図10に示す回路の動作を説明する真理値表である。11 is a truth table for explaining the operation of the circuit shown in FIG. 10. 図10に示す回路の動作を説明する真理値表である。11 is a truth table for explaining the operation of the circuit shown in FIG. 10. 図10に示す回路の動作を説明する真理値表である。11 is a truth table for explaining the operation of the circuit shown in FIG. 10. 実施例2にかかる画像処理装置のテクスチャキャッシュ部を示すブロック図である。FIG. 10 is a block diagram illustrating a texture cache unit of the image processing apparatus according to the second embodiment. 実施例2にかかる画像処理装置のテーブルの格納情報の一例を示す説明図である。FIG. 10 is an explanatory diagram illustrating an example of stored information in a table of the image processing apparatus according to the second embodiment. 実施例2にかかる画像処理装置のテクスチャキャッシュ部における処理を示すフローチャートである。12 is a flowchart illustrating processing in a texture cache unit of the image processing apparatus according to the second embodiment.

以下に添付図面を参照して、この画像処理装置の好適な実施の形態を詳細に説明する。   Exemplary embodiments of the image processing apparatus will be described below in detail with reference to the accompanying drawings.

(実施例1)
図1は、実施例1にかかる画像処理装置を示すブロック図である。図1に示すように、画像処理装置は、メモリ部1、キャッシュ部2、判定部3、保持部4およびデータ処理部5を備える。メモリ部1は、テクスチャデータを格納する。キャッシュ部2は、メモリ部1に格納されているテクスチャデータの一部を格納する。判定部3は、キャッシュ部2に格納されているデータを参照して将来描画の対象となるピクセルがキャッシュミスを起こすか否かを判定する。保持部4は、判定部3によりキャッシュミスを起こすと判定された複数のピクセルの情報を保持する。例えば、データ処理部5は、判定部3に将来描画の対象となるピクセルの位置の情報を与える。データ処理部5は、保持部4に情報が保持されているピクセルにより必要とされるデータがキャッシュ部2に格納されていない場合に、当該ピクセルよりも後のピクセルを次の描画対象とする。データ処理部5は、保持部4に情報が保持されているピクセルにより必要とされるデータがキャッシュ部2に格納されるときに当該ピクセルが現在の描画位置よりも前のピクセルである場合に、当該ピクセルを次の描画対象とする。
Example 1
FIG. 1 is a block diagram of an image processing apparatus according to the first embodiment. As shown in FIG. 1, the image processing apparatus includes a memory unit 1, a cache unit 2, a determination unit 3, a holding unit 4, and a data processing unit 5. The memory unit 1 stores texture data. The cache unit 2 stores a part of the texture data stored in the memory unit 1. The determination unit 3 refers to data stored in the cache unit 2 to determine whether or not a pixel to be drawn in the future causes a cache miss. The holding unit 4 holds information of a plurality of pixels determined by the determination unit 3 to cause a cache miss. For example, the data processing unit 5 gives the determination unit 3 information on the position of the pixel to be drawn in the future. When the data required by the pixel whose information is held in the holding unit 4 is not stored in the cache unit 2, the data processing unit 5 sets a pixel subsequent to the pixel as the next drawing target. When the data required by the pixel whose information is held in the holding unit 4 is stored in the cache unit 2 when the data processing unit 5 is a pixel before the current drawing position, The pixel is set as the next drawing target.

実施例1によれば、予め判定部3によりキャッシュミスを起こすと判定されたピクセルの描画を、当該ピクセルが必要とするテクスチャデータがキャッシュ部2に格納されるまで先延ばしにすることができる。それによって、キャッシュミスが発生するピクセルへのアクセスを避けることができるので、メモリ部1から該当するテクスチャデータを読み出してキャッシュ部2に格納するまでの待ち時間をなくすことができる。従って、処理性能の低下を抑制することができる。   According to the first embodiment, it is possible to postpone drawing of a pixel that is determined in advance by the determination unit 3 to cause a cache miss until the texture data required by the pixel is stored in the cache unit 2. Accordingly, access to a pixel in which a cache miss occurs can be avoided, so that the waiting time until the corresponding texture data is read from the memory unit 1 and stored in the cache unit 2 can be eliminated. Accordingly, it is possible to suppress a decrease in processing performance.

(実施例2)
・画像処理システムの説明
図2は、実施例2にかかる画像処理装置を含む画像処理システムを示すブロック図である。図2に示すように、画像処理システムは、メモリ11、ホストプロセッサ12、グラフィックスチップ13、ディスプレイ14およびバス15を備えている。メモリ11は、ディスプレイ14に表示されるオブジェクトの形状データやテクスチャデータを格納する。ホストプロセッサ12は、アプリケーションプログラムを実行し、アプリケーションプログラムによる描画の要求に基づいてグラフィックスチップ13にコマンドやデータを送る。グラフィックスチップ13は、ホストプロセッサ12からコマンドやデータを受け取り、描画を行う。ディスプレイ14は、グラフィックスチップ13の描画結果を出力する。メモリ11、ホストプロセッサ12およびグラフィックスチップ13は、バス15に接続されている。グラフィックスチップ13は、実施例2にかかる画像処理装置として動作する。
(Example 2)
FIG. 2 is a block diagram of an image processing system including an image processing apparatus according to the second embodiment. As shown in FIG. 2, the image processing system includes a memory 11, a host processor 12, a graphics chip 13, a display 14, and a bus 15. The memory 11 stores shape data and texture data of objects displayed on the display 14. The host processor 12 executes the application program and sends commands and data to the graphics chip 13 based on a drawing request by the application program. The graphics chip 13 receives commands and data from the host processor 12 and performs drawing. The display 14 outputs the drawing result of the graphics chip 13. The memory 11, the host processor 12 and the graphics chip 13 are connected to the bus 15. The graphics chip 13 operates as an image processing apparatus according to the second embodiment.

・画像処理装置(グラフィックスチップ)の説明
図3は、実施例2にかかる画像処理装置を示すブロック図である。図3に示すように、画像処理装置(グラフィックスチップ13)は、インタフェース部21、セットアップ部22、ラスタライズ部23、テクスチャ部24、テクスチャキャッシュ部25、フレームバッファ部26およびテクスチャメモリ部27を備えている。画像処理装置は、将来描画の対象となるピクセルがキャッシュミスを起こすか否かを判定し、キャッシュミスを起こすピクセルを避けるように描画順序を変更してテクスチャマッピング処理を行う。
Description of Image Processing Device (Graphics Chip) FIG. 3 is a block diagram of an image processing device according to the second embodiment. As shown in FIG. 3, the image processing apparatus (graphics chip 13) includes an interface unit 21, a setup unit 22, a rasterizing unit 23, a texture unit 24, a texture cache unit 25, a frame buffer unit 26, and a texture memory unit 27. ing. The image processing apparatus determines whether or not a pixel to be rendered in the future causes a cache miss, and performs a texture mapping process by changing the rendering order so as to avoid a pixel that causes a cache miss.

インタフェース部21は、ホストプロセッサ12から描画データおよびテクスチャデータを受け取る。インタフェース部21は、描画データをセットアップ部22へ送る。インタフェース部21は、テクスチャデータをテクスチャメモリ部27に書き込む。テクスチャメモリ部27には、テクスチャイメージが複数のブロックに分割されて格納される。分割されたテクスチャイメージの各ブロックには、一意のブロック番号が付与される。セットアップ部22は、インタフェース部21から与えられた描画データを、ラスタライズ部23での処理に適したデータ(セットアップデータ)に変換する。セットアップ部22は、セットアップデータをラスタライズ部23へ送る。   The interface unit 21 receives drawing data and texture data from the host processor 12. The interface unit 21 sends drawing data to the setup unit 22. The interface unit 21 writes the texture data into the texture memory unit 27. The texture memory unit 27 stores the texture image divided into a plurality of blocks. A unique block number is assigned to each block of the divided texture image. The setup unit 22 converts the drawing data given from the interface unit 21 into data (setup data) suitable for processing in the rasterizing unit 23. The setup unit 22 sends setup data to the rasterization unit 23.

ラスタライズ部23は、セットアップ部22から与えられたセットアップデータに基づいて1ピクセルずつ描画位置を求める。ラスタライズ部23は、1ピクセルずつ図形を描画する。ラスタライズ部23は、現在の描画位置にあるピクセルのテクスチャ座標(第1座標データ)を算出し、該第1座標データをテクスチャ部24に渡す。ラスタライズ部23は、現在の描画位置よりも後の描画位置(予測位置)にあるピクセル、すなわち将来描画の対象となるピクセルのテクスチャ座標(第2座標データ)を算出し、該第2座標データをテクスチャ部24に渡す。ラスタライズ部23は、テクスチャキャッシュ部25からキャッシュの判定結果としてヒット情報を受け取る。ラスタライズ部23は、テクスチャキャッシュ部25から、キャッシュに読み込まれたテクスチャイメージのブロックの情報としてブロック読み込み情報を受け取る。   The rasterizing unit 23 obtains a drawing position pixel by pixel based on the setup data given from the setup unit 22. The rasterizing unit 23 draws a figure pixel by pixel. The rasterizing unit 23 calculates the texture coordinates (first coordinate data) of the pixel at the current drawing position, and passes the first coordinate data to the texture unit 24. The rasterizing unit 23 calculates texture coordinates (second coordinate data) of a pixel at a drawing position (predicted position) after the current drawing position, that is, a pixel to be drawn in the future, and the second coordinate data is calculated. It is passed to the texture unit 24. The rasterizing unit 23 receives hit information as a cache determination result from the texture cache unit 25. The rasterizing unit 23 receives block read information from the texture cache unit 25 as information on the blocks of the texture image read into the cache.

テクスチャ部24は、ラスタライズ部23から与えられた第1座標データを第1アドレスデータに変換し、該第1アドレスデータをテクスチャキャッシュ部25に渡す。第1アドレスデータは、現在の描画位置にあるピクセルのテクスチャアドレスのデータである。テクスチャ部24は、第1アドレスデータに対応するテクスチャデータをテクスチャキャッシュ部25から受け取り、該テクスチャデータをピクセルデータとしてフレームバッファ部26に書き込む。テクスチャ部24は、ラスタライズ部23から与えられた第2座標データを第2アドレスデータに変換し、該第2アドレスデータをテクスチャキャッシュ部25に渡す。第2アドレスデータは、前記予測位置にあるピクセルのテクスチャアドレスのデータである。   The texture unit 24 converts the first coordinate data given from the rasterizing unit 23 into first address data, and passes the first address data to the texture cache unit 25. The first address data is data of the texture address of the pixel at the current drawing position. The texture unit 24 receives the texture data corresponding to the first address data from the texture cache unit 25 and writes the texture data to the frame buffer unit 26 as pixel data. The texture unit 24 converts the second coordinate data given from the rasterize unit 23 into second address data, and passes the second address data to the texture cache unit 25. The second address data is the texture address data of the pixel at the predicted position.

テクスチャキャッシュ部25は、テクスチャメモリ部27とテクスチャ部24との間でキャッシュ処理を行う。テクスチャキャッシュ部25には、テクスチャメモリ部27からテクスチャイメージのブロックの単位でデータが読み込まれる。テクスチャキャッシュ部25は、テクスチャ部24から与えられた第1アドレスデータに対応するテクスチャデータをテクスチャ部24に返す。テクスチャキャッシュ部25は、該当するテクスチャデータを有していない場合には、テクスチャメモリ部27から該当するテクスチャデータを読み込む。テクスチャキャッシュ部25は、テクスチャ部24から与えられた第2アドレスデータに対応するテクスチャデータを有しているか否かを判断し、その判断結果およびブロック番号をヒット情報としてラスタライズ部23に渡す。テクスチャキャッシュ部25は、ラスタライズ部23が必要とするテクスチャイメージのブロックをテクスチャメモリ部27から読み込むと、当該ブロックのブロック番号をブロック読み込み情報としてラスタライズ部23に渡す。テクスチャメモリ部27は、実施例1のメモリ部に相当する。   The texture cache unit 25 performs a cache process between the texture memory unit 27 and the texture unit 24. Data is read into the texture cache unit 25 from the texture memory unit 27 in units of texture image blocks. The texture cache unit 25 returns the texture data corresponding to the first address data given from the texture unit 24 to the texture unit 24. If the texture cache unit 25 does not have the corresponding texture data, the texture cache unit 25 reads the corresponding texture data from the texture memory unit 27. The texture cache unit 25 determines whether or not the texture data corresponding to the second address data given from the texture unit 24 is present, and passes the determination result and the block number to the rasterizing unit 23 as hit information. When the texture cache unit 25 reads a texture image block required by the rasterizing unit 23 from the texture memory unit 27, the texture cache unit 25 passes the block number of the block to the rasterizing unit 23 as block reading information. The texture memory unit 27 corresponds to the memory unit of the first embodiment.

・ラスタライズ部の説明
図4は、実施例2にかかる画像処理装置のラスタライズ部を示すブロック図である。図4に示すように、ラスタライズ部23は、描画位置情報生成部31、補間処理部32、ミス領域情報生成部33およびミスリスト部34を備えている。描画位置情報生成部31は、セットアップ部22から与えられたセットアップデータの情報と、ミスリスト部34から与えられた第1領域情報および第2領域情報とに基づいて、今まさに描画しようとしているピクセルの位置の情報(描画位置情報)を生成し、該描画位置情報を補間処理部32に渡す。第1領域情報および第2領域情報については、後述する。描画位置情報生成部31は、将来描画の対象となるピクセルの位置の情報(予測位置情報)を生成し、該予測位置情報をミス領域情報生成部33に渡す。描画位置情報生成部31は、描画の済んだピクセルのうち、最も進んだ位置にあるピクセルの位置の情報(走査位置情報)をミスリスト部34に渡す。描画位置情報生成部31は、実施例1のデータ処理部として動作する。
FIG. 4 is a block diagram of the rasterizing unit of the image processing apparatus according to the second embodiment. As shown in FIG. 4, the rasterizing unit 23 includes a drawing position information generating unit 31, an interpolation processing unit 32, a miss area information generating unit 33, and a miss list unit 34. The drawing position information generation unit 31 is the pixel that is about to be drawn based on the setup data information given from the setup unit 22 and the first area information and second area information given from the miss list part 34. Position information (drawing position information) is generated, and the drawing position information is passed to the interpolation processing unit 32. The first area information and the second area information will be described later. The drawing position information generation unit 31 generates position information (predicted position information) of a pixel to be drawn in the future, and passes the predicted position information to the miss area information generation unit 33. The drawing position information generation unit 31 passes information (scanning position information) on the position of the pixel at the most advanced position among the drawn pixels to the miss list unit 34. The drawing position information generation unit 31 operates as a data processing unit of the first embodiment.

図5は、描画対象のピクセルとキャッシュの予測対象のピクセルとの関係を説明する図である。図5において、特に限定しないが、例えば画像処理装置は、各行の左から右に向かって描画を進め、ある行の右端まで描画が済んだら、上の行を描画することとする。すなわち、図5に示す例では、描画装置は、P11のピクセルからP71のピクセルへ向かって描画を進め、P71のピクセルの描画が済んだら、P12のピクセルからP72のピクセルへ向かって描画を進める。なお、描画領域は、2行7列のマトリックスに限らない。また、各行の右から左に向かって描画を進めてもよいし、ある行の描画が済んだら、下の行を描画するようにしてもよい。P11からP71へ至る方向をX方向とし、P11からP12へ至る方向をY方向とする。   FIG. 5 is a diagram for explaining a relationship between a drawing target pixel and a cache prediction target pixel. In FIG. 5, although not particularly limited, for example, the image processing apparatus advances drawing from the left to the right of each line, and draws the upper line after drawing to the right end of a certain line. In other words, in the example illustrated in FIG. 5, the drawing apparatus advances drawing from the pixel P11 toward the pixel P71, and after drawing the pixel P71, advances the drawing from the pixel P12 to the pixel P72. The drawing area is not limited to a 2 × 7 matrix. In addition, drawing may proceed from the right to the left of each line, or after drawing a certain line, the lower line may be drawn. The direction from P11 to P71 is the X direction, and the direction from P11 to P12 is the Y direction.

描画位置情報生成部31は、aを1から7までの整数とすると、例えばPa1のピクセルを今まさに描画しようとしているときに、このPa1のピクセルよりも後に描画の対象となるPa2のピクセルをキャッシュの予測対象のピクセルとする。従って、描画位置情報生成部31は、描画位置情報としてPa1のピクセルの位置情報を出力し、予測位置情報としてPa2のピクセルの位置情報を出力する。実施例2では、キャッシュミスを起こすと判定され、かつテクスチャイメージの同じブロック番号のブロックに含まれる連続した複数のピクセルは、ミス領域情報生成部33によって一つのミス領域として扱われる。例えば、図5に示すように、予測対象のピクセル列において、P32、P42、P52およびP62の各ピクセルがキャッシュミスを起こすと判定され、かつP32のピクセルとP42のピクセルとがテクスチャイメージの同じブロック番号のブロックに含まれる場合、P32のピクセルとP42のピクセルとは一つのミス領域(ミス領域1)として扱われる。P52のピクセルおよびP62のピクセルについても同様であり、P52のピクセルとP62のピクセルとは、ミス領域1とは別のミス領域(ミス領域2)として扱われる。ミス領域に関する情報(ミス領域情報)は、後述するミス領域情報生成部33において生成される。ミス領域情報生成部33で生成されたミス領域情報は、後述するミスリスト部34に保持される。ミスリスト部34には、複数のミス領域情報が保持される。   If a is an integer from 1 to 7, the drawing position information generation unit 31 caches the pixel Pa2 that is to be drawn after the pixel Pa1 when the pixel Pa1 is about to be drawn. The pixel to be predicted. Accordingly, the drawing position information generation unit 31 outputs the position information of the pixel Pa1 as the drawing position information, and outputs the position information of the pixel Pa2 as the predicted position information. In the second embodiment, a plurality of consecutive pixels that are determined to cause a cache miss and are included in a block having the same block number in the texture image are handled as one miss area by the miss area information generation unit 33. For example, as shown in FIG. 5, it is determined that each of pixels P32, P42, P52, and P62 causes a cache miss in the pixel row to be predicted, and the pixels of P32 and P42 are the same block in the texture image. When included in the numbered block, the pixel P32 and the pixel P42 are treated as one miss area (miss area 1). The same applies to the pixel P52 and the pixel P62, and the pixel P52 and the pixel P62 are treated as a miss area (miss area 2) different from the miss area 1. Information regarding the miss area (miss area information) is generated by the miss area information generation unit 33 described later. The miss area information generated by the miss area information generation unit 33 is held in a miss list unit 34 described later. The miss list section 34 holds a plurality of miss area information.

描画位置情報生成部31は、次の(A)から(D)のいずれかに従って、今まさに描画しようとしているピクセルの位置を生成する。
(A)最も古いミス領域が必要とするデータがキャッシュに読み込まれた場合、今まさに描画しようとしているピクセルの位置は、最も古いミス領域の開始位置となる。この場合には、描画位置は、前に戻ることになる。最も古いミス領域の情報は、前記第2領域情報から得られる。描画位置情報生成部31は、後述する第2領域情報のフラグを参照することによって、最も古いミス領域が必要とするデータがキャッシュに読み込まれたか否かを判定する。
(B)今まさに描画しようとしているピクセルの位置がミス領域の開始位置に一致する場合、新たに、当該ミス領域の次の位置が、今まさに描画しようとしているピクセルの位置となる。この場合には、今まさに描画しようとしているピクセルに必要なデータがキャッシュにないので、当該ピクセルの描画が後回しにされることになる。今まさに描画しようとしているピクセルの位置に開始位置が一致するミス領域の情報は、前記第1領域情報から得られる。
(C)前記(A)の条件も前記(B)の条件も満たさず、かつミスリスト部34に空きがある場合、今まさに描画しようとしているピクセルの位置は、当初の順番通りの位置となる。
(D)前記(A)、前記(B)および前記(C)のいずれの条件も満たさない場合、最も古いミス領域が必要とするデータがキャッシュに読み込まれるまで待機する。
The drawing position information generation unit 31 generates the position of the pixel that is about to be drawn, in accordance with any of the following (A) to (D).
(A) When the data required by the oldest miss area is read into the cache, the position of the pixel that is about to be drawn is the start position of the oldest miss area. In this case, the drawing position returns to the previous position. The oldest miss area information is obtained from the second area information. The drawing position information generation unit 31 determines whether or not data required by the oldest miss area has been read into the cache by referring to a flag of second area information described later.
(B) If the position of the pixel that is about to be drawn coincides with the start position of the miss area, the next position of the miss area becomes the position of the pixel that is about to be drawn. In this case, since there is no data necessary for the pixel that is about to be drawn in the cache, the drawing of the pixel is postponed. Information on a miss area whose start position coincides with the position of the pixel that is about to be drawn is obtained from the first area information.
(C) If neither the condition (A) nor the condition (B) is satisfied and there is a space in the miss list section 34, the position of the pixel to be drawn is the position in the original order. .
(D) If none of the above conditions (A), (B), and (C) is satisfied, the process waits until the data required by the oldest miss area is read into the cache.

図4において、補間処理部32は、描画位置情報生成部31から与えられた描画位置情報(今まさに描画しようとしているピクセルの位置の情報)に基づいて、今まさに描画しようとしているピクセルの位置に対応するテクスチャ座標を生成し、該テクスチャ座標を第1座標データとして出力する。補間処理部32は、今まさに描画しようとしているピクセルの位置に対応するテクスチャ座標に基づいて、将来描画の対象となるピクセルの位置に対応するテクスチャ座標を生成し、該テクスチャ座標を第2座標データとして出力する。   In FIG. 4, the interpolation processing unit 32 sets the position of the pixel that is about to be drawn based on the drawing position information (information about the position of the pixel that is about to be drawn) given from the drawing position information generation unit 31. Corresponding texture coordinates are generated, and the texture coordinates are output as first coordinate data. The interpolation processing unit 32 generates texture coordinates corresponding to the position of the pixel to be drawn in the future based on the texture coordinates corresponding to the position of the pixel that is about to be drawn, and uses the texture coordinates as the second coordinate data. Output as.

補間処理部32は、例えば次のようにして将来描画の対象となるピクセルの位置に対応するテクスチャ座標を生成する。3次元グラフィックス描画処理では、多角形、例えば三角形のポリゴンの各頂点にテクスチャ座標(s,t)を設定し、次の(1)式に基づいて各ピクセルにおけるテクスチャ座標が算出される。下記(1)式については、同様の式が「The OpenGLR Graphics System:A Specification(Version 3.1 − May 28, 2009)」(インターネット<URL:http://www.opengl.org/registry/doc/glspec31.20090528.pdf>)の第97頁に同様の式が記載されている。   The interpolation processing unit 32 generates texture coordinates corresponding to the position of a pixel to be drawn in the future as follows, for example. In the three-dimensional graphics rendering process, texture coordinates (s, t) are set at each vertex of a polygon, for example, a triangular polygon, and texture coordinates at each pixel are calculated based on the following equation (1). For the following formula (1), a similar formula is “The OpenGLR Graphics System: A Specification (Version 3.1-May 28, 2009)” (Internet <URL: http://www.opengl.org/registry/registry/registry/registry/registry/registry/registry/registry/registry/registry/ /Glspec31.20090528.pdf>) page 97 describes a similar formula.

Figure 2011044077
Figure 2011044077

上記(1)式において、s(x,y)は、画面上の点(x,y)における図形のテクスチャ座標のs成分である。xはXY座標軸におけるX座標であり、yはXY座標軸におけるY座標である。sa、sbおよびscは、三角形の各頂点におけるテクスチャ座標のs成分の値である。wa、wbおよびwcは、三角形の各頂点の同次座標のw成分であり、定数である。μa、μbおよびμcは、点(x,y)における三角形の重心座標と呼ばれる値であり、点(x,y)の値に応じて変化する。従って、s(x,y)の分母および分子は、xとyの関数である。三角形の重心座標は、点(x,y)に対して線形に変化するので、s(x,y)の分母R(x,y)および分子F(x,y)は、ともに線形に変化する。従って、F(x,y)のy方向の変化FyおよびR(x,y)のy方向の変化Ryは、ともに定数である。以上のことから、テクスチャ座標sのY方向への変化syは、次の(2)式で求められる。 In the above equation (1), s (x, y) is the s component of the texture coordinate of the figure at the point (x, y) on the screen. x is the X coordinate on the XY coordinate axis, and y is the Y coordinate on the XY coordinate axis. s a , s b and s c are the values of the s component of the texture coordinates at each vertex of the triangle. w a , w b and w c are w components of the homogeneous coordinates of each vertex of the triangle, and are constants. μ a , μ b and μ c are values called the barycentric coordinates of the triangle at the point (x, y), and change according to the value of the point (x, y). Thus, the denominator and numerator of s (x, y) are functions of x and y. Since the centroid coordinates of the triangle change linearly with respect to the point (x, y), both the denominator R (x, y) and numerator F (x, y) of s (x, y) change linearly. . Accordingly, the change F y in the y direction of F (x, y) and the change R y in the y direction of R (x, y) are both constants. From the above, the change s y in the Y direction of the texture coordinate s is obtained by the following equation (2).

Figure 2011044077
Figure 2011044077

上記(2)式において、Rの逆数は、今まさに描画しようとしているピクセルの位置に対応するテクスチャ座標を求める際に既に求められている。FyおよびRyが定数であるので、上記(2)式の計算を容易に行うことができる。また、演算精度を適当に設定することによって、上記(2)式の演算処理を軽減させることができる。特に限定しないが、例えば、将来キャッシュミスを起こすか否かを判定する対象を、今まさに描画しようとしているピクセルの真上のピクセルとする場合、将来キャッシュミスを起こすか否かの判定対象となるピクセルのテクスチャ座標s(x,y+1)は、次の(3)式で表される一次近似式で求められる。3次元グラフィックスでは、図形に張られたテクスチャ画像が射影などの効果により歪むが、今まさに描画しようとしているピクセルの位置に対応するテクスチャ座標とテクスチャ座標のY方向の変化率とから、将来キャッシュミスを起こすか否かの判定対象となるピクセルのテクスチャ座標を求めることができる。 In the above equation (2), the reciprocal of R is already obtained when obtaining the texture coordinates corresponding to the position of the pixel that is about to be drawn. Since F y and R y are constants, the calculation of the above equation (2) can be easily performed. Further, by appropriately setting the calculation accuracy, the calculation process of the above equation (2) can be reduced. Although there is no particular limitation, for example, when a target for determining whether or not to cause a cache miss in the future is set to a pixel immediately above the pixel that is about to be drawn, it is a target for determining whether or not a future cache miss will occur. The texture coordinate s (x, y + 1) of the pixel is obtained by a primary approximation expression expressed by the following expression (3). In 3D graphics, a texture image stretched on a figure is distorted by an effect such as projection, but the future cache is determined based on the texture coordinate corresponding to the pixel position that is about to be drawn and the rate of change of the texture coordinate in the Y direction. It is possible to obtain the texture coordinates of the pixel to be determined whether or not to make a mistake.

Figure 2011044077
Figure 2011044077

ミス領域情報生成部33は、描画位置情報生成部31から与えられた予測位置情報(将来描画の対象となるピクセルの位置の情報)と、当該ピクセルが必要とするデータがキャッシュにあるか否かを判定した結果であるヒット情報とに基づいて、ミス領域情報を生成する。ミス領域情報には、当該ミス領域に含まれるピクセルが属するテクスチャイメージのブロックのブロック番号、当該ミス領域に含まれるピクセルのY座標、当該ミス領域の開始位置にあるピクセルのX座標(開始X座標)および当該ミス領域の終了位置にあるピクセルのX座標(終了X座標)の各情報が含まれる。ミス領域情報生成部33は、一時的にミス領域情報を格納する作業領域を備えている。   The miss area information generation unit 33 determines whether or not the predicted position information (position information of the pixel to be drawn in the future) given from the drawing position information generation unit 31 and the data required by the pixel are in the cache. Miss area information is generated based on the hit information that is the result of the determination. The miss area information includes the block number of the block of the texture image to which the pixel included in the miss area belongs, the Y coordinate of the pixel included in the miss area, and the X coordinate (start X coordinate of the pixel at the start position of the miss area) ) And the X coordinate (end X coordinate) of the pixel at the end position of the miss area. The miss area information generation unit 33 includes a work area for temporarily storing miss area information.

ミス領域情報生成部33は、この作業領域を用いて、次の(E)から(H)に従ってミス領域情報を生成する。ミス領域情報生成部33は、ヒット情報がミスである場合、ヒット情報からブロック番号を取得し、予測位置情報からY座標、開始X座標および終了X座標を取得する。
(E)作業領域が空であり、ヒット情報がミスである場合、ミス領域情報生成部33は、作業領域に、取得したブロック番号、Y座標、開始X座標および終了X座標の各情報を格納する。
(F)作業領域にブロック番号、Y座標、開始X座標および終了X座標の各情報が格納されており、ヒット情報がミスであり、新たに取得したブロック番号およびY座標が既に作業領域に格納されている各情報と一致している場合、ミス領域情報生成部33は、作業領域の終了X座標を新たに取得した終了X座標に更新する。
(G)作業領域にブロック番号、Y座標、開始X座標および終了X座標の各情報が格納されており、ヒット情報がミスであり、新たに取得したブロック番号またはY座標が既に作業領域に格納されている各情報と異なっている場合、ミス領域情報生成部33は、作業領域に既に格納されている情報を一つのミス領域情報として、ミスリスト部34へ送る。その後、ミス領域情報生成部33は、作業領域に新たに取得したブロック番号、Y座標、開始X座標および終了X座標の各情報を格納する。
(H)前記(E)、前記(F)および前記(G)のいずれの条件も満たさない場合、ミス領域情報生成部33は、作業領域に既に格納されている情報を一つのミス領域情報として、ミスリスト部34へ送る。その後、ミス領域情報生成部33は、作業領域を空にする。
The miss area information generation unit 33 uses this work area to generate miss area information according to the following (E) to (H). When the hit information is a miss, the miss area information generation unit 33 acquires a block number from the hit information and acquires a Y coordinate, a start X coordinate, and an end X coordinate from the predicted position information.
(E) When the work area is empty and the hit information is a miss, the miss area information generation unit 33 stores the acquired block number, Y coordinate, start X coordinate, and end X coordinate information in the work area. To do.
(F) The block number, Y coordinate, start X coordinate, and end X coordinate information are stored in the work area, the hit information is missed, and the newly acquired block number and Y coordinate are already stored in the work area. When the information matches the information, the miss area information generation unit 33 updates the end X coordinate of the work area to the newly acquired end X coordinate.
(G) The block number, Y coordinate, start X coordinate, and end X coordinate information are stored in the work area, the hit information is missed, and the newly acquired block number or Y coordinate is already stored in the work area. If the information is different from the information, the miss area information generation unit 33 sends the information already stored in the work area to the miss list part 34 as one miss area information. Thereafter, the miss area information generation unit 33 stores the newly acquired block number, Y coordinate, start X coordinate, and end X coordinate information in the work area.
(H) When none of the conditions (E), (F), and (G) is satisfied, the miss area information generation unit 33 sets information already stored in the work area as one miss area information. To the miss list section 34. Thereafter, the miss area information generation unit 33 empties the work area.

図6は、ミスリスト部を示すブロック図である。図6に示すように、ミスリスト部34は、複数の格納部41,42,43,44,45およびリスト制御部46を備えている。図示例では、第1から第5までの5個の格納部が設けられているが、格納部の数は2個、3個、4個または6個以上でもよい。各格納部41,42,43,44,45は、例えばレジスタを備えている。リスト制御部46は、各格納部41,42,43,44,45の動作を制御する。各格納部41,42,43,44,45は、ミス領域情報生成部33から与えられたミス領域情報を格納する。nを1以上の整数とすると、第n格納部は、リスト制御部46へ第n一致信号および第nバリッド信号を出力する。リスト制御部46は、第n格納部へ第nロード信号、第nリムーブ信号、第nシフト信号および第nアベイル信号を出力する。ミスリスト部34は、実施例1の保持部として動作する。   FIG. 6 is a block diagram showing the miss list portion. As shown in FIG. 6, the miss list unit 34 includes a plurality of storage units 41, 42, 43, 44, 45 and a list control unit 46. In the illustrated example, five storage units from first to fifth are provided, but the number of storage units may be two, three, four, or six or more. Each storage unit 41, 42, 43, 44, 45 includes a register, for example. The list control unit 46 controls the operation of each storage unit 41, 42, 43, 44, 45. Each storage unit 41, 42, 43, 44, 45 stores the miss area information given from the miss area information generation unit 33. When n is an integer equal to or greater than 1, the nth storage unit outputs the nth match signal and the nth valid signal to the list control unit 46. The list control unit 46 outputs the nth load signal, the nth remove signal, the nth shift signal, and the nth avail signal to the nth storage unit. The miss list unit 34 operates as a holding unit of the first embodiment.

リスト制御部46は、各格納部へのロード信号によって、ミス領域情報を第1格納部41、第2格納部42、・・・、第5格納部45の順に格納する。リスト制御部46は、各格納部41,42,43,44,45へのシフト信号によって、各格納部41,42,43,44,45に格納されている情報を第5格納部45、第4格納部44、・・・、第1格納部41の順にシフトさせる。リスト制御部46は、全ての格納部41,42,43,44,45の格納情報を一斉にシフトさせることができる。また、リスト制御部46は、一部の格納部の格納情報をシフトさせずに、別の一部の格納部の格納情報をシフトさせることができる。例えば、リスト制御部46は、第1格納部41の格納情報をそのまま保持して、第3格納部43の格納情報を第2格納部42へシフトさせ、第4格納部44の格納情報を第3格納部43へシフトさせ、第5格納部45の格納情報を第4格納部44へシフトさせることができる。   The list control unit 46 stores the miss area information in the order of the first storage unit 41, the second storage unit 42,..., The fifth storage unit 45 in accordance with the load signal to each storage unit. The list control unit 46 uses the shift signal to each storage unit 41, 42, 43, 44, 45 to transfer the information stored in each storage unit 41, 42, 43, 44, 45 to the fifth storage unit 45, 4 storage unit 44,..., And first storage unit 41 are shifted in this order. The list control unit 46 can shift the storage information of all the storage units 41, 42, 43, 44, 45 at the same time. Further, the list control unit 46 can shift the storage information of another part of the storage unit without shifting the storage information of the part of the storage unit. For example, the list control unit 46 holds the storage information in the first storage unit 41 as it is, shifts the storage information in the third storage unit 43 to the second storage unit 42, and changes the storage information in the fourth storage unit 44 to the first storage unit. The information stored in the fifth storage unit 45 can be shifted to the fourth storage unit 44.

図7は、ミスリスト部の格納情報の一例を示す説明図である。図7に示すように、ミスリスト部34の各格納部41,42,43,44,45には、ミス領域情報(ブロック番号、Y座標、開始X座標および終了X座標)、フラグおよびバリッドの各情報が格納される。フラグは、当該ミス領域情報のブロック番号に該当するテクスチャイメージのブロックがテクスチャメモリ部27からテクスチャキャッシュ部25に読み込まれたか否かを表す。テクスチャキャッシュ部25からブロック読み込み情報として与えられたブロック番号がミス領域情報のブロック番号と一致する場合に、フラグが真となる。フラグが真であるとき、当該ミス領域情報のブロック番号に該当するテクスチャイメージのブロックがテクスチャキャッシュ部25に格納されている。バリッドは、当該ミス領域情報が有効であるか否かを表す。ミス領域情報生成部33から与えられたミス領域情報が格納部に格納されるときに、バリッドが真となる。バリッドが真であるとき、当該格納部に格納されているミス領域情報は有効である。各格納部41,42,43,44,45は、有効な情報を格納していない状態においてミス領域情報を格納するときに、バリッドを真とし、フラグを偽とする。   FIG. 7 is an explanatory diagram showing an example of information stored in the miss list portion. As shown in FIG. 7, each storage section 41, 42, 43, 44, 45 of the miss list section 34 has miss area information (block number, Y coordinate, start X coordinate and end X coordinate), flag and valid. Each piece of information is stored. The flag indicates whether a texture image block corresponding to the block number of the miss area information has been read from the texture memory unit 27 into the texture cache unit 25. The flag is true when the block number given as block read information from the texture cache unit 25 matches the block number of the miss area information. When the flag is true, a texture image block corresponding to the block number of the miss area information is stored in the texture cache unit 25. The valid indicates whether or not the miss area information is valid. The valid is true when the miss area information given from the miss area information generation unit 33 is stored in the storage unit. When the valid is true, the miss area information stored in the storage unit is valid. Each storage unit 41, 42, 43, 44, 45 sets the valid to true and sets the flag to false when storing the miss area information in a state where no valid information is stored.

図6に示すように、各格納部41,42,43,44,45は、それぞれのバリッドをバリッド信号としてリスト制御部46に渡す。ミス領域情報生成部33からミスリスト部34にミス領域情報が与えられるときに、リスト制御部46に第6バリッド信号が入力する。リスト制御部46は、各格納部41,42,43,44,45からのバリッド信号および第6バリッド信号に基づいて、各格納部41,42,43,44,45へ前記ロード信号および前記シフト信号を出力する。各格納部41,42,43,44,45は、テクスチャキャッシュ部25から与えられたブロック番号とミス領域情報のブロック番号とが一致する場合に、リスト制御部46へ一致信号を出力する。リスト制御部46は、一致信号の入力によって一致信号の出力元である格納部へリムーブ信号またはアベイル信号を出力する。各格納部41,42,43,44,45では、リムーブ信号の入力によって格納情報のバリッドが偽となる。バリッドが偽であるとき、当該格納部には有効な情報が格納されていない。各格納部41,42,43,44,45では、アベイル信号の入力によって格納情報のフラグが真となる。   As shown in FIG. 6, each storage unit 41, 42, 43, 44, 45 passes each valid to the list control unit 46 as a valid signal. When the miss area information is given from the miss area information generation unit 33 to the miss list unit 34, the sixth valid signal is input to the list control unit 46. Based on the valid signal and the sixth valid signal from each storage unit 41, 42, 43, 44, 45, the list control unit 46 transfers the load signal and the shift to each storage unit 41, 42, 43, 44, 45. Output a signal. Each storage unit 41, 42, 43, 44, 45 outputs a match signal to the list control unit 46 when the block number given from the texture cache unit 25 matches the block number of the miss area information. The list control unit 46 outputs a remove signal or an avail signal to the storage unit that is the output source of the match signal in response to the input of the match signal. In each of the storage units 41, 42, 43, 44, and 45, the valid of the stored information becomes false by inputting the remove signal. When the valid is false, no valid information is stored in the storage unit. In each of the storage units 41, 42, 43, 44, and 45, the storage information flag becomes true by the input of the avail signal.

リスト制御部46は、次の(I)および(J)に従ってリムーブ信号またはアベイル信号を選択して出力する。
(I)一致信号を出力した格納部に格納されているミス領域情報のY座標の値が描画位置情報生成部31から与えられた走査位置情報のY座標の値よりも大きいか、もしくは、一致信号を出力した格納部に格納されているミス領域情報のY座標の値が描画位置情報生成部31から与えられた走査位置情報のY座標の値に等しく、かつ、一致信号を出力した格納部に格納されているミス領域情報の開始X座標の値が、描画位置情報生成部31から与えられた走査位置情報のX座標よりも大きい場合、リスト制御部46は、一致信号の出力元である格納部へリムーブ信号を出力する。この(I)の条件を満たす場合、走査位置情報により示される位置(描画の済んだピクセルのうち、最も進んだ位置にあるピクセルの位置)よりも当該ミス領域情報のミス領域の方が後にあるので、将来必要になるテクスチャイメージのブロックがテクスチャキャッシュ部25に格納されることになる。従って、この時点で既にミス領域ではなくなるので、リスト制御部46は、リムーブ信号によって当該格納部のミス領域情報を無効にする。それによって、ミスリスト部34から当該ミス領域情報が消去される。いずれかの格納部からミス領域情報が消去されると、各格納部41,42,43,44,45の格納情報が適宜、シフトされる。
(J)前記(I)の条件を満たさない場合、リスト制御部46は、一致信号の出力元である格納部へアベイル信号を出力する。この場合、走査位置情報により示される位置(描画の済んだピクセルのうち、最も進んだ位置にあるピクセルの位置)よりも当該ミス領域情報のミス領域の方が前にあるので、過去に描画処理を飛ばされたピクセルが必要とするテクスチャイメージのブロックがテクスチャキャッシュ部25に格納されることになる。従って、リスト制御部46は、アベイル信号によって当該格納部の格納情報のフラグを真にして、描画に必要なデータがテクスチャキャッシュ部25に読み込まれたことを示す。
The list controller 46 selects and outputs the remove signal or the avail signal in accordance with the following (I) and (J).
(I) The Y coordinate value of the missed area information stored in the storage unit that outputs the coincidence signal is greater than the Y coordinate value of the scanning position information given from the drawing position information generating unit 31, or matches The storage unit that outputs the coincidence signal, and the Y coordinate value of the missed area information stored in the storage unit that outputs the signal is equal to the Y coordinate value of the scanning position information given from the drawing position information generation unit 31 If the value of the start X coordinate of the missed area information stored in is larger than the X coordinate of the scanning position information given from the drawing position information generating unit 31, the list control unit 46 is the output source of the coincidence signal. A remove signal is output to the storage unit. When the condition (I) is satisfied, the missed area of the missed area information is behind the position indicated by the scanning position information (the position of the most advanced pixel among the drawn pixels). Therefore, a texture image block that will be required in the future is stored in the texture cache unit 25. Accordingly, since it is no longer a miss area at this time, the list control unit 46 invalidates the miss area information of the storage unit by the remove signal. As a result, the miss area information is erased from the miss list section 34. When the miss area information is erased from any of the storage units, the storage information of each storage unit 41, 42, 43, 44, 45 is shifted as appropriate.
(J) When the condition (I) is not satisfied, the list control unit 46 outputs an avail signal to the storage unit that is the output source of the coincidence signal. In this case, since the miss area of the miss area information is ahead of the position indicated by the scan position information (the position of the most advanced pixel among the drawn pixels), the rendering process is performed in the past. A block of the texture image required by the skipped pixel is stored in the texture cache unit 25. Accordingly, the list control unit 46 sets the storage information flag of the storage unit to true by the avail signal, and indicates that the data necessary for drawing has been read into the texture cache unit 25.

リスト制御部46は、各格納部41,42,43,44,45に格納されているミス領域情報を検索し、走査位置情報により示される位置よりも後にあり、かつ走査位置情報により示される位置に最も近いミス領域情報を第1領域情報として描画位置情報生成部31に渡す。リスト制御部46は、第1格納部41に格納されているミス領域情報、すなわち最も古いミス領域情報を第2領域情報として描画位置情報生成部31に渡す。   The list control unit 46 searches for the miss area information stored in each of the storage units 41, 42, 43, 44, and 45, and is located after the position indicated by the scanning position information and indicated by the scanning position information. To the drawing position information generating unit 31 as the first area information. The list control unit 46 passes the miss area information stored in the first storage unit 41, that is, the oldest miss area information to the drawing position information generation unit 31 as the second area information.

図8は、リスト制御部において、ミス領域情報の格納先を選択する回路の一例を示す回路図である。図8に示すように、リスト制御部46の、ミス領域情報の格納先を選択する回路は、例えば5個のインバータ51,52,53,54,55、4個の一段目のアンド回路56,57,58,59、5個の2段目のアンド回路60,61,62,63,64、および4個のオア回路65,66,67,68を備えている。第1インバータ51は、第5バリッド信号を反転する。第1アンド回路56は、第1インバータ51の出力信号と第4バリッド信号との論理積を出力する。第2アンド回路60は、第1アンド回路56の出力信号と第6バリッド信号との論理積を第5ロード信号として出力する。第1オア回路65は、第5バリッド信号と第4バリッド信号との論理和を出力する。第2インバータ52は、第1オア回路65の出力信号を反転する。第3アンド回路57は、第2インバータ52の出力信号と第3バリッド信号との論理積を出力する。第4アンド回路61は、第3アンド回路57の出力信号と第6バリッド信号との論理積を第4ロード信号として出力する。第2オア回路66は、第1オア回路65の出力信号と第3バリッド信号との論理和を出力する。第3インバータ53は、第2オア回路66の出力信号を反転する。第5アンド回路58は、第3インバータ53の出力信号と第2バリッド信号との論理積を出力する。第6アンド回路62は、第5アンド回路58の出力信号と第6バリッド信号との論理積を第3ロード信号として出力する。第3オア回路67は、第2オア回路66の出力信号と第2バリッド信号との論理和を出力する。第4インバータ54は、第3オア回路67の出力信号を反転する。第7アンド回路59は、第4インバータ54の出力信号と第1バリッド信号との論理積を出力する。第8アンド回路63は、第7アンド回路59の出力信号と第6バリッド信号との論理積を第2ロード信号として出力する。第4オア回路68は、第3オア回路67の出力信号と第1バリッド信号との論理和を出力する。第5インバータ55は、第4オア回路68の出力信号を反転する。第9アンド回路64は、第5インバータ55の出力信号と第6バリッド信号との論理積を第1ロード信号として出力する。   FIG. 8 is a circuit diagram showing an example of a circuit for selecting a storage location of miss area information in the list control unit. As shown in FIG. 8, the circuit for selecting the storage area of the miss area information in the list control unit 46 is, for example, five inverters 51, 52, 53, 54, 55, four first-stage AND circuits 56, 57, 58, 59, five second-stage AND circuits 60, 61, 62, 63, 64, and four OR circuits 65, 66, 67, 68 are provided. The first inverter 51 inverts the fifth valid signal. The first AND circuit 56 outputs a logical product of the output signal of the first inverter 51 and the fourth valid signal. The second AND circuit 60 outputs a logical product of the output signal of the first AND circuit 56 and the sixth valid signal as a fifth load signal. The first OR circuit 65 outputs a logical sum of the fifth valid signal and the fourth valid signal. The second inverter 52 inverts the output signal of the first OR circuit 65. The third AND circuit 57 outputs a logical product of the output signal of the second inverter 52 and the third valid signal. The fourth AND circuit 61 outputs a logical product of the output signal of the third AND circuit 57 and the sixth valid signal as a fourth load signal. The second OR circuit 66 outputs a logical sum of the output signal of the first OR circuit 65 and the third valid signal. The third inverter 53 inverts the output signal of the second OR circuit 66. The fifth AND circuit 58 outputs a logical product of the output signal of the third inverter 53 and the second valid signal. The sixth AND circuit 62 outputs a logical product of the output signal of the fifth AND circuit 58 and the sixth valid signal as a third load signal. The third OR circuit 67 outputs a logical sum of the output signal of the second OR circuit 66 and the second valid signal. The fourth inverter 54 inverts the output signal of the third OR circuit 67. The seventh AND circuit 59 outputs a logical product of the output signal of the fourth inverter 54 and the first valid signal. The eighth AND circuit 63 outputs the logical product of the output signal of the seventh AND circuit 59 and the sixth valid signal as the second load signal. The fourth OR circuit 68 outputs a logical sum of the output signal of the third OR circuit 67 and the first valid signal. The fifth inverter 55 inverts the output signal of the fourth OR circuit 68. The ninth AND circuit 64 outputs a logical product of the output signal of the fifth inverter 55 and the sixth valid signal as a first load signal.

図9は、図8に示す回路の動作を説明する真理値表である。各信号の値において、1は真であることを表し、0は偽であることを表す(図11〜図25においても同じ)。図9に示すように、ミス領域情報生成部33からミスリスト部34に新たなミス領域情報が与えられるときに、第6バリッド信号の値が1となる。ミスリスト部34の第1〜第(n−1)の格納部に有効なミス領域情報が格納されており、第n格納部に有効な情報が格納されていないときには、第1〜第(n−1)のバリッド信号の値が1であり、第nバリッド信号の値は0である。このときには、第nロード信号の値のみが1となり、その他のロード信号の値は0となる。従って、ミス領域情報の格納先は第n格納部となり、第n格納部に新たなミス領域情報が格納される。全ての格納部に有効な情報が格納されていないときには、第1ロード信号の値のみが1となるので、第1格納部41に新たなミス領域情報が格納される。全ての格納部に有効なミス領域情報が格納されているときには、全てのロード信号の値が0となるので、新たなミス領域情報はいずれの格納部にも格納されない。なお、ミス領域情報の格納先を選択する回路は、図8に示す回路に限らない。   FIG. 9 is a truth table for explaining the operation of the circuit shown in FIG. In the value of each signal, 1 represents true and 0 represents false (the same applies to FIGS. 11 to 25). As shown in FIG. 9, the value of the sixth valid signal becomes 1 when new miss area information is given from the miss area information generation unit 33 to the miss list unit 34. When valid miss area information is stored in the first to (n−1) th storage units of the miss list unit 34 and no valid information is stored in the nth storage unit, the first to (n−1) th (n−1) th storage units are stored. The value of the valid signal of -1) is 1, and the value of the nth valid signal is 0. At this time, only the value of the nth load signal is 1, and the values of the other load signals are 0. Accordingly, the storage area for the miss area information is the nth storage section, and new miss area information is stored in the nth storage section. When valid information is not stored in all the storage units, only the value of the first load signal is 1, so that new miss area information is stored in the first storage unit 41. When valid miss area information is stored in all storage units, the values of all load signals are 0, so that new miss area information is not stored in any storage unit. Note that the circuit for selecting the storage location of the miss area information is not limited to the circuit shown in FIG.

図10は、リスト制御部において、各格納部の格納情報をシフトさせる回路の一例を示す回路図である。図10に示すように、リスト制御部46の、各格納部41,42,43,44,45の格納情報をシフトさせる回路は、例えば5個のインバータ71,72,73,74,75および4個のオア回路76,77,78,79を備えている。第6インバータ71は、第1バリッド信号を反転した信号を第1シフト信号として出力する。第7インバータ72は、第2バリッド信号を反転する。第5オア回路76は、第7インバータ72の出力信号と第1シフト信号との論理和を第2シフト信号として出力する。第8インバータ73は、第3バリッド信号を反転する。第6オア回路77は、第8インバータ73の出力信号と第2シフト信号との論理和を第3シフト信号として出力する。第9インバータ74は、第4バリッド信号を反転する。第7オア回路78は、第9インバータ74の出力信号と第3シフト信号との論理和を第4シフト信号として出力する。第10インバータ75は、第5バリッド信号を反転する。第8オア回路79は、第10インバータ75の出力信号と第4シフト信号との論理和を第5シフト信号として出力する。   FIG. 10 is a circuit diagram illustrating an example of a circuit that shifts storage information of each storage unit in the list control unit. As shown in FIG. 10, the circuit for shifting the storage information of each storage unit 41, 42, 43, 44, 45 of the list control unit 46 is, for example, five inverters 71, 72, 73, 74, 75 and 4 OR circuits 76, 77, 78, 79 are provided. The sixth inverter 71 outputs a signal obtained by inverting the first valid signal as the first shift signal. The seventh inverter 72 inverts the second valid signal. The fifth OR circuit 76 outputs the logical sum of the output signal of the seventh inverter 72 and the first shift signal as the second shift signal. The eighth inverter 73 inverts the third valid signal. The sixth OR circuit 77 outputs a logical sum of the output signal of the eighth inverter 73 and the second shift signal as a third shift signal. The ninth inverter 74 inverts the fourth valid signal. The seventh OR circuit 78 outputs the logical sum of the output signal of the ninth inverter 74 and the third shift signal as a fourth shift signal. The tenth inverter 75 inverts the fifth valid signal. The eighth OR circuit 79 outputs the logical sum of the output signal of the tenth inverter 75 and the fourth shift signal as the fifth shift signal.

ここで、図10に示す回路の各インバータ71,72,73,74,75には、現在のミスリスト部34の各格納部41,42,43,44,45に格納されている情報のバリッドではなく、次のクロックで各格納部41,42,43,44,45に格納される候補となる情報のバリッドがバリッド信号として与えられる。つまり、新たなミス領域情報を格納したり、各格納部41,42,43,44,45に既に格納されている情報に変化が起こると、リスト制御部46は、まず、次のクロックで各格納部41,42,43,44,45に格納される候補となる情報を生成する。そして、図10に示す回路によって、各格納部41,42,43,44,45に格納される候補となる情報のバリッドに応じて各シフト信号の真偽が決まる。シフト信号が真である場合には、該当する格納部に格納されている情報がシフトされる。シフト信号が偽である場合には、該当する格納部に格納されている情報が保持される。   Here, each inverter 71, 72, 73, 74, 75 of the circuit shown in FIG. 10 has valid information stored in each storage unit 41, 42, 43, 44, 45 of the current mislist unit 34. Instead, the valid of the candidate information stored in each storage unit 41, 42, 43, 44, 45 is given as a valid signal at the next clock. In other words, when new miss area information is stored or information already stored in each storage unit 41, 42, 43, 44, 45 changes, the list control unit 46 first performs Candidate information to be stored in the storage units 41, 42, 43, 44, 45 is generated. The circuit shown in FIG. 10 determines the authenticity of each shift signal according to the validity of candidate information stored in each storage unit 41, 42, 43, 44, 45. When the shift signal is true, the information stored in the corresponding storage unit is shifted. When the shift signal is false, the information stored in the corresponding storage unit is retained.

リスト制御部46は、次の(K)から(N)に従って、各格納部41,42,43,44,45に次に格納される候補となる情報を設定する。各格納部41,42,43,44,45に次に格納される候補となる情報は、格納部ごとにロード信号、リムーブ信号およびアベイル信号により決まる。各格納部41,42,43,44,45に対して、ロード信号、リムーブ信号およびアベイル信号は背反であり、同時に真になることはない。
(K)第nロード信号が真であれば、リスト制御部46は、ミスリスト部34の第n格納部に格納する次の候補として、ミス領域情報生成部33から与えられた新たなミス領域情報を設定し、該候補のバリッドを真に設定する。
(L)第nリムーブ信号が真であれば、リスト制御部46は、第n格納部に格納する次の候補のバリッドを偽に設定する。
(M)第nアベイル信号が真であれば、リスト制御部46は、第n格納部に格納する次の候補として、第n格納部に現在格納されている情報を設定し、該候補のフラグを真に設定する。
(N)前記(K)、前記(L)および前記(M)のいずれにも該当しない場合、リスト制御部46は、第n格納部に格納する次の候補として、第n格納部に現在格納されている情報を設定する。
The list control unit 46 sets candidate information to be stored next in each of the storage units 41, 42, 43, 44, 45 according to the following (K) to (N). The candidate information to be stored next in each storage unit 41, 42, 43, 44, 45 is determined for each storage unit by a load signal, a remove signal and an avail signal. For each storage unit 41, 42, 43, 44, 45, the load signal, remove signal and avail signal are contradictory and will never be true at the same time.
(K) If the nth load signal is true, the list control unit 46 sets a new miss region given from the miss region information generation unit 33 as the next candidate to be stored in the nth storage unit of the miss list unit 34. Set the information and set the candidate valid to true.
(L) If the nth remove signal is true, the list control unit 46 sets the next candidate valid stored in the nth storage unit to false.
(M) If the n-th avail signal is true, the list control unit 46 sets information currently stored in the n-th storage unit as the next candidate to be stored in the n-th storage unit, and sets the flag of the candidate Is set to true.
(N) If none of the above (K), (L), and (M) applies, the list controller 46 stores the current candidate in the nth storage unit as the next candidate to be stored in the nth storage unit. Set the information.

図11〜図15は、図10に示す回路においてロード信号が真となるときの動作を説明する真理値表である。図11〜図15に示すように、現在の第1〜第(n−1)のバリッド信号の値が1であり、現在の第nバリッド信号の値が0であるときには、第nロード信号の値のみが1となり、その他のロード信号、リムーブ信号およびアベイル信号の値は0となる。従って、第1〜第nの格納部に格納される次の候補のバリッドの値が1となり、それ以外の格納部に格納される次の候補のバリッドの値は0となる。それによって、第1〜第nのシフト信号の値が0となるので、第1〜第nの格納部についてはシフトが起こらずに、自格納部に対して設定された次の候補の情報(現在の格納情報と同じ情報)が格納される。それ以外のシフト信号の値は1となるので、第(n+1)以降の格納部についてはシフトが起こる。kを1以上の整数とすると、シフトが起こる場合、第k格納部には、第(k+1)格納部に対して設定された次の候補の情報が格納される。ただし、例えば第5格納部45については、シフトが起こる場合に第5格納部45へ情報を提供する格納部が存在しないので、バリッドの値が0であるダミーのデータが用意されており、該ダミーのデータが第5格納部45に格納される。   11 to 15 are truth tables for explaining the operation when the load signal becomes true in the circuit shown in FIG. As shown in FIGS. 11 to 15, when the current first to (n−1) th valid signal value is 1 and the current nth valid signal value is 0, the nth load signal Only the value is 1, and the values of the other load signal, remove signal and avail signal are 0. Therefore, the valid value of the next candidate stored in the first to nth storage units is 1, and the valid value of the next candidate stored in the other storage units is 0. As a result, the values of the first to n-th shift signals are 0, so that the first to n-th storage units are not shifted, and the next candidate information set for the self-storage unit ( The same information as the current stored information) is stored. Since the value of the other shift signal is 1, a shift occurs in the (n + 1) th and subsequent storage units. If k is an integer greater than or equal to 1, when a shift occurs, the kth storage unit stores information on the next candidate set for the (k + 1) th storage unit. However, for example, for the fifth storage unit 45, since there is no storage unit that provides information to the fifth storage unit 45 when a shift occurs, dummy data whose valid value is 0 is prepared. Dummy data is stored in the fifth storage unit 45.

図16〜図20は、図10に示す回路においてリムーブ信号が真となるときの動作を説明する真理値表である。図16〜図20に示すように、第nリムーブ信号の値が1となるとき、第1〜第nの格納部には有効なミス領域情報が格納されているので、現在の第1〜第nのバリッド信号の値は1である。第(n+1)以降の格納部については、格納している情報が有効である場合(現在のバリッド信号の値が1)と無効である場合(現在のバリッド信号の値が0)とがある。第nリムーブ信号の値が1になると、第n格納部に格納される次の候補のバリッドの値は0となる。それ以外の格納部に格納される次の候補のバリッドの値は現在の値のままである。それによって、第1〜第(n−1)のシフト信号の値が0となるので、第1〜第(n−1)の格納部についてはシフトが起こらずに、自格納部に対して設定された次の候補の情報(現在の格納情報と同じ情報)が格納される。第n以降のシフト信号の値は1となるので、第n以降の格納部についてはシフトが起こる。シフトが起こる場合、第k格納部には、第(k+1)格納部に対して設定された次の候補の情報が格納される。ただし、例えば第5格納部45についてシフトが起こる場合には、上述したようにダミーのデータが格納される。   16 to 20 are truth tables for explaining the operation when the remove signal is true in the circuit shown in FIG. As shown in FIGS. 16 to 20, when the value of the n-th remove signal is 1, valid miss area information is stored in the first to n-th storage units. The value of the valid signal of n is 1. For the (n + 1) th and subsequent storage units, there are cases where the stored information is valid (current valid signal value is 1) and invalid (current valid signal value is 0). When the value of the nth remove signal becomes 1, the value of the next candidate valid stored in the nth storage unit becomes 0. The valid value of the next candidate stored in the other storage unit remains the current value. As a result, since the values of the first to (n−1) th shift signals are 0, the first to (n−1) th storage units are set for the own storage unit without causing a shift. The next candidate information (the same information as the current stored information) is stored. Since the value of the nth and subsequent shift signals is 1, a shift occurs in the nth and subsequent storage units. When a shift occurs, information on the next candidate set for the (k + 1) th storage unit is stored in the kth storage unit. However, for example, when a shift occurs in the fifth storage unit 45, dummy data is stored as described above.

図21〜図25は、図10に示す回路においてアベイル信号が真となるときの動作を説明する真理値表である。図21〜図25に示すように、mを1以上の整数とすると、第mアベイル信号の値が1になると、第m格納部のフラグの値が1になるが、第n格納部に格納される次の候補のバリッドの値は現在の値のままである。従って、現在のバリッドの値が1である格納部についてはシフト信号の値が0となるので、シフトが起こらずに、自格納部に対して設定された次の候補の情報(現在の格納情報と同じ情報)が格納される。現在のバリッドの値が0である格納部についてはシフト信号の値が1となるので、シフトが起こる。シフトが起こる場合、第k格納部には、第(k+1)格納部に対して設定された次の候補の情報が格納される。ただし、例えば第5格納部45についてシフトが起こる場合には、上述したようにダミーのデータが格納される。なお、各格納部の格納情報をシフトさせる回路は、図10に示す回路に限らない。   FIG. 21 to FIG. 25 are truth tables for explaining the operation when the avail signal becomes true in the circuit shown in FIG. As shown in FIGS. 21 to 25, when m is an integer equal to or greater than 1, when the value of the m-th avail signal is 1, the flag value of the m-th storage unit is 1, but stored in the n-th storage unit. The value of the next valid candidate to be played remains the current value. Therefore, since the value of the shift signal is 0 for the storage unit having the current valid value of 1, the next candidate information (current storage information) set for the own storage unit without any shift. The same information) is stored. Since the value of the shift signal is 1 for the storage unit where the current valid value is 0, a shift occurs. When a shift occurs, information on the next candidate set for the (k + 1) th storage unit is stored in the kth storage unit. However, for example, when a shift occurs in the fifth storage unit 45, dummy data is stored as described above. Note that the circuit for shifting the storage information of each storage unit is not limited to the circuit shown in FIG.

・テクスチャキャッシュ部の説明
図26は、実施例2にかかる画像処理装置のテクスチャキャッシュ部を示すブロック図である。図26に示すように、テクスチャキャッシュ部25は、キャッシュデータ部81およびキャッシュ制御部82を備えている。キャッシュデータ部81は、テクスチャメモリ部27から読み込まれたデータを格納するメモリである。キャッシュデータ部81は、複数のアクセスポートを有するRandom Access Memory(RAM、ランダムアクセスメモリ)を備えているとよい。キャッシュデータ部81が複数のアクセスポートを備えていれば、テクスチャメモリ部27から読み込まれたデータをキャッシュデータ部81に書き込む動作と、キャッシュ制御部82によるキャッシュデータ部81からのデータの読み出し動作とを同時に行うことができる。キャッシュ制御部82は、テクスチャキャッシュ部25の動作を制御する。キャッシュ制御部82は、テーブル83を備えている。テーブル83は、キャッシュデータ部81に格納されているテクスチャイメージのブロックの情報を保持する。テーブル83は、テクスチャ部24から第1アドレスデータと第2アドレスデータとを受け取るので、同時に2系統でデータの読み込みを行うことができるRAMを備えているとよい。
Description of Texture Cache Unit FIG. 26 is a block diagram of the texture cache unit of the image processing apparatus according to the second embodiment. As shown in FIG. 26, the texture cache unit 25 includes a cache data unit 81 and a cache control unit 82. The cache data unit 81 is a memory that stores data read from the texture memory unit 27. The cache data unit 81 may include a random access memory (RAM, random access memory) having a plurality of access ports. If the cache data unit 81 has a plurality of access ports, an operation of writing data read from the texture memory unit 27 to the cache data unit 81, and an operation of reading data from the cache data unit 81 by the cache control unit 82, Can be performed simultaneously. The cache control unit 82 controls the operation of the texture cache unit 25. The cache control unit 82 includes a table 83. The table 83 holds information on the texture image blocks stored in the cache data unit 81. Since the table 83 receives the first address data and the second address data from the texture unit 24, the table 83 may include a RAM that can simultaneously read data in two systems.

図27は、テーブルの格納情報の一例を示す説明図である。図27に示すように、テーブル83は、例えば複数のキャッシュアドレスのエントリを保持している。各エントリには、ブロック番号、イネーブル、ローディングおよびプレディクトの各情報が格納される。ブロック番号は、キャッシュデータ部81の、当該エントリのキャッシュアドレスに対応する領域に格納されているデータのブロック番号を表す。イネーブルは、当該エントリが有効であるか無効であるかを表す。ローディングは、テクスチャメモリ部27からデータを読み出してキャッシュデータ部81に書き込み中であることを表す。プレディクトは、キャッシュデータ部81の、当該エントリのキャッシュアドレスに対応する領域に格納されているデータがミス領域により必要とされるデータであるか否かを表す。   FIG. 27 is an explanatory diagram of an example of table storage information. As shown in FIG. 27, the table 83 holds, for example, entries for a plurality of cache addresses. Each entry stores block number, enable, loading, and predict information. The block number represents the block number of the data stored in the area corresponding to the cache address of the entry in the cache data unit 81. Enable indicates whether the entry is valid or invalid. “Loading” indicates that data is being read from the texture memory unit 27 and is being written to the cache data unit 81. Predict indicates whether or not the data stored in the area corresponding to the cache address of the entry in the cache data unit 81 is data required by the miss area.

図26に示すように、キャッシュ制御部82は、テクスチャ部24から第1アドレスデータを受け取ると、テーブル83を参照する。第1アドレスデータに対応するテクスチャデータがキャッシュデータ部81に格納されている場合、キャッシュ制御部82は、キャッシュデータ部81から該当するテクスチャデータを読み出してテクスチャ部24へ送る。該当するテクスチャデータがキャッシュデータ部81に格納されていない場合、キャッシュ制御部82は、キャッシュデータ部81から該当するテクスチャデータが読み出されるまで待機する。キャッシュ制御部82は、テクスチャ部24から第2アドレスデータを受け取ると、テーブル83を参照し、第2アドレスデータに対応するテクスチャデータがキャッシュデータ部81に格納されているか否かを判断する。第2アドレスデータに対応するテクスチャデータがキャッシュデータ部81に格納されている場合、キャッシュ制御部82は、ミス領域情報生成部33にヒット情報としてデータありを返す。第2アドレスデータに対応するテクスチャデータがキャッシュデータ部81に格納されていない場合、キャッシュ制御部82は、ミス領域情報生成部33にヒット情報としてデータなしを返すとともに、テクスチャメモリ部27から該当するデータを読み込む処理を実行する。   As shown in FIG. 26, when receiving the first address data from the texture unit 24, the cache control unit 82 refers to the table 83. When the texture data corresponding to the first address data is stored in the cache data unit 81, the cache control unit 82 reads the corresponding texture data from the cache data unit 81 and sends it to the texture unit 24. When the corresponding texture data is not stored in the cache data unit 81, the cache control unit 82 waits until the corresponding texture data is read from the cache data unit 81. When the cache control unit 82 receives the second address data from the texture unit 24, the cache control unit 82 refers to the table 83 and determines whether texture data corresponding to the second address data is stored in the cache data unit 81. When the texture data corresponding to the second address data is stored in the cache data unit 81, the cache control unit 82 returns the presence of data as hit information to the miss area information generation unit 33. When the texture data corresponding to the second address data is not stored in the cache data unit 81, the cache control unit 82 returns no data as hit information to the miss area information generation unit 33, and also corresponds from the texture memory unit 27. Execute processing to read data.

図28は、テクスチャキャッシュ部における第2アドレスデータに対する処理を示すフローチャートである。図28に示すように、キャッシュ制御部82は、前記予測位置にあるピクセルのテクスチャアドレスのデータ(第2アドレスデータ)がテクスチャ部24から渡されるのを待つ(ステップS1)。キャッシュ制御部82は、テクスチャ部24から第2アドレスデータを受け取ると、テーブル83を参照し、第2アドレスデータに対応するテクスチャデータがキャッシュデータ部81に格納されているか否かを判断する(ステップS2)。該当するデータがキャッシュデータ部81に格納されている場合(ステップS2:Yes)、キャッシュ制御部82は、ミス領域情報生成部33にヒット情報としてデータありを返す(ステップS3)。そして、処理を終了する。   FIG. 28 is a flowchart showing processing for the second address data in the texture cache unit. As shown in FIG. 28, the cache control unit 82 waits for the texture address data (second address data) of the pixel at the predicted position to be passed from the texture unit 24 (step S1). When the cache control unit 82 receives the second address data from the texture unit 24, the cache control unit 82 refers to the table 83 and determines whether the texture data corresponding to the second address data is stored in the cache data unit 81 (step S). S2). When the corresponding data is stored in the cache data unit 81 (step S2: Yes), the cache control unit 82 returns the presence of data as hit information to the miss area information generation unit 33 (step S3). Then, the process ends.

一方、該当するデータがキャッシュデータ部81に格納されていない場合(ステップS2:No)、キャッシュ制御部82は、ミス領域情報生成部33にヒット情報としてデータなしを返す(ステップS4)。次いで、キャッシュ制御部82は、第2アドレスデータに対応するテクスチャデータをテクスチャメモリ部27から読み込んでいる途中であるか否かを判断する(ステップS5)。該当するデータの読み込み中である場合(ステップS5:Yes)、処理を終了する。   On the other hand, when the corresponding data is not stored in the cache data unit 81 (step S2: No), the cache control unit 82 returns no data as hit information to the miss area information generation unit 33 (step S4). Next, the cache control unit 82 determines whether texture data corresponding to the second address data is being read from the texture memory unit 27 (step S5). If the corresponding data is being read (step S5: Yes), the process is terminated.

一方、該当するデータの読み込み中でない場合(ステップS5:No)、キャッシュ制御部82は、キャッシュデータ部81に空きがあるか否かを判断する(ステップS6)。キャッシュデータ部81に空きがある場合(ステップS6:Yes)、ステップS8へ進む。キャッシュデータ部81に空きがない場合(ステップS6:No)、キャッシュ制御部82は、キャッシュデータ部81から最も使用されていないキャッシュを破棄してキャッシュデータ部81に空きを作り(ステップS7)、ステップS8へ進む。次いで、キャッシュ制御部82は、テクスチャメモリ部27から第2アドレスデータに対応するテクスチャデータを読み込んでキャッシュデータ部81の空いている領域へ格納することを要求する(ステップS8)。次いで、キャッシュ制御部82は、テーブル83の該当するエントリのローディングおよびプレディクトをともに真にする(ステップS9)。そして、処理を終了する。   On the other hand, when the corresponding data is not being read (step S5: No), the cache control unit 82 determines whether or not there is an empty space in the cache data unit 81 (step S6). If there is an empty space in the cache data unit 81 (step S6: Yes), the process proceeds to step S8. When there is no space in the cache data unit 81 (step S6: No), the cache control unit 82 discards the least used cache from the cache data unit 81 and creates a space in the cache data unit 81 (step S7). Proceed to step S8. Next, the cache control unit 82 requests that the texture data corresponding to the second address data is read from the texture memory unit 27 and stored in an empty area of the cache data unit 81 (step S8). Next, the cache control unit 82 makes both loading and predict of the corresponding entry in the table 83 true (step S9). Then, the process ends.

テクスチャメモリ部27からキャッシュデータ部81にデータが読み込まれると、キャッシュ制御部82は、テーブル83の対応するエントリを参照し、該エントリのプレディクトが真であるか否かを確認する。プレディクトが真である場合、キャッシュデータ部81に読み込まれたデータは、ミス領域により必要とされているデータである。従って、キャッシュ制御部82は、読み込まれたデータのブロック番号をブロック読み込み情報としてミスリスト部34に通知する。キャッシュデータ部81は、実施例1のキャッシュ部に相当する。キャッシュ制御部82は、実施例1の判定部として動作する。   When data is read from the texture memory unit 27 into the cache data unit 81, the cache control unit 82 refers to the corresponding entry in the table 83 and confirms whether the predict of the entry is true. When the predict is true, the data read into the cache data unit 81 is data required by the miss area. Therefore, the cache control unit 82 notifies the miss list unit 34 of the block number of the read data as block read information. The cache data unit 81 corresponds to the cache unit of the first embodiment. The cache control unit 82 operates as a determination unit in the first embodiment.

実施例2によれば、予めキャッシュ制御部82によりキャッシュミスを起こすと判定されたピクセルの描画を、当該ピクセルが必要とするテクスチャデータがキャッシュデータ部81に格納されるまで先延ばしにすることができる。それによって、キャッシュミスが発生するピクセルへのアクセスを避けることができるので、テクスチャメモリ部27から該当するテクスチャデータを読み出してキャッシュデータ部81に格納するまでの待ち時間をなくすことができる。従って、処理性能の低下を抑制することができる。   According to the second embodiment, rendering of a pixel that is determined in advance by the cache control unit 82 to cause a cache miss may be postponed until the texture data required by the pixel is stored in the cache data unit 81. it can. As a result, access to a pixel in which a cache miss occurs can be avoided, so that the waiting time until the corresponding texture data is read from the texture memory unit 27 and stored in the cache data unit 81 can be eliminated. Accordingly, it is possible to suppress a decrease in processing performance.

1 メモリ部
2 キャッシュ部
3 判定部
4 保持部
5 データ処理部
DESCRIPTION OF SYMBOLS 1 Memory part 2 Cache part 3 Judgment part 4 Holding part 5 Data processing part

Claims (5)

テクスチャデータを格納するメモリ部と、
該メモリ部に格納されているテクスチャデータの一部を格納するキャッシュ部と、
該キャッシュ部に格納されているデータを参照して将来描画の対象となるピクセルがキャッシュミスを起こすか否かを判定する判定部と、
該判定部によりキャッシュミスを起こすと判定された複数のピクセルの情報を保持する保持部と、
該保持部に情報が保持されているピクセルにより必要とされるデータが該キャッシュ部に格納されていない場合に、当該ピクセルよりも後のピクセルを次の描画対象とし、一方、該保持部に情報が保持されているピクセルにより必要とされるデータが該キャッシュ部に格納されるときに当該ピクセルが現在の描画位置よりも前のピクセルである場合に、当該ピクセルを次の描画対象とするデータ処理部と、
を備えることを特徴とする画像処理装置。
A memory unit for storing texture data;
A cache unit for storing a part of the texture data stored in the memory unit;
A determination unit that refers to data stored in the cache unit and determines whether a pixel to be drawn in the future causes a cache miss;
A holding unit that holds information of a plurality of pixels determined to cause a cache miss by the determination unit;
When the data required by the pixel for which information is held in the holding unit is not stored in the cache unit, the pixel after the pixel is set as the next drawing target, while the information in the holding unit is When the data required by the pixel in which the pixel is held is stored in the cache unit and the pixel is a pixel before the current drawing position, the pixel is processed as the next drawing target. And
An image processing apparatus comprising:
前記データ処理部は、現在の描画位置よりも前のピクセルの描画処理が終了した後、元の描画位置に戻り、該元の描画位置の次のピクセルを次の描画対象とすることを特徴とする請求項1に記載の画像処理装置。   The data processing unit returns to the original drawing position after the drawing process of the pixel before the current drawing position is completed, and sets the next pixel at the original drawing position as the next drawing target. The image processing apparatus according to claim 1. 前記データ処理部は、前記保持部に情報が保持されているピクセルにより必要とされるデータが前記キャッシュ部に格納されるときに当該ピクセルが現在の描画位置よりも後のピクセルである場合、前記保持部に保持されている当該ピクセルの情報を消去することを特徴とする請求項1または2に記載の画像処理装置。   When the data required by the pixel whose information is held in the holding unit is stored in the cache unit when the pixel is a pixel after the current drawing position, The image processing apparatus according to claim 1, wherein the pixel information held in the holding unit is erased. 前記データ処理部は、将来描画の対象となるピクセルのテクスチャ座標を現在描画中のピクセルのテクスチャ座標に基づいて算出することを特徴とする請求項1〜3のいずれか一つに記載の画像処理装置。   The image processing according to claim 1, wherein the data processing unit calculates a texture coordinate of a pixel to be drawn in the future based on a texture coordinate of a pixel being currently drawn. apparatus. 前記将来描画の対象となるピクセルを含むピクセル列と前記現在描画中のピクセルを含むピクセル列とが隣接しており、かつ前記将来描画の対象となるピクセルと前記現在描画中のピクセルとが隣接している場合、
前記データ処理部は、前記将来描画の対象となるピクセルのテクスチャ座標を前記現在描画中のピクセルのテクスチャ座標の一次近似により求めることを特徴とする請求項3に記載の画像処理装置。
The pixel column including the pixel to be drawn in the future is adjacent to the pixel column including the pixel being currently drawn, and the pixel to be drawn in the future and the pixel being currently drawn are adjacent to each other. If
The image processing apparatus according to claim 3, wherein the data processing unit obtains texture coordinates of a pixel to be drawn in the future by first-order approximation of texture coordinates of a pixel being currently drawn.
JP2009193060A 2009-08-24 2009-08-24 Image processing device Withdrawn JP2011044077A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009193060A JP2011044077A (en) 2009-08-24 2009-08-24 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009193060A JP2011044077A (en) 2009-08-24 2009-08-24 Image processing device

Publications (1)

Publication Number Publication Date
JP2011044077A true JP2011044077A (en) 2011-03-03

Family

ID=43831452

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009193060A Withdrawn JP2011044077A (en) 2009-08-24 2009-08-24 Image processing device

Country Status (1)

Country Link
JP (1) JP2011044077A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9576396B2 (en) 2013-08-13 2017-02-21 Samsung Electronics Co., Ltd. Graphics processing unit, graphics processing system including the same, and method of operating the same

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9576396B2 (en) 2013-08-13 2017-02-21 Samsung Electronics Co., Ltd. Graphics processing unit, graphics processing system including the same, and method of operating the same

Similar Documents

Publication Publication Date Title
US8941653B2 (en) Order-preserving distributed rasterizer
JP4861403B2 (en) Tiled prefetch and cached depth buffer
KR101086507B1 (en) Deadlock avoidance by marking cpu traffic as special
US8063903B2 (en) Edge evaluation techniques for graphics hardware
JP3966832B2 (en) Drawing processing apparatus and drawing processing method
US8558842B1 (en) Parallel duplicate primitive vertex detection and batching
US8704836B1 (en) Distributing primitives to multiple rasterizers
US7139003B1 (en) Methods of processing graphics data including reading and writing buffers
JP4280270B2 (en) Method for unindexing geometric primitives, rasterization device, and computer-readable medium
US20110080406A1 (en) Calculation of plane equations after determination of z-buffer visibility
US10453168B2 (en) Techniques for maintaining atomicity and ordering for pixel shader operations
US20110102448A1 (en) Vertex attribute buffer for inline immediate attributes and constants
JP2007525768A (en) Register-based queuing for texture requests
US9239795B2 (en) Efficient cache management in a tiled architecture
US7348988B2 (en) Texture cache control using an adaptive missing data table in a multiple cache computer graphics environment
US20080079744A1 (en) Systems and Methods for Performing a Bank Swizzle Operation to Reduce Bank Collisions
US8605102B1 (en) Rasterization tile coalescer and reorder buffer
US8130234B2 (en) Computer graphics rendering apparatus and method
US20180165787A1 (en) Techniques for tiling compute work with graphics work
US9633458B2 (en) Method and system for reducing a polygon bounding box
US8773447B1 (en) Tag logic scoreboarding in a graphics pipeline
JP5580660B2 (en) Information processing apparatus, circuit, information processing method, and program
US11016802B2 (en) Techniques for ordering atomic operations
JP2011044077A (en) Image processing device
US10019776B2 (en) Techniques for maintaining atomicity and ordering for pixel shader operations

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20121106