23 atest.enable = DRAW_ENABLE;
24 atest.method = ATEST_METHOD_NOTEQUAL;
26 atest.keep = ATEST_KEEP_FRAMEBUFFER;
28 dtest.enable = DRAW_DISABLE;
29 dtest.pass = DRAW_DISABLE;
34 ztest.enable = DRAW_ENABLE;
35 ztest.method = z->method;
40 ztest.enable = DRAW_ENABLE;
41 ztest.method = ZTEST_METHOD_ALLPASS;
46 blend.color2 = BLEND_COLOR_DEST;
47 blend.alpha = BLEND_ALPHA_SOURCE;
48 blend.color3 = BLEND_COLOR_DEST;
49 blend.fixed_alpha = 0x80;
52 wrap.horizontal = WRAP_CLAMP;
53 wrap.vertical = WRAP_CLAMP;
54 wrap.minu = wrap.maxu = 0;
55 wrap.minv = wrap.maxv = 0;
61 PACK_GIFTAG(q, GS_SET_FRAME(frame->address>>11,frame->width>>6,frame->psm,frame->mask),
GS_REG_FRAME + context);
64 PACK_GIFTAG(q, GS_SET_ZBUF(z->address>>11,z->zsm,z->mask),
GS_REG_ZBUF + context);
70 PACK_GIFTAG(q, GS_SET_XYOFFSET(ftoi4(2048.0f),ftoi4(2048.0f)),
GS_REG_XYOFFSET + context);
73 PACK_GIFTAG(q, GS_SET_SCISSOR(0,frame->width-1,0,frame->height-1),
GS_REG_SCISSOR + context);
76 PACK_GIFTAG(q, GS_SET_TEST(atest.enable,atest.method,atest.compval,atest.keep,
77 dtest.enable,dtest.pass,
84 PACK_GIFTAG(q, GS_SET_PABE(DRAW_DISABLE),
GS_REG_PABE);
87 PACK_GIFTAG(q, GS_SET_ALPHA(blend.color1,blend.color2,blend.alpha,
88 blend.color3,blend.fixed_alpha),
GS_REG_ALPHA + context);
91 PACK_GIFTAG(q, GS_SET_DTHE(GS_DISABLE),
GS_REG_DTHE);
93 PACK_GIFTAG(q, GS_SET_DIMX(4,2,5,3,0,6,1,7,5,3,4,2,1,7,0,6),
GS_REG_DIMX);
101 PACK_GIFTAG(q,GS_SET_FBA(ALPHA_CORRECT_RGBA16),
GS_REG_FBA + context);
110 PACK_GIFTAG(q, GS_SET_CLAMP(wrap.horizontal,wrap.vertical,wrap.minu,
111 wrap.maxu,wrap.minv,wrap.maxv),
GS_REG_CLAMP + context);
149qword_t *
draw_clear(qword_t *q,
int context,
float x,
float y,
float width,
float height,
int r,
int g,
int b)
163 rect.v0.z = 0x00000000;
165 rect.color.rgbaq = GS_SET_RGBAQ(r,g,b,0x80,q0.ivalue);
167 rect.v1.x = x + width - 0.9375f;
168 rect.v1.y = y + height - 0.9375f;
169 rect.v1.z = 0x00000000;
171 PACK_GIFTAG(q, GIF_SET_TAG(2,0,0,0,0,1),
GIF_REG_AD);
175 PACK_GIFTAG(q, GS_SET_PRMODE(0,0,0,0,0,0,context,1),
GS_REG_PRMODE);
180 PACK_GIFTAG(q, GIF_SET_TAG(1,0,0,0,0,1),
GIF_REG_AD);
235 qwords = (width*height)>>4;
242 qwords = (width*height)>>2;
248 qwords = (width*height)>>5;
255 qwords = (width*height)>>3;
265 qwords = (width*height)>>4;
272 qwords = (width*height)>>2;
279 qwords = (width*height)>>3;
286 qwords = (width*height)>>5;
306 PACK_GIFTAG(q,GS_SET_BITBLTBUF(0,0,0,dest>>6,dest_width>>6,psm),
GS_REG_BITBLTBUF);
338 PACK_GIFTAG(q,GIF_SET_TAG(remaining,0,0,0,2,0),0);
340 DMATAG_REF(q,remaining,(
unsigned int)src,0,0,0);