JP2008299642A - Pattern drawing device - Google Patents

Pattern drawing device Download PDF

Info

Publication number
JP2008299642A
JP2008299642A JP2007145650A JP2007145650A JP2008299642A JP 2008299642 A JP2008299642 A JP 2008299642A JP 2007145650 A JP2007145650 A JP 2007145650A JP 2007145650 A JP2007145650 A JP 2007145650A JP 2008299642 A JP2008299642 A JP 2008299642A
Authority
JP
Japan
Prior art keywords
graphics
processing
buffer
vector graphics
processor
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.)
Pending
Application number
JP2007145650A
Other languages
Japanese (ja)
Inventor
Yoshiyuki Kato
義幸 加藤
Hiroshi Onishi
宏 大西
Akira Torii
晃 鳥居
Ryohei Ishida
良平 石田
Masaki Hamada
雅樹 濱田
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2007145650A priority Critical patent/JP2008299642A/en
Publication of JP2008299642A publication Critical patent/JP2008299642A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a pattern drawing device, for efficiently drawing a pattern in a small hardware scale. <P>SOLUTION: An SIMD processor 101 performs geometric processing of 3D graphics and edge intersection calculation processing of vector graphics, and outputs processing results thereof to shared SP output buffers 104-107. A pixel shader 112 performs pixel shader processing in the 3D graphic and the vector graphics. A fragment processing part 114 performs fragment processing using a first auxiliary buffer 116 which is used as a depth buffer in the 3D graphics and as a mask buffer in the vector graphics, a second auxiliary buffer 117 used as a stencil buffer in the 3D graphics and as a scissor buffer in the vector graphics, and a shared color buffer 115. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

この発明は、数式で定義されたベクター図形を描画する分野において、ベクターグラフィックス描画と3Dグラフィックス描画を同時に実現させる図形描画装置に関するものである。   The present invention relates to a graphics drawing apparatus that simultaneously realizes vector graphics drawing and 3D graphics drawing in the field of drawing vector graphics defined by mathematical expressions.

ベクターグラフィックスは、入力データがベジエ曲線などの数式で与えられその輪郭線を微小な線分に分割して多角形描画が行われる。そのためビットマップ画像のように拡大縮小してもジャギーが発生することなく高品質な図形描画ができるという特徴がある。そして2Dベクターグラフィックス処理用のプログラミングインタフェースとしてOpenVGが使用されてきている。このOpenVGは、規格標準化団体であるKhronos Groupにより仕様策定されたグラフィックスAPIで、曲線などで定義されたパスやストロークの塗りつぶし処理、マトリクス変換処理、クリッピングやマスク処理、イメージを貼り付けるパターンペイント処理、アンチエイリアス処理、ブレンド処理、ディザ処理などの様々な機能が定義されている。一般にベクターグラフィックスでは数式で定義された輪郭曲線を多角形へ変換または分割して描画を行うために、専用ハードウェアやソフトウェアで実装されることが多い(例えば、特許文献1参照)。   In vector graphics, input data is given by a mathematical expression such as a Bezier curve, and the outline is divided into minute line segments to draw a polygon. Therefore, there is a feature that high-quality graphic drawing can be performed without generating jaggy even if the image is enlarged or reduced like a bitmap image. OpenVG has been used as a programming interface for 2D vector graphics processing. This OpenVG is a graphics API specified by the Khronos Group, which is a standards organization, and is designed to fill paths and strokes defined by curves, matrix conversion processing, clipping and mask processing, and pattern paint processing to paste images Various functions such as anti-aliasing, blending, and dithering are defined. In general, vector graphics are often implemented by dedicated hardware or software in order to perform drawing by converting or dividing a contour curve defined by a mathematical expression into a polygon (see, for example, Patent Document 1).

国際公開第03/096275号パンフレットInternational Publication No. 03/096275 Pamphlet

ベクターグラフィックスでは数式で定義された輪郭曲線などがピクセルに分解される。そして分解されたピクセルはアンチエイリアス処理された後、マスク情報などを元にフレームバッファへ書き込まれる。一方、3Dグラフィックスではポリゴンで定義されたデータが座標変換された後ピクセルへ分解される。ピクセルはデプスバッファなどを使用して前後判定を行いながらピクセルの書き込みが行われる。このように、ベクターグラフィックスと3Dグラフィックスでは処理内容が異なるために、ハードウェアで実装する場合は異なるハードウェアになってしまう。   In vector graphics, contour curves defined by mathematical formulas are decomposed into pixels. The decomposed pixels are anti-aliased and then written into the frame buffer based on mask information and the like. On the other hand, in 3D graphics, data defined by polygons is coordinate-transformed and then decomposed into pixels. Pixels are written while performing a forward / backward determination using a depth buffer or the like. As described above, since the processing contents are different between vector graphics and 3D graphics, when hardware is used, the hardware becomes different.

ベクターグラフィックス、3Dグラフィックス共にそれぞれをハードウェア実装したときのハードウェア規模は一般に大きい。そのため、ベクターグラフィックスと3Dグラフィックスの両方をハードウェアで実装すると非常に大きなゲート規模となってしまう。これは特に組み込み向け用途などで、ハードウェア規模を小さく抑える必要がある分野では大きな問題となり、ゲート規模増加により消費電力も増加してしまうといった問題があった。   The hardware scale is generally large when both vector graphics and 3D graphics are implemented by hardware. Therefore, when both vector graphics and 3D graphics are implemented by hardware, the gate scale becomes very large. This is a big problem especially in the field of embedded use, where it is necessary to keep the hardware scale small, and there is a problem that power consumption increases due to an increase in the gate scale.

この発明は上記のような課題を解決するためになされたもので、ベクターグラフィックスと3Dグラフィックスのハードウェアを共用することにより、少ないハードウェア規模で効率よく図形描画処理を実行することのできる図形描画装置を得ることを目的とする。   The present invention has been made to solve the above-described problems. By sharing the hardware of vector graphics and 3D graphics, it is possible to efficiently execute graphic drawing processing with a small hardware scale. An object is to obtain a graphic drawing apparatus.

この発明に係る図形描画装置は、3Dグラフィックスのジオメトリ処理とベクターグラフィックスのエッジ交点算出処理を行うプロセッサと、エッジ交点算出処理結果であるスキャンライン情報からピクセルへの展開を行うスキャンライン展開部と、3Dグラフィックス及びベクターグラフィックスにおけるピクセルシェーダ処理を行うピクセルシェーダと、3Dグラフィックスではデプスバッファとして用い、ベクターグラフィックスではマスクバッファとして用いる第1の補助バッファと、3Dグラフィックスではステンシルバッファとして用い、ベクターグラフィックスではシザーバッファとして用いる第2の補助バッファと、3Dグラフィックス及びベクターグラフィックスで共通に用いるカラーバッファと、第1の補助バッファ、第2の補助バッファ及びカラーバッファを用い、ピクセルシェーダから出力されたデータに対して、3Dグラフィックス及びベクターグラフィックスにおけるフラグメント処理を行うフラグメント処理部とを備えたものである。   A graphic drawing apparatus according to the present invention includes a processor that performs 3D graphics geometry processing and vector graphics edge intersection calculation processing, and a scan line expansion unit that expands pixels from scan line information that is the result of edge intersection calculation processing A pixel shader that performs pixel shader processing in 3D graphics and vector graphics, a first auxiliary buffer that is used as a depth buffer in 3D graphics, a mask buffer in vector graphics, and a stencil buffer in 3D graphics A second auxiliary buffer used as a scissor buffer in vector graphics, a color buffer commonly used in 3D graphics and vector graphics, and a first auxiliary buffer, Using two auxiliary buffer and color buffer, the data outputted from the pixel shader, in which a fragment processing unit that performs fragmentation process in 3D graphics and vector graphics.

この発明の図形描画装置は、プロセッサとその入出力バッファをベクターグラフィックスと3Dグラフィックスで共用し、更に描画関連バッファをベクターグラフィックスと3Dグラフィックスで別の用途で使用するようにしたので、少ないハードウェア規模で効率よく図形描画処理を実行することができる。   In the graphic drawing apparatus of the present invention, the processor and its input / output buffer are shared by vector graphics and 3D graphics, and the drawing related buffer is used for different purposes by vector graphics and 3D graphics. The graphic drawing process can be executed efficiently with a small hardware scale.

実施の形態1.
図1は、この発明の実施の形態1による図形描画装置を示す構成図である。
図において、図形描画装置は、SP入力バッファ100、SIMDプロセッサ101、SPプログラムメモリ102、VG(Vector Graphics)シーケンス制御部103、SP出力バッファ104〜107、VGスキャンライン展開部108、3Dセットアップ109、3Dラスタライザ110、テクスチャフェッチ部111、ピクセルシェーダ112、ピクセルシェーダプログラムメモリ113、フラグメント処理部114、カラーバッファ115、第1の補助バッファ116、第2の補助バッファ117を備えている。
Embodiment 1 FIG.
FIG. 1 is a block diagram showing a figure drawing apparatus according to Embodiment 1 of the present invention.
In the figure, a graphics drawing apparatus includes an SP input buffer 100, a SIMD processor 101, an SP program memory 102, a VG (Vector Graphics) sequence control unit 103, SP output buffers 104 to 107, a VG scan line development unit 108, a 3D setup 109, A 3D rasterizer 110, a texture fetch unit 111, a pixel shader 112, a pixel shader program memory 113, a fragment processing unit 114, a color buffer 115, a first auxiliary buffer 116, and a second auxiliary buffer 117 are provided.

SP入力バッファ100は、SIMDプロセッサ101への入力データを保持するためのバッファであり、ベクターグラフィックスを処理する場合にはVG輪郭情報100aが、また、3Dグラフィックスを処理する場合には物体を構成するモデルデータや光の情報といった3Dモデルデータ100bが予め格納される。SIMDプロセッサ101は、4−SIMDを構成するプロセッサであり、PU0、PU1、PU2、PU3の演算コアから構成される。SPプログラムメモリ102は、SIMDプロセッサ101が実行するプログラムを格納するためのメモリであり、ベクターグラフィックス処理用としてVG輪郭情報から輪郭座標を算出すためのプログラムや、OpenVGのマトリクス処理を行うプログラムといったVG用プログラム102aが格納される。また、SPプログラムメモリ102には、3Dグラフィックス処理用として、幾何学演算処理やライティング処理を行うためのプログラム(頂点シェーダプログラム相当)といった3D用プログラム102bが格納される。尚、SIMDプロセッサ101は、3Dグラフィックスで一般に使用される頂点シェーダのような演算プロセッサであっても構わない。   The SP input buffer 100 is a buffer for holding input data to the SIMD processor 101. The VG contour information 100a is used for processing vector graphics, and the object is used for processing 3D graphics. 3D model data 100b such as model data and light information to be configured is stored in advance. The SIMD processor 101 is a processor that constitutes 4-SIMD, and includes an arithmetic core of PU0, PU1, PU2, and PU3. The SP program memory 102 is a memory for storing a program executed by the SIMD processor 101, such as a program for calculating contour coordinates from VG contour information for vector graphics processing, and a program for performing OpenVG matrix processing. The VG program 102a is stored. The SP program memory 102 stores a 3D program 102b such as a program (equivalent to a vertex shader program) for performing geometric calculation processing and lighting processing for 3D graphics processing. The SIMD processor 101 may be an arithmetic processor such as a vertex shader generally used in 3D graphics.

VGシーケンス制御部103は、SIMDプロセッサ101を制御してベクターグラフィックス処理を行うためのプログラマブルロジックコントローラである。SP出力バッファ104〜107は、SIMDプロセッサ101におけるそれぞれの演算コアで演算された結果を一時保存するためのバッファであり、それぞれベクターグラフィックス用のVGエッジデータ104a〜107a、3D頂点データ104b〜107bが格納されるようになっている。VGスキャンライン展開部108は、ベクターグラフィックス処理に用いられる機能部であり、SP出力バッファ104〜107にある輪郭線のエッジリストを読み出して、スキャンライン情報からピクセルへ展開するよう構成されている。3Dセットアップ109は、SP出力バッファ104〜107にある3D頂点データ104b〜107bから、ビューポート変換、クリップ処理、そしてラスタライズに必要な増分パラメータの計算を行う機能部である。3Dラスタライザ110は、3Dセットアップ109から出力された増分パラメータからポリゴンの中に含まれるピクセル値を算出する機能部である。テクスチャフェッチ部111は、VGスキャンライン展開部108及び3Dラスタライザ110から出力されたテクスチャ座標に基づいて、テクセルデータを求め、これをピクセルシェーダ112に出力する機能部である。   The VG sequence control unit 103 is a programmable logic controller for controlling the SIMD processor 101 to perform vector graphics processing. The SP output buffers 104 to 107 are buffers for temporarily storing the results calculated by the respective arithmetic cores in the SIMD processor 101, and VG edge data 104a to 107a and 3D vertex data 104b to 107b for vector graphics, respectively. Is stored. The VG scanline development unit 108 is a functional unit used for vector graphics processing, and is configured to read the edge list of the contour line in the SP output buffers 104 to 107 and develop it from the scanline information to pixels. . The 3D setup 109 is a functional unit that calculates incremental parameters necessary for viewport conversion, clip processing, and rasterization from the 3D vertex data 104b to 107b in the SP output buffers 104 to 107. The 3D rasterizer 110 is a functional unit that calculates pixel values included in a polygon from the incremental parameters output from the 3D setup 109. The texture fetch unit 111 is a functional unit that obtains texel data based on the texture coordinates output from the VG scanline development unit 108 and the 3D rasterizer 110 and outputs the texel data to the pixel shader 112.

ピクセルシェーダ112は、ピクセル演算処理を行うための4−SIMDプロセッサであり、ピクセルシェーダプログラムメモリ113に格納されたプログラムにより実行されるものである。ピクセルシェーダプログラムメモリ113は、ベクターグラフィックス処理と3Dグラフィックス処理ではそれぞれ異なるピクセルシェーダプログラム(VG用プログラム113a,3D用プログラム113b)が格納されている。   The pixel shader 112 is a 4-SIMD processor for performing pixel calculation processing, and is executed by a program stored in the pixel shader program memory 113. The pixel shader program memory 113 stores different pixel shader programs (a VG program 113a and a 3D program 113b) for vector graphics processing and 3D graphics processing.

フラグメント処理部114は、ベクターグラフィックス処理を行う場合は、ピクセルのブレンディング処理とアルファブレンディング処理を行うと共に、シザークリップ処理を行う機能を有している。また、フラグメント処理部114は、3Dグラフィックス処理を行う場合は、デプステストとステンシルテストを行い、ピクセル値をカラーバッファ115に書き込む処理を行う。カラーバッファ115は、ピクセル毎の色情報を格納するためのバッファである。第1の補助バッファ116は、ベクターグラフィックス処理のためのVGマスクアルファ116aと3Dグラフィックス処理のための3Dデプス情報116bを格納し、第2の補助バッファ117は、ベクターグラフィックス処理のためのVGシザー情報117aと3Dグラフィックス処理のための3Dステンシル情報117bを格納するバッファである。   The fragment processing unit 114 has a function of performing pixel blending processing and alpha blending processing as well as scissor clip processing when performing vector graphics processing. Further, when performing the 3D graphics process, the fragment processing unit 114 performs a depth test and a stencil test, and performs a process of writing the pixel value to the color buffer 115. The color buffer 115 is a buffer for storing color information for each pixel. The first auxiliary buffer 116 stores VG mask alpha 116a for vector graphics processing and 3D depth information 116b for 3D graphics processing, and the second auxiliary buffer 117 stores vector graphics processing. The buffer stores VG scissor information 117a and 3D stencil information 117b for 3D graphics processing.

次に、実施の形態1の図形描画装置による実施の形態1を説明する。
描画処理に先立ち、SP入力バッファ100にはベクターグラフィックスを処理する場合にはVG輪郭情報100aが、3Dグラフィックスを処理する場合には3Dモデルデータ100bが予め格納されているものとする。
SIMDプロセッサ101は、SPプログラムメモリ102からプログラムを読み出しながら実行する。ベクターグラフィックス処理の場合、曲線などの輪郭情報は微小な線分(エッジ)に分割され、そのエッジの両端の座標をv0(x0,y0)、v1(x1,y1)、スキャンラインのY座標をyとすると、スキャンラインとエッジの交点座標xs(y)は以下の式で求めることができる。但し、y0=y1のときは交点座標の算出は行わない。

Figure 2008299642
Next, Embodiment 1 by the graphic drawing apparatus of Embodiment 1 will be described.
Prior to the rendering process, it is assumed that the SP input buffer 100 stores VG outline information 100a when processing vector graphics and 3D model data 100b when processing 3D graphics.
The SIMD processor 101 executes the program while reading the program from the SP program memory 102. In the case of vector graphics processing, contour information such as a curve is divided into minute line segments (edges), the coordinates of both ends of the edge are v0 (x0, y0), v1 (x1, y1), and the Y coordinate of the scan line. If y is y, the intersection coordinates xs (y) between the scan line and the edge can be obtained by the following equation. However, intersection coordinates are not calculated when y0 = y1.
Figure 2008299642

また、曲線を微小な線分に分解せずに、直接2次のベジエ曲線からスキャンラインとの交点座標を以下のように算出することもできる。ベジエ曲線はパラメータt(0≦t≦1)を用いて以下のパラメトリック形式で定義される。
x(t)=(1−t)2*x0+2*(1−t)*t*x1+t2*x2 (1)
y(t)=(1−t)2*y0+2*(1−t)*t*y1+t2*y2 (2)
In addition, the intersection coordinates with the scan line can be calculated directly from a secondary Bezier curve as follows without decomposing the curve into minute line segments. A Bezier curve is defined in the following parametric format using a parameter t (0 ≦ t ≦ 1).
x (t) = (1-t) 2 * x0 + 2 * (1-t) * t * x1 + t 2 * x2 (1)
y (t) = (1-t) 2 * y0 + 2 * (1-t) * t * y1 + t 2 * y2 (2)

(1),(2)式をtについて整理して方程式を解くと、

Figure 2008299642
ここで、
a=y0−2*y1+y2(定数)
b=2*(y1−y0) (定数)
c=y0−y When the equations are solved by arranging (1) and (2) with respect to t,
Figure 2008299642
here,
a = y0-2 * y1 + y2 (constant)
b = 2 * (y1-y0) (constant)
c = y0-y

このように、スキャンラインのY座標yが一意に決まれば、(3)式によりパラメータtの値が求まり(判別式b2−4*a*c≧0の場合)、それを(1)式に代入すれば、ベジエ曲線とスキャンラインとの交点座標xを算出することができる。尚、これらの交点算出やその他のOpenVG用マトリクス処理などは、通常、プログラムを記述することにより実行されるが、高速化とプログラム領域を削減するためにSIMDプロセッサの演算器とレジスタを直接VGシーケンス制御部103によって制御することにより、プログラムを介さずにハードワイヤードにより処理しても構わない。 In this way, if the Y coordinate y of the scan line is uniquely determined, the value of the parameter t is obtained by the equation (3) (when discriminant b 2 −4 * a * c ≧ 0), and is expressed by the equation (1). Can be calculated, the intersection point coordinate x between the Bezier curve and the scan line can be calculated. These intersection calculation and other OpenVG matrix processing are usually performed by writing a program, but in order to increase the speed and reduce the program area, the SIMD processor's arithmetic units and registers are directly connected to the VG sequence. By controlling by the control unit 103, the processing may be performed hard-wired without using a program.

SIMDプロセッサ101は、SPプログラムメモリ102におけるVG用プログラム102aまたは3D用プログラム102bを実行後、演算結果をSP出力バッファ104〜107へ出力する。ベクターグラフィックス処理の場合には輪郭線とスキャンラインの交点座標xのリスト(4個分)が並列に書き込まれる。3Dグラフィックス処理の場合には、幾何学演算処理された以下のようなポリゴンの頂点データが書き込まれる。各データは4成分から構成されるので、各成分がSP出力バッファ104〜107へ並列に書き込まれる。   The SIMD processor 101 outputs the calculation result to the SP output buffers 104 to 107 after executing the VG program 102a or the 3D program 102b in the SP program memory 102. In the case of vector graphics processing, a list (four pieces) of intersection coordinates x of contour lines and scan lines is written in parallel. In the case of 3D graphics processing, the following vertex data of a polygon subjected to geometric calculation processing is written. Since each data is composed of four components, each component is written in parallel to the SP output buffers 104-107.

Position (x,y,z,w)
Front Color (r,g,b,a)
Back Color (r,g,b,a)
Fog (−,−,−,f)
Texture(n) (s,t,r,q)
Position (x, y, z, w)
Front Color (r, g, b, a)
Back Color (r, g, b, a)
Fog (-,-,-, f)
Texture (n) (s, t, r, q)

VGスキャンライン展開部108は、SP出力バッファ104〜107にある輪郭線のエッジリストを読み出して、スキャンライン情報からピクセルへ展開する。即ち、描画すべきピクセルのx,y座標とアンチエイリアスのためのカバレッジ情報を算出する。
3Dセットアップ109は、SP出力バッファ104〜107にある頂点データからビューポート変換、クリップ処理、そしてラスタライズに必要な増分パラメータの計算を行う。増分パラメータとしてはラスタライズに必要なエッジファンクションのパラメータや各属性の平面の方程式の係数A,B,Cなどがある。
The VG scan line development unit 108 reads the edge list of the contour lines in the SP output buffers 104 to 107 and develops them from the scan line information into pixels. That is, the x and y coordinates of the pixel to be drawn and the coverage information for anti-aliasing are calculated.
The 3D setup 109 calculates incremental parameters necessary for viewport conversion, clip processing, and rasterization from the vertex data in the SP output buffers 104-107. Incremental parameters include edge function parameters required for rasterization and coefficients A, B, and C of plane equations for each attribute.

3Dラスタライザ110は、3Dセットアップ109から出力された増分パラメータからポリゴンの中に含まれるピクセル値を算出する。一般的には、ポリゴンの中に含まれるピクセルを特定するためにエッジファンクションなどを利用してx,y座標を求める。次に各属性の平面の方程式の係数A,B,Cを用いてカラーやフォグの値を計算する。テクスチャ座標のようにパースペクティブコレクションを施すためには除算処理も必要となる。

Figure 2008299642
The 3D rasterizer 110 calculates the pixel value included in the polygon from the incremental parameter output from the 3D setup 109. In general, the x and y coordinates are obtained by using an edge function or the like in order to specify pixels included in a polygon. Next, color and fog values are calculated using the coefficients A, B, and C of the plane equation for each attribute. Division processing is also required to perform perspective collection like texture coordinates.
Figure 2008299642

テクスチャフェッチ部111は、VGスキャンライン展開部108、3Dラスタライザ110から出力されたテクスチャ座標をアドレスとしてテクスチャメモリ(図示せず)をアクセスし、テクセルデータを読み出す。読み出されたテクセルデータはバイリニア、トライリニアなどのフィルタ処理が施された後、ピクセルシェーダ112へ出力される。
ピクセルシェーダ112は、ベクターグラフィックス処理か、3Dグラフィックス処理かに応じて、ピクセルシェーダプログラムメモリ113のVG用プログラム113aか3D用プログラム113bを用いてそれぞれの処理に対応したピクセル演算処理を行う。ピクセルシェーダ112における各種の演算処理は、VGスキャンライン展開部108、3Dラスタライザ110から出力されるピクセル情報(カラー、フォグ、テクスチャ座標)と、テクスチャフェッチ部111から出力されるテクセルデータを使用して行われる。
The texture fetch unit 111 accesses a texture memory (not shown) using the texture coordinates output from the VG scanline development unit 108 and the 3D rasterizer 110 as an address, and reads texel data. The read texel data is output to the pixel shader 112 after being subjected to bilinear, trilinear, or other filtering.
The pixel shader 112 performs pixel calculation processing corresponding to each processing using the VG program 113a or the 3D program 113b in the pixel shader program memory 113, depending on whether the vector graphics processing or the 3D graphics processing is performed. Various arithmetic processes in the pixel shader 112 are performed using pixel information (color, fog, texture coordinates) output from the VG scanline development unit 108 and 3D rasterizer 110 and texel data output from the texture fetch unit 111. Done.

フラグメント処理部114は、ベクターグラフィックス処理を行う場合、カラーバッファ115からデスティネーションカラーを読み出して、ピクセルのブレンディング処理を行う。その後、カバレッジと第1の補助バッファ116から読み出されたマスクアルファ値(VGマスクアルファ116a)を乗算し、アンチエイリアスのためのアルファブレンディング処理を行う。マスクアルファ(Masking)はOpenVGで定義されている機能である。この機能はマスクアルファ値をテクスチャメモリに格納して、マルチテクスチャとして処理することによっても等価な処理を行うことが可能である。またフラグメント処理部114は、第2の補助バッファ117からシザー情報(VGシザー情報117a)を読み出すことにより、シザークリップ処理も行う。シザー情報はピクセル当たり1bitのデータで描画すべき矩形エリアが予め設定されているものとする。このシザークリップもOpenVGで定義された機能である。そして描画すべきピクセルであれば、最終カラー値がカラーバッファ115へ書き込まれる。   When performing the vector graphics processing, the fragment processing unit 114 reads the destination color from the color buffer 115 and performs pixel blending processing. Thereafter, the coverage is multiplied by the mask alpha value (VG mask alpha 116a) read from the first auxiliary buffer 116, and alpha blending processing for anti-aliasing is performed. Mask alpha is a function defined in OpenVG. This function can perform an equivalent process by storing the mask alpha value in the texture memory and processing it as a multi-texture. The fragment processing unit 114 also performs scissor clip processing by reading scissor information (VG scissor information 117a) from the second auxiliary buffer 117. In the scissor information, a rectangular area to be drawn with 1-bit data per pixel is set in advance. This scissor clip is also a function defined by OpenVG. If the pixel is to be drawn, the final color value is written into the color buffer 115.

一方、フラグメント処理部114が3Dグラフィックス処理を行う場合、第1の補助バッファ116からデプス情報(3Dデプス情報116b)を読み出してデプステストを行うと共に、第2の補助バッファ117からはステンシル情報(3Dステンシル情報117b)を読み出してステンシルテストを行う。そして、両方のテストにパスしたら、ピクセル値をカラーバッファ115へ書き込むと同時に第1の補助バッファ116及び第2の補助バッファ117のデプス情報とステンシル情報の更新を行う。これらの機能はOpenGLで定義された機能である。   On the other hand, when the fragment processing unit 114 performs 3D graphics processing, the depth information (3D depth information 116b) is read from the first auxiliary buffer 116 and a depth test is performed, and stencil information (from the second auxiliary buffer 117) The 3D stencil information 117b) is read and a stencil test is performed. If both the tests are passed, the pixel value is written into the color buffer 115 and the depth information and stencil information of the first auxiliary buffer 116 and the second auxiliary buffer 117 are updated at the same time. These functions are functions defined in OpenGL.

このように、SIMDプロセッサとその入出力バッファをベクターグラフィックスと3Dグラフィックスで共用し、更に描画関連バッファをベクターグラフィックスと3Dグラフィックスで別の用途で使用することにより、ラスタライザを除くほとんどのハードウェアを共通で使用することが可能となる。そして無駄なハードウェアを実装することなくハードウェア規模を削減でき、アイドル状態になる演算器も少なくなるので消費電力を低減できる。   In this way, the SIMD processor and its input / output buffer are shared by vector graphics and 3D graphics, and the drawing-related buffer is used for different purposes in vector graphics and 3D graphics, so that most of the exceptions of the rasterizer are used. It becomes possible to use hardware in common. In addition, the hardware scale can be reduced without installing unnecessary hardware, and the number of computing units that are in an idle state is reduced, so that power consumption can be reduced.

以上のように、実施の形態1の図形描画装置によれば、3Dグラフィックスのジオメトリ処理とベクターグラフィックスのエッジ交点算出処理を行うプロセッサと、エッジ交点算出処理結果であるスキャンライン情報からピクセルへの展開を行うスキャンライン展開部と、3Dグラフィックス及びベクターグラフィックスにおけるピクセルシェーダ処理を行うピクセルシェーダと、3Dグラフィックスではデプスバッファとして用い、ベクターグラフィックスではマスクバッファとして用いる第1の補助バッファと、3Dグラフィックスではステンシルバッファとして用い、ベクターグラフィックスではシザーバッファとして用いる第2の補助バッファと、3Dグラフィックス及びベクターグラフィックスで共通に用いるカラーバッファと、第1の補助バッファ、第2の補助バッファ及びカラーバッファを用い、ピクセルシェーダから出力されたデータに対して、3Dグラフィックス及びベクターグラフィックスにおけるフラグメント処理を行うフラグメント処理部とを備えたので、少ないハードウェア規模で効率よく図形描画処理を実行することができる。   As described above, according to the graphics drawing apparatus of the first embodiment, a processor that performs 3D graphics geometry processing and vector graphics edge intersection calculation processing, and scan line information that is the result of edge intersection calculation processing are converted into pixels. A scan line developing unit for developing the image, a pixel shader for performing pixel shader processing in 3D graphics and vector graphics, a first auxiliary buffer used as a depth buffer in 3D graphics, and as a mask buffer in vector graphics, A second auxiliary buffer used as a stencil buffer in 3D graphics, a scissor buffer in vector graphics, and a color buffer commonly used in 3D graphics and vector graphics; Since a single auxiliary buffer, a second auxiliary buffer, and a color buffer are used and a fragment processing unit that performs fragment processing in 3D graphics and vector graphics on data output from the pixel shader is provided, less hardware is required. The graphic drawing process can be executed efficiently on a wear scale.

また、実施の形態1の図形描画装置によれば、プロセッサに入力する3Dグラフィックスのジオメトリ処理を行うための入力データとベクターグラフィックスのエッジ交点算出処理に行うための入力データのいずれか一方を保持する入力バッファと、プロセッサから出力された3Dグラフィックスとベクターグラフィックスのいずれかの処理結果の出力データを保持する出力バッファとを備えると共に、プロセッサは、実行するベクターグラフィックスと3Dグラフィックスの処理に応じて対応するプログラムを実行するようにしたので、更にハードウェア規模を削減することができ、より消費電力を低減することができる。   In addition, according to the graphic drawing apparatus of the first embodiment, either input data for performing geometry processing of 3D graphics input to the processor or input data for performing edge intersection calculation processing of vector graphics is input. An input buffer for holding, and an output buffer for holding output data of a processing result of either 3D graphics or vector graphics output from the processor, and the processor includes vector graphics and 3D graphics to be executed. Since the corresponding program is executed according to the processing, the hardware scale can be further reduced, and the power consumption can be further reduced.

実施の形態2.
図2は図1におけるSIMDプロセッサ101のベクターグラフィックスでの動作をより具体的に説明するためのものである。
ベクターグラフィックスでは、アンチエイリアスのカバレッジを算出するために、1個のスキャンラインを複数のサブスキャンラインに分割して処理を行う。図2では4個のサブスキャンラインy0,y1,y2,y3に分割している。SIMDプロセッサ101は4−SIMD構成であるので、演算コアPU0,PU1,PU2,PU3にサブスキャンラインy0,y1,y2,y3を割り当てて並列に処理を行う。そして、PU0,PU1,PU2,PU3は、自身に割り当てられたサブスキャンラインと全輪郭線とのX座標交点を順次求め、SP出力バッファ104,105,106,107へ書き込んでいく。図2の例においては、PU0はエッジ0の交点x00、エッジ1の交点x01、エッジ2の交点x02、エッジ3の交点x03を算出し、各エッジのUP/DOWN情報と共にSP出力バッファ104へ書き込んでいく。同様に、PU1,PU2,PU3も各交点X座標とUP/DOWN情報をSP出力バッファ105,106,107へ書き込む。
Embodiment 2. FIG.
FIG. 2 is a diagram for specifically explaining the operation of the SIMD processor 101 in FIG. 1 in vector graphics.
In vector graphics, in order to calculate anti-aliasing coverage, one scan line is divided into a plurality of sub-scan lines. In FIG. 2, it is divided into four sub scan lines y0, y1, y2 and y3. Since the SIMD processor 101 has a 4-SIMD configuration, sub-scan lines y0, y1, y2, and y3 are assigned to the arithmetic cores PU0, PU1, PU2, and PU3 to perform processing in parallel. Then, PU 0, PU 1, PU 2, and PU 3 sequentially obtain X coordinate intersections between the sub-scan lines assigned to the PU 0, PU 2, and PU 3 and write them to the SP output buffers 104, 105, 106, and 107. In the example of FIG. 2, PU0 calculates the intersection x00 of edge 0, the intersection x01 of edge 1, the intersection x02 of edge 2, and the intersection x03 of edge 3, and writes it to the SP output buffer 104 together with the UP / DOWN information of each edge. Go. Similarly, PU1, PU2, and PU3 also write each intersection X coordinate and UP / DOWN information to the SP output buffers 105, 106, and 107.

次に、VGスキャンライン展開部108は、このSP出力バッファ104,105,106,107に書き込まれた情報を読み出して輪郭線で囲まれた領域のピクセルのカバレッジ(アンチエイリアス処理を行うためのピクセル占有率)を求め、ピクセルを生成していく。このカバレッジを求めるためにVGスキャンライン展開部108はマスク情報生成用スキャンラインカウンタ(図示せず)を備え、これを用いて処理を行う。スキャンラインカウンタは、1スキャンライン分のカウンタ群で構成され、ピクセル毎にエッジとの交差回数をカウントする。カウンタはスキャンラインと交差するエッジのUP/DOWN情報に基づいてインクリメント/デクリメントした合計値である。このスキャンラインカウンタを用いることにより、複雑な図形でもX座標のソーティングをすることなく高速なピクセル生成が可能である。   Next, the VG scan line development unit 108 reads out the information written in the SP output buffers 104, 105, 106, and 107, and covers the pixel coverage (pixel occupancy for performing anti-aliasing processing) in the area surrounded by the outline. Rate) and generate pixels. In order to obtain this coverage, the VG scan line development unit 108 is provided with a mask information generation scan line counter (not shown), which performs processing. The scan line counter is composed of a counter group for one scan line, and counts the number of intersections with edges for each pixel. The counter is a total value incremented / decremented based on the UP / DOWN information of the edge intersecting the scan line. By using this scan line counter, even a complicated figure can be generated at high speed without sorting the X coordinate.

このように、SIMDプロセッサの各演算コアがサブスキャンラインの交点X座標とUP/DOWN情報算出を並列に行うことにより、ベクターグラフィックスのピクセル生成に必要なデータ作成を効率よく実行できる。   As described above, the calculation cores of the SIMD processor perform the calculation of the intersection X coordinate of the sub-scan line and the UP / DOWN information in parallel, thereby efficiently generating data necessary for vector graphics pixel generation.

以上のように、実施の形態2の図形描画装置によれば、ベクターグラフィックスのエッジ交点算出処理をアンチエイリアス処理に用い、プロセッサは複数のサブスキャンラインのエッジ交点を並列に算出するようにしたので、アンチエイリアス処理におけるピクセル生成に必要なデータ作成を効率よく実行することができる。   As described above, according to the graphic drawing apparatus of the second embodiment, vector graphics edge intersection calculation processing is used for antialiasing processing, and the processor calculates edge intersections of a plurality of sub-scan lines in parallel. Therefore, it is possible to efficiently execute data creation necessary for pixel generation in the anti-aliasing process.

実施の形態3.
図3は、図2におけるSIMDプロセッサの動作をフローチャートとして示した図である。
描画すべきオブジェクト(1パス分)のY座標の最小値をYmin、Y座標の最大値をYmaxとする。先ず、ステップST301でカレントスキャンラインYをYminに設定し、サブスキャンラインy0,y1,y2,y3の値を設定する(y0=Y,y1=Y+0.25,y2=Y+0.5,y3=Y+0.75)。次に、ステップST302でSP入力バッファ100から輪郭データ(エッジ)を読み出し、ステップST303でそのエッジとサブスキャンラインy0,y1,y2,y3の交点X座標の計算を、PU0,PU1,PU2,PU3を用いて並列に行う。算出した交点X座標はステップST304において、PU0はSP出力バッファ104へ、PU1はSP出力バッファ105へ、PU2はSP出力バッファ106へ、PU3はSP出力バッファ107へ同時に書き込む。
Embodiment 3 FIG.
FIG. 3 is a flowchart showing the operation of the SIMD processor in FIG.
The minimum value of the Y coordinate of the object to be drawn (for one pass) is Ymin, and the maximum value of the Y coordinate is Ymax. First, in step ST301, the current scan line Y is set to Ymin, and the values of the sub scan lines y0, y1, y2, and y3 are set (y0 = Y, y1 = Y + 0.25, y2 = Y + 0.5, y3 = Y + 0). .75). Next, in step ST302, contour data (edge) is read from the SP input buffer 100, and in step ST303, the intersection X coordinate of the edge and the sub-scan lines y0, y1, y2, y3 is calculated as PU0, PU1, PU2, PU3. In parallel. In step ST304, the calculated intersection X coordinate is simultaneously written into the SP output buffer 104, PU1 into the SP output buffer 105, PU2 into the SP output buffer 106, and PU3 into the SP output buffer 107 simultaneously.

次に、ステップST305で1個のオブジェクトから線分に分割された全てのエッジ(またはベジエで定義された曲線)を処理したかの判定を行い、まだ処理されていないエッジが残っていれば、ステップST302に戻り、サブスキャンラインy0,y1,y2,y3とその処理されていないエッジとの交点X座標の算出を繰り返す。そして、ステップST305の判定で全エッジの処理が完了したら、ステップST306においてVGスキャンライン展開部108の起動を行う。この起動によりVGスキャンライン展開部108は1スキャンライン分のピクセル生成を行う。ピクセル生成が終了したら、ステップST307においてカレントスキャンラインを1進め、サブピクセルスキャンラインy0,y1,y2,y3の更新も行う。ステップST308でカレントスキャンラインYがYmaxを超えたかを比較し、超えていれば処理を終了する。超えていなければ、ステップST310においてSP入力バッファ100のリードポインタをリセットし、サブスキャンラインy0,y1,y2,y3と全エッジの交点X座標の算出を同様にして行う。   Next, in step ST305, it is determined whether all edges (or curves defined by Beziers) divided into line segments from one object have been processed, and if there are still unprocessed edges, Returning to step ST302, the calculation of the intersection X coordinate between the sub-scan lines y0, y1, y2, and y3 and the unprocessed edge is repeated. When the processing of all edges is completed in the determination in step ST305, the VG scan line development unit 108 is activated in step ST306. With this activation, the VG scan line developing unit 108 generates pixels for one scan line. When the pixel generation is completed, the current scan line is advanced by 1 in step ST307, and the sub-pixel scan lines y0, y1, y2, and y3 are also updated. In step ST308, it is compared whether or not the current scan line Y exceeds Ymax. If not, the read pointer of the SP input buffer 100 is reset in step ST310, and the intersection X coordinates of the sub-scan lines y0, y1, y2, and y3 and all edges are calculated in the same manner.

以上のように、実施の形態3の図形描画装置では、1スキャンライン毎に全エッジと交差するサブスキャンラインの交点X座標の算出と、スキャンラインのピクセル生成を交互に行うことにより、ベクターグラフィックスの塗りつぶし処理を行うことができる。尚、説明を簡単にするために、交点X座標の算出とスキャンラインのピクセル生成を順番に行うこととしたが、パイプライン処理によりこれら2つの処理は並列に実行することも可能である。但し、パイプライン処理を行うためにはSP出力バッファをダブルバッファ構成などにする必要がある。   As described above, in the graphic drawing apparatus according to the third embodiment, the vector graphic is obtained by alternately calculating the intersection X coordinate of the sub-scan line that intersects all edges for each scan line and generating the pixel of the scan line. Can be filled. In order to simplify the description, the calculation of the intersection X coordinate and the pixel generation of the scan line are sequentially performed. However, these two processes can be executed in parallel by pipeline processing. However, in order to perform pipeline processing, the SP output buffer needs to have a double buffer configuration or the like.

実施の形態4.
図4は図2におけるSIMDプロセッサの動作をフローチャートとして示した図である。
描画すべきオブジェクト(1パス分)のY座標の最小値をYmin、Y座標の最大値をYmaxとする。先ず、ステップST401でカレントスキャンラインYをYminに設定し、サブスキャンラインy0,y1,y2,y3の値を設定する(y0=Y,y1=Y+0.25,y2=Y+0.5,y3=Y+0.75)。次に、ステップST402でSP入力バッファ100から輪郭データ(エッジ)を読み出し、ステップST403でそのエッジとサブスキャンラインy0,y1,y2,y3の交点X座標の計算をPU0,PU1,PU2,PU3を用いて並列に行う。算出した交点X座標はステップST404において、PU0はSP出力バッファ104へ、PU1はSP出力バッファ105へ、PU2はSP出力バッファ106へ、PU3はSP出力バッファ107へ同時に書き込む。このとき実施の形態3の場合とは異なり、カレントスキャンラインだけではなく次のスキャンラインの交点X座標も順次書き込みを行うので、Y座標とのペアでエッジリストを作成する。つまり、SP出力バッファには1オブジェクトと交差する全エッジの交点X座標が格納されるので、実施の形態3よりも大きな領域が必要となる。
Embodiment 4 FIG.
FIG. 4 is a flowchart showing the operation of the SIMD processor in FIG.
The minimum value of the Y coordinate of the object to be drawn (for one pass) is Ymin, and the maximum value of the Y coordinate is Ymax. First, in step ST401, the current scan line Y is set to Ymin, and the values of the sub scan lines y0, y1, y2, and y3 are set (y0 = Y, y1 = Y + 0.25, y2 = Y + 0.5, y3 = Y + 0). .75). Next, in step ST402, contour data (edge) is read from the SP input buffer 100. In step ST403, the intersection X coordinate of the edge and the sub scan lines y0, y1, y2, y3 is calculated as PU0, PU1, PU2, PU3. Use in parallel. In step ST404, the calculated intersection X coordinate is simultaneously written into the SP output buffer 104, PU1 into the SP output buffer 105, PU2 into the SP output buffer 106, and PU3 into the SP output buffer 107 at the same time. At this time, unlike the case of the third embodiment, not only the current scan line but also the intersection X coordinate of the next scan line is sequentially written, so an edge list is created with a pair with the Y coordinate. That is, since the SP output buffer stores the intersection X coordinates of all edges that intersect with one object, a larger area than that in the third embodiment is required.

次に、ステップST405で1個のオブジェクトから線分に分割された全てのエッジ(またはベジエで定義された曲線)を処理したかの判定を行い、まだ処理されていないエッジが残っていれば、ステップST402に戻り、サブスキャンラインy0,y1,y2,y3とその処理されていないエッジとの交点X座標の算出を繰り返す。そして、ステップST405の判定で全エッジの処理が完了したら、ステップST406においてカレントスキャンラインを1進め、サブピクセルスキャンラインy0,y1,y2,y3の更新を行う。ステップST407でカレントスキャンラインYがYmaxを超えたかを比較し、超えていれば、1個のオブジェクトと交差する全てのサブスキャンラインの交点算出が終了したことになるので、ステップST408においてVGスキャンライン展開部108の起動を行う。VGスキャンライン展開部108は、実施の形態3の場合とは異なり、SP出力バッファ104〜107に格納されている1個のオブジェクトと交差する全てのサブスキャンラインの交点X座標を読み出して、ピクセルを生成していく。   Next, in step ST405, it is determined whether all edges (or curves defined by Bezier) divided from one object into line segments have been processed, and if there are still unprocessed edges, Returning to step ST402, the calculation of the intersection X coordinate between the sub-scan lines y0, y1, y2, and y3 and the unprocessed edge is repeated. When all edge processing is completed in the determination in step ST405, the current scan line is advanced by 1 in step ST406, and the sub-pixel scan lines y0, y1, y2, and y3 are updated. In step ST407, it is compared whether or not the current scan line Y exceeds Ymax. If it exceeds, the intersection calculation of all the sub-scan lines intersecting with one object is completed, so in step ST408 the VG scan line is determined. The expansion unit 108 is activated. Unlike the case of the third embodiment, the VG scan line development unit 108 reads out the intersection X coordinates of all the sub scan lines intersecting with one object stored in the SP output buffers 104 to 107 to obtain the pixel Will be generated.

ステップST407において、カレントスキャンラインYがYmaxを超えていなければ、ステップST410においてSP入力バッファ100のリードポインタをリセットし、ステップST402に戻り、サブスキャンラインと全エッジの交点X座標の算出を同様にして行う。   If the current scan line Y does not exceed Ymax in step ST407, the read pointer of the SP input buffer 100 is reset in step ST410, and the process returns to step ST402 to calculate the intersection X coordinate of the sub scan line and all edges in the same manner. Do it.

以上のように、実施の形態4の図形描画装置によれば、1個のオブジェクトと交差する全サブスキャンラインエッジの交点X座標の算出と、ピクセル生成を行うことにより、ベクターグラフィックスの塗りつぶし処理を高速に行うことができる。   As described above, according to the graphic drawing apparatus of the fourth embodiment, the calculation of the intersection X coordinate of all the sub-scan line edges intersecting with one object and the pixel generation are performed, thereby performing vector graphics filling processing. Can be performed at high speed.

実施の形態5.
図5は、図1におけるSIMDプロセッサ101が2並列の場合(SIMDプロセッサ101aとSIMDプロセッサ101bで構成)のベクターグラフィックスでの動作をより具体的に説明するためのものである。
ベクターグラフィックスではアンチエイリアスのカバレッジを算出するために、1個のスキャンラインを複数のサブスキャンラインに分割して処理を行う。図5では8個のサブスキャンラインy0,y1,y2,y3,y4,y5,y6,y7に分割したものである。
SIMDプロセッサは一般に4−SIMD構成であるので、SIMDプロセッサ101aの演算コアPU0,PU1,PU2,PU3に、サブスキャンラインy0,y1,y2,y3を割り当てて並列に処理を行う。そして、もう一方のSIMDプロセッサ101bの演算コアPU0,PU1,PU2,PU3に、サブスキャンラインy4,y5,y6,y7を割り当てる。各演算コアは自身に割り当てられたサブスキャンラインと全輪郭線とのX座標交点を順次求め、SP出力バッファ104〜107へ書き込んでいく。図5の例においては、SIMDプロセッサ101aのPU0はエッジ0の交点x00、エッジ1の交点x01、エッジ2の交点x02、エッジ3の交点x03を算出し、各エッジのUP/DOWN情報と共にSP出力バッファ104へ書き込んでいく。同様にPU1,PU2,PU3、そしてSIMDプロセッサ101bのPU0,PU1,PU2,PU3も各交点X座標とUP/DOWN情報をSP出力バッファへ書き込む。
Embodiment 5 FIG.
FIG. 5 is a diagram for more specifically explaining the operation in vector graphics when the SIMD processors 101 in FIG. 1 are in parallel (comprised of the SIMD processor 101a and the SIMD processor 101b).
In vector graphics, processing is performed by dividing one scan line into a plurality of sub-scan lines in order to calculate anti-aliasing coverage. In FIG. 5, the sub-scan lines are divided into eight sub-scan lines y0, y1, y2, y3, y4, y5, y6, and y7.
Since the SIMD processor generally has a 4-SIMD configuration, sub-scan lines y0, y1, y2, and y3 are assigned to the arithmetic cores PU0, PU1, PU2, and PU3 of the SIMD processor 101a to perform processing in parallel. Then, sub scan lines y4, y5, y6, and y7 are allocated to the arithmetic cores PU0, PU1, PU2, and PU3 of the other SIMD processor 101b. Each calculation core sequentially obtains the X coordinate intersections of the sub-scan lines and all contour lines assigned to it, and writes them to the SP output buffers 104 to 107. In the example of FIG. 5, PU0 of the SIMD processor 101a calculates the intersection point x00 of edge 0, the intersection point x01 of edge 1, the intersection point x02 of edge 2, and the intersection point x03 of edge 3, and SP output together with UP / DOWN information of each edge Write to the buffer 104. Similarly, PU1, PU2, PU3, and PU0, PU1, PU2, PU3 of the SIMD processor 101b also write each intersection X coordinate and UP / DOWN information to the SP output buffer.

次に、VGスキャンライン展開部108は、SP出力バッファ104〜107に書き込まれた情報を元に、輪郭線で囲まれた領域のピクセルのカバレッジを求めピクセルを生成していく。カバレッジを求めるために図示しないマスク情報生成用スキャンラインカウンタを用いる。スキャンラインカウンタは、1スキャンライン分のカウンタ群でピクセル毎にエッジとの交差回数をカウントする。カウンタはスキャンラインと交差するエッジのUP/DOWN情報に基づいてインクリメント/デクリメントした合計値である。このスキャンラインカウンタを用いることにより、複雑な図形でもX座標のソーティングをすることなく高速なピクセル生成が可能である。   Next, the VG scan line development unit 108 generates pixels by obtaining the coverage of the pixels in the region surrounded by the outline based on the information written in the SP output buffers 104 to 107. In order to obtain the coverage, a scan line counter for generating mask information (not shown) is used. The scan line counter is a group of counters for one scan line and counts the number of intersections with edges for each pixel. The counter is a total value incremented / decremented based on the UP / DOWN information of the edge intersecting the scan line. By using this scan line counter, even a complicated figure can be generated at high speed without sorting the X coordinate.

このように、複数のSIMDプロセッサを用いてサブスキャンラインの交点X座標とUP/DOWN情報算出を並列に行うことにより、ベクターグラフィックスのピクセル生成に必要なデータ作成を効率よく実行できる。   In this way, by using a plurality of SIMD processors to calculate the intersection X coordinate of the sub-scan line and the UP / DOWN information in parallel, it is possible to efficiently create data necessary for generating the vector graphics pixel.

尚、上記実施の形態では、複数のSIMDプロセッサを用いて複数のスキャンラインの処理に割り当てるよう構成したが、SIMDプロセッサ101のSIMD数を増やすことにより複数のスキャンラインを同時に並列処理するよう構成してもよい。   In the above-described embodiment, a plurality of SIMD processors are used to allocate a plurality of scan lines. However, by increasing the number of SIMDs in the SIMD processor 101, a plurality of scan lines are simultaneously processed in parallel. May be.

以上のように、実施の形態5の図形描画装置によれば、プロセッサをSIMDプロセッサとしてSIMDプロセッサを複数用意し、これら複数のSIMDプロセッサで複数のサブスキャンラインのエッジ交点算出処理を並列に処理するようにしたので、カバレッジの算出精度を向上させ、アンチエイリアスの品質を向上させることができる。   As described above, according to the graphic drawing apparatus of the fifth embodiment, a plurality of SIMD processors are prepared using SIMD processors as processors, and edge intersection calculation processing of a plurality of sub-scan lines is performed in parallel by the plurality of SIMD processors. As a result, coverage calculation accuracy can be improved and anti-aliasing quality can be improved.

また、実施の形態5の図形描画装置によれば、プロセッサをSIMDプロセッサとして、SIMDプロセッサのSIMD数を増加させることによりエッジ交点算出処理を並列に行うサブスキャンラインの数を増加させるようにしたので、カバレッジの算出精度を向上させ、アンチエイリアスの品質を向上させることができる。   Further, according to the graphic drawing apparatus of the fifth embodiment, since the processor is an SIMD processor, the number of SIMDs of the SIMD processor is increased to increase the number of sub-scan lines that perform edge intersection calculation processing in parallel. , Improve coverage calculation accuracy and improve anti-aliasing quality.

この発明の実施の形態1による図形描画装置を示す構成図である。BRIEF DESCRIPTION OF THE DRAWINGS It is a block diagram which shows the figure drawing apparatus by Embodiment 1 of this invention. この発明の実施の形態2による図形描画装置のSIMDプロセッサのベクターグラフィックスでの動作を示す説明図である。It is explanatory drawing which shows the operation | movement by the vector graphics of the SIMD processor of the figure drawing apparatus by Embodiment 2 of this invention. この発明の実施の形態3による図形描画装置のベクターグラフィックスでの動作を示すフローチャートである。It is a flowchart which shows the operation | movement by the vector graphics of the figure drawing apparatus by Embodiment 3 of this invention. この発明の実施の形態4による図形描画装置のベクターグラフィックスでの動作を示すフローチャートである。It is a flowchart which shows the operation | movement by the vector graphics of the figure drawing apparatus by Embodiment 4 of this invention. この発明の実施の形態5による図形描画装置のSIMDプロセッサのベクターグラフィックスでの動作を示す説明図である。It is explanatory drawing which shows the operation | movement by the vector graphics of the SIMD processor of the figure drawing apparatus by Embodiment 5 of this invention.

符号の説明Explanation of symbols

100 SP入力バッファ、100a VG輪郭情報、100b 3Dモデルデータ、101,101a,101b SIMDプロセッサ、102 SPプログラムメモリ、102a,113a VG用プログラム、102b,113b 3D用プログラム、103 VGシーケンス制御部、104〜107 SP出力バッファ、104a〜107a VGエッジデータ、104b〜107b 3D頂点データ、108 VGスキャンライン展開部、109 3Dセットアップ、110 3Dラスタライザ、111 テクスチャフェッチ部、112 ピクセルシェーダ、113 ピクセルシェーダプログラムメモリ、114 フラグメント処理部、115 カラーバッファ、116 第1の補助バッファ、116a VGマスクアルファ、116b 3Dデプス情報、117 第2の補助バッファ、117a VGシザー情報、117b 3Dステンシル情報。   100 SP input buffer, 100a VG contour information, 100b 3D model data, 101, 101a, 101b SIMD processor, 102 SP program memory, 102a, 113a VG program, 102b, 113b 3D program, 103 VG sequence controller, 104- 107 SP output buffer, 104a to 107a VG edge data, 104b to 107b 3D vertex data, 108 VG scanline development unit, 109 3D setup, 110 3D rasterizer, 111 texture fetch unit, 112 pixel shader, 113 pixel shader program memory, 114 Fragment processing unit, 115 color buffer, 116 first auxiliary buffer, 116a VG mask alpha, 116b 3D data Scan information, 117 a second auxiliary buffer, 117a VG scissor information, 117b 3D stencil information.

Claims (5)

3Dグラフィックスのジオメトリ処理とベクターグラフィックスのエッジ交点算出処理を行うプロセッサと、
前記エッジ交点算出処理結果であるスキャンライン情報からピクセルへの展開を行うスキャンライン展開部と、
3Dグラフィックス及びベクターグラフィックスにおけるピクセルシェーダ処理を行うピクセルシェーダと、
3Dグラフィックスではデプスバッファとして用い、ベクターグラフィックスではマスクバッファとして用いる第1の補助バッファと、
3Dグラフィックスではステンシルバッファとして用い、ベクターグラフィックスではシザーバッファとして用いる第2の補助バッファと、
3Dグラフィックス及びベクターグラフィックスで共通に用いるカラーバッファと、
前記第1の補助バッファ、前記第2の補助バッファ及び前記カラーバッファを用い、前記ピクセルシェーダから出力されたデータに対して、3Dグラフィックス及びベクターグラフィックスにおけるフラグメント処理を行うフラグメント処理部とを備えた図形描画装置。
A processor for performing 3D graphics geometry processing and vector graphics edge intersection calculation processing;
A scan line development unit that develops the pixel from the scan line information that is the result of the edge intersection calculation process;
A pixel shader that performs pixel shader processing in 3D graphics and vector graphics;
A first auxiliary buffer used as a depth buffer in 3D graphics and as a mask buffer in vector graphics;
A second auxiliary buffer used as a stencil buffer in 3D graphics and a scissor buffer in vector graphics;
A color buffer commonly used in 3D graphics and vector graphics;
A fragment processing unit that performs fragment processing in 3D graphics and vector graphics on the data output from the pixel shader using the first auxiliary buffer, the second auxiliary buffer, and the color buffer; Figure drawing device.
プロセッサに入力する3Dグラフィックスのジオメトリ処理を行うための入力データとベクターグラフィックスのエッジ交点算出処理に行うための入力データのいずれか一方を保持する入力バッファと、前記プロセッサから出力された3Dグラフィックスとベクターグラフィックスのいずれかの処理結果の出力データを保持する出力バッファとを備えると共に、
前記プロセッサは、実行するベクターグラフィックスと3Dグラフィックスの処理に応じて対応するプログラムを実行することを特徴とする請求項1記載の図形描画装置。
An input buffer for holding either input data for performing geometry processing of 3D graphics input to the processor or input data for performing edge intersection calculation processing of vector graphics, and 3D graphics output from the processor And an output buffer for holding output data of the processing result of either one of the vector graphics and
2. The graphic drawing apparatus according to claim 1, wherein the processor executes a corresponding program in accordance with vector graphics processing and 3D graphics processing to be executed.
ベクターグラフィックスのエッジ交点算出処理をアンチエイリアス処理に用い、プロセッサは複数のサブスキャンラインのエッジ交点を並列に算出することを特徴とする請求項1または請求項2記載の図形描画装置。   3. The graphic drawing apparatus according to claim 1, wherein the edge intersection calculation processing of vector graphics is used for antialiasing processing, and the processor calculates edge intersections of a plurality of sub scan lines in parallel. プロセッサをSIMDプロセッサとして当該SIMDプロセッサを複数用意し、
これら複数のSIMDプロセッサで複数のサブスキャンラインのエッジ交点算出処理を並列に処理することを特徴とする請求項3記載の図形描画装置。
Prepare multiple SIMD processors as SIMD processors,
4. The graphic drawing apparatus according to claim 3, wherein the plurality of SIMD processors process edge intersection calculation processing for a plurality of sub-scan lines in parallel.
プロセッサをSIMDプロセッサとして、当該SIMDプロセッサのSIMD数を増加させることによりエッジ交点算出処理を並列に行うサブスキャンラインの数を増加させることを特徴とする請求項3記載の図形描画装置。   4. The graphic drawing apparatus according to claim 3, wherein the number of sub-scan lines for performing edge intersection calculation processing in parallel is increased by increasing the number of SIMDs of the SIMD processor, using the processor as a SIMD processor.
JP2007145650A 2007-05-31 2007-05-31 Pattern drawing device Pending JP2008299642A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007145650A JP2008299642A (en) 2007-05-31 2007-05-31 Pattern drawing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007145650A JP2008299642A (en) 2007-05-31 2007-05-31 Pattern drawing device

Publications (1)

Publication Number Publication Date
JP2008299642A true JP2008299642A (en) 2008-12-11

Family

ID=40173102

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007145650A Pending JP2008299642A (en) 2007-05-31 2007-05-31 Pattern drawing device

Country Status (1)

Country Link
JP (1) JP2008299642A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101036242B1 (en) * 2009-06-05 2011-05-20 계명대학교 산학협력단 Image rendering method for vector graphic and apparatus thereof
JP2013532855A (en) * 2010-07-13 2013-08-19 アドバンスト・マイクロ・ディバイシズ・インコーポレイテッド Dynamic enabling and disabling of SIMD units in graphics processors
US9311102B2 (en) 2010-07-13 2016-04-12 Advanced Micro Devices, Inc. Dynamic control of SIMDs
JP2016520920A (en) * 2013-04-30 2016-07-14 マイクロソフト テクノロジー ライセンシング,エルエルシー 2D curve tessellation using graphics pipeline

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07152637A (en) * 1993-09-20 1995-06-16 Internatl Business Mach Corp <Ibm> System and method for storage
JPH1145346A (en) * 1997-07-29 1999-02-16 Matsushita Electric Ind Co Ltd Plotting device/method for three-dimensional picture and medium recording plotting method
WO2007049610A1 (en) * 2005-10-25 2007-05-03 Mitsubishi Electric Corporation Image processor

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07152637A (en) * 1993-09-20 1995-06-16 Internatl Business Mach Corp <Ibm> System and method for storage
JPH1145346A (en) * 1997-07-29 1999-02-16 Matsushita Electric Ind Co Ltd Plotting device/method for three-dimensional picture and medium recording plotting method
WO2007049610A1 (en) * 2005-10-25 2007-05-03 Mitsubishi Electric Corporation Image processor

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101036242B1 (en) * 2009-06-05 2011-05-20 계명대학교 산학협력단 Image rendering method for vector graphic and apparatus thereof
JP2013532855A (en) * 2010-07-13 2013-08-19 アドバンスト・マイクロ・ディバイシズ・インコーポレイテッド Dynamic enabling and disabling of SIMD units in graphics processors
US9311102B2 (en) 2010-07-13 2016-04-12 Advanced Micro Devices, Inc. Dynamic control of SIMDs
JP2016520920A (en) * 2013-04-30 2016-07-14 マイクロソフト テクノロジー ライセンシング,エルエルシー 2D curve tessellation using graphics pipeline

Similar Documents

Publication Publication Date Title
US8730253B2 (en) Decomposing cubic Bezier segments for tessellation-free stencil filling
EP3039652B1 (en) Prefixed summed length in graphics processing
JP5232358B2 (en) Rendering outline fonts
US9177351B2 (en) Multi-primitive graphics rendering pipeline
US8379025B1 (en) Methods and apparatus for rendering vector art on graphics hardware
US9183651B2 (en) Target independent rasterization
JP4937359B2 (en) Graphic drawing apparatus and graphic drawing method
US7928984B1 (en) Efficient data packaging for rendering bézier curves on a GPU
US8068106B1 (en) Rendering cubic Bézier curves as quadratic curves using a GPU
US20170270710A1 (en) Fast, Coverage-Optimized, Resolution-Independent and Anti-aliased Graphics Processing
US10192348B2 (en) Method and apparatus for processing texture
JP2008299642A (en) Pattern drawing device
EP4168976A1 (en) Fine grained replay control in binning hardware

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100301

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111003

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111018

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20120228