Lines Matching refs:curProg

110 static void match_pair_inst(struct ati_fragment_shader *curProg, GLuint optype)  in match_pair_inst()  argument
112 if (optype == curProg->last_optype) { in match_pair_inst()
113 curProg->last_optype = 1; in match_pair_inst()
181 static int check_arith_arg(struct ati_fragment_shader *curProg, in check_arith_arg() argument
203 if ((curProg->cur_pass == 1) && in check_arith_arg()
205 curProg->interpinp1 = GL_TRUE; in check_arith_arg()
239 struct ati_fragment_shader *curProg = ctx->ATIFragmentShader.Current; in _mesa_BindFragmentShaderATI() local
249 if (curProg->Id == id) { in _mesa_BindFragmentShaderATI()
254 if (curProg->Id != 0) { in _mesa_BindFragmentShaderATI()
255 curProg->RefCount--; in _mesa_BindFragmentShaderATI()
256 if (curProg->RefCount <= 0) { in _mesa_BindFragmentShaderATI()
383 struct ati_fragment_shader *curProg = ctx->ATIFragmentShader.Current; in _mesa_EndFragmentShaderATI() local
392 if (curProg->interpinp1 && (ctx->ATIFragmentShader.Current->cur_pass > 1)) { in _mesa_EndFragmentShaderATI()
397 match_pair_inst(curProg, 0); in _mesa_EndFragmentShaderATI()
414 GLuint op = curProg->SetupInst[j][i].Opcode; in _mesa_EndFragmentShaderATI()
416 GLuint src = curProg->SetupInst[j][i].src; in _mesa_EndFragmentShaderATI()
417 GLuint swizzle = curProg->SetupInst[j][i].swizzle; in _mesa_EndFragmentShaderATI()
421 for (i = 0; i < curProg->numArithInstr[j]; i++) { in _mesa_EndFragmentShaderATI()
422 GLuint op0 = curProg->Instructions[j][i].Opcode[0]; in _mesa_EndFragmentShaderATI()
423 GLuint op1 = curProg->Instructions[j][i].Opcode[1]; in _mesa_EndFragmentShaderATI()
426 GLuint count0 = curProg->Instructions[j][i].ArgCount[0]; in _mesa_EndFragmentShaderATI()
427 GLuint count1 = curProg->Instructions[j][i].ArgCount[1]; in _mesa_EndFragmentShaderATI()
446 struct ati_fragment_shader *curProg = ctx->ATIFragmentShader.Current; in _mesa_PassTexCoordATI() local
454 if (curProg->cur_pass == 1) { in _mesa_PassTexCoordATI()
455 match_pair_inst(curProg, 0); in _mesa_PassTexCoordATI()
456 curProg->cur_pass = 2; in _mesa_PassTexCoordATI()
458 if ((curProg->cur_pass > 2) || in _mesa_PassTexCoordATI()
459 ((1 << (dst - GL_REG_0_ATI)) & curProg->regsAssigned[curProg->cur_pass >> 1])) { in _mesa_PassTexCoordATI()
474 if ((curProg->cur_pass == 0) && (coord >= GL_REG_0_ATI)) { in _mesa_PassTexCoordATI()
488 if ((((curProg->swizzlerq >> (tmp * 2)) & 3) != 0) && in _mesa_PassTexCoordATI()
489 (((swizzle & 1) + 1) != ((curProg->swizzlerq >> (tmp * 2)) & 3))) { in _mesa_PassTexCoordATI()
493 curProg->swizzlerq |= (((swizzle & 1) + 1) << (tmp * 2)); in _mesa_PassTexCoordATI()
497 curProg->regsAssigned[curProg->cur_pass >> 1] |= 1 << (dst - GL_REG_0_ATI); in _mesa_PassTexCoordATI()
498 new_tex_inst(curProg); in _mesa_PassTexCoordATI()
501 curI = &curProg->SetupInst[curProg->cur_pass >> 1][dst - GL_REG_0_ATI]; in _mesa_PassTexCoordATI()
518 struct ati_fragment_shader *curProg = ctx->ATIFragmentShader.Current; in _mesa_SampleMapATI() local
526 if (curProg->cur_pass == 1) { in _mesa_SampleMapATI()
527 match_pair_inst(curProg, 0); in _mesa_SampleMapATI()
528 curProg->cur_pass = 2; in _mesa_SampleMapATI()
530 if ((curProg->cur_pass > 2) || in _mesa_SampleMapATI()
531 ((1 << (dst - GL_REG_0_ATI)) & curProg->regsAssigned[curProg->cur_pass >> 1])) { in _mesa_SampleMapATI()
547 if ((curProg->cur_pass == 0) && (interp >= GL_REG_0_ATI)) { in _mesa_SampleMapATI()
561 if ((((curProg->swizzlerq >> (tmp * 2)) & 3) != 0) && in _mesa_SampleMapATI()
562 (((swizzle & 1) + 1) != ((curProg->swizzlerq >> (tmp * 2)) & 3))) { in _mesa_SampleMapATI()
566 curProg->swizzlerq |= (((swizzle & 1) + 1) << (tmp * 2)); in _mesa_SampleMapATI()
570 curProg->regsAssigned[curProg->cur_pass >> 1] |= 1 << (dst - GL_REG_0_ATI); in _mesa_SampleMapATI()
571 new_tex_inst(curProg); in _mesa_SampleMapATI()
574 curI = &curProg->SetupInst[curProg->cur_pass >> 1][dst - GL_REG_0_ATI]; in _mesa_SampleMapATI()
595 struct ati_fragment_shader *curProg = ctx->ATIFragmentShader.Current; in _mesa_FragmentOpXATI() local
605 if (curProg->cur_pass==0) in _mesa_FragmentOpXATI()
606 curProg->cur_pass=1; in _mesa_FragmentOpXATI()
608 else if (curProg->cur_pass==2) in _mesa_FragmentOpXATI()
609 curProg->cur_pass=3; in _mesa_FragmentOpXATI()
613 if ((optype == 0) || (curProg->last_optype == optype)) { in _mesa_FragmentOpXATI()
614 if (curProg->numArithInstr[curProg->cur_pass >> 1] > 7) { in _mesa_FragmentOpXATI()
619 match_pair_inst(curProg, optype); in _mesa_FragmentOpXATI()
620 new_arith_inst(curProg); in _mesa_FragmentOpXATI()
622 curProg->last_optype = optype; in _mesa_FragmentOpXATI()
623 ci = curProg->numArithInstr[curProg->cur_pass >> 1] - 1; in _mesa_FragmentOpXATI()
626 curI = &curProg->Instructions[curProg->cur_pass >> 1][ci]; in _mesa_FragmentOpXATI()
660 if (!check_arith_arg(curProg, optype, arg1, arg1Rep)) { in _mesa_FragmentOpXATI()
664 if (!check_arith_arg(curProg, optype, arg2, arg2Rep)) { in _mesa_FragmentOpXATI()
669 if (!check_arith_arg(curProg, optype, arg3, arg3Rep)) { in _mesa_FragmentOpXATI()
786 struct ati_fragment_shader *curProg = ctx->ATIFragmentShader.Current; in _mesa_SetFragmentShaderConstantATI() local
787 COPY_4V(curProg->Constants[dstindex], value); in _mesa_SetFragmentShaderConstantATI()
788 curProg->LocalConstDef |= 1 << dstindex; in _mesa_SetFragmentShaderConstantATI()