Lines Matching refs:curProg
77 static void match_pair_inst(struct ati_fragment_shader *curProg, GLuint optype) in match_pair_inst() argument
79 if (optype == curProg->last_optype) { in match_pair_inst()
80 curProg->last_optype = ATI_FRAGMENT_SHADER_ALPHA_OP; in match_pair_inst()
221 struct ati_fragment_shader *curProg = ctx->ATIFragmentShader.Current; in _mesa_BindFragmentShaderATI() local
231 if (curProg->Id == id) { in _mesa_BindFragmentShaderATI()
236 if (curProg->Id != 0) { in _mesa_BindFragmentShaderATI()
237 curProg->RefCount--; in _mesa_BindFragmentShaderATI()
238 if (curProg->RefCount <= 0) { in _mesa_BindFragmentShaderATI()
364 struct ati_fragment_shader *curProg = ctx->ATIFragmentShader.Current; in _mesa_EndFragmentShaderATI() local
373 if (curProg->interpinp1 && (ctx->ATIFragmentShader.Current->cur_pass > 1)) { in _mesa_EndFragmentShaderATI()
378 match_pair_inst(curProg, 0); in _mesa_EndFragmentShaderATI()
395 GLuint op = curProg->SetupInst[j][i].Opcode; in _mesa_EndFragmentShaderATI()
397 GLuint src = curProg->SetupInst[j][i].src; in _mesa_EndFragmentShaderATI()
398 GLuint swizzle = curProg->SetupInst[j][i].swizzle; in _mesa_EndFragmentShaderATI()
402 for (i = 0; i < curProg->numArithInstr[j]; i++) { in _mesa_EndFragmentShaderATI()
403 GLuint op0 = curProg->Instructions[j][i].Opcode[0]; in _mesa_EndFragmentShaderATI()
404 GLuint op1 = curProg->Instructions[j][i].Opcode[1]; in _mesa_EndFragmentShaderATI()
407 GLuint count0 = curProg->Instructions[j][i].ArgCount[0]; in _mesa_EndFragmentShaderATI()
408 GLuint count1 = curProg->Instructions[j][i].ArgCount[1]; in _mesa_EndFragmentShaderATI()
425 curProg->Program)) { in _mesa_EndFragmentShaderATI()
437 struct ati_fragment_shader *curProg = ctx->ATIFragmentShader.Current; in _mesa_PassTexCoordATI() local
439 GLubyte new_pass = curProg->cur_pass; in _mesa_PassTexCoordATI()
446 if (curProg->cur_pass == 1) in _mesa_PassTexCoordATI()
449 ((1 << (dst - GL_REG_0_ATI)) & curProg->regsAssigned[new_pass >> 1])) { in _mesa_PassTexCoordATI()
478 if ((((curProg->swizzlerq >> (tmp * 2)) & 3) != 0) && in _mesa_PassTexCoordATI()
479 (((swizzle & 1) + 1) != ((curProg->swizzlerq >> (tmp * 2)) & 3))) { in _mesa_PassTexCoordATI()
483 curProg->swizzlerq |= (((swizzle & 1) + 1) << (tmp * 2)); in _mesa_PassTexCoordATI()
487 if (curProg->cur_pass == 1) in _mesa_PassTexCoordATI()
488 match_pair_inst(curProg, 0); in _mesa_PassTexCoordATI()
489 curProg->cur_pass = new_pass; in _mesa_PassTexCoordATI()
490 curProg->regsAssigned[curProg->cur_pass >> 1] |= 1 << (dst - GL_REG_0_ATI); in _mesa_PassTexCoordATI()
493 curI = &curProg->SetupInst[curProg->cur_pass >> 1][dst - GL_REG_0_ATI]; in _mesa_PassTexCoordATI()
510 struct ati_fragment_shader *curProg = ctx->ATIFragmentShader.Current; in _mesa_SampleMapATI() local
512 GLubyte new_pass = curProg->cur_pass; in _mesa_SampleMapATI()
519 if (curProg->cur_pass == 1) in _mesa_SampleMapATI()
522 ((1 << (dst - GL_REG_0_ATI)) & curProg->regsAssigned[new_pass >> 1])) { in _mesa_SampleMapATI()
552 if ((((curProg->swizzlerq >> (tmp * 2)) & 3) != 0) && in _mesa_SampleMapATI()
553 (((swizzle & 1) + 1) != ((curProg->swizzlerq >> (tmp * 2)) & 3))) { in _mesa_SampleMapATI()
557 curProg->swizzlerq |= (((swizzle & 1) + 1) << (tmp * 2)); in _mesa_SampleMapATI()
561 if (curProg->cur_pass == 1) in _mesa_SampleMapATI()
562 match_pair_inst(curProg, 0); in _mesa_SampleMapATI()
563 curProg->cur_pass = new_pass; in _mesa_SampleMapATI()
564 curProg->regsAssigned[curProg->cur_pass >> 1] |= 1 << (dst - GL_REG_0_ATI); in _mesa_SampleMapATI()
567 curI = &curProg->SetupInst[curProg->cur_pass >> 1][dst - GL_REG_0_ATI]; in _mesa_SampleMapATI()
588 struct ati_fragment_shader *curProg = ctx->ATIFragmentShader.Current; in _mesa_FragmentOpXATI() local
592 GLubyte new_pass = curProg->cur_pass; in _mesa_FragmentOpXATI()
600 if (curProg->cur_pass == 0) in _mesa_FragmentOpXATI()
602 else if (curProg->cur_pass == 2) in _mesa_FragmentOpXATI()
605 numArithInstr = curProg->numArithInstr[new_pass >> 1]; in _mesa_FragmentOpXATI()
612 curProg->last_optype == optype || in _mesa_FragmentOpXATI()
613 curProg->numArithInstr[new_pass >> 1] == 0) { in _mesa_FragmentOpXATI()
614 if (curProg->numArithInstr[new_pass >> 1] > 7) { in _mesa_FragmentOpXATI()
621 curI = &curProg->Instructions[new_pass >> 1][ci]; in _mesa_FragmentOpXATI()
685 curProg->interpinp1 |= check_arg_color(new_pass, arg1); in _mesa_FragmentOpXATI()
687 curProg->interpinp1 |= check_arg_color(new_pass, arg2); in _mesa_FragmentOpXATI()
689 curProg->interpinp1 |= check_arg_color(new_pass, arg3); in _mesa_FragmentOpXATI()
691 curProg->numArithInstr[new_pass >> 1] = numArithInstr; in _mesa_FragmentOpXATI()
692 curProg->last_optype = optype; in _mesa_FragmentOpXATI()
693 curProg->cur_pass = new_pass; in _mesa_FragmentOpXATI()
813 struct ati_fragment_shader *curProg = ctx->ATIFragmentShader.Current; in _mesa_SetFragmentShaderConstantATI() local
814 COPY_4V(curProg->Constants[dstindex], value); in _mesa_SetFragmentShaderConstantATI()
815 curProg->LocalConstDef |= 1 << dstindex; in _mesa_SetFragmentShaderConstantATI()