JPH11154237A - Memory for texture mapping - Google Patents

Memory for texture mapping

Info

Publication number
JPH11154237A
JPH11154237A JP31943497A JP31943497A JPH11154237A JP H11154237 A JPH11154237 A JP H11154237A JP 31943497 A JP31943497 A JP 31943497A JP 31943497 A JP31943497 A JP 31943497A JP H11154237 A JPH11154237 A JP H11154237A
Authority
JP
Japan
Prior art keywords
memory
pattern data
data
texture
address
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
JP31943497A
Other languages
Japanese (ja)
Inventor
Yoshio Hirose
佳生 広瀬
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 JP31943497A priority Critical patent/JPH11154237A/en
Publication of JPH11154237A publication Critical patent/JPH11154237A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

PROBLEM TO BE SOLVED: To fast read data that is used for texture mapping from memory and to improve the processing performance of a three-dimensional graphic by dividing every other pattern data on each coordinate on a two-dimensional grit vertically and horizontally and separately storing them in four memory parts. SOLUTION: A memory controller 12 produces the addresses ad1 to ad4 of four pattern data which are located around a texture coordinate based on the texture coordinate on a two-dimensional grid coordinate to a pixel on a display. It accesses each memory macro 11a to 11d to simultaneously read the four neighborhood pattern data. An arithmetic unit 13 is accessed by the controller 12 and performs prescribed weight processing of each pattern data DT1 to DT4 which is simultaneously read from the macros 11a to 11d. It executes weighted means processing that calculates a mean value of acquired values and outputs it as texture data.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、テキスチャマッピ
ング用メモリ装置に関し、詳しくは、コンピュータグラ
フィックスの分野で所定の3次元表示されたパターンに
所望のテクスチャデータを貼り付ける際に用いられるテ
クスチャマッピング用のメモリ装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory device for texture mapping, and more particularly to a memory device for texture mapping used when pasting desired texture data to a predetermined three-dimensionally displayed pattern in the field of computer graphics. Memory device.

【0002】[0002]

【従来の技術】近年、CPUの性能向上や専用プロセッ
サの低価格化により、パソコンレベルでも3次元グラフ
ィックスが実現されるようになってきた。一般的に、コ
ンピュータグラフィックスにおいては、3次元データを
ポリゴン(三角形が用いられることが多い)の組み合わ
せで表現する。ここで、壁や床のような複雑な模様を少
ないポリゴンで表現するために、テクスチャマッピング
という技術が用いられている。例えば複雑な模様の描か
れた壁の輪郭を1つの四角形ポリゴン(あるいは2つの
三角形ポリゴン)で表現し、別に用意した壁模様の2次
元テクスチャのパターンデータ(以下、単にパターンデ
ータという)をそのポリゴン上に貼り付けることによ
り、複雑な模様の壁を表現している。
2. Description of the Related Art In recent years, three-dimensional graphics have been realized even at the personal computer level due to the improvement in performance of CPUs and the reduction in cost of dedicated processors. Generally, in computer graphics, three-dimensional data is represented by a combination of polygons (triangles are often used). Here, a technique called texture mapping is used to represent a complicated pattern such as a wall or a floor with a small number of polygons. For example, the outline of a wall on which a complicated pattern is drawn is represented by one quadrilateral polygon (or two triangular polygons), and the separately prepared two-dimensional texture pattern data of the wall pattern (hereinafter simply referred to as pattern data) is used as the polygon. By pasting it on top, it expresses a wall with a complicated pattern.

【0003】この場合、ディスプレイ上の壁の部分を構
成する画素の2次元テクスチャ上での座標(テクスチャ
座標)は、必ずしもパターンデータの2次元格子上の座
標に一致するとは限らない。そのため、対応する座標に
一番近い格子点のデータを用いるポイントサンプリング
や、近傍の4点のデータを重み付けして平均を計算する
バイリニアフィルタリングが使われている。
In this case, the coordinates (texture coordinates) of the pixels constituting the wall portion on the display on the two-dimensional texture do not always match the coordinates on the two-dimensional grid of the pattern data. Therefore, point sampling using the data of the lattice point closest to the corresponding coordinates, and bilinear filtering for calculating the average by weighting the data of the four nearby points are used.

【0004】さらに、高級な手法として、同じテクスチ
ャを有し、データ量が異なるパターンデータを複数用意
しておいて、データ量の大きさの順位が隣り合う2つの
パターンデータに対して近傍の4点ずつ、合計8個のデ
ータを抽出し、重み付けして平均を計算するトリリニア
フィルタリングが用いられることもある。従来のテキス
チャマッピングの手法について、図7及び図8を参照し
て説明する。
Further, as a high-level technique, a plurality of pattern data having the same texture and different data amounts are prepared, and the order of the magnitude of the data amount is smaller than that of two adjacent pattern data. Trilinear filtering may be used in which a total of eight data points are extracted and weighted to calculate an average. A conventional texture mapping method will be described with reference to FIGS.

【0005】図7(a)に示すように、ディスプレイ2
0上に表示された矩形の壁の輪郭(パターン)21に、
図7(b)に示すような任意の模様を貼り付ける場合に
ついて説明する。ここで、模様を貼り付けるパターン2
1はディスプレイ20上で3次元的(立体的)に表示さ
れているため、平行四辺形で表現されている。図7
(a)に示すように、ディスプレイ20上の画素22a
は、水平方向の走査線22に沿って存在するが、図7
(b)に示すように、パターンデータ30上では走査線
22に対応する斜めの直線31上の点31aとして取り
扱われる。なお、ディスプレイ20上での水平走査線2
2上の点は、1つ1つの画素を表し、パターンデータ3
0上での直線31上の丸は、それぞれの画素に対応する
座標を示している。
[0005] As shown in FIG.
0 on the outline (pattern) 21 of the rectangular wall displayed on
A case where an arbitrary pattern as shown in FIG. 7B is attached will be described. Here, pattern 2 to paste the pattern
Since 1 is displayed three-dimensionally (three-dimensionally) on the display 20, it is represented by a parallelogram. FIG.
As shown in FIG.
Are present along the horizontal scan line 22, but in FIG.
As shown in (b), on the pattern data 30, it is treated as a point 31a on an oblique straight line 31 corresponding to the scanning line 22. Note that the horizontal scanning line 2 on the display 20
2 represent each pixel, and the pattern data 3
Circles on a straight line 31 on 0 indicate coordinates corresponding to each pixel.

【0006】そして、パターンデータは、例えば図8
(a)に示すように、256画素×256画素の2次元
格子座標上のデータとして与えられるため、ディスプレ
イ20上の各画素に対応するパターンデータ上での座標
Pは、必ずしも格子点上に存在するとは限らず、ほとん
どの場合格子点間の中間座標に位置することになる。ポ
イントサンプリングの手法では、ディスプレイ20上で
の1つの画素22aに対応する座標Pに最も近い格子点
B1のデータをその画素22aのデータとして用いる。
The pattern data is, for example, as shown in FIG.
As shown in (a), since the data is given as data on a two-dimensional grid coordinate of 256 pixels × 256 pixels, the coordinate P on the pattern data corresponding to each pixel on the display 20 does not necessarily exist on a grid point. This is not always the case, and in most cases, it will be located at an intermediate coordinate between grid points. In the point sampling method, the data of the grid point B1 closest to the coordinate P corresponding to one pixel 22a on the display 20 is used as the data of the pixel 22a.

【0007】一方、バイリニアフィルタリングでは、パ
ターンデータ上での座標Pの近傍の4個の格子点A1、
B1、C1、D1のデータを抽出し、座標Pから各々の
格子点A1、B1、C1、D1までの距離で重み付け
し、これらの平均値をとったものをデータとして用い
る。また、トリリニアフィルタリングでは、図8(b)
に示すように、図8(a)に示した256画素×256
画素のパターンデータに加え、同一のテクスチャを有
し、半分の大きさに相当する128画素×128画素の
パターンデータを用意し、各々のパターンデータについ
て、上述したバイリニアフィルタリングと同様に、座標
Pの近傍の8個の格子点A1、B1、C1、D1及びa
1、b1、c1、d1のデータを抽出し、座標Pからの
距離で重み付けし、これらの平均値をデータとして用い
る。
On the other hand, in the bilinear filtering, four lattice points A1, near the coordinate P on the pattern data are used.
Data of B1, C1, and D1 are extracted, weighted by the distance from the coordinate P to each of the grid points A1, B1, C1, and D1, and an average of these values is used as data. In the trilinear filtering, FIG.
As shown in FIG. 8A, 256 pixels × 256 pixels shown in FIG.
In addition to the pixel pattern data, 128-pixel × 128-pixel pattern data having the same texture and half the size of the pixel data is prepared. Eight nearby grid points A1, B1, C1, D1, and a
The data of 1, b1, c1, and d1 are extracted, weighted by the distance from the coordinates P, and the average value of them is used as data.

【0008】[0008]

【発明が解決しようとする課題】上述した従来のテクス
チャマッピングによれば、パターンデータを格納したメ
モリから、ポイントサンプリングでは1つのデータだけ
を読み出す処理を実行するが、バイリニアフィルタリン
グでは4点、トリリニアフィルタリングでは8点のデー
タを毎回読み出さなければならない。
According to the above-described conventional texture mapping, only one data is read from the memory storing the pattern data in the point sampling, but four points are used in the bilinear filtering and the trilinear filtering is performed. Then, eight points of data must be read each time.

【0009】例えば、バイリニアフィルタリングの場
合、座標Pの近傍の4点のデータのうち、水平方向の2
点についてはアドレスが連続しているが、垂直方向につ
いてみると、アドレスは連続していない。アドレスが連
続していない2点であっても、データがメモリの同じペ
ージに存在していれば、4個の格子点のデータを高速で
読み出すことができるが、ページが異なっている場合に
は、各ページについてアクセスを実行することとなるた
め、読み出しに時間を要するという問題があった。
For example, in the case of bilinear filtering, of the data of four points near the coordinate P, two in the horizontal direction
Although the addresses are continuous for points, the addresses are not continuous in the vertical direction. Even if two addresses have non-consecutive addresses, the data at the four grid points can be read at high speed if the data exists on the same page of the memory, but if the pages are different, In addition, since access is performed for each page, there is a problem that it takes time to read.

【0010】また、アドレスが連続している2点であっ
ても、必ずしも同じページに存在しているとは限らず、
場合によっては、近傍の4点のデータがすべて異なるペ
ージに存在するということもあり、読み出し時間の増大
を招く問題があった。そこで、本発明は、上記問題点を
解決して、テクスチャマッピングで用いるデータをメモ
リから高速で読み出し、3次元グラフィックスの処理性
能の向上を図ることができるテクスチャマッピング用メ
モリ装置を提供することを目的とする。
[0010] Even if two addresses are consecutive, they do not always exist on the same page.
In some cases, all four neighboring data exist on different pages, and there is a problem that the reading time is increased. Accordingly, the present invention has been made to solve the above-mentioned problem, and to provide a texture mapping memory device capable of reading out data used in texture mapping from a memory at a high speed and improving the processing performance of three-dimensional graphics. Aim.

【0011】[0011]

【課題を解決するための手段】上記目的を達成するため
に、請求項1記載の発明は、2次元テクスチャのパター
ンデータを2次元格子上の座標(2m、2n)、(2m
+1、2n)、(2m、2n+1)及び(2m+1、2
n+1)(m、nは整数)毎に分類し、該分類種に対応
させて個別に格納する4個のメモリ部を有するメモリ手
段と、前記2次元格子上にない任意の画素座標に基づい
て、前記4個のメモリ部の各々に格納された、該任意の
画素座標の近傍に位置する4個の前記パターンデータの
アドレスを生成するメモリ制御手段と、前記4個のメモ
リ部から同時に読み出された各々のパターンデータに、
前記任意の画素座標からの距離に基づく重み付けを行
い、平均値を演算して、テクスチャデータとして出力す
る演算手段と、を具備することを特徴としている。
In order to achieve the above object, according to the first aspect of the present invention, pattern data of a two-dimensional texture is converted to coordinates (2m, 2n), (2m
+1 and 2n), (2m and 2n + 1) and (2m + 1 and 2
(n + 1) (m and n are integers) based on a memory means having four memory units for individually storing the classification types in correspondence with the classification types, and arbitrary pixel coordinates not on the two-dimensional grid. Memory control means for generating addresses of the four pattern data stored in the vicinity of the arbitrary pixel coordinates stored in each of the four memory units; and simultaneously reading out the addresses from the four memory units. To each of the pattern data
Calculating means for performing weighting based on a distance from the arbitrary pixel coordinates, calculating an average value, and outputting the calculated average value as texture data.

【0012】このようなテキスチャマッピング用メモリ
装置によれば、パターンデータを2次元格子上の座標毎
に、縦横方向に1点おきに分類して、4個のメモリ部に
個別に格納することにより、ディスプレイ上の画素に対
応する2次元格子座標上の画素座標に近接する4点のパ
ターンデータが必ず異なるメモリ部に格納されることと
なる。
According to such a memory device for texture mapping, the pattern data is classified every other point in the vertical and horizontal directions for each coordinate on the two-dimensional grid and stored separately in the four memory units. Thus, the pattern data of four points close to the pixel coordinates on the two-dimensional grid coordinates corresponding to the pixels on the display are always stored in different memory units.

【0013】そのため、バイリニアフィルタリングやト
リリニアフィルタリングのテクスチャデータの算出に必
要な、近傍4点或いは8点のパターンデータを異なるメ
モリ部から同時に読み出すことができる。したがって、
従来技術における同一のメモリ部から順次各点を読み出
す処理に比較して、極めて高速に所望のデータを抽出す
ることができ、テクスチャマッピングに係る処理時間を
短縮して、3次元グラフィックの処理能力を向上させる
ことができる。
Therefore, it is possible to simultaneously read pattern data of four or eight points in the vicinity necessary for calculating texture data of bilinear filtering or trilinear filtering from different memory units. Therefore,
Compared to the conventional technique of sequentially reading each point from the same memory unit, it is possible to extract desired data at a very high speed, shorten the processing time related to texture mapping, and increase the processing capability of three-dimensional graphics. Can be improved.

【0014】請求項2記載の発明は、請求項1記載のテ
クスチャマッピング用メモリ装置において、前記2次元
テクスチャのパターンデータは、同一のテクスチャにつ
いてデータ量の異なる複数のパターンデータ群を有し、
前記メモリ手段は、4個のメモリ部からなる組を2組有
するとともに、前記パターンデータ群の各パターンデー
タうち、前記データ量の大きい方から2x−1(xは自
然数)番目の前記パターンデータを第1組の4個のメモ
リ部に格納し、前記データ量の大きい方から2x番目の
前記パターンデータを第2組の4個のメモリ部に格納
し、前記メモリ制御手段は、前記2次元格子上にない任
意の画素が属するパターンの大きさ及び該画素座標に基
づいて、前記第1組及び第2組の4個のメモリ部に格納
された前記パターンデータを指定して、該任意の画素座
標の近傍に位置する各々4個の画素データのアドレスを
生成し、前記演算手段は、前記第1組及び第2組の4個
のメモリ部から同時に読み出された各々のパターンデー
タに、前記任意の画素座標からの距離に基づく重み付け
を行い、平均値を演算して、テクスチャデータとして出
力することを特徴としている。
According to a second aspect of the present invention, in the texture mapping memory device according to the first aspect, the two-dimensional texture pattern data includes a plurality of pattern data groups having different data amounts for the same texture.
The memory means has two sets of four memory units and, among the pattern data of the pattern data group, stores the 2x-1 (x is a natural number) pattern data from the larger data amount. A first set of four memory units; a 2x-th pattern data having a larger data amount being stored in a second set of four memory units; Designating the pattern data stored in the first and second sets of four memory units based on the size of the pattern to which an arbitrary pixel not located above and the pixel coordinates, and specifying the arbitrary pixel An address of each of four pixel data located in the vicinity of the coordinates is generated, and the arithmetic unit adds the address of each of the pattern data read simultaneously from the first and second sets of four memory units. Any picture Performs weighting based on the distance from the coordinates, and calculates the average value, it is characterized in that output as texture data.

【0015】このようなテキスチャマッピング用メモリ
装置によれば、データ量の異なる複数のパターンデータ
群を、複数のメモリ部を有する2組のメモリブロックの
各々にデータ量の順に交互に格納することにより、デー
タ量の順位が連続するパターンデータが必ず異なる組の
メモリブロックに格納されることとなる。そのため、ト
リリニアフィルタリングのテクスチャデータの算出に必
要な、近傍8点のパターンデータを異なるメモリブロッ
クのメモリ部から同時に読み出すことができる。
According to such a texture mapping memory device, a plurality of pattern data groups having different data amounts are alternately stored in two sets of memory blocks having a plurality of memory sections in the order of the data amount. , The pattern data in which the order of the data amount continues is always stored in different sets of memory blocks. Therefore, it is possible to simultaneously read the pattern data of eight neighboring points necessary for calculating the texture data of the trilinear filtering from the memory units of different memory blocks.

【0016】請求項3記載の発明は、請求項2記載のテ
キスチャマッピング用メモリ装置において、前記2次元
テクスチャのパターンデータは、異なるテクスチャにつ
いて前記パターンデータ群を複数有し、前記メモリ手段
は、前記パターンデータ群の各々の前記第1組及び第2
組の4個のメモリ部への格納に際し、最大のデータ量を
有する前記パターンデータの各々を、前記第1組及び第
2組の4個のメモリ部に交互に格納することを特徴とし
ている。
According to a third aspect of the present invention, in the texture mapping memory device according to the second aspect, the two-dimensional texture pattern data includes a plurality of the pattern data groups for different textures, and the memory means includes: The first set and the second set of each of the pattern data groups;
When storing in the four memory units of the set, each of the pattern data having the maximum data amount is alternately stored in the four memory units of the first set and the second set.

【0017】このようなテキスチャマッピング用メモリ
装置によれば、異なるテクスチャのパターンデータ群を
異なるメモリブロックに格納する際に、パターンデータ
群の各々について、最大のデータ量を有するパターンデ
ータを異なる組のメモリブロックに交互に格納すること
により、異なる組のメモリブロックの各々に最大のデー
タ量を有するパターンデータが格納されることとなる。
According to such a texture mapping memory device, when storing pattern data groups of different textures in different memory blocks, different sets of pattern data having the maximum data amount are stored for each of the pattern data groups. By alternately storing the data in the memory blocks, the pattern data having the maximum data amount is stored in each of the different sets of memory blocks.

【0018】そのため、各組のメモリブロックに格納さ
れるパターンデータのデータ量を均等化することがで
き、回路設計上の自由度を向上させることができるとと
もに、3次元グラフィックスの処理能力の向上を図るこ
とができる。請求項4記載の発明は、前記メモリ手段
は、請求項1、2又は3記載のテキスチャマッピング用
メモリ装置において、前記メモリ手段は、前記座標(2
m、2n)、(2m+1、2n)、(2m、2n+1)
及び(2m+1、2n+1)(m、nは整数)毎の4個
の前記パターンデータについて同一のアドレスを設定し
て前記4個のメモリ部に個別に格納し、前記メモリ制御
手段は、前記4個のパターンデータのアドレスに基づい
て、前記4個のパターンデータに隣接する他の4個のパ
ターンデータのアドレスを生成するインクリメント手段
と、前記4個のパターンデータのアドレス及び前記イン
クリメント部により生成されたアドレスから、前記4個
のメモリ部に格納された所定のパターンデータを読み出
すアドレスを設定するアドレス設定手段と、を有するこ
とを特徴としている。
Therefore, the amount of pattern data stored in each set of memory blocks can be equalized, the degree of freedom in circuit design can be improved, and the processing capability of three-dimensional graphics can be improved. Can be achieved. According to a fourth aspect of the present invention, in the texture mapping memory device according to the first, second, or third aspect, the memory means may store the coordinates (2
m, 2n), (2m + 1, 2n), (2m, 2n + 1)
And (2m + 1, 2n + 1) (m and n are integers), the same address is set for each of the four pattern data and individually stored in the four memory units. Incrementing means for generating addresses of the other four pattern data adjacent to the four pattern data based on the address of the pattern data, and the address of the four pattern data and the increment generated by the increment section. Address setting means for setting an address from which the predetermined pattern data stored in the four memory units is read from the address.

【0019】このようなテキスチャマッピング用メモリ
装置によれば、パターンデータを2次元格子上の座標毎
に4分割する際に、近接する4点毎に1領域として取り
扱い、同一のアドレスを設定して個別のメモリ部に格納
することにより、任意の領域についてのアドレスに基づ
いて近傍の領域に属するパターンデータのアドレスがイ
ンクリメントにより生成されることとなる。
According to such a memory device for texture mapping, when pattern data is divided into four parts for each coordinate on a two-dimensional lattice, four adjacent points are treated as one area, and the same address is set. By storing the pattern data in the individual memory unit, the address of the pattern data belonging to the neighboring area is generated by increment based on the address of the arbitrary area.

【0020】そのため、バイリニアフィルタリングやト
リリニアフィルタリングのテクスチャデータの算出に必
要な、近傍4点或いは8点のパターンデータを1つのア
ドレスにより指定して読み出すことができ、メモリ制御
手段の負担を軽減するとともに、配線占有領域の削減を
図ることができる。
Therefore, it is possible to specify and read out the pattern data of the neighboring four points or eight points necessary for the calculation of the texture data of the bilinear filtering or the trilinear filtering by one address, thereby reducing the load on the memory control means. Thus, the area occupied by the wiring can be reduced.

【0021】[0021]

【発明の実施の形態】以下に、本発明に係るテクスチャ
用メモリ装置について、実施例を示して説明する。本発
明のテクスチャマッピング用メモリ装置の第1の実施例
について、図1を参照して説明する。ここでは、本発明
をバイリニアフィルタリングに適用した場合について説
明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A texture memory device according to the present invention will be described below with reference to embodiments. A first embodiment of a texture mapping memory device according to the present invention will be described with reference to FIG. Here, a case where the present invention is applied to bilinear filtering will be described.

【0022】図1において、テクスチャマッピング用メ
モリ装置は、メモリ手段のメモリ部を構成するメモリマ
クロ11a〜11d、メモリ制御手段を構成するメモリ
制御装置12、演算手段を構成する演算装置13を有し
て構成されている。メモリマクロ11a〜11dは、メ
モリブロック11内に構成され、2次元格子座標上のパ
ターンデータを4つに分類し、各々を個別に格納するメ
モリ領域である。詳しくは、後述する。
In FIG. 1, the memory device for texture mapping has memory macros 11a to 11d forming a memory section of a memory means, a memory control device 12 forming a memory control means, and a calculation device 13 forming a calculation means. It is configured. The memory macros 11a to 11d are configured in the memory block 11 and are memory areas for classifying pattern data on two-dimensional grid coordinates into four groups and storing each of the four groups. Details will be described later.

【0023】メモリ制御装置12は、ディスプレイ上の
画素に対応する2次元格子座標上でのテクスチャ座標に
基づいて、その座標の近傍に位置する4点のパターンデ
ータのアドレスad1〜ad4を生成し、各メモリマク
ロ11a〜11dに対して、近傍の4点のパターンデー
タを同時に読み出すようにアクセスする。演算装置13
は、メモリ制御装置12によりアクセスされ、メモリマ
クロ11a〜11dから同時に読み出されたパターンデ
ータDT1〜DT4の各々について、所定の重み付け処
理を行い、得られた値の平均を算出する加重平均計算処
理を実行し、テクスチャデータとして出力する。
The memory control device 12 generates, based on texture coordinates on a two-dimensional grid coordinate corresponding to a pixel on the display, addresses ad1 to ad4 of pattern data of four points located near the coordinates, An access is made to each of the memory macros 11a to 11d so as to simultaneously read pattern data of four neighboring points. Arithmetic unit 13
Is a weighted average calculation process of performing a predetermined weighting process on each of the pattern data DT1 to DT4 accessed by the memory control device 12 and simultaneously read from the memory macros 11a to 11d, and calculating an average of the obtained values. And outputs it as texture data.

【0024】次に、2次元格子座標上のパターンデータ
の具体的な分類、格納方法について、図2を参照して説
明する。図2(a)に示すような2次元格子座標を有す
るパターンデータにおいて、任意の近接する4点(領域
R)に着目すると、各々の格子点A〜Dは、図2(b)
に示すように、格子座標(2m,2n)、(2m+1,
2n)、(2m,2n+1)及び(2m+1,2n+
1)に各々分類される(m、nは整数)。すなわち、2
次元格子座標上のデータは全て、上記4つの座標表示に
より分類される。なお、便宜上、格子点Aを○、格子点
Bを□、格子点Cを△、格子点Dを◎として表した。
Next, a specific classification and storage method of the pattern data on the two-dimensional grid coordinates will be described with reference to FIG. In pattern data having two-dimensional grid coordinates as shown in FIG. 2A, focusing on any four adjacent points (region R), each of the grid points A to D is shown in FIG.
, Grid coordinates (2m, 2n), (2m + 1,
2n), (2m, 2n + 1) and (2m + 1, 2n +
1) (m and n are integers). That is, 2
All the data on the dimensional grid coordinates are classified by the above four coordinate displays. For convenience, the lattice point A is represented by ○, the lattice point B is represented by □, the lattice point C is represented by Δ, and the lattice point D is represented by ◎.

【0025】そして、このように分類された格子点A
(2m,2n)のデータは、図1に示したメモリマクロ
11aに、また、格子点B(2m+1,2n)のデータ
はメモリマクロ11bに、格子点C(2m,2n+1)
のデータはメモリマクロ11cに、格子点D(2m+
1,2n+1)のデータはメモリマクロ11dに各々格
納される。
The grid points A thus classified
The data of (2m, 2n) is stored in the memory macro 11a shown in FIG. 1, the data of the grid point B (2m + 1, 2n) is stored in the memory macro 11b, and the grid point C (2m, 2n + 1).
Is stored in the memory macro 11c at the lattice point D (2m +
The data of (1, 2n + 1) are stored in the memory macro 11d.

【0026】このように、2次元テクスチャのパターン
データを1つのメモリ領域に格納するのではなく、x、
y方向ともに1点おきに分類して、座標(2m,2
n)、(2m+1,2n)、(2m,2n+1)、(2
m+1,2n+1)で表される格子点ごとに、データを
別々のメモリマクロ11a〜11dに格納することによ
り、テクスチャ座標P(p,q)の近傍4点A〜Dは、
必ず異なるメモリマクロ11a〜11dに格納されてい
ることになる。
As described above, instead of storing the pattern data of the two-dimensional texture in one memory area, x,
Classify every other point in the y direction, and set coordinates (2m, 2
n), (2m + 1, 2n), (2m, 2n + 1), (2
By storing data in separate memory macros 11a to 11d for each grid point represented by m + 1, 2n + 1), four points A to D near the texture coordinates P (p, q) are
They are always stored in different memory macros 11a to 11d.

【0027】したがって、メモリ制御装置12がテクス
チャ座標Pに基づいて、各メモリマクロ11a〜11d
に格納された近傍4点A〜Dのアドレスad1〜ad4
を生成してアクセスすることにより、該当するデータD
T1〜DT4を同時に読み出すことができるため、演算
装置13により高速にテクスチャデータの加算平均計算
処理を行うことができ、バイリニアフィルタリングによ
る3次元グラフィックスの処理性能を大幅に向上させる
ことができる。
Therefore, the memory control device 12 determines each of the memory macros 11a to 11d based on the texture coordinates P.
Addresses ad1 to ad4 of four neighboring points A to D stored in
By generating and accessing the corresponding data D
Since T1 to DT4 can be read at the same time, the arithmetic device 13 can perform the averaging calculation processing of the texture data at high speed, and the processing performance of three-dimensional graphics by bilinear filtering can be greatly improved.

【0028】なお、上述したバイリニアフィルタリング
処理を異なるデータ量を有する同一のテクスチャについ
て2回実行することにより、トリリニアフィルタリング
処理を実現することができる。この場合、従来のように
同一のメモリブロックから8点を順次抽出する処理に比
較して、4点づつ同時に抽出することができるため、大
幅に処理時間を短縮することができる。
By executing the above-described bilinear filtering processing twice for the same texture having different data amounts, the trilinear filtering processing can be realized. In this case, since four points can be extracted at the same time as compared with the conventional processing of sequentially extracting eight points from the same memory block, the processing time can be greatly reduced.

【0029】次に、本発明の第2の実施例について、図
3を参照して説明する。ここでは、本発明をトリリニア
フィルタリングに適用した場合について説明する。図3
において、テクスチャマッピング用メモリ装置は、メモ
リブロック11A内に構成されるメモリマクロ11a〜
11d、メモリブロック11B内に構成されるメモリマ
クロ11e〜11h、メモリ制御装置12、演算装置1
3を有して構成されている。
Next, a second embodiment of the present invention will be described with reference to FIG. Here, a case where the present invention is applied to trilinear filtering will be described. FIG.
In the above, the memory device for texture mapping includes the memory macros 11a to 11a configured in the memory block 11A.
11d, memory macros 11e to 11h configured in a memory block 11B, a memory control device 12, and an arithmetic device 1.
3.

【0030】メモリブロック11A及び11Bは、トリ
リニアフィルタリングのために用意された同一のテクス
チャを有し、データ量の異なる複数のパターンデータに
対して、データ量の大きいパターンデータから順に、上
述した第1の実施例と同様に、2次元格子点毎に4つに
分類して、メモリブロック11Aのメモリマクロ11a
〜11d及びメモリブロック11Bのメモリマクロ11
e〜11hに交互に格納する。
The memory blocks 11A and 11B have the same texture prepared for tri-linear filtering, and the above-described first data pattern is used for a plurality of pattern data having different data sizes in order from a pattern data having a larger data size. In the same manner as in the embodiment, the memory macro 11a of the memory block 11A is classified into four for each two-dimensional lattice point.
11d and the memory macro 11 of the memory block 11B
e to 11h are stored alternately.

【0031】メモリ制御装置12は、テクスチャ座標に
基づいて、その座標の近傍に位置する4点づつ、計8点
のパターンデータのアドレスを生成し、メモリマクロ1
1a〜11d、11e〜11hの各々に対してアクセス
する。演算装置13は、メモリ制御装置12によりアク
セスされ、メモリマクロ11a〜11d、11e〜11
hから読み出された8個のパターンデータの各々につい
て、所定の重み付け処理を行い、得られた値の平均を算
出する加重平均計算処理を実行し、テクスチャデータと
して出力する。
Based on the texture coordinates, the memory control unit 12 generates a total of eight pattern data addresses for each of four points located in the vicinity of the coordinates, and generates the memory macro 1
Access is made to each of 1a to 11d and 11e to 11h. The arithmetic unit 13 is accessed by the memory control unit 12 and includes memory macros 11a to 11d and 11e to 11e.
A predetermined weighting process is performed on each of the eight pieces of pattern data read from h, a weighted average calculation process for calculating an average of the obtained values is performed, and the resultant is output as texture data.

【0032】次に、本実施例におけるパターンデータの
具体的な格納方法について、図4を参照して説明する。
通常、メモリブロックに格納されるパターンデータとし
ては、図4に示すように、256画素×256画素程度
のパターンを最大に、128画素×128画素、64画
素×64画素といった2n画素×2n画素の大ききのパタ
ーンデータが用意されている。
Next, a specific method of storing pattern data in this embodiment will be described with reference to FIG.
Normally, as shown in FIG. 4, the pattern data stored in the memory block has a pattern of about 256 pixels × 256 pixels at the maximum, and a pattern of 2n pixels × 2n pixels such as 128 pixels × 128 pixels and 64 pixels × 64 pixels. Large pattern data is prepared.

【0033】本実施例では、例えば、256画素×25
6画素のパターンデータは、メモリブロック11Aのメ
モリマクロ11a〜11dに4分類されて格納され、1
28画素×128画素のパターンデータは、メモリブロ
ック11Bのメモリマクロ11e〜11hに4分類され
て格納され、また、64画素×64画素のパターンデー
タは、メモリブロック11Aのメモリマクロ11a〜1
1dに4分類されて格納され、32画素×32画素のパ
ターンデータは、メモリブロック11Bのメモリマクロ
11e〜11hに4分類されて格納される。
In this embodiment, for example, 256 pixels × 25
The pattern data of the six pixels is classified into four and stored in the memory macros 11a to 11d of the memory block 11A.
The pattern data of 28 pixels × 128 pixels are classified into four and stored in the memory macros 11e to 11h of the memory block 11B, and the pattern data of 64 pixels × 64 pixels are stored in the memory macros 11a to 11h of the memory block 11A.
The pattern data of 32 pixels × 32 pixels is stored in the memory macros 11e to 11h of the memory block 11B in four classes.

【0034】そして、トリリニアフィルタリングを実行
する際に、ディスプレイ上のパターン(壁の輪郭)の大
きさに基づいて、大きさの近いパターンデータが選ばれ
る。このとき選ばれる2つのパターンデータは、例え
ば、256画素×256画素及び128画素×128画
素のように、その大ききの順位が隣り合うため、必ずメ
モリブロック11A、11Bの双方に別れて格納される
こととなる。
When executing the trilinear filtering, pattern data having a similar size is selected based on the size of the pattern (wall outline) on the display. The two pattern data selected at this time are always stored separately in both of the memory blocks 11A and 11B because their large order is adjacent, for example, 256 pixels × 256 pixels and 128 pixels × 128 pixels. The Rukoto.

【0035】したがって、メモリ制御装置12が生成す
るテクスチャ座標の近傍の8点のアドレスにより、各々
異なるメモリブロック11A及び11Bから個別に4点
づつ、計8点のパターンデータを同時に読み出すことが
できる。そのため、高速でテクスチャデータの抽出、算
出処理を行うことができ、トリリニアフィルタリング手
法による3次元グラフィックスの処理性能を大幅に向上
させることができる。
Therefore, by using the addresses of eight points near the texture coordinates generated by the memory control device 12, it is possible to simultaneously read out a total of eight points of pattern data, four points individually from different memory blocks 11A and 11B. Therefore, the extraction and calculation processing of the texture data can be performed at high speed, and the processing performance of three-dimensional graphics by the trilinear filtering method can be greatly improved.

【0036】次に、上述した第2の実施例におけるメモ
リブロックの大きさの均等化について説明する。一般
に、テクスチャマッビングにおいては、貼り付けるパタ
ーンデータを複数種類用意するが、各々のバターンデー
タの大きさによってメモリに要求される容量が大きく異
なる。例えば、上述した第2の実施例のパターンデータ
の格納方法、すなわち、データ量の大きさの順にメモリ
ブロック11A及び11Bに交互に格納する構成におい
ては、メモリブロックに要求されるメモリ容量、すなわ
ち、占有面積に4倍の差が生じることになる。
Next, the equalization of the sizes of the memory blocks in the second embodiment will be described. Generally, in texture mapping, a plurality of types of pattern data to be pasted are prepared, but the required capacity of the memory greatly differs depending on the size of each pattern data. For example, in the pattern data storage method of the second embodiment described above, that is, in a configuration in which data is alternately stored in the memory blocks 11A and 11B in the order of the data amount, the memory capacity required for the memory block, that is, The occupied area will be four times different.

【0037】そこで、複数種類用意されたパターンデー
タについて、最初のパターンデータについては、上述し
た第2の実施例のように、256画素×256画素及び
64画素×64画素のパターンデータを、メモリブロッ
ク11Aに4分類して格納し、128画素×128画素
及び32画素×32画素のパターンデータを、メモリブ
ロック11Bに4分類して格納する。次のパターンデー
タについては、上記とは逆に、例えば、256画素×2
56画素及び64画素×64画素のパターンデータを、
メモリブロック11Bに4分類して格納し、128画素
×128画素及び32画素×32画素のパターンデータ
を、メモリブロック11Aに4分類して格納する。
Therefore, as to the first pattern data of the plurality of types of prepared pattern data, the pattern data of 256 pixels × 256 pixels and 64 pixels × 64 pixels is stored in the memory block as in the second embodiment. Pattern data of 128 pixels × 128 pixels and pattern data of 32 pixels × 32 pixels are stored in the memory block 11B in four categories. For the next pattern data, for example, 256 pixels × 2
The pattern data of 56 pixels and 64 pixels × 64 pixels is
The pattern data of 128 pixels × 128 pixels and the pattern data of 32 pixels × 32 pixels are stored in the memory block 11A by classifying them into four types.

【0038】このように、異なるパターンデータ毎にメ
モリブロック11A及び11Bへの格納の優先順位を交
互に変換することにより、メモリブロック11A及び1
1B相互のメモリ使用量の差を最小化することができ
る。すなわち、このようなパターンデータの格納方法に
より、メモリブロックの占有面積を均一化することがで
きるため、回路設計上のレイアウトの自由度を向上させ
ることができるとともに、配線遅延に伴うデータの読み
出し速度のばらつきを防止することができる。
As described above, the priority of storage in the memory blocks 11A and 11B is alternately converted for each of the different pattern data, whereby the memory blocks 11A and 1B are converted.
It is possible to minimize the difference in memory usage between 1B. That is, such a method of storing pattern data makes it possible to equalize the area occupied by the memory blocks, so that the degree of freedom in layout in circuit design can be improved and the data reading speed due to wiring delay can be improved. Can be prevented.

【0039】次に、本発明の第3の実施例について、図
5を参照して説明する。なお、上述した実施例と同等の
構成については、同一の符号を付して、その説明を省略
する。図5において、テクスチャマッピング用メモリ装
置は、メモリマクロ11a〜11d、メモリ制御装置1
2、演算装置13に加え、インクリメント手段を構成す
るインクリメント処理部14a〜14c、アドレス設定
手段を構成するセレクタ15a〜15cを有して構成さ
れている。
Next, a third embodiment of the present invention will be described with reference to FIG. In addition, about the structure equivalent to the above-mentioned Example, the same code | symbol is attached | subjected and the description is abbreviate | omitted. In FIG. 5, the memory device for texture mapping includes memory macros 11a to 11d and a memory control device 1.
2. In addition to the arithmetic unit 13, it is configured to include increment processing units 14a to 14c forming an increment unit and selectors 15a to 15c forming an address setting unit.

【0040】メモリマクロ11a〜11dは、上述した
実施例と同等の構成を有し、2次元格子座標上のパター
ンデータを4つに分類し、各々を個別に格納する。メモ
リ制御装置12は、テクスチャ座標に基づいて、その座
標の近傍に位置する4点のパターンデータに関する単一
のアドレスNを生成するとともに、後述するインクリメ
ント処理部14a〜14c及びセレクタ15a〜15c
における動作処理を制御するインクリメント値M及び制
御信号Sを出力する。
Each of the memory macros 11a to 11d has the same configuration as that of the above-described embodiment, classifies the pattern data on the two-dimensional grid coordinates into four, and stores each of them individually. Based on the texture coordinates, the memory control device 12 generates a single address N for the pattern data of four points located near the coordinates, and increments processing units 14a to 14c and selectors 15a to 15c to be described later.
Output an increment value M and a control signal S for controlling the operation processing in.

【0041】演算装置13は、メモリマクロ11a〜1
1dから同時に読み出されたパターンデータDT1〜D
T4の各々について、加重平均計算処理を実行し、テク
スチャデータとして出力する。インクリメント処理部1
4a〜14cは、メモリ制御装置12により生成、出力
される単一のアドレスN及びインクリメント値Mに基づ
いて、各メモリマクロ11a〜11dへのアドレスN、
N+1、N+M、N+M+1を生成する。具体的には、
インクリメント処理部14aはアドレスNに対してM+
1番地、インクリメント処理部14bはアドレスNに対
してM番地、インクリメント処理部14cはアドレスN
に対して1番地インクリメントする処理を実行する。
The arithmetic unit 13 has memory macros 11a-1
1d, the pattern data DT1 to DT read simultaneously.
For each of T4, a weighted average calculation process is performed and output as texture data. Increment processing unit 1
4a to 14c are addresses N to each of the memory macros 11a to 11d based on a single address N and an increment value M generated and output by the memory control device 12.
Generate N + 1, N + M, N + M + 1. In particular,
The increment processing unit 14a calculates M +
The address 1, the increment processing unit 14b uses the address M for the address N, and the increment processing unit 14c uses the address N
Is executed for the address.

【0042】セレクタ15a〜15cは、メモリ制御装
置12から出力される制御信号Sに基づいて、メモリ制
御装置12及びインクリメント処理部14a〜14cに
より生成されたアドレスN、N+1、N+M、N+M+
1から、所望の近傍4点のパターンデータを指定するア
ドレスを選択、設定する。具体的には、セレクタ15a
はアドレスN、N+1、N+M及びN+M+1、セレク
タ15bはアドレスN及びN+M、セレクタ15cはア
ドレスN及びN+1から制御信号Sに基づいて、いずれ
かを選択し、メモリマクロ11b〜11dの各々に設定
する。なお、メモリマクロ11dにはアドレスNのみが
設定される。
The selectors 15a to 15c are configured to control the addresses N, N + 1, N + M, N + M + generated by the memory control device 12 and the increment processing units 14a to 14c based on the control signal S output from the memory control device 12.
From 1, an address for designating pattern data of desired four neighboring points is selected and set. Specifically, the selector 15a
Is selected from the addresses N, N + 1, N + M and N + M + 1, the selector 15b selects one of the addresses N and N + M based on the address N and N + 1 based on the control signal S, and sets the selected one in each of the memory macros 11b to 11d. Note that only the address N is set in the memory macro 11d.

【0043】次に、本実施例におけるパターンデータの
格納方法について、図6を参照して説明する。本実施例
においては、図6に示すように、テクスチャ座標系での
各々の格子点のパターンデータに対して、x方向にスキ
ャンしながら座標系の左上から右下方向に向かうよう
に、メモリマクロ11a〜11dに個別に格納する。
Next, a method of storing pattern data in this embodiment will be described with reference to FIG. In the present embodiment, as shown in FIG. 6, the memory macro scans the pattern data of each grid point in the texture coordinate system from the upper left to the lower right of the coordinate system while scanning in the x direction. 11a to 11d.

【0044】このとき、領域R(N)に属する4個の格
子点A1〜D1のデータは、各々異なるメモリマクロ1
1a〜11dに格納され、これらのデータが格納される
各々のメモリマクロ11a〜11dのアドレスを同一の
番地Nに設定する。同様に、領域R(N)の図6中右
隣、すなわちx方向に1領域分ずれた領域R(N+1)
に属する格子点A2〜D2のアドレスを(N+1)番地
に設定する。なお、1つの格子点のデータを格納するの
にP番地分のアドレスが必要とする場合には、右隣の格
子点のアドレスは(N+P)番地になる。
At this time, the data of the four grid points A1 to D1 belonging to the region R (N) are stored in different memory macros 1
The address of each of the memory macros 11a to 11d stored in 1a to 11d and storing these data is set to the same address N. Similarly, the region R (N + 1) adjacent to the right of the region R (N) in FIG. 6, that is, one region shifted in the x direction.
Are set to addresses (N + 1) of the lattice points A2 to D2 belonging to. When an address for address P is required to store data of one grid point, the address of the grid point on the right is (N + P).

【0045】また、パターンデータの大きさを2M画素
×2M画素とすると、1つのメモリアレイが1行分の2
M画素のうち、半分のM画素のデータを格納することに
なるので、領域R(N)の図6中下隣、すなわちy方向
に1領域分ずれた領域R(N+M)に属する格子点E1
〜H1のアドレスは(N+M)番地に設定される。さら
に、領域R(N+M)の右隣に1領域分ずれた領域(N
+M+1)に属する格子点E2〜H2のアドレスは(N
+M+1)番地に設定される。
If the size of the pattern data is 2M pixels × 2M pixels, one memory array can store 2 rows of 2M pixels.
Since data of half of M pixels among the M pixels is stored, the grid point E1 belonging to the region R (N + M) adjacent to the region R (N) in FIG.
The addresses H1 to H1 are set to the address (N + M). Further, a region (N) shifted by one region to the right of the region R (N + M)
The addresses of grid points E2 to H2 belonging to (+ M + 1) are (N
+ M + 1) is set.

【0046】そのため、ディスプレイ上の画素に対応す
るテクスチャ座標が、の領域、すなわち領域R1内に
ある場合には、近傍の4個の格子点はA1、B1、C
1、D1となるため、メモリ制御装置12からインクリ
メント処理部14a〜14c及びセレクタ14a〜15
cを介して、4つのメモリマクロ11a〜11dに供給
されるアドレスはすべてN番地となる。
Therefore, when the texture coordinates corresponding to the pixel on the display are in the region, that is, in the region R1, the four neighboring grid points are A1, B1, and C.
1 and D1, so that the memory controller 12 sends the increment processing units 14a to 14c and the selectors 14a to 15
The addresses supplied to the four memory macros 11a to 11d via c are all N addresses.

【0047】また、テクスチャ座標が、の領域内にあ
る場合には、近傍の4個の格子点は領域(N)のB1、
D1及び領域(N+1)のA2、C2となるため、メモ
リマクロ11bと11dに供給されるアドレスはN番
地、メモリマクロ11aと11cに供給されるアドレス
は(N+1)番地となる。そして、テクスチャ座標が、
の領域にある場合には、近傍の4個の格子点は領域
(N)のC1、D1及び領域(N+M)のE1、F1と
なるため、メモリマクロ11cと11dに供給されるア
ドレスはN番地、メモリマクロ11aと11bに供給さ
れるアドレスは(N+M)番地となる。
When the texture coordinates are within the area of the area (N), the four neighboring grid points are B1 and B2 of the area (N).
Since D1 and A2 and C2 in the area (N + 1) are used, the address supplied to the memory macros 11b and 11d is N, and the address supplied to the memory macros 11a and 11c is (N + 1). And the texture coordinates are
, The four neighboring grid points are C1 and D1 in the area (N) and E1 and F1 in the area (N + M), so that the addresses supplied to the memory macros 11c and 11d are N. The addresses supplied to the memory macros 11a and 11b are (N + M).

【0048】さらに、テクスチャ座標が、の領域にあ
る場合には、近傍の4個の格子点は領域(N)のD1、
領域(N+1)のC2、領域(N+M)のF1及び領域
(N+M+1)のE2となるため、メモリマクロ11a
に(N+M+1)番地、メモリマクロ11bに(N+
M)番地、メモリマクロ11cに(N+1)番地、メモ
リマクロ11dにN番地が供給される。
Further, when the texture coordinates are in the region of, the four neighboring grid points are D1 and D1 of the region (N).
Since C2 in the area (N + 1), F1 in the area (N + M) and E2 in the area (N + M + 1), the memory macro 11a
Address (N + M + 1), and (N + M + 1) in the memory macro 11b.
Address M), address (N + 1) is supplied to the memory macro 11c, and address N is supplied to the memory macro 11d.

【0049】すなわち、メモリ制御装置12は、ディス
プレイ上の画素に対応するテクスチャ座標に基づいて、
基準となる領域R(N)の番地Nをアドレスとして生
成、出力し、インクリメント処理部14a〜14cは、
メモリ制御装置12から出力されるインクリメント値M
に基づいて、アドレスNに対して(+1)、(+M)、
(+M+1)のインクリメント処理を実行し、隣り合う
領域R(N+1)、R(N+M)、R(N+M+1)に
属する格子点のアドレスを生成する。
That is, the memory control device 12 calculates the texture coordinates based on the texture coordinates corresponding to the pixels on the display.
The address N of the reference region R (N) is generated and output as an address, and the increment processing units 14a to 14c
Increment value M output from memory control device 12
, (+1), (+ M),
An increment process of (+ M + 1) is performed to generate addresses of grid points belonging to adjacent regions R (N + 1), R (N + M), and R (N + M + 1).

【0050】そして、セレクタ15a〜15cは、テク
スチャ座標が存在する領域に基づいて生成される制御信
号Sにより、アドレスN及びインクリメント部により生
成されるアドレス(N+1)、(N+M)、(N+M+
1)から、テクスチャ座標が存在する領域に属する4個
の格子点を指定するアドレスを選択、設定する。このよ
うに、メモリ制御装置12により、テクスチャ座標近傍
の4点全てのアドレスを出力するのではなく、4点の格
子点が属する領域単位で同一のアドレスを設定し、その
データが格納されているメモリマクロを指定する2ビッ
トの制御信号Sと、パターンデータの大ききを示す信号
(インクリメント値)Mとを出力することにより、メモ
リマクロの所望のアドレスが指定される。
The selectors 15a to 15c control the address N and the addresses (N + 1), (N + M), (N + M +) generated by the increment unit by the control signal S generated based on the area where the texture coordinates exist.
From 1), an address for designating four grid points belonging to the area where the texture coordinates exist is selected and set. In this way, the memory controller 12 does not output the addresses of all four points near the texture coordinates, but sets the same address for each area to which the four grid points belong, and stores the data. By outputting a 2-bit control signal S for specifying the memory macro and a signal (increment value) M indicating the size of the pattern data, a desired address of the memory macro is specified.

【0051】そのため、上述した第1、第2の実施例の
構成においては、メモリ制御装置12が、各メモリマク
ロ11a〜11dに格納されたパターンデータを読み出
す際に、4又は8個のアドレスを個別に生成する必要が
あるのに対して、本実施例では、メモリ制御装置12は
単一のアドレスN、インクリメント値M及び制御信号S
のみを生成、出力するだけでよいため、メモリ制御装置
12の処理動作上の負担を軽減することができる。
Therefore, in the configuration of the first and second embodiments described above, when the memory control device 12 reads out the pattern data stored in each of the memory macros 11a to 11d, four or eight addresses are read. In this embodiment, the memory controller 12 has a single address N, an increment value M, and a control signal S.
Since it is only necessary to generate and output only the data, the load on the processing operation of the memory control device 12 can be reduced.

【0052】また、テクスチャメモリは、通常2n画素
×2n画素で構成されているので、メモリ制御装置12
から出力するアドレスNに、例えばM(=2n-1)を加
える場合、加算器を用いる必要はなく、最下位ビットか
らnビット目に1を加算するというインクリメント処理
を実行するだけで容易に実現することができる。なお、
テクスチャデータを格納するメモリブロックのメモリ容
量は、全体で数MBにもなることがあり、従来は汎用の
DRAMを画像処理装置の外部に接続する構成を採用せ
ざるを得なかったが、近年大容量のDRAMメモリをマ
クロとしてロジック回路とともに混載したチップ上に搭
載できるようになっている。そのため、上述した本発明
のテクスチャメモリとその制御回路を同一チップ上に搭
載した構成として用いることもできる。
Since the texture memory is usually composed of 2 n pixels × 2 n pixels, the memory controller 12
When adding, for example, M (= 2 n-1 ) to the address N output from the, it is not necessary to use an adder, and simply by executing an increment process of adding 1 to the nth bit from the least significant bit. Can be realized. In addition,
The memory capacity of a memory block for storing texture data may be as large as several MB in total, and in the past, a configuration in which a general-purpose DRAM was connected to the outside of the image processing apparatus had to be adopted. A DRAM memory having a large capacity can be mounted as a macro on a chip on which a logic circuit is mounted together. Therefore, the above-described texture memory of the present invention and its control circuit can be used as a configuration mounted on the same chip.

【0053】[0053]

【発明の効果】以上説明したように、請求項1記載のテ
キスチャマッピング用メモリ装置によれば、パターンデ
ータを2次元格子上の座標毎に、縦横方向に1点おきに
分類して、4個のメモリ部に個別に格納することによ
り、ディスプレイ上の画素に対応する2次元格子座標上
の画素座標に近接する4点のパターンデータが必ず異な
るメモリ部に格納されることとなる。
As described above, according to the memory device for texture mapping according to the first aspect, pattern data is classified into every other point in the vertical and horizontal directions for each coordinate on the two-dimensional lattice, and four patterns are classified. , The pattern data of the four points close to the pixel coordinates on the two-dimensional grid coordinates corresponding to the pixels on the display are always stored in different memory units.

【0054】そのため、バイリニアフィルタリングやト
リリニアフィルタリングのテクスチャデータの算出に必
要な、近傍4点或いは8点のパターンデータを異なるメ
モリ部から同時に読み出すことができる。したがって、
従来技術における同一のメモリ部から順次各点を読み出
す処理に比較して、極めて高速に所望のデータを抽出す
ることができ、テクスチャマッピングに係る処理時間を
短縮して、3次元グラフィックの処理能力を向上させる
ことができる。
Therefore, it is possible to simultaneously read pattern data at four or eight points in the vicinity necessary for calculating texture data of bilinear filtering or trilinear filtering from different memory units. Therefore,
Compared to the conventional technique of sequentially reading each point from the same memory unit, it is possible to extract desired data at a very high speed, shorten the processing time related to texture mapping, and increase the processing capability of three-dimensional graphics. Can be improved.

【0055】また、請求項2記載のテキスチャマッピン
グ用メモリ装置によれば、データ量の異なる複数のパタ
ーンデータ群を、複数のメモリ部を有する2組のメモリ
ブロックの各々にデータ量の順に交互に格納することに
より、データ量の順位が連続するパターンデータが必ず
異なる組のメモリブロックに格納されることとなる。そ
のため、トリリニアフィルタリングのテクスチャデータ
の算出に必要な、近傍8点のパターンデータを異なるメ
モリブロックのメモリ部から同時に読み出すことができ
る。
According to the texture mapping memory device of the present invention, a plurality of pattern data groups having different data amounts are alternately arranged in each of two sets of memory blocks having a plurality of memory sections in the order of the data amount. By storing the pattern data, pattern data having a continuous data amount order is always stored in a different set of memory blocks. Therefore, it is possible to simultaneously read the pattern data of eight neighboring points necessary for calculating the texture data of the trilinear filtering from the memory units of different memory blocks.

【0056】請求項3記載のテキスチャマッピング用メ
モリ装置によれば、異なるテクスチャのパターンデータ
群を異なるメモリブロックに格納する際に、パターンデ
ータ群の各々について、最大のデータ量を有するパター
ンデータを異なる組のメモリブロックに交互に格納する
ことにより、異なる組のメモリブロックの各々に最大の
データ量を有するパターンデータが格納されることとな
る。
According to the memory device for texture mapping of the present invention, when storing pattern data groups of different textures in different memory blocks, the pattern data having the maximum data amount differs for each of the pattern data groups. By alternately storing data in the set of memory blocks, pattern data having the maximum data amount is stored in each of the different sets of memory blocks.

【0057】そのため、各組のメモリブロックに格納さ
れるパターンデータのデータ量を均等化することがで
き、回路設計上の自由度を向上させることができるとと
もに、3次元グラフィックスの処理能力の向上を図るこ
とができる。そして、請求項4記載のテキスチャマッピ
ング用メモリ装置によれば、パターンデータを2次元格
子上の座標毎に4分割する際に、近接する4点毎に1領
域として取り扱い、同一のアドレスを設定して個別のメ
モリ部に格納することにより、任意の領域についてのア
ドレスに基づいて近傍の領域に属するパターンデータの
アドレスがインクリメントにより生成されることとな
る。
Therefore, the amount of pattern data stored in each set of memory blocks can be equalized, the degree of freedom in circuit design can be improved, and the processing capability of three-dimensional graphics can be improved. Can be achieved. According to the texture mapping memory device of the fourth aspect, when pattern data is divided into four parts for each coordinate on a two-dimensional grid, four adjacent points are treated as one area and the same address is set. Thus, the address of the pattern data belonging to the neighboring area is generated by increment based on the address of the arbitrary area by storing the data in the individual memory unit.

【0058】そのため、バイリニアフィルタリングやト
リリニアフィルタリングのテクスチャデータの算出に必
要な、近傍4点或いは8点のパターンデータを1つのア
ドレスにより指定して読み出すことができ、メモリ制御
手段の負担を軽減するとともに、配線占有領域の削減を
図ることができる。
Therefore, it is possible to specify and read out the pattern data of four or eight points in the vicinity necessary for calculating the texture data of the bilinear filtering or the trilinear filtering by one address, thereby reducing the load on the memory control means. Thus, the area occupied by the wiring can be reduced.

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

【図1】本発明に係るテクスチャマッピング用メモリ装
置の第1の実施例を示すブロック図である。
FIG. 1 is a block diagram showing a first embodiment of a texture mapping memory device according to the present invention.

【図2】本発明に係るメモリ装置へのデータの格納形式
を示す概念図である。
FIG. 2 is a conceptual diagram showing a storage format of data in a memory device according to the present invention.

【図3】本発明の第2の実施例を示すブロック図であ
る。
FIG. 3 is a block diagram showing a second embodiment of the present invention.

【図4】第2の実施例におけるメモリブロックに格納さ
れるパターンデータのデータ量を示す概念図である。
FIG. 4 is a conceptual diagram illustrating a data amount of pattern data stored in a memory block according to a second embodiment.

【図5】本発明の第3の実施例を示すブロック図であ
る。
FIG. 5 is a block diagram showing a third embodiment of the present invention.

【図6】第3の実施例におけるパターンデータの領域及
びアドレスの設定方法を示す概念図である。
FIG. 6 is a conceptual diagram showing a method of setting an area and an address of pattern data in a third embodiment.

【図7】テクスチャマッピングの概念(その1)を示す
図である。
FIG. 7 is a diagram illustrating a concept (part 1) of texture mapping.

【図8】テクスチャマッピングの概念(その2)を示す
図である。
FIG. 8 is a diagram illustrating a concept (part 2) of texture mapping.

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

11、11A、11B メモリブロック 11a〜11h メモリマクロ 12 メモリ制御装置 13 演算装置 14a〜14c インクリメント処理部 15a〜15c セレクタ 20 ディスプレイ 21 パターン 22 走査線 22a ディスプレイ上の画素 30 パターンデータ 31 パターンデータ上の走査線 31a パターンデータ上の画素 11, 11A, 11B Memory block 11a to 11h Memory macro 12 Memory controller 13 Arithmetic unit 14a to 14c Increment processing unit 15a to 15c Selector 20 Display 21 Pattern 22 Scan line 22a Pixel 30 on display 30 Pattern data 31 Scan on pattern data Line 31a Pixel on pattern data

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】2次元テクスチャのパターンデータを2次
元格子上の座標(2m、2n)、(2m+1、2n)、
(2m、2n+1)及び(2m+1、2n+1)(m、
nは整数)毎に分類し、該分類種に対応させて個別に格
納する4個のメモリ部を有するメモリ手段と、 前記2次元格子上にない任意の画素座標に基づいて、前
記4個のメモリ部の各々に格納された、該任意の画素座
標の近傍に位置する4個の前記パターンデータのアドレ
スを生成するメモリ制御手段と、 前記4個のメモリ部から同時に読み出された各々のパタ
ーンデータに、前記任意の画素座標からの距離に基づく
重み付けを行い、平均値を演算して、テクスチャデータ
として出力する演算手段と、を具備することを特徴とす
るテクスチャマッピング用メモリ装置。
1. Pattern data of a two-dimensional texture is represented by coordinates (2m, 2n), (2m + 1, 2n) on a two-dimensional grid,
(2m, 2n + 1) and (2m + 1, 2n + 1) (m,
(n is an integer), and a memory means having four memory units for individually storing the classified data corresponding to the classification type; and the four memory units based on arbitrary pixel coordinates not on the two-dimensional grid. Memory control means for generating addresses of the four pattern data stored in the vicinity of the arbitrary pixel coordinates stored in each of the memory units; and each of the patterns simultaneously read from the four memory units A memory means for weighting data based on a distance from the arbitrary pixel coordinates, calculating an average value, and outputting the average value as texture data.
【請求項2】前記2次元テクスチャのパターンデータ
は、同一のテクスチャについてデータ量の異なる複数の
パターンデータ群を有し、 前記メモリ手段は、4個のメモリ部からなる組を2組有
するとともに、前記パターンデータ群の各パターンデー
タうち、前記データ量の大きい方から2x−1(xは自
然数)番目の前記パターンデータを第1組の4個のメモ
リ部に格納し、前記データ量の大きい方から2x番目の
前記パターンデータを第2組の4個のメモリ部に格納
し、 前記メモリ制御手段は、前記2次元格子上にない任意の
画素が属するパターンの大きさ及び該画素座標に基づい
て、前記第1組及び第2組の4個のメモリ部に格納され
た前記パターンデータを指定して、該任意の画素座標の
近傍に位置する各々4個の画素データのアドレスを生成
し、 前記演算手段は、前記第1組及び第2組の4個のメモリ
部から同時に読み出された各々のパターンデータに、前
記任意の画素座標からの距離に基づく重み付けを行い、
平均値を演算して、テクスチャデータとして出力するこ
とを特徴とする請求項1記載のテクスチャマッピング用
メモリ装置。
2. The pattern data of the two-dimensional texture has a plurality of pattern data groups having different data amounts for the same texture, and the memory means has two sets of four memory units, Of the pattern data in the pattern data group, the 2x-1 (x is a natural number) pattern data from the larger data amount is stored in a first set of four memory units, and the larger data amount is stored in the first set of four memory units. And the 2x-th pattern data is stored in a second set of four memory units, and the memory control unit calculates the pattern data based on the size of the pattern to which an arbitrary pixel not on the two-dimensional grid belongs and the pixel coordinates. , The pattern data stored in the first and second sets of four memory units are designated, and the address of each of the four pixel data located near the arbitrary pixel coordinates is specified. Generates a scan, said computing means, said first set and each of the pattern data read simultaneously from the second set of four memory section performs weighting based on the distance from the arbitrary pixel coordinates,
2. The texture mapping memory device according to claim 1, wherein an average value is calculated and output as texture data.
【請求項3】前記2次元テクスチャのパターンデータ
は、異なるテクスチャについて前記パターンデータ群を
複数有し、 前記メモリ手段は、前記パターンデータ群の各々の前記
第1組及び第2組の4個のメモリ部への格納に際し、最
大のデータ量を有する前記パターンデータの各々を、前
記第1組及び第2組の4個のメモリ部に交互に格納する
ことを特徴とする請求項2記載のテキスチャマッピング
用メモリ装置。
3. The pattern data of the two-dimensional texture includes a plurality of pattern data groups for different textures, and the memory means includes a first set and a second set of four pattern data groups. 3. The texture according to claim 2, wherein, when storing the pattern data in the memory unit, each of the pattern data having the maximum data amount is alternately stored in the four memory units of the first set and the second set. Memory device for mapping.
【請求項4】前記メモリ手段は、前記座標(2m、2
n)、(2m+1、2n)、(2m、2n+1)及び
(2m+1、2n+1)(m、nは整数)毎の4個の前
記パターンデータについて同一のアドレスを設定して前
記4個のメモリ部に個別に格納し、 前記メモリ制御手段は、前記4個のパターンデータのア
ドレスに基づいて、前記4個のパターンデータに隣接す
る他の4個のパターンデータのアドレスを生成するイン
クリメント手段と、前記4個のパターンデータのアドレ
ス及び前記インクリメント手段により生成されたアドレ
スから、前記4個のメモリ部に格納された所定のパター
ンデータを読み出すアドレスを設定するアドレス設定手
段と、を有することを特徴とする請求項1、2又は3記
載のテキスチャマッピング用メモリ装置。
4. The method according to claim 1, wherein the memory means stores the coordinates (2 m, 2 m
n), (2m + 1, 2n), (2m, 2n + 1) and (2m + 1, 2n + 1) (m and n are integers), and set the same address for the four pattern data and store the same address in the four memory units. The memory control means individually stores the address of the four pattern data, and the memory control means generates an address of another four pattern data adjacent to the four pattern data based on the address of the four pattern data; Address setting means for setting an address for reading predetermined pattern data stored in the four memory units from an address of the pattern data and an address generated by the increment means. Item 3. The memory device for texture mapping according to Item 1, 2 or 3.
JP31943497A 1997-11-20 1997-11-20 Memory for texture mapping Withdrawn JPH11154237A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP31943497A JPH11154237A (en) 1997-11-20 1997-11-20 Memory for texture mapping

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP31943497A JPH11154237A (en) 1997-11-20 1997-11-20 Memory for texture mapping

Publications (1)

Publication Number Publication Date
JPH11154237A true JPH11154237A (en) 1999-06-08

Family

ID=18110163

Family Applications (1)

Application Number Title Priority Date Filing Date
JP31943497A Withdrawn JPH11154237A (en) 1997-11-20 1997-11-20 Memory for texture mapping

Country Status (1)

Country Link
JP (1) JPH11154237A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003006673A (en) * 2001-06-25 2003-01-10 Namco Ltd Image generating system, program and information storage medium
CN1293513C (en) * 2003-11-17 2007-01-03 松下电器产业株式会社 Texture processor
US7417639B2 (en) 2001-10-23 2008-08-26 Fujitsu Limited Drawing device and information processing apparatus
CN112417570A (en) * 2020-12-03 2021-02-26 杭州群核信息技术有限公司 Continuous grain brick paving design method and system and computer equipment
CN113741310A (en) * 2021-09-16 2021-12-03 许昌学院 Big data information monitoring system
CN113836858A (en) * 2021-09-13 2021-12-24 深圳市紫光同创电子有限公司 Chip layout method

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003006673A (en) * 2001-06-25 2003-01-10 Namco Ltd Image generating system, program and information storage medium
JP4704615B2 (en) * 2001-06-25 2011-06-15 株式会社バンダイナムコゲームス Image generation system, program, and information storage medium
US7417639B2 (en) 2001-10-23 2008-08-26 Fujitsu Limited Drawing device and information processing apparatus
CN1293513C (en) * 2003-11-17 2007-01-03 松下电器产业株式会社 Texture processor
US7365751B2 (en) 2003-11-17 2008-04-29 Matsushita Electric Industrial Co., Ltd. Texture processor
CN112417570A (en) * 2020-12-03 2021-02-26 杭州群核信息技术有限公司 Continuous grain brick paving design method and system and computer equipment
CN113836858A (en) * 2021-09-13 2021-12-24 深圳市紫光同创电子有限公司 Chip layout method
CN113741310A (en) * 2021-09-16 2021-12-03 许昌学院 Big data information monitoring system

Similar Documents

Publication Publication Date Title
JP3138173B2 (en) Frame memory device for graphics
US6778177B1 (en) Method for rasterizing a graphics basic component
US5757374A (en) Method and apparatus for performing texture mapping
EP0613098B1 (en) Image processing apparatus and method of controlling the same
JP3081774B2 (en) Texture pattern memory circuit
JPH117541A (en) Volume data composing method
JPWO2006013849A1 (en) Drawing device
US6992664B2 (en) Graphics plotting apparatus
JPH09179999A (en) Method and device for image generation
JPH11154237A (en) Memory for texture mapping
US6466219B1 (en) Storage device and image data processing apparatus
US6940519B2 (en) Graphics processor, graphics card and graphics processing system
JP2000011190A (en) Image processor
JP2003323339A (en) Memory access device, semiconductor device, memory access control method, computer program and recording medium
JP4081304B2 (en) Drawing processing program, storage medium storing drawing processing program, drawing processing apparatus, and drawing processing method
US20030231180A1 (en) Image processing apparatus and method of same
JP4314655B2 (en) Image processing device
JP3906234B1 (en) Image memory circuit
JP2003132347A (en) Image processor
JPH09270024A (en) Information processor
JP3971448B2 (en) Drawing apparatus and drawing method
JP2647375B2 (en) Image processing device
EP1222629B1 (en) Method and system for rendering macropixels
CN110024001B (en) Image processing device, image processing method, and program
JP2913635B2 (en) Drawing method in bitmap display system

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