975
975
r300ContextPtr rmesa = R300_CONTEXT(ctx);
978
Ref[0] & 0xff) << R300_STENCILREF_SHIFT) | ((ctx->
984
R300_STENCILMASK_SHIFT));
977
((ctx->Stencil.Ref[0] & 0xff) << R300_STENCILREF_SHIFT)
978
| ((ctx->Stencil.ValueMask[0] & 0xff) << R300_STENCILMASK_SHIFT);
979
const unsigned back = ctx->Stencil._BackFace;
988
982
R300_STATECHANGE(rmesa, zs);
1000
994
rmesa->hw.zs.cmd[R300_ZS_CNTL_1] |=
1001
995
(flag << R300_S_FRONT_FUNC_SHIFT);
1003
if (ctx->Stencil._TestTwoSide)
1004
flag = translate_func(ctx->Stencil.Function[1]);
997
flag = translate_func(ctx->Stencil.Function[back]);
1006
999
rmesa->hw.zs.cmd[R300_ZS_CNTL_1] |=
1007
1000
(flag << R300_S_BACK_FUNC_SHIFT);
1026
1019
GLenum fail, GLenum zfail, GLenum zpass)
1028
1021
r300ContextPtr rmesa = R300_CONTEXT(ctx);
1022
const unsigned back = ctx->Stencil._BackFace;
1030
1024
R300_STATECHANGE(rmesa, zs);
1031
1025
/* It is easier to mask what's left.. */
1042
1036
| (translate_stencil_op(ctx->Stencil.ZPassFunc[0]) <<
1043
1037
R300_S_FRONT_ZPASS_OP_SHIFT);
1045
if (ctx->Stencil._TestTwoSide) {
1046
rmesa->hw.zs.cmd[R300_ZS_CNTL_1] |=
1047
(translate_stencil_op(ctx->Stencil.FailFunc[1]) <<
1048
R300_S_BACK_SFAIL_OP_SHIFT)
1049
| (translate_stencil_op(ctx->Stencil.ZFailFunc[1]) <<
1050
R300_S_BACK_ZFAIL_OP_SHIFT)
1051
| (translate_stencil_op(ctx->Stencil.ZPassFunc[1]) <<
1052
R300_S_BACK_ZPASS_OP_SHIFT);
1054
rmesa->hw.zs.cmd[R300_ZS_CNTL_1] |=
1055
(translate_stencil_op(ctx->Stencil.FailFunc[0]) <<
1056
R300_S_BACK_SFAIL_OP_SHIFT)
1057
| (translate_stencil_op(ctx->Stencil.ZFailFunc[0]) <<
1058
R300_S_BACK_ZFAIL_OP_SHIFT)
1059
| (translate_stencil_op(ctx->Stencil.ZPassFunc[0]) <<
1060
R300_S_BACK_ZPASS_OP_SHIFT);
1039
rmesa->hw.zs.cmd[R300_ZS_CNTL_1] |=
1040
(translate_stencil_op(ctx->Stencil.FailFunc[back]) <<
1041
R300_S_BACK_SFAIL_OP_SHIFT)
1042
| (translate_stencil_op(ctx->Stencil.ZFailFunc[back]) <<
1043
R300_S_BACK_ZFAIL_OP_SHIFT)
1044
| (translate_stencil_op(ctx->Stencil.ZPassFunc[back]) <<
1045
R300_S_BACK_ZPASS_OP_SHIFT);
1064
1048
/* =============================================================
1215
1199
case STATE_R300_TEXRECT_FACTOR:{
1216
1200
struct gl_texture_object *t =
1217
ctx->Texture.Unit[state[2]].CurrentRect;
1201
ctx->Texture.Unit[state[2]].CurrentTex[TEXTURE_RECT_INDEX];
1219
1203
if (t && t->Image[0][t->BaseLevel]) {
1220
1204
struct gl_texture_image *image =