TWI478094B - Guard band clipping systems and methods - Google Patents

Guard band clipping systems and methods Download PDF

Info

Publication number
TWI478094B
TWI478094B TW097112498A TW97112498A TWI478094B TW I478094 B TWI478094 B TW I478094B TW 097112498 A TW097112498 A TW 097112498A TW 97112498 A TW97112498 A TW 97112498A TW I478094 B TWI478094 B TW I478094B
Authority
TW
Taiwan
Prior art keywords
vertex
processor
guard band
cut
module
Prior art date
Application number
TW097112498A
Other languages
Chinese (zh)
Other versions
TW200943220A (en
Inventor
Weng Kuo-Yin
Xu Yunjie
Original Assignee
Via Tech Inc
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 Via Tech Inc filed Critical Via Tech Inc
Priority to TW097112498A priority Critical patent/TWI478094B/en
Publication of TW200943220A publication Critical patent/TW200943220A/en
Application granted granted Critical
Publication of TWI478094B publication Critical patent/TWI478094B/en

Links

Landscapes

  • Image Generation (AREA)

Description

保護帶剪切系統和方法Protective tape shearing system and method

本發明係有關於一種資料處理系統,特別是有關於一種電腦圖形系統和方法。The present invention relates to a data processing system, and more particularly to a computer graphics system and method.

電腦圖形學是一門用電腦產生圖形,圖像或者其他繪畫或者圖示資訊的科學和藝術。圖形或者圖像的產生通常被稱為渲染。通常,在電腦三維繪圖中,一個場景中代表物件表面(或者體積)的幾何圖形被翻譯為圖元(圖像基本圖元),儲存在幀暫存器中,然後顯示於顯示設備上。Computer graphics is a science and art that uses computers to produce graphics, images, or other pictorial or graphic information. The generation of graphics or images is often referred to as rendering. Generally, in computer three-dimensional drawing, the geometry representing the surface (or volume) of an object in a scene is translated into primitives (image primitives), stored in a frame register, and then displayed on a display device.

一幅圖形或者圖像渲染時,當透過多種並行系統處理的時候,物件透過管道的多個階段經歷多種處理,這通常稱為空間。請見第1圖,渲染過程10一般顯示為從模型空間102到世界(world space)空間104,再到觀測空間(view space)106,再到剪切空間(clip space)108,再到顯示空間(screen space)110。在某些執行過程中,這個過程可能包含世界空間104,並且直接從模型空間102跳到觀測空間106。簡單地說,模型空間102代表原始的調整系統,因此那些將被包含在現時場景中的特定的物件尚未被轉換。模型空間102為用戶提供了一個透過使用模型轉換以在顯示器上處理物件的平臺。透過電腦顯示器的用戶介面,用戶可以嘗試用各種態樣、形狀和/或尺寸對物件進行尋找方向或排序。更詳細的說,透過用戶介面,用戶能夠經由各種 為物件或模型提供的模型轉換來指揮主處理器執行修改,結果使模型空間102變為世界空間104。When rendering a graphic or image, when processed through multiple parallel systems, the object undergoes multiple processes through multiple stages of the pipeline, often referred to as space. Referring to Figure 1, the rendering process 10 is generally shown as from the model space 102 to the world space 104, to the view space 106, to the clip space 108, to the display space. (screen space) 110. In some implementations, this process may include world space 104 and jump directly from model space 102 to observation space 106. Briefly, the model space 102 represents the original adjustment system, so that certain objects that will be included in the current scene have not yet been converted. Model space 102 provides a platform for the user to use the model transformation to process objects on the display. Through the user interface of the computer display, the user can try to find directions or sort the objects in various aspects, shapes and/or sizes. In more detail, through the user interface, users can go through various The model transformation provided for the object or model directs the host processor to perform the modification, with the result that the model space 102 becomes the world space 104.

更多轉換(例如觀察轉換)從世界空間104提供給轉換的物件的頂點,以促進發射和剪切,從而發展為觀測空間106。在觀測空間106(也稱為拍攝空間)中,產生各種功能--例如添加、修改亮度和/或陰影,微小拒絕,創建觀察冊等,這形成一個判斷:什麼物件能被照相機拍到以及什麼物件不能被照相機拍到。例如,一個具有近距離和遠距離剪切面的平面截體的觀察被典型的創建。渲染過的三維場景的物件,如果近距離和遠距離剪切面和平面截體的邊緣不相匹配,則忽略處理,以此減少剪切操作。More transformations (e.g., observation transitions) are provided from the world space 104 to the vertices of the transformed object to facilitate launching and shearing, thereby developing into the observation space 106. In the observation space 106 (also referred to as the shooting space), various functions are generated - such as adding, modifying brightness and/or shadows, tiny rejections, creating an observation book, etc., which form a judgment: what objects can be photographed by the camera and what Objects cannot be captured by the camera. For example, an observation of a plane truncation with close and long shear planes is typically created. Objects of rendered 3D scenes, if the close and far cut planes do not match the edges of the plane cuts, the processing is ignored, thereby reducing the cut operation.

在剪切空間108中,在觀測空間106中創建的平面截體的座標被格式化(例如,透過透視劃分)以簡化剪切的複雜性,然後執行剪切。In the shear space 108, the coordinates of the plane cuts created in the observation space 106 are formatted (eg, by perspective division) to simplify the complexity of the cut, and then the cut is performed.

一旦剪切執行,觀察量中的基本圖元就被影射到顯示空間110並被渲染到顯示設備上。請注意,在有些情況下,各種如前所述的處理都可以在不同的和/或其他的空間發生。Once the cut is performed, the base primitives in the observations are mapped to display space 110 and rendered onto the display device. Please note that in some cases, various processes as described above may occur in different and/or other spaces.

現在請見剪切空間108,應用了各種技術來減少需要剪切的基本圖元的數量(比如三角)。常用的其中一個技術為保護帶剪切技術。在保護帶剪切中,觀測空間106中創建的近距離和遠距離剪切面維持不變,但是平面截體被拉伸,超過期望的視口。換句話說,共兩個平面截體被創建:一個是保護帶平面截體,另一個是較小視口平面截體。 渲染和剪切的環境可以按照如下步驟來實現。如果三角位於視口之外,則完全丟棄。如果三角位於視口內,則不需剪切,直接渲染。而如果三角與視口和保護帶平面截體交叉或者如果三角與近距離和遠距離剪切面交叉,則執行剪切。See cut space 108 now, applying various techniques to reduce the number of primitives that need to be cut (such as triangles). One of the commonly used techniques is the protective tape cutting technique. In the guard band shear, the close and long shear planes created in the observation space 106 remain unchanged, but the plane cuts are stretched beyond the desired viewport. In other words, a total of two plane truncations are created: one is the guard band plane truncation and the other is the smaller viewport plane truncation. The environment for rendering and cutting can be implemented as follows. If the triangle is outside the viewport, it is completely discarded. If the triangle is inside the viewport, it does not need to be cut and rendered directly. If the triangle intersects the viewport and the guard plane plane section or if the triangle crosses the close and long distance cut planes, the cut is performed.

儘管保護帶剪切提供了一個渲染的保守方法(例如,比起需要剪切的三角來,更多的三角直接通過),這種保守仍然要與剪切操作的減少相平衡。也就是說,大多數情況下,保護帶剪切減少的時間間隔取決於主處理器(例如中央處理器,或者說CPU)透過接收部分位於顯示幕之外的三角來執行的剪切、允許主處理器執行更為簡單和快速的選擇和剪切測試的時間間隔。然而,當三角將要被剪切時,處理是很費力和費時的。在傳統的系統中,典型的做法是:透過在主處理器上執行多個不同演算法中的一個演算法來做剪切,比如科恩-薩瑟蘭都演算法(Cohen-Sutherland),薩瑟蘭都-霍德格曼演算法(Sutherland-Hodgman),威勒-亞瑟頓演算法(Weiler-Atherton),派翠克吉爾斯美勒特演算法(Patrick Gilles Maillot)等等。這些演算法通常需要完整地分類(比如,觀察平面截體剪切碼),與觀察量剪切平面的交叉判斷和頂點的每個參數(比如阿爾法參數、福戈參數等)的插補,這些都需要很強的計算步驟,與硬體的映射不太好。Although guard band clipping provides a conservative approach to rendering (for example, more triangles pass directly than triangles that need to be cut), this conservativeity is still balanced with the reduction in shearing operations. That is to say, in most cases, the time interval during which the guard band shear is reduced depends on the cutting performed by the main processor (for example, the central processing unit, or the CPU) by receiving a triangle located outside the display screen, allowing the main The processor performs a simpler and faster selection and shear test interval. However, when the triangle is about to be cut, the processing is laborious and time consuming. In traditional systems, the typical approach is to perform a cut by performing one of several different algorithms on the host processor, such as Cohen-Sutherland, Catherine. The Sutherland-Hodgman algorithm, the Weiler-Atherton algorithm, the Patrick Gilles Maillot, and so on. These algorithms usually need to be completely classified (for example, observing the plane cut-off cut code), the intersection judgment with the observation cut plane, and the interpolation of each parameter of the vertex (such as alpha parameter, Fogo parameter, etc.). Both require very strong calculation steps, and the mapping with the hardware is not very good.

本發明提供了保護帶剪切的系統與方法。簡要地說, 在架構中,本發明的其中一個方法的實施例包含:將轉換後的頂點資料向繪圖管道的下游傳送;保護帶剪切模組判斷與轉換後的頂點資料相應的基本圖元是否需要剪切,以及基於上述判斷執行保護保護帶剪切和重心插補,以便保護帶剪切計算邏輯單元定義新頂點的座標。The present invention provides systems and methods for protecting the belt from shearing. Briefly, In an architecture, an embodiment of one of the methods of the present invention includes: transmitting the converted vertex data to a downstream of the drawing pipeline; and the guard band cutting module determines whether the basic primitive corresponding to the converted vertex data needs to be cut. And performing protection guard band shearing and center of gravity interpolation based on the above determination to protect the coordinates of the new vertex with the clipping calculation logic unit.

本發明的其中一個保護帶剪切系統的實施例包含:一頂點處理器,將轉換後的頂點資料轉換至整數顯示空間資料,計算剪切碼並將轉換後的頂點資料傳輸至繪圖管道的下游;以及一保護帶剪切模組耦接到頂點處理器,一保護帶計算邏輯單元耦接到該保護帶剪切模組,該保護帶剪切模組用來判斷與該轉換後的頂點資料相應的基本圖元是否需要剪切,依據該判斷,將該基本圖元傳輸至該保護帶計算邏輯單元,以執行保護帶剪切。An embodiment of one of the guard band shearing systems of the present invention includes: a vertex processor that converts the converted vertex data to integer display spatial data, calculates the cut code, and transmits the converted vertex data to the downstream of the drawing pipeline And a protection strip shearing module coupled to the vertex processor, a guard band computing logic unit coupled to the guard band shearing module, the guard band shearing module for determining and converting the transformed vertex data Whether the corresponding basic primitive needs to be cut, according to the judgment, the basic primitive is transmitted to the guard band calculation logic unit to perform guard band clipping.

本發明的其中一個保護帶剪切系統的實施例包含:一狀態機,接收狀態資料和轉換的頂點;一頂點索引緩衝器,耦接至該狀態機;一頂點緩衝器,由該頂點索引緩衝器索引,該頂點緩衝器儲存該轉換的頂點;一頂點處理器,耦接至該頂點索引緩衝器,該頂點處理器產生頂點的剪切碼,並對剪切後的基本圖元的結果相應的頂點的屬性執行透視畫法校正;一微小拒絕模組,依據該剪切碼的值執行微小拒絕;一保護帶剪切模組,依據該剪切碼的值判斷基本圖元是否需要執行保護帶剪切;以及一保護帶剪切計算邏輯單元,回應於需要剪切的判斷而剪切該基本圖元;該保護帶剪切計算邏輯單元還用來執行插補,以定義新剪切 的頂點的座標。An embodiment of one of the guard band shearing systems of the present invention comprises: a state machine receiving state data and converted vertices; a vertex index buffer coupled to the state machine; and a vertex buffer buffered by the vertex index a vertex buffer storing the transformed vertex; a vertex processor coupled to the vertex index buffer, the vertex processor generating a cut code of the vertex, and corresponding to the result of the cut base element The vertices of the attributes perform perspective rendering correction; a tiny rejection module performs micro-rejection according to the value of the clipping code; a protection band cutting module determines whether the basic primitive needs to be protected according to the value of the clipping code a shearing; and a guard band shear calculation logic unit that cuts the base primitive in response to a determination that a cut is required; the guard band shear calculation logic unit is further configured to perform interpolation to define a new cut The coordinates of the vertices.

本發明所揭露的保護帶剪切系統和方法(簡稱為GB剪切系統)提供了一種快速、便捷、基於硬體的保護帶剪切。在一個實施例中,由一個或多個固定點的計算邏輯單元(ALU)執行剪切,無須主處理器工作,與傳統技術相比,加快了剪切處理速度。在這樣的實施例中,剪切在顯示空間執行,微小拒絕在剪切空間或顯示空間執行。因為以專用硬體實現,本發明各個不使用主處理器的GB剪切系統的實施例提供了高效、高速的計算,減少了複雜性。The protective tape shearing system and method (referred to as the GB shearing system) disclosed herein provides a fast, convenient, hardware-based protective tape shear. In one embodiment, the cutting is performed by one or more fixed point computational logic units (ALUs) without the need for the main processor to operate, which speeds up the clipping process compared to conventional techniques. In such an embodiment, the cut is performed in the display space, and the tiny rejection is performed in the cut space or display space. Because of the implementation of dedicated hardware, embodiments of the GB shear system of the present invention that do not use a main processor provide efficient, high speed calculations, reducing complexity.

為讓本發明之上述和其他目的、特徵、和優點能更明顯易懂,下文特舉出較佳實施例,並配合所附圖式,作詳細說明如下:The above and other objects, features and advantages of the present invention will become more <RTIgt;

第2圖是繪圖處理系統100的實施例,其中包含保護帶(GB)剪切系統200的實施例。在有些情況下,繪圖處理系統100可以被配置為一個電腦系統。繪圖處理系統100可以包含顯示設備202,由顯示介面單元(DIU)204和本地記憶體206(例如,可以包含顯示緩衝器,紋理緩衝器,命令緩衝器等等)。在這裏,本地記憶體206也可以包含幀緩衝器或儲存單元。本地記憶體206透過儲存介面單元(MIU)210耦接到繪圖處理單元(GPU)214。在本實施例中,儲存介面單元210,繪圖處理單元214和顯示介面單元204耦接到匯流排界面單元(BIU)218。在一個實施例中,匯流排界面單元218可以相容PCIE,並且可以使用 繪圖位址重映射表(GART),雖然會用到其他的記憶體映射機制。繪圖處理單元GPU 214包含GB剪切系統200,如下所述。雖然只是顯示為繪圖處理單元GPU214的一個部件,但在一些實施例中,GB剪切系統200可以包含如圖所示的一個或者多個繪圖處理系統100的其他元件,或者其他元件。2 is an embodiment of a graphics processing system 100 that includes an embodiment of a guard band (GB) shearing system 200. In some cases, the graphics processing system 100 can be configured as a computer system. The graphics processing system 100 can include a display device 202, by a display interface unit (DIU) 204 and local memory 206 (eg, can include display buffers, texture buffers, command buffers, etc.). Here, local memory 206 may also include a frame buffer or a storage unit. The local memory 206 is coupled to a graphics processing unit (GPU) 214 via a storage interface unit (MIU) 210. In the present embodiment, the storage interface unit 210, the graphics processing unit 214, and the display interface unit 204 are coupled to a bus interface unit (BIU) 218. In one embodiment, the bus interface unit 218 can be compatible with PCIE and can be used The Plot Address Remap Table (GART), although other memory mapping mechanisms are used. The graphics processing unit GPU 214 includes a GB shearing system 200, as described below. Although shown as only one component of the graphics processing unit GPU 214, in some embodiments, the GB cutout system 200 can include other components of one or more of the graphics processing systems 100 as shown, or other components.

匯流排界面單元218耦接到晶片組222(比如北橋晶片組)或者轉換器。晶片組222包含介面電路,用來增強來自中央處理器(CPU)226(這裏也稱為主處理器)的信號,並將進出系統記憶體224的信號與進出輸入輸出設備(I/O)(圖中未示出)的信號分離出來。儘管在這裏描述了PCIE匯流排協定,在某些實施例中,主處理器226和繪圖處理單元214之間可以採用其他一些連接和/或通信方式(比如PCI,專用高速匯流排等等)。系統記憶體224也包含驅動軟體250,透過使用主處理器226傳送通信指令或命令給繪圖處理單元214中的暫存器和指令流處理機。The bus interface unit 218 is coupled to a chip set 222 (such as a north bridge chip set) or a converter. The chipset 222 includes interface circuitry for enhancing signals from a central processing unit (CPU) 226 (also referred to herein as a main processor) and for inputting and receiving signals to and from the system memory 224, as well as input and output devices (I/O) ( The signals not shown in the figure are separated. Although a PCIE bus bar protocol is described herein, in some embodiments, other connections and/or communication methods (such as PCI, dedicated high speed bus, etc.) may be employed between the main processor 226 and the graphics processing unit 214. System memory 224 also includes driver software 250 for communicating communication instructions or commands to the scratchpad and instruction stream handlers in graphics processing unit 214 via host processor 226.

在一些實施例中,還包含其他繪圖處理單元,比如透過晶片組222經由PCIE匯流排協定耦接到第2圖中顯示的元件。在一個實施例中,繪圖處理系統100可以包含第2圖中顯示的所有元件,還可以包含其中的幾個和/或不同的元件。另外,在一些實施例中,還可以用到其他元件,例如耦接到晶片組222的南橋晶片組。In some embodiments, other graphics processing units are also included, such as coupled to the elements shown in FIG. 2 via a PCIE busbar protocol via chipset 222. In one embodiment, the graphics processing system 100 may include all of the elements shown in FIG. 2, and may also include several and/or different elements. Additionally, in some embodiments, other components, such as a south bridge chipset coupled to the wafer set 222, may also be utilized.

在某些特定的實施例中,GB剪切系統200用硬體實現,包含如下技術中的任何一個或者其組合,如本領域技 術人員所知:一個具有邏輯閘來實現資料信號邏輯功能的邏輯分立電路,一個具有相應邏輯閘組合的特殊應用積體電路(ASIC),一個可編程閘陣列(PGA),一個現場可編程閘陣列(FPGA),狀態機等等。In certain particular embodiments, the GB shearing system 200 is implemented in hardware, including any one or combination of the following, as in the art. Known to the surgeon: a logic discrete circuit with logic gates to implement the logic function of the data signal, a special application integrated circuit (ASIC) with a corresponding logic gate combination, a programmable gate array (PGA), a field programmable gate Array (FPGA), state machine, and more.

第3圖為第2圖中繪圖處理單元214和保護帶剪切系統200實施例的示意圖。在一些實施例中,還可以包含比第3圖中所示的元件多或者少。比如,每一個如下所述的模組或者單元都可以具有它自己的內部暫存器或者暫存器,圖中未示出,可以是模組中獨立使用,或者和其他模組共用。在一個實施例中,繪圖處理單元214可以設置為管道架構,包含命令流處理器(CSP)302,執行單元池(EU)304,三角結構單元(TSU)306,和GB剪切系統200,屬性結構單元(ASU)308,範圍和瓦片產生單元(STG)310,紋理先進先出單元(TFIFO)312,深度先進先出單元(ZFIFO)314,屬性結構單元(ASU)先進先出(FIFO)單元(AFIFO)316組成一體。3 is a schematic diagram of an embodiment of the drawing processing unit 214 and the guard band shearing system 200 in FIG. In some embodiments, more or less elements than those shown in FIG. 3 may also be included. For example, each module or unit as described below may have its own internal register or register, which is not shown in the figure, and may be used independently in the module or shared with other modules. In one embodiment, the graphics processing unit 214 can be configured as a pipeline architecture including a Command Stream Processor (CSP) 302, an Execution Unit Pool (EU) 304, a Triangular Structure Unit (TSU) 306, and a GB Shear System 200, attributes. Structural Unit (ASU) 308, Range and Tile Generation Unit (STG) 310, Texture First In First Out Unit (TFIFO) 312, Deep First In First Out Unit (ZFIFO) 314, Attribute Structure Unit (ASU) First In First Out (FIFO) The unit (AFIFO) 316 is integrated.

命令流處理器302提供狀態資料(來自於驅動軟體250),執行單元池304(比如頂點形狀功能)提供交換的頂點資料(也可以來自於驅動軟體250)給三角結構單元306。在有些實施例中,頂點資料可以由固定功能頂點陰影處理器提供。基於所接收的資料,三角結構單元306整合和設置基本圖元(比如線,三角形,如多邊形,三角帶,扇形的組合基本圖元等等)來空白剪切,以及為屬性結構單元308重新處理資料。例如,三角結構單元306執行眾 所周知的任務:視口轉換,微小拒絕,範圍盒產生和剔除。另外,三角結構單元306透過使用GB剪切系統200執行保護帶剪切。The command stream processor 302 provides status data (from the driver software 250), and the execution unit pool 304 (such as the vertex shape function) provides exchanged vertex data (which may also come from the driver software 250) to the triangulation unit 306. In some embodiments, vertex data can be provided by a fixed function vertex shader processor. Based on the received data, the triangulation unit 306 integrates and sets basic primitives (such as lines, triangles, such as polygons, triangles, combined basic primitives of the sector, etc.) for blank clipping, and reprocesses the attribute structure unit 308. data. For example, the triangular structure unit 306 performs Known tasks: viewport conversion, tiny rejection, range box generation and culling. In addition, the triangular structure unit 306 performs guard band shearing by using the GB shearing system 200.

三角結構單元306將這些資料從上述的處理器提供給屬性結構單元308,屬性結構單元308為每個將被渲染(例如,透過圖元級插補)的基本圖元分別設置屬性三角值(比如顏色、深度、透明度、模糊等)。這樣的屬性三角值被送到深度先進先出單元314和屬性結構單元先進先出單元單元316。例如,如果屬性結構單元308包含Z(深度),屬性三角值處理單元(例如ALU等)則與深度先進先出單元314一起來執行此類計算,如本領域人員所知,在深度先進先出單元314中寫入這些三角值以便後續在Z-test單元中使用。屬性結構單元308與屬性結構單元先進先出單元316協同動作,執行本領域人員所知的圖元顏色和紋理屬性三角值處理,以便在圖元級上的進一步插補。屬性結構單元308也將三角結構單元邊緣函數傳遞給範圍和瓦片產生310,範圍和瓦片產生310提供瓦片生成功能,使得資料物件分割為瓦片(例如8x8,16x16等),並傳遞至紋理先進先出單元312。The triangulation unit 306 provides these materials from the processor described above to the attribute structure unit 308, which sets the attribute triangle values for each of the base elements to be rendered (eg, through primitive-level interpolation) (eg, Color, depth, transparency, blur, etc.). Such attribute triangle values are sent to the depth first in first out unit 314 and the attribute structure unit first in first out unit unit 316. For example, if attribute structure unit 308 includes Z (depth), attribute trigonometric processing unit (eg, ALU, etc.), along with depth first in first out unit 314, performs such calculations, as is known to those skilled in the art, in depth first in, first out. These triangular values are written in unit 314 for subsequent use in the Z-test unit. The attribute structure unit 308 cooperates with the attribute structure unit first in first out unit 316 to perform primitive color and texture attribute triangulation processing known to those skilled in the art for further interpolation at the primitive level. The attribute structure unit 308 also passes the triangular structure unit edge function to the range and tile generation 310, and the range and tile generation 310 provides a tile generation function that causes the data object to be segmented into tiles (eg, 8x8, 16x16, etc.) and passed to Texture first in first out unit 312.

第4圖為第3圖所示保護(GB)帶剪切系統200的實施例的部分元件的示意圖。如前所述,在其中一個實施例中,GB剪切系統200為三角結構單元306的一部分,包含輸入狀態機(ISM)402、暫存器模組404、頂點檢索緩衝器(VIB)406、頂點緩衝器(VB)408、頂點處理器410、基本圖元彙 編/微小拒絕(PATR)模組412(也被稱為微小拒絕模組),保護帶剪切模組(GBC)414、保護帶頂點緩衝器(GBVB)416、保護帶計算邏輯單元(GB ALU)418、三角處理器(TRIPROC)420以及保護帶屬性輸出狀態機(OSM GBA)模組422。保護帶屬性輸出狀態機(OSM GBA)模組422輸出保護帶頂點屬性的結果至屬性結構單元308,以便進行進一步設置。第4圖中顯示了屬性結構單元308還可以包含其他元件,屬性結構單元(ASU)計算邏輯單元(ALU)424將資料傳送至範圍和瓦片產生單元310、屬性結構單元先進先出單元單元316和深度先進先出單元314,如第3圖中所描述。GB剪切系統200的有些實施例可以包含更少或更多或不同的元件。Figure 4 is a schematic illustration of some of the elements of an embodiment of the protective (GB) tape shearing system 200 shown in Figure 3. As described above, in one embodiment, the GB shearing system 200 is part of the triangular structure unit 306, including an input state machine (ISM) 402, a scratchpad module 404, a vertex search buffer (VIB) 406, Vertex buffer (VB) 408, vertex processor 410, basic primitive sink Edit/Micro Reject (PATR) module 412 (also known as micro-rejection module), protection band cut module (GBC) 414, guard band vertex buffer (GBVB) 416, guard band calculation logic unit (GB ALU) 418, a triangle processor (TRIPROC) 420, and a guard band attribute output state machine (OSM GBA) module 422. The guard band attribute output state machine (OSM GBA) module 422 outputs the result of protecting the vertex attribute to the attribute structure unit 308 for further setup. The attribute structure unit 308 is shown in FIG. 4 and may also include other elements. The attribute structure unit (ASU) calculation logic unit (ALU) 424 transfers the data to the range and tile generation unit 310, and the attribute structure unit first in first out unit unit 316. And a deep FIFO unit 314, as described in FIG. Some embodiments of the GB shear system 200 may include fewer or more or different components.

一般來說,保護帶剪切是在頂點座標(和相關屬性)依透視畫法校正和映射到頂點處理器410中的整數顯示座標後才執行的,使得線性內插匹配顯示空間的需求。在一個實施例中,透視畫法校正全部屬性與XYZ座標判斷同步獲得,可以理解為,一些頂點可稍後在保護帶計算邏輯單元418中隨著新頂點結果的計算值而獲得剪切。因此,如隨後將進一步討論的,頂點處理器410為至少兩個硬體模組服務,他們稱為頂點檢索緩衝器406和保護帶剪切模組414。在一個實施例中,保護帶剪切模組414比設置在頂點處理器410和頂點檢索緩衝器406之間的標準階段有更高的優先順序,因此來自保護帶剪切模組414的與剪切操作相關的請求能夠中斷當前來自頂點檢索緩衝 器406的頂點處理處理。In general, guard band clipping is performed after the vertex coordinates (and associated attributes) are corrected and mapped to integer display coordinates in vertex processor 410, such that linear interpolation matches the display space requirements. In one embodiment, the perspective rendering corrections are all synchronized with the XYZ coordinate determination, it being understood that some of the vertices may later be clipped in the guard band calculation logic unit 418 along with the calculated value of the new vertex result. Thus, as will be discussed further below, vertex processor 410 serves at least two hardware modules, which are referred to as vertex retrieval buffer 406 and guard band cutout module 414. In one embodiment, the guard band shear module 414 has a higher priority than the standard phase disposed between the vertex processor 410 and the vertex search buffer 406, thus the shear from the guard band shear module 414 The request related to the cut operation can interrupt the current search buffer from the vertex The vertex processing of the 406 is processed.

輸入狀態機402用來同步執行單元池資料(例如狀態、命令、轉換的頂點資料)和命令流處理器資料(例如狀態、命令)。輸入狀態機402將命令和狀態資料傳送至暫存器模組404,將轉換的頂點資料傳送至頂點檢索緩衝器406。頂點檢索緩衝器406將頂點資料寫入到頂點緩衝器408。頂點檢索緩衝器406根據每個頂點在基本圖元中的位置(例如帶)來判斷其參考數。當基本圖元被拒絕或完成(若完成則傳送至屬性結構單元308),在相同或實質相同的時間內,頂點檢索緩衝器406更新(自己更新或依下游模組的請求更新)所有特定基本圖元的所有頂點的參考數。當頂點緩衝器的任何一個輸入釋放時(比如,當所有基本圖元都被拒絕或者都被傳送至屬性結構單元308時),頂點緩衝器408接收從輸入狀態機402傳送來的頂點資料。Input state machine 402 is used to synchronize execution of unit pool data (eg, state, commands, converted vertex data) and command stream processor data (eg, status, commands). The input state machine 402 communicates the command and status data to the scratchpad module 404, and passes the converted vertex data to the vertex lookup buffer 406. Vertex retrieval buffer 406 writes vertex data to vertex buffer 408. The vertex retrieval buffer 406 determines its reference number based on the position (e.g., band) of each vertex in the base primitive. When the base primitive is rejected or completed (if it is completed, it is passed to the attribute structure unit 308), the vertex retrieval buffer 406 updates (self-updates or updates according to the request of the downstream module) all the specific basics in the same or substantially the same time. The reference number of all vertices of the primitive. Vertex buffer 408 receives vertex data transmitted from input state machine 402 when any of the input to the vertex buffer is released (eg, when all of the base primitives are rejected or are passed to attribute structure unit 308).

頂點處理器410從頂點緩衝器408(透過頂點檢索緩衝器406使用索引)接收剪切空間頂點資料,執行透視畫法校正和視口轉換,轉換資料至整數顯示空間。頂點處理器410也產生頂點的剪切碼,被下游各個模組用來判斷是否包含微小拒絕或保護帶剪切。在一個實施例中,頂點處理器410包含管道(例如多階段管道架構。因此,在標準處理過程中,頂點處理器410處理所有即將到來的頂點檢索緩衝器406所需的全部頂點,並將資料傳送至基本圖元彙編/微小拒絕模組412和保護帶剪切模組414。Vertex processor 410 receives the cut space vertex data from vertex buffer 408 (using an index through vertex retrieval buffer 406), performs perspective art correction and viewport conversion, and converts the data to an integer display space. The vertex processor 410 also generates a cut code for the vertex, which is used by the downstream modules to determine whether to include a minor rejection or a guard band cut. In one embodiment, vertex processor 410 includes a pipeline (eg, a multi-stage pipeline architecture. Thus, during standard processing, vertex processor 410 processes all of the vertices required for all upcoming vertex retrieval buffers 406 and will Transfer to the base primitive assembly/micro-rejection module 412 and the guard band cutout module 414.

由頂點處理器410和頂點檢索緩衝器406執行的標準處理一直進行,直到保護帶剪切模組414傳送信號至頂點處理器410表明收到一個剪切事件。一般地,回應於基於剪切操作的新頂點的產生,保護帶剪切模組414請求頂點處理器410從頂點檢索緩衝器406的處理中中斷,XYZ頂點計算和屬性透視畫法校正被頂點處理器410重做。如上所暗示,頂點處理器410透過將所有的當前資料臨時儲存於整數緩衝器而完成如上各種任務,並即時服務保護帶剪切模組請求。待處理完保護帶剪切模組請求後,頂點檢索緩衝器406的處理繼續進行。特別地,為了將要進行保護帶剪切的基本圖元,頂點處理器410從頂點檢索緩衝器406獲取剪切空間資料,然後為剪切的基本圖元產生新頂點。例如,當保護帶剪切事件在後續管道階段中產生時(比如保護帶剪切模組414的信號表明剪切事件產生),頂點處理器410將資料(當前階段處理所需的資料)從頂點檢索緩衝器406中複製出來,臨時儲存於臨時緩衝器,在一個實施例中,是儲存於頂點處理器410中。當服務保護帶剪切模組請求之後,頂點處理器410存取此臨時儲存資料並繼續處理頂點檢索緩衝器406的資料。The standard processing performed by vertex processor 410 and vertex retrieval buffer 406 continues until guard band shear module 414 transmits a signal to vertex processor 410 indicating receipt of a clipping event. In general, in response to the generation of new vertices based on the shearing operation, the guard band clipping module 414 requests the vertex processor 410 to interrupt the processing from the vertex retrieval buffer 406, and the XYZ vertex calculation and the attribute perspective rendering correction are processed by the vertex. The unit 410 is redone. As implied above, the vertex processor 410 accomplishes the above various tasks by temporarily storing all current data in an integer buffer, and the instant service protection band cut module request. After the protection band cutout module request is processed, the processing of the vertex retrieval buffer 406 continues. In particular, for the base primitive to be protected for shear band clipping, vertex processor 410 retrieves the cut space data from vertex retrieval buffer 406 and then generates new vertices for the cropped base primitive. For example, when a guard band shear event is generated in a subsequent pipeline phase (eg, the signal from the guard band shear module 414 indicates that a shear event is generated), the vertex processor 410 takes the data (data required for current stage processing) from the vertex. The search buffer 406 is copied, temporarily stored in a temporary buffer, and in one embodiment, stored in the vertex processor 410. After the service protection band cut module request, the vertex processor 410 accesses the temporary storage data and continues processing the data of the vertex retrieval buffer 406.

頂點處理器410處理過之後,基本圖元彙編/微小拒絕模組412對所有位於視口之外(由頂點處理器410的剪切碼表示)的頂點執行微小拒絕。可以使用一種或多種微小拒絕技術(在顯示空間或剪切空間中),包括本領域所公知的:負W,剪切窗,Z近距離,Z遠距離,剔除距 離測試以及剪切面測試。After the vertex processor 410 has processed, the base primitive assembler/minor rejection module 412 performs a slight rejection of all vertices located outside of the viewport (represented by the cut code of the vertex processor 410). One or more micro-rejection techniques (in display or shear space) may be used, including those known in the art: negative W, shear window, Z close distance, Z long distance, cull distance Off test and shear face test.

基本圖元資料被傳送至保護帶剪切模組414,其基於頂點處理器410產生的剪切碼判斷是否需要保護帶剪切,剪切碼還向保護帶剪切模組414暗示了以保護帶和視口部分為參照,基本圖元頂點所處的位置。如果需要剪切,即傳送頂點資料至保護帶頂點緩衝器416並在保護帶計算邏輯單元418中執行剪切計算。剪切後的三角傳送至三角處理器420,在這裏執行計算,例如決定性計算,範圍盒,邊緣函數,屬性函數等本領域技術人員所知的方法。三角處理器420的輸出提供至保護帶屬性輸出狀態機模組422,如上所述。保護帶屬性輸出狀態機模組422的輸出(頂點屬性)輸出至屬性結構單元計算邏輯單元424,然後輸出至範圍和瓦片產生單元310和各種FIFO,如上所詳述。屬性結構單元計算邏輯單元424從保護帶屬性輸出狀態機模組422接收剪切後的(或稱為被保護的)頂點屬性(Z,顏色、紋理等),並計算三角值,以便在圖元處理階段執行進一步的插補。這樣,屬性結構單元計算邏輯單元424將三角幾何設置資料從三角處理器420傳送到範圍和瓦片產生單元310。屬性三角值和任何狀態資訊都被寫入深度先進先出單元314和屬性結構單元先進先出單元單元316。The base primitive data is passed to a guard band shear module 414 which determines whether a tape cut is required based on the cut code generated by the vertex processor 410, and the cut code is also suggested to the guard band shear module 414 for protection. The band and viewport parts are referenced, and the position of the base vertices is located. If clipping is required, the vertex data is transferred to the guard band vertex buffer 416 and the cut calculation is performed in the guard band calculation logic unit 418. The clipped triangles are passed to a triangle processor 420 where calculations such as deterministic calculations, range boxes, edge functions, attribute functions, and the like known to those skilled in the art are performed. The output of the triangle processor 420 is provided to a guard band attribute output state machine module 422, as described above. The output of the guard band attribute output state machine module 422 (vertex attribute) is output to the attribute structure unit calculation logic unit 424 and then output to the range and tile generation unit 310 and various FIFOs, as detailed above. The attribute structure unit calculation logic unit 424 receives the clipped (or called protected) vertex attributes (Z, color, texture, etc.) from the guard band attribute output state machine module 422, and calculates a trigonometric value for the primitive The processing stage performs further imputation. Thus, the attribute structure unit calculation logic unit 424 transfers the triangular geometry setting material from the triangle processor 420 to the range and tile generation unit 310. The attribute triangle value and any status information are written to the depth first in first out unit 314 and the attribute structure unit first in first out unit unit 316.

第5圖描述了第4圖所示保護帶剪切系統的一個方法實施例的流程圖,用200a表示。第6圖和第7圖分別詳細描述方法200a的相關部分。GB剪切方法200a執行保護 帶剪切測試502。現進一步參照第6圖,602步驟,頂點檢索緩衝器406從頂點緩衝器408中存取顯示空間資料,並在步驟604提供給頂點處理器410。在其中一個實施例中,此類存取將在保護帶剪切模組414的下游變為空間狀態後開始。下列公式表示了頂點處理器410使用虛擬碼產生剪切碼的機制: Figure 5 depicts a flow diagram of one embodiment of a method of the protective tape shearing system of Figure 4, indicated at 200a. The relevant portions of the method 200a are described in detail in Figures 6 and 7, respectively. The GB shearing method 200a performs a guard band shear test 502. Referring now further to FIG. 6, step 602, vertex retrieval buffer 406 accesses display space data from vertex buffer 408 and provides it to vertex processor 410 in step 604. In one of these embodiments, such access will begin after becoming a spatial state downstream of the guard band shear module 414. The following formula represents the mechanism by which vertex processor 410 uses the virtual code to generate the cut code:

簡而言之,上述虛擬碼為每一個頂點設置了剪切旗標或剪切碼,其對保護帶剪切模組414表明是否要進行保護帶剪切。驅動軟體250設置不同的wnear和wfar值,並將剪切空間中的深度範圍設置為大於顯示空間的z範圍(znear,zfar)。GB_range與GB範圍指數值(例如13,23)相對應。剪切空間資料(例如x0,y0等)被頂點檢索緩衝器406從頂點緩衝器408中存取。請注意,頂點處理器410執行浮點運算,每一個數位具有數值部分和指數部分。In short, the above virtual code sets a clipping flag or a cut code for each vertex, and the guard band cutting module 414 indicates whether or not the guard band is to be cut. The driver software 250 sets different wnear and wfar values and sets the depth range in the clipping space to be larger than the z range (znear, zfar) of the display space. GB_range corresponds to the GB range index value (for example, 13, 23). Shear space data (e.g., x0, y0, etc.) is accessed from vertex buffer 408 by vertex retrieval buffer 406. Note that vertex processor 410 performs floating point operations, with each digit having a numerical portion and an exponent portion.

作為保護帶剪切測試步驟502的一部分,頂點檢索緩衝器406還將顯示空間資料傳輸至基本圖元彙編/微小拒絕模組412,見步驟606。據此,步驟608判斷是否執行 微小拒絕。基本圖元彙編/微小拒絕模組412透過預定基本圖元(例如三角)的頂點的剪切碼來判斷。剪切碼描述了頂點相對於保護帶所處的位置,由如上所述的實施例的方法產生。另外,剪切碼還對於隨後的保留三角(比如沒有被剪切處理所碰到)有用,用來控制新頂點的插補。下列偽碼描述了基本圖元彙編/微小拒絕模組412執行處理的實施例:}As part of the guard band shear test step 502, the vertex search buffer 406 also transmits the display spatial data to the base primitive assembler/micro-rejection module 412, see step 606. Accordingly, step 608 determines if a minor rejection is performed. The basic primitive assembly/micro-rejection module 412 is determined by a cut code of a vertex of a predetermined basic primitive (e.g., a triangle). The cut code describes the position of the vertex relative to the guard band, resulting from the method of the embodiment described above. In addition, the cut code is also useful for subsequent reserved triangles (such as not encountered by the clipping process) to control the interpolation of new vertices. The following pseudo code describes an embodiment in which the basic primitive assembler/minor rejection module 412 performs processing: }

從上述虛擬碼的第二部分可見,如果將要執行微小拒絕,在一個實施例中,微小拒絕的執行(步驟610)將基於頂點旗標的設置,而頂點旗標依據在二維空間的保護帶的範圍和來自頂點檢索緩衝器406的Z或W使用的顯示空間資料的對比而產生。例如,如果三角的所有三個頂點都位於Z範圍之外(Z<0),則此三角被拒絕。也就是說,如果所有的三個頂點均為負Z,即使上述偽碼(與頂點處理器410的操作相應)所描述的情況為真而且三角位於保護帶以內,此三角仍將被拒絕。應該注意的是,三角是不可見的,因為所有的三個頂點均為負Z。在其中一個實施例中,微小拒絕的實現包含:執行Z近距離測試。在Z近距離測試中,對於與各種頂點組合相應的三角段執行下列程式:設頂點v0v1,v1v2,v2v0,在Z範圍上產生剪切旗標: As can be seen from the second portion of the virtual code described above, if a microrejection is to be performed, in one embodiment, the execution of the microrejection (step 610) will be based on the setting of the vertex flag, and the vertex flag is based on the guard band in the two dimensional space. The range is generated from a comparison of the display space data used by the Z or W from the vertex search buffer 406. For example, if all three vertices of a triangle are outside the Z range (Z<0), then this triangle is rejected. That is, if all three vertices are negative Z, even if the above described pseudo code (corresponding to the operation of vertex processor 410) is true and the triangle is within the guard band, the triangle will still be rejected. It should be noted that the triangle is invisible because all three vertices are negative Z. In one of the embodiments, the implementation of the micro-reject includes: performing a Z-distance test. In the Z close-range test, the following program is executed for the triangle segments corresponding to the various vertex combinations: the vertex v0v1, v1v2, v2v0 is set, and the clipping flag is generated on the Z range:

對於與基本圖元彙編/微小拒絕模組412相對應的上述虛擬碼的第一部分來說,沒有被微小拒絕的三角將執行保護帶剪切(步驟504)。請見第7圖,更進一步描述了保護帶剪切方法504。總的來說,為了保護帶剪切,執行下列 操作:(a)如果全部三個頂點的w0,則拒絕此三角(例如三角的W均為負W,則此三角為不可見,拒絕此三角。對Z也一樣);(b)執行xy-剪切(依據保護帶邊緣區域,由-wxw,-wyw定義,(依據xy-clip碼),為每個XY剪切面(x=w,x=-w,y=w,y=-w));以及(c)執行W-剪切(wnearwwfar,為每個W剪切面(w=wnear,w=wfar)。For the first portion of the virtual code described above corresponding to the base primitive assembler/minor rejection module 412, the triangle that is not slightly rejected will perform guard band clipping (step 504). See Figure 7, which further describes the guard band shearing method 504. In general, to protect the tape cut, do the following: (a) If all three vertices w 0, then reject this triangle (for example, if the triangle W is negative W, then the triangle is invisible, reject the triangle. Same as Z); (b) perform xy-cut (depending on the edge of the guard band, by - w x w,-w y w definition, (according to xy-clip code), for each XY clipping plane (x=w, x=-w, y=w, y=-w)); and (c) perform W-cut (wnear) w Wfar, for each W clipping plane (w=wnear, w=wfar).

更進一步說,保護帶剪切模組414從頂點緩衝器408(透過頂點檢索緩衝器406)接收頂點資料(將剪切的)(步驟702),在保護帶計算邏輯單元418中執行Z近距離剪切(步驟704)。Still further, the guard band cutout module 414 receives vertex data (to be clipped) from the vertex buffer 408 (through the vertex retrieval buffer 406) (step 702), and performs Z close range in the guard band calculation logic unit 418. Cut (step 704).

在Z近距離剪切中,每個頂點組合(v0 v1 ,v1 v2 ,v2 v0 )都依次被Z近距離平面所剪切。為了定義新的剪切後頂點的座標,執行重心插補。以v1 v2 為例,下列虛擬碼描述了一個示範性的流程(注意,參考下述輸出緩衝器,在一個實施例中,參考保護帶頂點緩衝器416,"r"代表源自邊緣的兩個頂點所產生的新頂點的比率,"r"也被重心插補以其他屬性(例如RGB)所用,包括XYZW): In Z close range shearing, each vertex combination (v 0 v 1 , v 1 v 2 , v 2 v 0 ) is sequentially clipped by the Z close distance plane. In order to define the coordinates of the new post-cut vertex, the center of gravity interpolation is performed. Taking v 1 v 2 as an example, the following virtual code describes an exemplary flow (note that with reference to the output buffer described below, in one embodiment, the reference guard band vertex buffer 416, "r" represents edge-derived The ratio of new vertices produced by the two vertices, "r" is also used by the center of gravity interpolation for other attributes (such as RGB), including XYZW):

在一個實施例中,在執行Z近距離剪切的同時,保護帶計算邏輯單元418執行XY剪切和W剪切(步驟706,708)。在執行上述Z近距離剪切的同時,個別剪切後的頂點儲存於保護帶頂點緩衝器416。如果這些頂點中的至少一個頂點位於視口內,這個頂點則位於保護帶中,用一下運算式表示:-w<x<w,-w<y<w。如此一來,對於XY剪切,為每個頂點產生(比如由頂點處理器410產生)剪切碼,並產生新頂點(基於剪切程式)。在其中一個實施例中,每個頂點用下列4個位來描述剪切碼(比如左,右,底,頂): Bit0 =(x<-w) Bit1 =(x>w) Bit2 =(y<-w) Bit3 =(y>w)3In one embodiment, guard band calculation logic unit 418 performs XY shearing and W shearing while performing Z close shearing (steps 706, 708). While performing the above Z close range shearing, the individual cut vertices are stored in the guard band vertex buffer 416. If at least one of these vertices is in the viewport, this vertex is in the guard band and is represented by the following expression: -w<x<w, -w<y<w. As such, for XY clipping, a cut code is generated for each vertex (such as produced by vertex processor 410) and a new vertex is generated (based on the cut program). In one of these embodiments, each vertex uses the following four bits to describe the clipping code (such as left, right, bottom, top): Bit 0 = (x < - w) Bit 1 = (x > w) Bit 2 =(y<-w) Bit 3 =(y>w)3

下面繼續描述XY剪切程式,在其中一個實施例中,保護帶計算邏輯單元418執行左、右、底、頂的剪切。在每個剪切階段的過程中,使用一個或多個緩衝器(比如包含保護帶頂點緩衝器416)來臨時地儲存頂點資料。例如,用一個緩衝器儲存輸入,用另一個緩衝期儲存輸出。舉例來說,保護帶計算邏輯單元418執行下列虛擬碼: The XY shearing routine continues to be described below. In one of the embodiments, the guard band calculation logic unit 418 performs the left, right, bottom, and top cuts. During each shear phase, one or more buffers (such as including a guard band vertex buffer 416) are used to temporarily store vertex data. For example, use one buffer to store the input and another to store the output. For example, guard band calculation logic unit 418 performs the following virtual code:

保護帶頂點緩衝器416可以儲存一系列的頂點(比如8個),這一系列的頂點由v0位於頭部,各點連起來組成一個扇形,其伴隨著保護帶旗標輸出至三角處理器420。例如,可以用保護帶旗標來定義剪切後頂點的屬性值的插補命令。請注意,雖然在以上描述中偽碼為並行處理,但是W剪切和XY剪切可以按順序執行。隨後,執行三角彙編(比如,由GB ALU 418執行)。三角彙編之後,屬性結構單元308的屬性結構單元計算邏輯單元424執行屬性插補。為了計算新三角的屬性值,屬性結構單元計算邏輯單元424向保護帶頂點緩衝器416請求比率,向頂點緩衝器408請求屬性。The guard band vertex buffer 416 can store a series of vertices (such as 8). The vertices of this series are located at the head by v0, and the points are connected to form a fan shape, which is accompanied by the protection flag flag output to the triangle processor 420. . For example, an interpolation command can be used to define the attribute value of the post-cut vertex using the guard band flag. Note that although the pseudo code is parallel processing in the above description, W clipping and XY clipping can be performed in order. Subsequently, a triangulation is performed (for example, by GB ALU 418). After the triangulation, the attribute structure unit calculation logic unit 424 of the attribute structure unit 308 performs attribute interpolation. To calculate the attribute value of the new triangle, attribute structure unit calculation logic unit 424 requests a ratio from guard band vertex buffer 416 and an attribute to vertex buffer 408.

第5~7圖的流程圖顯示了保護帶剪切系統200和相應的方法200a的架構、功能和/或操作的實施例。在這點上, 每個方塊代表一個或多個模組的各種功能。應當理解的是,其他可替代的裝置、元件、功能、流程可以超出第5~7圖所描述的範圍。例如,第5圖中用兩個方塊相連接所表示的流程也可以部分為兩個方塊而連續的執行,或者有時也可以以倒序執行,這取決於所需的功能,這一點將在下面作進一步說明。The flowcharts of Figures 5-7 illustrate embodiments of the architecture, functionality, and/or operation of the guard band shear system 200 and the corresponding method 200a. At this point, Each square represents various functions of one or more modules. It should be understood that other alternative devices, components, functions, and flows may be beyond the scope of FIGS. 5-7. For example, the flow represented by the two blocks in Figure 5 can also be executed in two blocks in succession, or sometimes in reverse order, depending on the desired function, which will be below. For further explanation.

雖然本發明已以較佳實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可作些許之更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。Although the present invention has been disclosed in the above preferred embodiments, it is not intended to limit the invention, and any one of ordinary skill in the art can make some modifications and refinements without departing from the spirit and scope of the invention. Therefore, the scope of the invention is defined by the scope of the appended claims.

102‧‧‧模型空間102‧‧‧Model space

104‧‧‧世界空間104‧‧‧World Space

106‧‧‧觀測空間106‧‧‧ Observation space

108‧‧‧剪切空間108‧‧‧Cutting space

110‧‧‧顯示空間110‧‧‧ display space

200‧‧‧GB剪切系統200‧‧‧GB shearing system

202‧‧‧顯示設備202‧‧‧Display equipment

204‧‧‧顯示介面單元204‧‧‧Display interface unit

206‧‧‧本地記憶體206‧‧‧Local memory

210‧‧‧儲存介面單元210‧‧‧Storage interface unit

214‧‧‧繪圖處理單元214‧‧‧Drawing processing unit

222‧‧‧晶片組222‧‧‧ Chipset

218‧‧‧匯流排界面單元218‧‧‧ bus interface unit

224‧‧‧系統記憶體224‧‧‧ system memory

226‧‧‧中央處理器226‧‧‧ central processor

250‧‧‧驅動軟體250‧‧‧Drive software

302‧‧‧命令流處理器302‧‧‧Command Stream Processor

304‧‧‧執行單元池304‧‧‧Executive unit pool

306‧‧‧三角結構單元306‧‧‧Triangular structural unit

308‧‧‧屬性結構單元308‧‧‧Attribute Structure Unit

310‧‧‧範圍和瓦片產生單元310‧‧‧ Range and tile generation unit

402‧‧‧輸入狀態機402‧‧‧Input state machine

312‧‧‧紋理先進先出單元312‧‧‧Textured FIFO unit

404‧‧‧暫存器模組404‧‧‧Storage Module

314‧‧‧深度先進先出單元314‧‧‧Deep FIFO unit

408‧‧‧頂點緩衝器408‧‧‧ vertex buffer

406‧‧‧頂點檢索緩衝器406‧‧‧Vertex Search Buffer

410‧‧‧頂點處理器410‧‧‧ vertex processor

414‧‧‧保護帶剪切模組414‧‧‧Protection belt shear module

420‧‧‧三角處理器420‧‧‧ Triangle Processor

416‧‧‧保護帶頂點緩衝器416‧‧‧Protection with vertex buffer

316‧‧‧屬性結構單元先進先出單元316‧‧‧Attribute Structure Unit FIFO Unit

412‧‧‧基本圖元彙編/微小拒絕模組412‧‧‧Basic Element Compilation/Micro Rejection Module

418‧‧‧保護帶計算邏輯單元418‧‧‧Protection Band Computing Logic Unit

422‧‧‧保護帶屬性輸出狀態機模組422‧‧‧Protection band attribute output state machine module

424‧‧‧屬性結構單元計算邏輯單元424‧‧‧Attribute Structure Unit Calculation Logic Unit

502、504、602~610、702~708‧‧‧步驟502, 504, 602~610, 702~708‧‧‧ steps

第1圖為描述繪圖處理系統中渲染圖像的各種等同系統或空間的一個概念性的方塊圖;第2圖為本發明繪圖處理系統中保護帶剪切系統和方法的實施例;第3圖為第2圖中繪圖處理單元和保護帶剪切系統實施例的方塊圖;第4圖為第3圖所示保護帶剪切系統實施例的方塊圖;第5~7圖為描述第4圖所示保護帶剪切系統的方法實施例的流程圖。1 is a conceptual block diagram depicting various equivalent systems or spaces for rendering images in a graphics processing system; FIG. 2 is an embodiment of a guard band shearing system and method in a graphics processing system of the present invention; 2 is a block diagram of an embodiment of a drawing processing unit and a protective tape cutting system in FIG. 2; FIG. 4 is a block diagram of an embodiment of a protective tape cutting system shown in FIG. 3; and FIG. 5 to FIG. A flow chart of an embodiment of a method of protecting a belt shearing system is shown.

100‧‧‧繪圖處理系統100‧‧‧Drawing Processing System

200‧‧‧GB剪切系統200‧‧‧GB shearing system

202‧‧‧顯示設備202‧‧‧Display equipment

204‧‧‧顯示介面單元204‧‧‧Display interface unit

206‧‧‧本地記憶體206‧‧‧Local memory

210‧‧‧儲存介面單元210‧‧‧Storage interface unit

214‧‧‧繪圖處理單元214‧‧‧Drawing processing unit

218‧‧‧匯流排界面單元218‧‧‧ bus interface unit

222‧‧‧晶片組222‧‧‧ Chipset

224‧‧‧系統記憶體224‧‧‧ system memory

226‧‧‧中央處理器226‧‧‧ central processor

250‧‧‧驅動軟體250‧‧‧Drive software

Claims (16)

一種繪圖處理器中的保護帶剪切系統,包含:一頂點處理器,將轉換後的頂點資料轉換至整數顯示空間資料,計算剪切碼並將轉換後的頂點資料傳輸至繪圖管道的下游;以及一保護帶剪切模組,耦接到該頂點處理器;一保護帶計算邏輯單元,耦接到該保護帶剪切模組,該保護帶剪切模組用來判斷與該轉換後的頂點資料相應的基本圖元是否需要保護帶剪切,判斷為需要保護帶剪切時,將該基本圖元傳輸至該保護帶計算邏輯單元,以執行保護帶剪切,回應於該保護帶計算邏輯單元所執行的該保護帶剪切,該保護帶剪切模組還用來透過該頂點處理器請求一標準處理的一中斷,回應該中斷,該頂點處理器重新計算頂點座標和重新計算的該頂點座標的剪切碼,對與重新計算的該頂點座標相應的屬性執行一透視畫法校正,並將重新計算的該頂點座標映射至整數顯示空間。 A protection band clipping system in a graphics processor, comprising: a vertex processor, converting the converted vertex data to an integer display space data, calculating a clipping code, and transmitting the converted vertex data to a downstream of the drawing pipeline; And a protection band cutting module coupled to the vertex processor; a protection band computing logic unit coupled to the protection band cutting module, the protection band cutting module is used to determine the converted Whether the corresponding primitive element of the vertex data needs protection band shearing, and when it is determined that the protection band is required to be cut, the basic element is transmitted to the protection band calculation logic unit to perform protection band shearing, in response to the protection band calculation The guard band cut performed by the logic unit, the guard band shear module is further configured to request an interrupt of a standard process through the vertex processor, and the interrupt should be interrupted, and the vertex processor recalculates the vertex coordinates and the recalculated The cut code of the vertex coordinates, performing a perspective correction on the attribute corresponding to the recalculated vertex coordinates, and mapping the recalculated vertex coordinates to integers Show space. 如申請專利範圍第1項所述的繪圖處理器中的保護帶剪切系統,更包括一頂點索引緩衝器,耦接至一頂點緩衝器和該頂點處理器,該頂點緩衝器用來儲存該轉換後的頂點資料和剪切空間資料。 The protection band clipping system in the graphics processor of claim 1, further comprising a vertex index buffer coupled to a vertex buffer and the vertex buffer, wherein the vertex buffer is used to store the conversion Post vertex data and clipping space data. 如申請專利範圍第1項所述的繪圖處理器中的保護帶剪切系統,其中該頂點處理器透過經由一頂點索引緩衝器存取一頂點緩衝器來執行該轉換後的頂點資料的標準處理。 A guard band clipping system in a graphics processor according to claim 1, wherein the vertex processor performs standard processing of the converted vertex data by accessing a vertex buffer via a vertex index buffer. . 如申請專利範圍第1項所述的繪圖處理器中的保護帶剪切系統,更包括一微小拒絕模組,依據來自該頂點處理器的剪切碼判斷是否需要執行基本圖元的微小拒絕,並回應該判斷,該微小拒絕模組用來執行該微小拒絕。 The protection band cutting system in the drawing processor according to claim 1, further comprising a micro rejection module, determining whether to perform a micro rejection of the basic primitive according to the cut code from the vertex processor. And it should be judged that the tiny rejection module is used to perform the micro rejection. 如申請專利範圍第1項所述的繪圖處理器中的保護帶剪切系統,其中該保護帶剪切模組還用來依據來自該頂點處理器的剪切碼判斷是否需要執行基本圖元的保護帶剪切。 The protective tape cutting system of the drawing processor of claim 1, wherein the protective tape cutting module is further configured to determine whether a basic primitive needs to be executed according to a cut code from the vertex processor. Protective tape is cut. 如申請專利範圍第1項所述的繪圖處理器中的保護帶剪切系統,更包括一屬性設置單元,從該保護帶剪切系統接收保護帶頂點屬性,並為每一個將被渲染的基本圖元分別設置屬性三角值。 The protective tape cutting system in the drawing processor according to claim 1, further comprising an attribute setting unit that receives the guard band vertex attribute from the guard band cutting system, and for each of the basics to be rendered The primitives are set to the attribute triangle values. 如申請專利範圍第1項所述的繪圖處理器中的保護帶剪切系統,其中該保護帶剪切計算邏輯單元用來執行重心插補,以定義新剪切的頂點的座標。 A guard band shearing system in a graphics processor as described in claim 1, wherein the guard band shear calculation logic unit is configured to perform center of gravity interpolation to define coordinates of newly cut vertices. 一種保護帶剪切方法,包含:向繪圖管道的下游傳輸轉換後的頂點資料;在保護帶剪切模組中判斷與轉換後的頂點資料相應的基本圖元是否需要保護帶剪切;判斷為需要保護帶剪切時,執行保護帶剪切並執行插補,以在保護帶剪切計算邏輯單元中定義新剪切的頂點;以及響應於該保護帶計算邏輯單元所執行的一保護帶剪切操作,該保護帶剪切模組請求一頂點處理器標準操作的中 斷,其中該頂點處理器回應於該中斷做出如下步驟:重新計算頂點座標並為該重新計算的頂點座標重新計算剪切碼;為與該重新計算的頂點座標相應的屬性執行透視畫法校正;以及影射該重新計算的頂點座標至整數顯示空間。 A protection band shearing method comprises: transmitting a converted vertex data to a downstream of a drawing pipeline; and determining, in a guard band shearing module, whether a basic primitive corresponding to the converted vertex data needs a protection band shear; When the guard band is required to be cut, the guard band shear is performed and interpolation is performed to define a new cut vertex in the guard band shear calculation logic unit; and a guard band shear performed by the logic unit in response to the guard band calculation Cutting operation, the protection band cutting module requests a vertex processor standard operation Breaking, wherein the vertex processor responds to the interrupt by recalculating vertex coordinates and recalculating the cut code for the recalculated vertex coordinates; performing perspective art correction for the attribute corresponding to the recalculated vertex coordinates ; and map the recalculated vertex coordinates to the integer display space. 如申請專利範圍第8項所述的保護帶剪切方法,其中該插補為重心插補。 The protective tape cutting method of claim 8, wherein the interpolation is a center of gravity interpolation. 如申請專利範圍第8項所述的保護帶剪切方法,更包括:儲存該轉換後的頂點資料並在一通過一頂點索引緩衝器索引的頂點緩衝器中剪切空間資料。 The protection band clipping method of claim 8, further comprising: storing the converted vertex data and cutting the spatial data in a vertex buffer indexed by a vertex index buffer. 如申請專利範圍第10項所述的保護帶剪切方法,更包括:透過經由該頂點索引緩衝器存取該頂點緩衝器,處理該轉換後的頂點資料。 The protection band clipping method of claim 10, further comprising: processing the converted vertex data by accessing the vertex buffer via the vertex index buffer. 如申請專利範圍第8項所述的保護帶剪切方法,更包括:一微小拒絕模組依據來自一頂點處理器的剪切碼判斷基本圖元是否需要執行微小拒絕。 The protection band cutting method according to claim 8, further comprising: a micro rejection module determining whether the basic primitive needs to perform a micro rejection according to a cut code from a vertex processor. 如申請專利範圍第12項所述的保護帶剪切方法,更包括:該微小拒絕模組執行該判斷的回應。 The protective tape cutting method according to claim 12, further comprising: the micro rejection module performing a response of the determination. 如申請專利範圍第8項所述的保護帶剪切方法,更包括:依據來自一頂點處理器的剪切碼判斷基本圖元是否需 要執行保護帶剪切。 The protection tape cutting method according to claim 8 of the patent application scope, further comprising: determining whether the basic primitive is required according to a cut code from a vertex processor To perform a guard band cut. 如申請專利範圍第8項所述項所述的保護帶剪切方法,更包括:一屬性設置單元從保護帶剪切系統中接收保護帶處理後的頂點屬性,並為每一個將被渲染得基本圖元分別設置屬性三角值。 The protection tape cutting method according to the item of claim 8, further comprising: an attribute setting unit receiving the protection layer processed vertex attribute from the protection band shearing system, and each of which is to be rendered The base element sets the attribute triangle value separately. 一種繪圖處理器管道中的保護帶剪切系統,包含:一狀態機,接收狀態資料和轉換的頂點;一頂點索引緩衝器,耦接至該狀態機;一頂點緩衝器,由該頂點索引緩衝器索引,該頂點緩衝器儲存該轉換的頂點;一頂點處理器,耦接至該頂點索引緩衝器,該頂點處理器產生頂點的剪切碼,並對剪切後的基本圖元的結果相應的頂點的屬性執行透視畫法校正;一微小拒絕模組,依據該剪切碼的值執行微小拒絕;一保護帶剪切模組,依據該剪切碼的值判斷基本圖元是否需要執行保護帶剪切;以及一保護帶剪切計算邏輯單元,回應於需要剪切的判斷而剪切該基本圖元;該保護帶剪切計算邏輯單元還用來執行插補,以定義新剪切的頂點的座標,回應於該保護帶計算邏輯單元所執行的該保護帶剪切,該保護帶剪切模組還用來透過該頂點處理器請求一標準處理的一中斷,回應該中斷,該頂點處理器重新計算頂點座標和重新計算的該頂點座標的剪切碼,對與重新計算的該頂點座標相應的屬性 執行一透視畫法校正,並將重新計算的該頂點座標映射至整數顯示空間。 A guard band clipping system in a graphics processor pipeline, comprising: a state machine, receiving state data and converted vertices; a vertex index buffer coupled to the state machine; and a vertex buffer buffered by the vertex index a vertex buffer storing the transformed vertex; a vertex processor coupled to the vertex index buffer, the vertex processor generating a cut code of the vertex, and corresponding to the result of the cut base element The vertices of the attributes perform perspective rendering correction; a tiny rejection module performs micro-rejection according to the value of the clipping code; a protection band cutting module determines whether the basic primitive needs to be protected according to the value of the clipping code And a guard band shear calculation logic unit that cuts the base primitive in response to a determination that a cut is required; the guard band shear calculation logic unit is further configured to perform interpolation to define a new cut a coordinate of the vertex, in response to the guard band shear performed by the guard band computing logic unit, the guard band shear module is further configured to request a standard processing through the vertex processor , Responds to the interrupt, the processor recalculates the vertex coordinates of the vertices and the vertex coordinates recalculated shear code, attributes to the vertex coordinates of the corresponding recalculation Perform a perspective correction and map the recalculated vertex coordinates to the integer display space.
TW097112498A 2008-04-07 2008-04-07 Guard band clipping systems and methods TWI478094B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW097112498A TWI478094B (en) 2008-04-07 2008-04-07 Guard band clipping systems and methods

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW097112498A TWI478094B (en) 2008-04-07 2008-04-07 Guard band clipping systems and methods

Publications (2)

Publication Number Publication Date
TW200943220A TW200943220A (en) 2009-10-16
TWI478094B true TWI478094B (en) 2015-03-21

Family

ID=44868967

Family Applications (1)

Application Number Title Priority Date Filing Date
TW097112498A TWI478094B (en) 2008-04-07 2008-04-07 Guard band clipping systems and methods

Country Status (1)

Country Link
TW (1) TWI478094B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6359630B1 (en) * 1999-06-14 2002-03-19 Sun Microsystems, Inc. Graphics system using clip bits to decide acceptance, rejection, clipping
US6686924B1 (en) * 2000-02-02 2004-02-03 Ati International, Srl Method and apparatus for parallel processing of geometric aspects of video graphics data
US20050030320A1 (en) * 2003-08-06 2005-02-10 Ati Technologies, Inc. Method and apparatus for graphics processing in a handheld device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6359630B1 (en) * 1999-06-14 2002-03-19 Sun Microsystems, Inc. Graphics system using clip bits to decide acceptance, rejection, clipping
US6686924B1 (en) * 2000-02-02 2004-02-03 Ati International, Srl Method and apparatus for parallel processing of geometric aspects of video graphics data
US20050030320A1 (en) * 2003-08-06 2005-02-10 Ati Technologies, Inc. Method and apparatus for graphics processing in a handheld device

Also Published As

Publication number Publication date
TW200943220A (en) 2009-10-16

Similar Documents

Publication Publication Date Title
US10614549B2 (en) Varying effective resolution by screen location by changing active color sample count within multiple render targets
TWI592902B (en) Control of a sample mask from a fragment shader program
KR101923562B1 (en) Method for efficient re-rendering objects to vary viewports and under varying rendering and rasterization parameters
US9019271B2 (en) Z-culling method, three-dimensional graphics processing method and apparatus threrof
US7307628B1 (en) Diamond culling of small primitives
US8059119B2 (en) Method for detecting border tiles or border pixels of a primitive for tile-based rendering
US20040075654A1 (en) 3-D digital image processor and method for visibility processing for use in the same
US20170372509A1 (en) Culling objects from a 3-d graphics pipeline using hierarchical z buffers
JPH0950537A (en) Volume rendering device and its method
JPH11272880A (en) Local eye vector fast calculating method using fixed-decimal point writing unit
TW201915937A (en) Multi-space rendering with configurable transformation parameters
US8068120B2 (en) Guard band clipping systems and methods
US7400325B1 (en) Culling before setup in viewport and culling unit
KR100922780B1 (en) An efficient interface and assembler for a graphics processor
KR20090079241A (en) Graphics processing unit with shared arithmetic logic unit
JP2008269659A (en) Volume clipping in computer 3d graphic
US7292239B1 (en) Cull before attribute read
US6677953B1 (en) Hardware viewport system and method for use in a graphics pipeline
US11302054B2 (en) Varying effective resolution by screen location by changing active color sample count within multiple render targets
TW201331887A (en) Sample culling based on linearized 5D edge equations
TWI478094B (en) Guard band clipping systems and methods
WO2023115408A1 (en) Image processing apparatus and method
JP3367506B2 (en) Image processing apparatus and image processing method
JP2973413B2 (en) Illuminance calculation method and display device for computer graphics
US8711156B1 (en) Method and system for remapping processing elements in a pipeline of a graphics processing unit