CN101261744B - Protection belt cutting system and method for plot processor - Google Patents

Protection belt cutting system and method for plot processor Download PDF

Info

Publication number
CN101261744B
CN101261744B CN2008100848284A CN200810084828A CN101261744B CN 101261744 B CN101261744 B CN 101261744B CN 2008100848284 A CN2008100848284 A CN 2008100848284A CN 200810084828 A CN200810084828 A CN 200810084828A CN 101261744 B CN101261744 B CN 101261744B
Authority
CN
China
Prior art keywords
boundary belt
vertex
shear
processor
shearing
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.)
Active
Application number
CN2008100848284A
Other languages
Chinese (zh)
Other versions
CN101261744A (en
Inventor
翁国尹
许云杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Via Technologies Inc
Original Assignee
Via Technologies 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 Technologies Inc filed Critical Via Technologies Inc
Priority to CN2008100848284A priority Critical patent/CN101261744B/en
Publication of CN101261744A publication Critical patent/CN101261744A/en
Application granted granted Critical
Publication of CN101261744B publication Critical patent/CN101261744B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a protection belt cutting system and a protection belt cutting method in a drawing processor. In a system embodiment, the system comprises a top point processor which switches switched top point data to an integer display space and transmits the switched top point data to the downstream of a drawing pipeline; a protection belt cutting module coupled to the top point processor; a protection belt calculating logic unit coupled to the protection belt cutting module and the protection belt cutting module judges whether a basic primitive corresponding to the switched top point data needs cutting or not and transmits the basic primitive to the protection belt calculating logic unit based on the judgment so as to carry out protection belt cutting. The protection belt cutting system and the protection belt cutting method in the drawing processor of the invention provide effective and high speed calculation and reduce complexity.

Description

Boundary belt cutting system in the painting processor, boundary belt cutting method
Technical field
The present invention relates to a kind of data handling system, especially design a kind of computer graphics system and method.
Background technology
Computer graphics is one and produces figure with computing machine, the science and the art of image or other drawing or pictorial information.The generation of figure or image is commonly called plays up.Usually, in Computerized three-dimensional was drawn, the geometric figure on representative object surface (perhaps volume) was translated into pixel (image element figure) in scene, is stored in the frame buffer, is shown on the display device then.
When one width of cloth figure or image were played up, when handling by multiple parallel system, object experienced multiple processing by a plurality of stages of pipeline, and this is commonly referred to the space.Ask for an interview Fig. 1, render process 10 is shown generically from the model space 102 to world space 104, arrives observation space 106 again, arrives viscous shear space 108 again, arrives display space 110 again.In some implementation, this process may comprise world space 104, and directly jumps to observation space 106 from the model space 102.Briefly, the original Adjustment System of the model space 102 representatives, so those specific objects that will be comprised in the reality scene are not converted as yet.The model space 102 provides one by the platform of conversion with process object on display that use a model for the user.By the user interface of graphoscope, the user can attempt with various aspects, shape and/or size object being sought direction or ordering.In more detail, by user interface, the user can command primary processor to carry out via the various model conversion that provide for object or model and revise, and the result makes the model space 102 become world space 104.
More conversions (for example observe conversion) offer the summit of the object of conversion from world space 104, promoting emission and to shear, thereby develop into observation space 106.In observation space 106 (be also referred to as and take the space), produce various functions---for example add, revise brightness and/or shade, small refusal is created and is observed volume etc., and this forms a judgement: what object can be photographed by camera and what object can not be photographed by camera.For example, one has closely and observation that body is cut on the plane of remote shear surface is typically created.The object of the three-dimensional scenic of playing up, if closely and remote shear surface and the plane edge that cuts body be not complementary, then ignore processing, reduce shearing manipulation with this.
In viscous shear space 108, the coordinate formatted (for example, dividing by perspective) of body is cut to simplify the complicacy of shearing in the plane of creating in observation space 106, carries out then and shears.
Carry out in case shear, the element figure in the observed quantity just is mapped to display space 110 and is rendered on the display device.Note that in some cases various foregoing processing can take place in different and/or other space.
Ask for an interview viscous shear space 108 now, used the quantity (such as triangle) that various technology reduce the element figure that needs shearing.One of them technology commonly used is the boundary belt shearing technique.In boundary belt is sheared, create in the observation space 106 closely and remote shear surface remain unchanged, but the plane cut body and be stretched, surpass the viewport of expectation.In other words, totally two planes are cut body and are created: one is that body is cut on the boundary belt plane, and another is that body is cut on less viewport plane.The environment of playing up and shearing can be realized according to following steps.If triangle is positioned at outside the viewport, then abandon fully.If triangle is positioned at viewport, then need not shear, directly play up.And if if triangle and viewport and boundary belt plane cut that body intersects or triangle with closely and remote shear surface intersects, then carry out shearing.
Provide a conservative approach of playing up (for example, the triangle of shearing compared with needs comes, and more triangle directly passes through) although boundary belt is sheared, this conservative approach still will balance each other with the minimizing of shearing manipulation.That is to say; in most cases; the time interval that boundary belt shear to reduce depends on that primary processor (for example central processing unit, CPU in other words) is positioned at shearing that the triangle outside the display screen carries out, allows primary processor to carry out more simply and select fast and time interval of shearing test by receiving unit.Yet when triangle will be sheared, processing was to require great effort very much with time-consuming.In traditional system, typical way is: do shearing by an algorithm of carrying out in a plurality of algorithms of different on primary processor, such as Koln-Sutherland algorithm (Cohen-Sutherland) all, the Sutherland all-Huo Degeman algorithm (Sutherland-Hodgman), Weiler-A Sedun algorithm (Weiler-Atherton), Patrick gill Si Meilete algorithm (Patrick Gilles Maillot) or the like.The intactly classification usually of these algorithms (such as, viewing plane cuts body and shears sign indicating number), judge with intersecting of observed quantity shear plane and the interpolation of each parameter (such as alpha parameter, good fortune dagger-axe parameter etc.) on summit that these all need very strong calculation procedure, and are not so good to the mapping of hardware.
Summary of the invention
The invention provides the System and method for that boundary belt is sheared.In brief, in framework, the embodiment of one of them method of the present invention comprises: the vertex data after will changing transmits to the downstream of drawing pipeline; Whether the corresponding element figure of vertex data after judgement of boundary belt shear module and the conversion needs to shear, and shears and the center of gravity interpolation based on above-mentioned judgement execute protection boundary belt, so that boundary belt computational logic unit defines the coordinate on new summit.
The embodiment of one of them boundary belt cutting system of the present invention comprises: a vertex processor, the vertex data after the conversion is converted to integer display space data, and calculate the downstream that the vertex data of shearing after sign indicating number also will be changed transfers to the drawing pipeline; And one the boundary belt shear module be couple to vertex processor; one boundary belt computational logic unit is couple to this boundary belt shear module; this boundary belt shear module be used for judging with this conversion after the corresponding element figure of the vertex data band that whether needs protection shear; be judged as when needing protection the band shearing; this element figure is transferred to this boundary belt computational logic unit; shear with the execute protection band; shear in response to this boundary belt that this boundary belt computational logic unit is performed; this boundary belt shear module also is used for by an interruption of the standard processing of the vertex data after this this conversion of vertex processor request; in response to this interruption; this vertex processor recomputates the shearing sign indicating number of apex coordinate and this apex coordinate that recomputates; proofread and correct carrying out a foreshortened figure, and this apex coordinate that will recomputate maps to the integer display space with the corresponding attribute of this apex coordinate that recomputates.
The invention provides a kind of boundary belt cutting method, comprise: the vertex data after the downstream transmission conversion of drawing pipeline; Whether the corresponding element figure of vertex data in the boundary belt shear module after judgement and the conversion needs protection to be with is sheared; Be judged as when needing protection the band shearing, the execute protection band is sheared and is also carried out interpolation, with the coordinate on the summit of the new shearing of definition in boundary belt computational logic unit; Shear the interruption of this boundary belt shear module request one vertex processor standard operation in response to this boundary belt that this boundary belt computational logic unit is performed; In response to this interruption, this vertex processor recomputates apex coordinate and shears sign indicating number for this apex coordinate that recomputates recomputates, proofread and correct for carrying out foreshortened figure, and this apex coordinate that mapping is recomputated is to the integer display space with the corresponding attribute of this apex coordinate that recomputates.
The embodiment of one of them boundary belt cutting system of the present invention comprises: a state machine, the summit of accepting state data and conversion; One vertex index impact damper is coupled to this state machine; One vertex buffer, by this vertex index buffer index, this vertex buffer is stored the summit of this conversion; One vertex processor is coupled to this vertex index impact damper, and this vertex processor produces the shearing sign indicating number on summit, and the attribute of the corresponding apex coordinate of result of the element figure after shearing is carried out foreshortened figure proofread and correct; One small refusal module is carried out small refusal according to the value of this shearing sign indicating number; One boundary belt shear module judges according to the value of this shearing sign indicating number whether element figure needs the execute protection band to shear; And a boundary belt computational logic unit, the judgement of shearing in response to needs and shear this element figure; This boundary belt computational logic unit also is used for carrying out interpolation, with the coordinate on the summit that defines new shearing.
Disclosed boundary belt cutting system of the present invention and method (abbreviating the GB cutting system as) provide a kind of quick, convenient, hardware based boundary belt to shear.In one embodiment, carry out by the computational logic unit (ALU) of one or more point of fixity and to shear, need not primary processor work, compare with conventional art, accelerated shear treatment speed.In such embodiments, shear at display space and carry out, small refusal is carried out in viscous shear space or display space.Because realize with specialized hardware, the present invention each do not use the embodiment of the GB cutting system of primary processor that efficient, calculating at a high speed is provided, and reduced complicacy.
Description of drawings
Fig. 1 is the various equivalent system of rendering image or a conceptual block diagram in space in the description graphics processing system;
Fig. 2 is the embodiment of boundary belt cutting system in the graphics processing system of the present invention and method;
Fig. 3 is the synoptic diagram of graphics processing unit and boundary belt cutting system embodiment among Fig. 2;
Fig. 4 is the synoptic diagram of the part assembly of boundary belt cutting system embodiment shown in Figure 3;
Fig. 5 to Fig. 7 is the process flow diagram of the method embodiment of description boundary belt cutting system shown in Figure 4.
Embodiment
Fig. 2 is the embodiment of graphics processing system 100, wherein comprises the embodiment of boundary belt cutting system 200.In some cases, graphics processing system 100 can be configured to a computer system.Graphics processing system 100 can comprise display device 202, by display interface unit (DIU) 204 and local storage 206 (for example, can comprise display buffer, texture buffer, commands buffer or the like).Here, local storage 206 also can comprise frame buffer or storage unit.Local storage 206 is couple to graphics processing unit (GPU) 214 by storage interface unit (MIU) 210.In the present embodiment, storage interface unit MIU 210, and graphics processing unit GPU 214 and display interface cells D IU 204 are couple to Bus Interface Unit (BIU) 218.In one embodiment, Bus Interface Unit BIU218 can compatible with PCI E, and can use drawing address replay firing table (GART), though can use other memory mapped mechanism.Graphics processing unit GPU 214 comprises GB cutting system 200, and is as described below.Though just be shown as the parts of graphics processing unit GPU214, in certain embodiments, GB cutting system 200 can comprise other assembly of one or more graphics processing system 100 as shown in the figure.
Bus Interface Unit BIU 218 is couple to chipset 222 (such as north bridge chipset) or converter.Chipset 222 comprises interface circuit, be used for strengthening signal, and the signal that will pass in and out system storage 224 comes out with the Signal Separation that passes in and out input-output device (I/O) (not shown) from central processing unit (CPU) 226 (being also referred to as primary processor here).Although described the PCIE bus protocol here, in certain embodiments, can adopt some other connection and/or communication mode (such as PCI, dedicated high speed bus or the like) between primary processor 226 and the graphics processing unit GPU214.System storage 224 also comprises drive software 250, by using CPU226 to transmit communication instruction or ordering register and the instruction stream processor of giving among the graphics processing unit GPU214.
In certain embodiments, also comprise other graphics processing unit, such as being couple to the assembly that shows among Fig. 2 via the PCIE bus protocol by chipset 222.In one embodiment, graphics processing system 100 can comprise all component that shows among Fig. 2, can also comprise several and/or different assembly wherein.In addition, in certain embodiments, can also use other assemblies, for example be couple to the South Bridge chip group of chipset 222.
In some certain embodiments, GB cutting system 200 usefulness hardware are realized, comprise any one or its combination in the following technology, as is known to the person skilled in the art: one has the logical separate circuit that logic gate realizes the data-signal logic function, special IC (ASIC) with the combination of respective logic door, a programmable gate array (PGA), a field programmable gate array (FPGA), state machine or the like.
Fig. 3 is the synoptic diagram of graphics processing unit 214 and boundary belt (GB) cutting system 200 embodiment among Fig. 2.In certain embodiments, can also comprise than the assembly shown in Fig. 3 and Duo or few.Such as, module that each is as described below or unit can have its internal register or register, and be not shown, can be independent use the in the module, perhaps shared with other modules.In one embodiment, graphics processing unit 214 can be set to the pipeline framework, comprise command stream processor (CSP) 302, pool of execution units (EU) 304, three-legged structure unit (TSU) 306 and GB cutting system 200, attribute are provided with unit (ASU) 308, scope and tile generation unit (STG) 310, texture first in first out unit (TFIFO) 312, degree of depth first in first out unit (ZFIFO) 314, attribute are provided with first in first out unit, unit (ASU cell fifo (AFIFO)) 316 and form one.
CSP 302 provides status data (coming from drive software 250), and pool of execution units (EU) 304 (such as summit shape function) provides the vertex data (also can come from drive software 250) of exchange to give three-legged structure unit TSU306.In some embodiments, vertex data can be provided by fixed function summit Shadows Processing device.Based on the data that received, three-legged structure unit TSU306 integrates and is provided with element figure (such as line, triangle, as polygon, V-belt, fan-shaped combination element figure or the like) and comes blank the shearing, and ASU308 deal with data again in unit is set for attribute.For example, three-legged structure unit TSU306 carries out well-known task: the viewport conversion, small refusal, scope box produce and reject.In addition, three-legged structure unit TSU306 shears by using GB cutting system 200 execute protection bands.
Three-legged structure unit TSU 306 offers attribute with these data from above-mentioned processor unit ASU 308 is set, attribute is provided with unit ASU 308 and is each element figure of will being played up (for example, by the Pixel-level interpolation) triangle value (such as color, the degree of depth, transparency, fuzzy etc.) that sets a property respectively.Such attribute triangle value is sent to degree of depth first in first out unit ZFIFO314 and AFIFO unit 316.For example, if being provided with unit ASU 308, attribute comprises Z (degree of depth), attribute triangle value processing unit (for example ALU etc.) then comes together to carry out this type of calculating with degree of depth first in first out unit ZFIFO 314, known to those skilled in the art, in degree of depth first in first out unit ZFIFO 314, write these triangle values so that follow-uply in the Z-test unit, use.Attribute is provided with unit ASU 308 and 316 concerted actions of AFIFO unit, and pixel color and the texture properties triangle value carried out known to the those skilled in the art are handled, so that the further interpolation on Pixel-level.Attribute is provided with unit ASU 308 and also three-legged structure unit TSU edge function is passed to STG 310, and STG 310 provides the tile systematic function, makes data object be divided into tile (for example 8 * 8,16 * 16 etc.), and is passed to TFIFO unit 312.
Fig. 4 is the synoptic diagram of part assembly of the embodiment of boundary belt cutting system 200 shown in Figure 3.As previously mentioned; therein among embodiment; GB cutting system 200 is the part of three-legged structure unit TSU 306; comprise input state machine (ISM) 402; register module 404; vertex index impact damper (VIB) 406; vertex buffer (VB) 408; vertex processor 410; element figure compilation/small refusal (PATR) module 412 (being also referred to as small refusal module), boundary belt shear module (GBC) 414; boundary belt vertex buffer (GBVB) 416; boundary belt computational logic unit (GBALU) 418; triangle processor (TRIPROC) 420 and boundary belt attribute output state machine (OSM GBA) module 422.The result of boundary belt attribute output state machine (OSM GBA) module 422 output protection band vertex attributes is provided with unit ASU 308 to attribute, so that further be provided with.Shown among Fig. 4 that attribute is provided with unit ASU 308 and can also comprises other assemblies, attribute is provided with computational logic unit, unit ASU ALU424 data is sent to STG 310, AFIFO unit 316 and degree of depth first in first out unit ZFIFO314, described in Fig. 3.Some embodiment of boundary belt cutting system 200 can comprise still less, more or different assembly.
In general, it is just to carry out after integer displaing coordinate among the VP 410 is proofreaied and correct and be mapped to apex coordinate (and association attributes) perspectively that boundary belt is sheared, and makes linear interpolation mate the demand of display space.In one embodiment, foreshortened figure proofreaies and correct whole attributes and XYZ coordinate is judged synchronization gain, can be understood as, and some summits can obtain to shear along with new summit result's calculated value in GB ALU418 after a while.Therefore, as will further discussing subsequently, VP 410 is at least two hardware module services, and they are called VIB 406 and GBC module 414.In one embodiment, GBC module 414 has higher priority than the standard stage that is arranged between VP 410 and the VIB 406, therefore can interrupt current VP from VIB 406 from the request relevant with shearing manipulation of GBC module 414 and handle.
ISM 402 is used for synchronous pool of execution units (EU) data (for example vertex data of state, order, conversion) and CSP data (for example state, order).ISM 402 will order and status data is sent to register module 404, and the vertex data of changing is sent to VIB 406.VIB 406 is written to VB 408 with vertex data.VIB 406 judges its reference number according to the position (for example band) of each summit in element figure.When element figure is rejected or finishes (if finish then be sent to attribute unit ASU308 is set), in identical or time that essence is identical, VIB 406 upgrades the reference number on all summits of (own upgrade or according to the request renewal of downstream module) all specific element figures.When any one input of VB discharges (such as, when all element figures all are rejected or all are transferred into attribute unit ASU 308 is set), VB 408 receives the vertex data that sends from ISM 402.
VP 410 receives the viscous shear space vertex data from VB 408 (making index of reference by VIB 406), carries out foreshortened figure correction and viewport conversion, and translation data is to the integer display space.VP 410 also produces the shearing sign indicating number on summit, is used for judging whether to comprise small refusal by each module of downstream or boundary belt is sheared.And VP 410 can transfer to the vertex data after the conversion downstream of drawing pipeline.In one embodiment, VP 410 comprises pipeline (for example multistage pipeline framework).Therefore, in standard operation, VP410 handles the required whole summits of all VIB on the horizon 406, and data are sent to PATR module 412 and GBC module 414.
The standard of being carried out by VP 410 and VIB 406 is handled and is carried out always, sends a signal to VP 410 up to GBC module 414 and shows and receive a shear event.Usually, in response to generation based on the new summit of shearing manipulation, GBC module 414 request VP 410 interrupt from the processing of VIB 406, calculate on the XYZ summit and the correction of attribute foreshortened figure is reformed by VP410, and (this VP 410 recomputates the shearing sign indicating number of apex coordinate and this apex coordinate that recomputates, proofread and correct carrying out a foreshortened figure, and the apex coordinate that this recomputates is mapped to the integer display space) with the corresponding attribute of this apex coordinate that recomputates.As implied above, VP 410 finishes as above various tasks by all current datas are stored in vertex buffer temporarily, and immediate service GBC request.After waiting to handle the GBC request, the processing of VIB406 is proceeded.Especially, in order to carry out the element figure that boundary belt is sheared, VP410 obtains the viscous shear space data from VIB406, produces new summit for the element figure of shearing then.For example; when the boundary belt shear event produces in follow-up pipe stage (the signal indicating shear event such as GBC module 414 produces); VP 410 duplicates out from VIB 406 with data (current generation is handled required data); be stored in temporary buffer temporarily; in one embodiment, be to be stored among the VP 410.After service GBC request, the data of VIB 406 are handled in this temporary storaging data of VP410 access and continuation.
After VP410 handled, small refusal was carried out on all summits that are positioned at (by the shearing representation of VP410) outside the viewport of 412 pairs of PATR modules.Can use one or more small refusal technology (in display space or viscous shear space), comprise known in the field: negative W, shear window, Z closely, Z is remote, rejects the test of distance test and shear surface.
The element figure data are transferred into GBC module 414, and its shearing sign indicating number that produces based on VP410 judges whether to need protection to be with and shears, and shear sign indicating number and have also hinted that to GBC module 414 with boundary belt and viewport partly be reference, residing position, element figure summit.Shear if desired, promptly transmit vertex data and carry out Calculation of Shear to GB VB 416 and in GB ALU418.Triangle after the shearing is sent to triangle processor 420, carry out to calculate for example decisive calculating, scope box, edge function, the method known to those skilled in the art such as attribute function here.The output of triangle processor 420 provides to OSMGBA module 422, as mentioned above.The output (vertex attribute) of OSM GBA module 422 exports attribute to computational logic unit, unit ASU ALU 424 is set, and exports STG 310 and various FIFO then to, as above describes in detail.Attribute is provided with (or being called protected) vertex attribute (Z, color, texture etc.) that unit ASUALU 424 receives after shearing from OSM GBA module 422, and calculates the triangle value, so that carry out further interpolation in the processes pixel stage.Like this, attribute is provided with computational logic unit, unit ASU ALU 424 and triangle how much is provided with data is sent to STG 310 from triangle processor 420.Attribute triangle value and any status information all are written into degree of depth first in first out unit ZFIFO 314 and AFIFO unit 316.
Fig. 5 has described the process flow diagram of a method embodiment of boundary belt cutting system shown in Figure 4, represents with 200a.Fig. 6 and Fig. 7 describe the relevant portion of method 200a respectively in detail.GB cutting method 200a execute protection band shearing test 502.Now with further reference to Fig. 6,602 steps, VIB 406 is access display space data from VB 408, and offer VP 410 in step 604.Among embodiment, this type of access will begin after will becoming idle condition in the downstream module of GBC module 414 therein.Following formulate VP410 use pseudo-code to produce the mechanism of shearing sign indicating number:
wclip_flag=(|w|<wnear)||(|w|>wfar).
xyclip_flag=x0.exp>=GB_range||y0.exp>=GB_range||
x1.exp>=GB_range||y1.exp>=GB_range||
x2.exp>=GB_range||y2.exp>=GB_range
In brief, above-mentioned pseudo-code is sheared sign or is sheared sign indicating number for each summit is provided with, and it shows that to GB C module 414 whether will carry out boundary belt shears.Drive software 250 is provided with different wnear and wfar value, and the depth range in the viscous shear space be set to greater than display space the z scope (znear, zfar).GB_range and GB scope exponential quantity (for example 13,23) are corresponding.Viscous shear space data (for example x0, y0 etc.) are by VIB406 access from VB 408.Note that VP 410 carries out floating-point operation, each numeral has value part and exponential part.
As the part of boundary belt shearing test step 502, VIB 406 also with the display space data transmission to PATR module 412, see step 606.In view of the above, step 608 judges whether to carry out small refusal.PATR module 412 is judged by the shearing sign indicating number on the summit of given element figure (for example triangle).Shear sign indicating number and described the summit, by the method generation of aforesaid embodiment with respect to the residing position of boundary belt.In addition, it is also useful for reservation triangle (running into such as not being sheared processing institute) subsequently to shear sign indicating number, is used for controlling the interpolation on new summit.Following pseudo-code has been described PATR module 412 and has been carried out the embodiment that handles:
If(wclip_flag|xyclip_flag)
{
Jump?to?GBC?Module?414
}
Else
{
Do?trivial?rejection?using?screen?data?from?VIB?406
1.Negative?W?rejection,i.e.,if w0<=0&&w1<=0&&w2<=0
2.X/Y?rejection?against?the?viewport?boundary
3.znear?rejection,i.e.if?z0<0&&z1<0&&z2<0
4.zfar?rejection,i.e.if?z0>zfar&&z?1>zfar&&z2>zfar
}
From the second portion of above-mentioned pseudo-code as seen; if will carry out small refusal; in one embodiment; the execution (step 610) of small refusal will be based on the setting of summit sign, and the summit sign produces according to the contrast of the display space data of using in the scope of the boundary belt of two-dimensional space with from Z or the W of VIB406.For example, if three summits of all of triangle all are positioned at (Z<0) outside the Z scope, then this triangle is rejected.That is to say that if three all summits are negative Z, even the described situation of above-mentioned pseudo-code (corresponding with the operation of VP410) is positioned in the boundary belt for true and triangle, this triangle will be rejected.It should be noted that triangle is sightless, because three all summits are negative Z.Among embodiment, the realization of small refusal comprises therein: carry out Z and closely test.In Z closely tests, carry out follow procedure for making up corresponding triangle section with various summits:
If vertex v 0v 1, v 1v 2, v 2v 0, on the Z scope, produce and shear sign:
Need_Znear_Clipping=wclip_flag||Z0<0||Z1<0||Z2<0
For with the first of PATR module 412 corresponding above-mentioned pseudo-codes, the execute protection band is sheared (step 504) by the triangle of small refusal.Ask for an interview Fig. 7, further described boundary belt cutting method 504.Generally speaking, shear, carry out following operation for boundary belt:
(a) if the w on whole three summits<0, (for example the W of triangle is negative W, and then this triangle is invisible, refuses this triangle then to refuse this triangle.To Z too);
(b) carry out xy-and shear that (according to the boundary belt fringe region, by-w<x<w ,-w<y<w definition, (according to the xy-clip sign indicating number) is each XY shear surface (x=w, x=-w, y=w, y=-w)); And
(c) carry out W-shear (wnear<w<wfar, for each W shear surface (w=wnear, w=wfar).
Furtherly, GBC module 414 receives vertex data (will shear) (step 702) from VB 408 (by VIB 406), carries out Z and closely shear (step 704) in GB ALU 418.
In Z closely shears, each summit combination (v 0v 1, v 1v 2, v 2v 0) all closely sheared on the plane by Z successively.In order to define the coordinate on summit after the new shearing, carry out center of gravity interpolation (carrying out the center of gravity interpolations) by GB ALU 418.With v 1v 2Be example, following pseudo-code has been described an exemplary flow process and (has been noted, with reference to following output buffer, in one embodiment, with reference to GB VB 416, " r " representative is derived from the ratio on two new summits that the summit produced at edge, and " r " also thought that by the center of gravity interpolation other attributes (for example RGB) are used, comprises XYZW):
1)If?v 1.z>0&&v 2.z>0,put?v 1?into?output?buffer,goto?4)
If?v 1.z>0&&v 2.z<0,put?v 1?into?output?buffer,goto?3)
If?v 1.z<0&&v 2.z>0,goto?2)
If?v 1.z<0&&v 2.z<0,goto?4)
2)swap?v 1,v 2(interpolate?from?the?inside?vertex?to?theoutside?vertex)
3)Ratio=v 1.z/(v 1.z-v 2.z)
v.x=v 1.x*(1-Ratio)+v 2.x*Ratio
v.y=v 1.y*(1-Ratio)+v 2.y*Ratio
v.w=v 1.w*(1-Ratio)+v 2.w*Ratio
v.r 0=v 1.r 0*(1-Ratio)+v 2.r 0*Ratio
v.r 1=v 1.r 1*(1-Ratio)+v 2.r 1*Ratio
v.r 2=v 1.r 2*(1-Ratio)+v 2.r 2*Ratio
put?v?into?output?buffer
4)Move?to?the?next?edge
In one embodiment, when execution Z closely sheared, GB ALU 418 carried out the XY shearing and W shears (step 706,708).When the above-mentioned Z of execution closely sheared, the summit after indivedual the shearing was stored in GB VB 416.If at least one summit in these summits is positioned at viewport, this summit then is arranged in boundary belt, represents with following formula :-w<x<w ,-w<y<w.Thus, shear, shear sign indicating number for each summit produces (such as being produced by VP 410), and produce new summit (based on the shearing program) for XY.Among embodiment, each summit is described with following 4 positions and is sheared sign indicating number (such as a left side, the right side, the end, top) therein:
Bit 0=(x<-w)
Bit 1=(x>w)
Bit 2=(y<-w)
Bit 3=(y>w)
Continue to describe XY below and shear program, therein among embodiment, that GB ALU418 carries out is left and right, the shearing on the end, top.In the process of each shear stage, use one or more impact dampers (such as comprising VB 416) to store vertex data provisionally.For example, with a buffer stores input, with another buffer stores output.For instance, GB ALU 418 carries out following pseudo-code:
1)Fetch?v 1,v 2?from?input?buffer?in?sequence.
2)If?v 1.Bit 0==0&&v 2.Bit 0==0,put?v 1?into?output?buffer,goto?5)
If?v 1.Bit 0==0&&v 2.Bit 0==1,put?v 1?into?output?buffer,goto?4)
If?v 1.Bit 0==1&&v2.Bit 0==0,goto?3)
If?v 1.Bit 0==1&&v2.Bit 0==1,goto?5)
3)swap?v 1,v 2(always?interpolate?from?the?inside?vertex?tothe?outside?vertex
4)d1=v 1.x+v 1.w
d2=v 2.x+v 2.w
Ratio=d1/(d1-d2)
v.x=v 1.x*(1-Ratio)+v 2.x*Ratio
v.y=v 1.y*(1-Ratio)+v 2.y*Ratio
v.w=v 1.w*(1-Ratio)+v 2.w*Ratio
v.r 0=v 1.r 0*(1-Ratio)+v 2.r 0*Ratio
v.r 1=v 1.r 1*(1-Ratio)+v 2.r 1*Ratio
v.r 2=v 1.r 2*(1-Ratio)+v 2.r 2*Ratio
compute?v’s?clipcode
put?v?into?output?buffer
5)If?not?swapped(v 1,v 2),v 1?move?forward?to?v 2
6)If?v 1?is?the?first?one?of?input?buffer,end.
Else?v 2?move?forward?to?the?next?vertex?in?GB?VB?416,goto2)
GB VB 416 can store a series of summit (such as 8), and this a series of summit is positioned at head by v0, and it is fan-shaped that each point links up one of composition, and it is accompanied by the boundary belt sign and exports triangle processor 420 to.For example, can define the order interpolation of the property value of shearing the summit, back with the boundary belt sign.Though note that pseudo-code is parallel processing in the above description, W shears and XY shears and can carry out in order.Subsequently, execution triangle compilation (such as, carry out by GB ALU 418).After the triangle compilation, the attribute that attribute is provided with unit ASU 308 is provided with the interpolation of computational logic unit, unit ASU ALU424 execution attribute.In order to calculate the property value of new triangle, attribute is provided with computational logic unit, unit ASU ALU 424 to GB VB 416 request ratios, to VB 408 request attribute.
The process flow diagram of Fig. 5 to Fig. 7 has shown the embodiment of framework, function and/or the operation of boundary belt cutting system 200 and corresponding method 200a.In this, each square is represented the various functions of one or more modules.Should be understood that other alternative devices, element, function, flow process can exceed the described scope of Fig. 5 to Fig. 7.For example, also can partly be two squares and continuous execution perhaps also can be carried out with inverted order sometimes with two squares represented flow process that is connected among Fig. 5, this depends on required function.
The above only is preferred embodiment of the present invention; so it is not in order to limit scope of the present invention; any personnel that are familiar with this technology; without departing from the spirit and scope of the present invention; can do further improvement and variation on this basis, so the scope that claims were defined that protection scope of the present invention is worked as with the application is as the criterion.

Claims (10)

1. the boundary belt cutting system in the painting processor is characterized in that, comprises:
One vertex processor is converted to the integer display space with the vertex data after the conversion, produces the downstream that the vertex data of shearing after sign indicating number also will be changed transfers to the drawing pipeline; And
One boundary belt shear module is couple to this vertex processor; one boundary belt computational logic unit is couple to this boundary belt shear module; this boundary belt shear module be used for judging with this conversion after the corresponding element figure of the vertex data band that whether needs protection shear; be judged as when needing protection the band shearing; this element figure is transferred to this boundary belt computational logic unit; shear with the execute protection band; shear in response to this boundary belt that this boundary belt computational logic unit is performed; this boundary belt shear module also is used for by an interruption of the standard processing of the vertex data after this this conversion of vertex processor request; in response to this interruption; this vertex processor recomputates the shearing sign indicating number of apex coordinate and this apex coordinate that recomputates; proofread and correct carrying out a foreshortened figure, and this apex coordinate that will recomputate maps to the integer display space with the corresponding attribute of this apex coordinate that recomputates.
2. the boundary belt cutting system in the painting processor according to claim 1 is characterized in that, this vertex processor is handled by this standard of carrying out the vertex data after this conversion via a vertex index buffer accesses one vertex buffer.
3. the boundary belt cutting system in the painting processor according to claim 1, it is characterized in that, this boundary belt cutting system also comprises a small refusal module, judge whether to need to carry out the small refusal of element figure according to shearing sign indicating number from this vertex processor, when being judged as small refusal that need to carry out element figure, this small refusal module is used for this small refusal of execution; And
This painting processor comprises an attribute unit is set, receive boundary belt from this boundary belt cutting system and shear data, and for each with the coloured element figure triangle value that sets a property respectively.
4. the boundary belt cutting system in the painting processor according to claim 1 is characterized in that, this boundary belt shear module also is used for need judging whether the boundary belt of execution element figure to shear according to the shearing sign indicating number from this vertex processor.
5. the boundary belt cutting system in the painting processor according to claim 1 is characterized in that, this boundary belt computational logic unit is used for carrying out the center of gravity interpolation, with the coordinate on the summit that defines new shearing.
6. a boundary belt cutting method is characterized in that, comprises:
Vertex data after the downstream transmission conversion of drawing pipeline;
Whether the corresponding element figure of vertex data in the boundary belt shear module after judgement and the conversion needs protection to be with is sheared;
Be judged as when needing protection the band shearing, the execute protection band is sheared and is also carried out interpolation, with the coordinate on the summit of the new shearing of definition in boundary belt computational logic unit;
Shear the interruption of this boundary belt shear module request one vertex processor standard operation in response to this boundary belt that this boundary belt computational logic unit is performed;
In response to this interruption, this vertex processor recomputates apex coordinate and shears sign indicating number for this apex coordinate that recomputates recomputates, proofread and correct for carrying out foreshortened figure, and this apex coordinate that mapping is recomputated is to the integer display space with the corresponding attribute of this apex coordinate that recomputates.
7. boundary belt cutting method according to claim 6 is characterized in that, this interpolation is the center of gravity interpolation.
8. boundary belt cutting method according to claim 6 is characterized in that, also comprises:
Store after this conversion vertex data and one by viscous shear space vertex data in the vertex buffer of a vertex index buffer index.
9. boundary belt cutting method according to claim 8 is characterized in that, also comprises:
By via this this vertex buffer of vertex index buffer accesses, handle the vertex data after this conversion.
10. boundary belt cutting method according to claim 6 is characterized in that, also comprises following thrin:
One small refusal module is according to judging from the shearing sign indicating number of this vertex processor whether element figure needs to carry out small refusal;
According to judging from the shearing sign indicating number of a vertex processor whether element figure needs the execute protection band to shear;
One attribute is provided with the data after the unit receives the boundary belt shear treatment, and for each with the coloured element figure triangle value that sets a property respectively.
CN2008100848284A 2008-03-27 2008-03-27 Protection belt cutting system and method for plot processor Active CN101261744B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008100848284A CN101261744B (en) 2008-03-27 2008-03-27 Protection belt cutting system and method for plot processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008100848284A CN101261744B (en) 2008-03-27 2008-03-27 Protection belt cutting system and method for plot processor

Publications (2)

Publication Number Publication Date
CN101261744A CN101261744A (en) 2008-09-10
CN101261744B true CN101261744B (en) 2010-10-13

Family

ID=39962183

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008100848284A Active CN101261744B (en) 2008-03-27 2008-03-27 Protection belt cutting system and method for plot processor

Country Status (1)

Country Link
CN (1) CN101261744B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104011774A (en) * 2011-12-26 2014-08-27 英特尔公司 Multiple scissor plane registers for rendering image data
CN103871022B (en) * 2012-12-12 2017-02-08 高德信息技术有限公司 Image cropping method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6169554B1 (en) * 1997-06-30 2001-01-02 Sun Microsystems, Inc. Clip testing unit for a three-dimensional graphics accelerator
US6359630B1 (en) * 1999-06-14 2002-03-19 Sun Microsystems, Inc. Graphics system using clip bits to decide acceptance, rejection, clipping
CN1391194A (en) * 2002-07-19 2003-01-15 章新苏 Device for drawing 3D graphics
CN1437163A (en) * 2002-02-07 2003-08-20 矽统科技股份有限公司 Pattern element editing device and method for computerized drawing system
US20040263534A1 (en) * 2003-06-30 2004-12-30 Bimal Poddar Clipping and scissoring technique
CN1687971A (en) * 2005-05-25 2005-10-26 威盛电子股份有限公司 Drawing method and apparatus thereof
US6967664B1 (en) * 2000-04-20 2005-11-22 Ati International Srl Method and apparatus for primitive processing in a graphics system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6169554B1 (en) * 1997-06-30 2001-01-02 Sun Microsystems, Inc. Clip testing unit for a three-dimensional graphics accelerator
US6359630B1 (en) * 1999-06-14 2002-03-19 Sun Microsystems, Inc. Graphics system using clip bits to decide acceptance, rejection, clipping
US6967664B1 (en) * 2000-04-20 2005-11-22 Ati International Srl Method and apparatus for primitive processing in a graphics system
CN1437163A (en) * 2002-02-07 2003-08-20 矽统科技股份有限公司 Pattern element editing device and method for computerized drawing system
CN1391194A (en) * 2002-07-19 2003-01-15 章新苏 Device for drawing 3D graphics
US20040263534A1 (en) * 2003-06-30 2004-12-30 Bimal Poddar Clipping and scissoring technique
CN1687971A (en) * 2005-05-25 2005-10-26 威盛电子股份有限公司 Drawing method and apparatus thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
US 6169554 B1,全文.

Also Published As

Publication number Publication date
CN101261744A (en) 2008-09-10

Similar Documents

Publication Publication Date Title
US10614549B2 (en) Varying effective resolution by screen location by changing active color sample count within multiple render targets
US7737982B2 (en) Method and system for minimizing an amount of data needed to test data against subarea boundaries in spatially composited digital video
US7310098B2 (en) Method and apparatus for rendering three-dimensional object groups
US7071935B1 (en) Graphics system with just-in-time decompression of compressed graphics data
CN100585630C (en) Be used to produce the method and system of the elementary instruction raster stage of programmable pixel bag
US5249264A (en) Image display method and apparatus
JP3289110B2 (en) Method for generating a shading value for a pixel having a scanning line width, a shading method, a rendering device, and a method for interpolating a pixel value
US7468726B1 (en) Culling in a vertex processing unit
CN101116112B (en) Plotting device and plotting method
US6940512B2 (en) Image processing apparatus and method of same
JP3543942B2 (en) Image generation device
WO2007132746A1 (en) Processing device
CN101877116A (en) Graphics processing unit, execution unit and work management method
US6157393A (en) Apparatus and method of directing graphical data to a display device
CN107392836A (en) The more projections of solid realized using graphics processing pipeline
US8068120B2 (en) Guard band clipping systems and methods
CN101261744B (en) Protection belt cutting system and method for plot processor
CN117058288A (en) Graphics processor, multi-core graphics processing system, electronic device, and apparatus
EP1408453A1 (en) Rendering method
US11302054B2 (en) Varying effective resolution by screen location by changing active color sample count within multiple render targets
MXPA02002643A (en) Image processing system, device, method, and computer program.
US8711156B1 (en) Method and system for remapping processing elements in a pipeline of a graphics processing unit
JP2010092507A (en) Image processing method and apparatus
CN1215441C (en) Device and method for supporting embedded or external drawing accelerator
TWI478094B (en) Guard band clipping systems and methods

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant