1 #ifndef __NV50_ACCEL_H__
2 #define __NV50_ACCEL_H__
4 #include "nv04_pushbuf.h"
6 /* "Tesla scratch buffer" offsets */
7 #define PVP_OFFSET 0x00000000 /* Vertex program */
8 #define PFP_OFFSET 0x00001000 /* Fragment program */
9 #define TIC_OFFSET 0x00002000 /* Texture Image Control */
10 #define TSC_OFFSET 0x00003000 /* Texture Sampler Control */
11 #define PFP_DATA 0x00004000 /* FP constbuf */
13 /* Fragment programs */
14 #define PFP_S 0x0000 /* (src) */
15 #define PFP_C 0x0100 /* (src IN mask) */
16 #define PFP_CCA 0x0200 /* (src IN mask) component-alpha */
17 #define PFP_CCASA 0x0300 /* (src IN mask) component-alpha src-alpha */
18 #define PFP_S_A8 0x0400 /* (src) a8 rt */
19 #define PFP_C_A8 0x0500 /* (src IN mask) a8 rt - same for CA and CA_SA */
20 #define PFP_NV12 0x0600 /* NV12 YUV->RGB */
22 /* Constant buffer assignments */
27 static __inline__
void
28 VTX1s(NVPtr pNv
, float sx
, float sy
, unsigned dx
, unsigned dy
)
30 struct nouveau_channel
*chan
= pNv
->chan
;
31 struct nouveau_grobj
*tesla
= pNv
->Nv3D
;
33 BEGIN_RING(chan
, tesla
, NV50TCL_VTX_ATTR_2F_X(8), 2);
36 BEGIN_RING(chan
, tesla
, NV50TCL_VTX_ATTR_2I(0), 1);
37 OUT_RING (chan
, (dy
<< 16) | dx
);
40 static __inline__
void
41 VTX2s(NVPtr pNv
, float s1x
, float s1y
, float s2x
, float s2y
,
42 unsigned dx
, unsigned dy
)
44 struct nouveau_channel
*chan
= pNv
->chan
;
45 struct nouveau_grobj
*tesla
= pNv
->Nv3D
;
47 BEGIN_RING(chan
, tesla
, NV50TCL_VTX_ATTR_2F_X(8), 4);
48 OUT_RINGf (chan
, s1x
);
49 OUT_RINGf (chan
, s1y
);
50 OUT_RINGf (chan
, s2x
);
51 OUT_RINGf (chan
, s2y
);
52 BEGIN_RING(chan
, tesla
, NV50TCL_VTX_ATTR_2I(0), 1);
53 OUT_RING (chan
, (dy
<< 16) | dx
);