Lines Matching full:machine

105                          const struct gl_program_machine *machine)  in get_src_register_pointer()  argument
107 const struct gl_program *prog = machine->CurProgram; in get_src_register_pointer()
112 reg += machine->AddressReg[0][0]; in get_src_register_pointer()
122 return machine->Temporaries[reg]; in get_src_register_pointer()
128 return machine->VertAttribs[reg]; in get_src_register_pointer()
133 return machine->Attribs[reg][machine->CurElement]; in get_src_register_pointer()
139 return machine->Outputs[reg]; in get_src_register_pointer()
144 return machine->CurProgram->LocalParams[reg]; in get_src_register_pointer()
149 return machine->EnvParams[reg]; in get_src_register_pointer()
163 assert(reg < Elements(machine->SystemValues)); in get_src_register_pointer()
164 return machine->SystemValues[reg]; in get_src_register_pointer()
181 struct gl_program_machine *machine) in get_dst_register_pointer() argument
188 reg += machine->AddressReg[0][0]; in get_dst_register_pointer()
198 return machine->Temporaries[reg]; in get_dst_register_pointer()
203 return machine->Outputs[reg]; in get_dst_register_pointer()
224 const struct gl_program_machine *machine, GLfloat result[4]) in fetch_vector4() argument
226 const GLfloat *src = get_src_register_pointer(source, machine); in fetch_vector4()
273 const struct gl_program_machine *machine, GLuint result[4]) in fetch_vector4ui() argument
275 const GLuint *src = (GLuint *) get_src_register_pointer(source, machine); in fetch_vector4ui()
305 const struct gl_program_machine *machine, in fetch_vector4_deriv() argument
309 source->Index < (GLint) machine->NumDeriv) { in fetch_vector4_deriv()
310 const GLint col = machine->CurElement; in fetch_vector4_deriv()
311 const GLfloat w = machine->Attribs[FRAG_ATTRIB_WPOS][col][3]; in fetch_vector4_deriv()
316 deriv[0] = machine->DerivX[source->Index][0] * invQ; in fetch_vector4_deriv()
317 deriv[1] = machine->DerivX[source->Index][1] * invQ; in fetch_vector4_deriv()
318 deriv[2] = machine->DerivX[source->Index][2] * invQ; in fetch_vector4_deriv()
319 deriv[3] = machine->DerivX[source->Index][3] * invQ; in fetch_vector4_deriv()
322 deriv[0] = machine->DerivY[source->Index][0] * invQ; in fetch_vector4_deriv()
323 deriv[1] = machine->DerivY[source->Index][1] * invQ; in fetch_vector4_deriv()
324 deriv[2] = machine->DerivY[source->Index][2] * invQ; in fetch_vector4_deriv()
325 deriv[3] = machine->DerivY[source->Index][3] * invQ; in fetch_vector4_deriv()
358 const struct gl_program_machine *machine, GLfloat result[4]) in fetch_vector1() argument
360 const GLfloat *src = get_src_register_pointer(source, machine); in fetch_vector1()
376 const struct gl_program_machine *machine) in fetch_vector1ui() argument
378 const GLuint *src = (GLuint *) get_src_register_pointer(source, machine); in fetch_vector1ui()
388 const struct gl_program_machine *machine, in fetch_texel() argument
393 const GLuint unit = machine->Samplers[inst->TexSrcUnit]; in fetch_texel()
397 if (machine->NumDeriv > 0 && in fetch_texel()
402 machine->FetchTexelDeriv(ctx, texcoord, in fetch_texel()
403 machine->DerivX[attr], in fetch_texel()
404 machine->DerivY[attr], in fetch_texel()
408 machine->FetchTexelLod(ctx, texcoord, lodBias, unit, color); in fetch_texel()
455 eval_condition(const struct gl_program_machine *machine, in eval_condition() argument
460 if (test_cc(machine->CondCodes[GET_SWZ(swizzle, 0)], condMask) || in eval_condition()
461 test_cc(machine->CondCodes[GET_SWZ(swizzle, 1)], condMask) || in eval_condition()
462 test_cc(machine->CondCodes[GET_SWZ(swizzle, 2)], condMask) || in eval_condition()
463 test_cc(machine->CondCodes[GET_SWZ(swizzle, 3)], condMask)) { in eval_condition()
479 struct gl_program_machine *machine, const GLfloat value[4]) in store_vector4() argument
485 GLfloat *dst = get_dst_register_pointer(dstReg, machine); in store_vector4()
506 if (!test_cc(machine->CondCodes[GET_SWZ(dstReg->CondSwizzle, 0)], in store_vector4()
511 if (!test_cc(machine->CondCodes[GET_SWZ(dstReg->CondSwizzle, 1)], in store_vector4()
516 if (!test_cc(machine->CondCodes[GET_SWZ(dstReg->CondSwizzle, 2)], in store_vector4()
521 if (!test_cc(machine->CondCodes[GET_SWZ(dstReg->CondSwizzle, 3)], in store_vector4()
545 machine->CondCodes[0] = generate_cc(value[0]); in store_vector4()
547 machine->CondCodes[1] = generate_cc(value[1]); in store_vector4()
549 machine->CondCodes[2] = generate_cc(value[2]); in store_vector4()
551 machine->CondCodes[3] = generate_cc(value[3]); in store_vector4()
554 _mesa_condcode_string(machine->CondCodes[0]), in store_vector4()
555 _mesa_condcode_string(machine->CondCodes[1]), in store_vector4()
556 _mesa_condcode_string(machine->CondCodes[2]), in store_vector4()
557 _mesa_condcode_string(machine->CondCodes[3])); in store_vector4()
568 struct gl_program_machine *machine, const GLuint value[4]) in store_vector4ui() argument
572 GLuint *dst = (GLuint *) get_dst_register_pointer(dstReg, machine); in store_vector4ui()
577 if (!test_cc(machine->CondCodes[GET_SWZ(dstReg->CondSwizzle, 0)], in store_vector4ui()
582 if (!test_cc(machine->CondCodes[GET_SWZ(dstReg->CondSwizzle, 1)], in store_vector4ui()
587 if (!test_cc(machine->CondCodes[GET_SWZ(dstReg->CondSwizzle, 2)], in store_vector4ui()
592 if (!test_cc(machine->CondCodes[GET_SWZ(dstReg->CondSwizzle, 3)], in store_vector4ui()
609 machine->CondCodes[0] = generate_cc((float)value[0]); in store_vector4ui()
611 machine->CondCodes[1] = generate_cc((float)value[1]); in store_vector4ui()
613 machine->CondCodes[2] = generate_cc((float)value[2]); in store_vector4ui()
615 machine->CondCodes[3] = generate_cc((float)value[3]); in store_vector4ui()
618 _mesa_condcode_string(machine->CondCodes[0]), in store_vector4ui()
619 _mesa_condcode_string(machine->CondCodes[1]), in store_vector4ui()
620 _mesa_condcode_string(machine->CondCodes[2]), in store_vector4ui()
621 _mesa_condcode_string(machine->CondCodes[3])); in store_vector4ui()
633 * \param machine machine state (must be initialized)
639 struct gl_program_machine *machine) in _mesa_execute_program() argument
645 machine->CurProgram = program; in _mesa_execute_program()
652 machine->EnvParams = ctx->VertexProgram.Parameters; in _mesa_execute_program()
655 machine->EnvParams = ctx->FragmentProgram.Parameters; in _mesa_execute_program()
669 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
674 store_vector4(inst, machine, result); in _mesa_execute_program()
680 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
681 fetch_vector4(&inst->SrcReg[1], machine, b); in _mesa_execute_program()
686 store_vector4(inst, machine, result); in _mesa_execute_program()
697 fetch_vector4ui(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
698 fetch_vector4ui(&inst->SrcReg[1], machine, b); in _mesa_execute_program()
703 store_vector4ui(inst, machine, result); in _mesa_execute_program()
709 fetch_vector4(&inst->SrcReg[0], machine, t); in _mesa_execute_program()
710 machine->AddressReg[0][0] = IFLOOR(t[0]); in _mesa_execute_program()
712 printf("ARL %d\n", machine->AddressReg[0][0]); in _mesa_execute_program()
732 if (eval_condition(machine, inst)) { in _mesa_execute_program()
741 if (eval_condition(machine, inst)) { in _mesa_execute_program()
750 if (eval_condition(machine, inst)) { in _mesa_execute_program()
757 if (eval_condition(machine, inst)) { in _mesa_execute_program()
759 if (machine->StackDepth >= MAX_PROGRAM_CALL_DEPTH) { in _mesa_execute_program()
762 machine->CallStack[machine->StackDepth++] = pc + 1; /* next inst */ in _mesa_execute_program()
770 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
771 fetch_vector4(&inst->SrcReg[1], machine, b); in _mesa_execute_program()
772 fetch_vector4(&inst->SrcReg[2], machine, c); in _mesa_execute_program()
777 store_vector4(inst, machine, result); in _mesa_execute_program()
790 fetch_vector1(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
793 store_vector4(inst, machine, result); in _mesa_execute_program()
799 fetch_vector4_deriv(ctx, &inst->SrcReg[0], machine, in _mesa_execute_program()
801 store_vector4(inst, machine, result); in _mesa_execute_program()
807 fetch_vector4_deriv(ctx, &inst->SrcReg[0], machine, in _mesa_execute_program()
809 store_vector4(inst, machine, result); in _mesa_execute_program()
815 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
816 fetch_vector4(&inst->SrcReg[1], machine, b); in _mesa_execute_program()
818 store_vector4(inst, machine, result); in _mesa_execute_program()
828 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
829 fetch_vector4(&inst->SrcReg[1], machine, b); in _mesa_execute_program()
830 fetch_vector1(&inst->SrcReg[1], machine, &c); in _mesa_execute_program()
832 store_vector4(inst, machine, result); in _mesa_execute_program()
842 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
843 fetch_vector4(&inst->SrcReg[1], machine, b); in _mesa_execute_program()
845 store_vector4(inst, machine, result); in _mesa_execute_program()
855 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
856 fetch_vector4(&inst->SrcReg[1], machine, b); in _mesa_execute_program()
858 store_vector4(inst, machine, result); in _mesa_execute_program()
869 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
870 fetch_vector4(&inst->SrcReg[1], machine, b); in _mesa_execute_program()
872 store_vector4(inst, machine, result); in _mesa_execute_program()
878 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
879 fetch_vector4(&inst->SrcReg[1], machine, b); in _mesa_execute_program()
884 store_vector4(inst, machine, result); in _mesa_execute_program()
890 fetch_vector1(&inst->SrcReg[0], machine, t); in _mesa_execute_program()
910 store_vector4( inst, machine, q ); in _mesa_execute_program()
916 fetch_vector1(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
923 store_vector4(inst, machine, result); in _mesa_execute_program()
929 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
934 store_vector4(inst, machine, result); in _mesa_execute_program()
940 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
945 store_vector4(inst, machine, result); in _mesa_execute_program()
958 fetch_vector1(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
962 cond = eval_condition(machine, inst); in _mesa_execute_program()
989 if (eval_condition(machine, inst)) { in _mesa_execute_program()
996 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1010 fetch_vector1(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1020 store_vector4(inst, machine, result); in _mesa_execute_program()
1027 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1045 store_vector4(inst, machine, result); in _mesa_execute_program()
1056 fetch_vector1(&inst->SrcReg[0], machine, t); in _mesa_execute_program()
1091 store_vector4(inst, machine, q); in _mesa_execute_program()
1097 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1098 fetch_vector4(&inst->SrcReg[1], machine, b); in _mesa_execute_program()
1099 fetch_vector4(&inst->SrcReg[2], machine, c); in _mesa_execute_program()
1104 store_vector4(inst, machine, result); in _mesa_execute_program()
1117 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1118 fetch_vector4(&inst->SrcReg[1], machine, b); in _mesa_execute_program()
1119 fetch_vector4(&inst->SrcReg[2], machine, c); in _mesa_execute_program()
1124 store_vector4(inst, machine, result); in _mesa_execute_program()
1137 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1138 fetch_vector4(&inst->SrcReg[1], machine, b); in _mesa_execute_program()
1143 store_vector4(inst, machine, result); in _mesa_execute_program()
1154 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1155 fetch_vector4(&inst->SrcReg[1], machine, b); in _mesa_execute_program()
1160 store_vector4(inst, machine, result); in _mesa_execute_program()
1166 fetch_vector4(&inst->SrcReg[0], machine, result); in _mesa_execute_program()
1167 store_vector4(inst, machine, result); in _mesa_execute_program()
1177 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1178 fetch_vector4(&inst->SrcReg[1], machine, b); in _mesa_execute_program()
1183 store_vector4(inst, machine, result); in _mesa_execute_program()
1194 fetch_vector1(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1199 store_vector4(inst, machine, result); in _mesa_execute_program()
1205 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1209 store_vector4(inst, machine, result); in _mesa_execute_program()
1215 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1220 store_vector4(inst, machine, result); in _mesa_execute_program()
1226 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1231 store_vector4(inst, machine, result); in _mesa_execute_program()
1239 fetch_vector4ui(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1244 store_vector4ui(inst, machine, result); in _mesa_execute_program()
1251 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1259 store_vector4(inst, machine, result); in _mesa_execute_program()
1266 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1274 store_vector4(inst, machine, result); in _mesa_execute_program()
1280 fetch_vector4ui(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1281 fetch_vector4ui(&inst->SrcReg[1], machine, b); in _mesa_execute_program()
1286 store_vector4ui(inst, machine, result); in _mesa_execute_program()
1294 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1301 store_vector4ui(inst, machine, result); in _mesa_execute_program()
1308 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1317 store_vector4ui(inst, machine, result); in _mesa_execute_program()
1324 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1337 store_vector4ui(inst, machine, result); in _mesa_execute_program()
1344 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1357 store_vector4ui(inst, machine, result); in _mesa_execute_program()
1363 fetch_vector1(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1364 fetch_vector1(&inst->SrcReg[1], machine, b); in _mesa_execute_program()
1367 store_vector4(inst, machine, result); in _mesa_execute_program()
1374 fetch_vector1(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1404 store_vector4(inst, machine, result); in _mesa_execute_program()
1411 fetch_vector1(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1419 store_vector4(inst, machine, result); in _mesa_execute_program()
1423 if (eval_condition(machine, inst)) { in _mesa_execute_program()
1424 if (machine->StackDepth == 0) { in _mesa_execute_program()
1428 pc = machine->CallStack[--machine->StackDepth] - 1; in _mesa_execute_program()
1434 fetch_vector4(&inst->SrcReg[0], machine, axis); in _mesa_execute_program()
1435 fetch_vector4(&inst->SrcReg[1], machine, dir); in _mesa_execute_program()
1442 store_vector4(inst, machine, result); in _mesa_execute_program()
1448 fetch_vector1(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1451 store_vector4(inst, machine, result); in _mesa_execute_program()
1460 fetch_vector1(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1465 store_vector4(inst, machine, result); in _mesa_execute_program()
1471 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1472 fetch_vector4(&inst->SrcReg[1], machine, b); in _mesa_execute_program()
1477 store_vector4(inst, machine, result); in _mesa_execute_program()
1489 store_vector4(inst, machine, result); in _mesa_execute_program()
1495 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1496 fetch_vector4(&inst->SrcReg[1], machine, b); in _mesa_execute_program()
1501 store_vector4(inst, machine, result); in _mesa_execute_program()
1513 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1514 fetch_vector4(&inst->SrcReg[1], machine, b); in _mesa_execute_program()
1519 store_vector4(inst, machine, result); in _mesa_execute_program()
1531 fetch_vector1(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1534 store_vector4(inst, machine, result); in _mesa_execute_program()
1540 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1541 fetch_vector4(&inst->SrcReg[1], machine, b); in _mesa_execute_program()
1546 store_vector4(inst, machine, result); in _mesa_execute_program()
1558 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1559 fetch_vector4(&inst->SrcReg[1], machine, b); in _mesa_execute_program()
1564 store_vector4(inst, machine, result); in _mesa_execute_program()
1576 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1577 fetch_vector4(&inst->SrcReg[1], machine, b); in _mesa_execute_program()
1582 store_vector4(inst, machine, result); in _mesa_execute_program()
1594 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1599 store_vector4(inst, machine, result); in _mesa_execute_program()
1605 store_vector4(inst, machine, result); in _mesa_execute_program()
1611 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1612 fetch_vector4(&inst->SrcReg[1], machine, b); in _mesa_execute_program()
1617 store_vector4(inst, machine, result); in _mesa_execute_program()
1628 const GLfloat *src = get_src_register_pointer(source, machine); in _mesa_execute_program()
1645 store_vector4(inst, machine, result); in _mesa_execute_program()
1652 fetch_vector4(&inst->SrcReg[0], machine, texcoord); in _mesa_execute_program()
1662 fetch_texel(ctx, machine, inst, texcoord, 0.0, color); in _mesa_execute_program()
1670 store_vector4(inst, machine, color); in _mesa_execute_program()
1678 fetch_vector4(&inst->SrcReg[0], machine, texcoord); in _mesa_execute_program()
1683 fetch_texel(ctx, machine, inst, texcoord, lodBias, color); in _mesa_execute_program()
1697 store_vector4(inst, machine, color); in _mesa_execute_program()
1704 fetch_vector4(&inst->SrcReg[0], machine, texcoord); in _mesa_execute_program()
1705 fetch_vector4(&inst->SrcReg[1], machine, dtdx); in _mesa_execute_program()
1706 fetch_vector4(&inst->SrcReg[2], machine, dtdy); in _mesa_execute_program()
1707 machine->FetchTexelDeriv(ctx, texcoord, dtdx, dtdy, in _mesa_execute_program()
1710 store_vector4(inst, machine, color); in _mesa_execute_program()
1718 fetch_vector4(&inst->SrcReg[0], machine, texcoord); in _mesa_execute_program()
1723 machine->FetchTexelLod(ctx, texcoord, lod, in _mesa_execute_program()
1724 machine->Samplers[inst->TexSrcUnit], color); in _mesa_execute_program()
1726 store_vector4(inst, machine, color); in _mesa_execute_program()
1734 fetch_vector4(&inst->SrcReg[0], machine, texcoord); in _mesa_execute_program()
1745 fetch_texel(ctx, machine, inst, texcoord, 0.0, color); in _mesa_execute_program()
1747 store_vector4(inst, machine, color); in _mesa_execute_program()
1757 fetch_vector4(&inst->SrcReg[0], machine, texcoord); in _mesa_execute_program()
1765 fetch_texel(ctx, machine, inst, texcoord, 0.0, color); in _mesa_execute_program()
1767 store_vector4(inst, machine, color); in _mesa_execute_program()
1773 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1778 store_vector4(inst, machine, result); in _mesa_execute_program()
1783 const GLuint raw = fetch_vector1ui(&inst->SrcReg[0], machine); in _mesa_execute_program()
1790 store_vector4(inst, machine, result); in _mesa_execute_program()
1795 const GLuint raw = fetch_vector1ui(&inst->SrcReg[0], machine); in _mesa_execute_program()
1802 store_vector4(inst, machine, result); in _mesa_execute_program()
1807 const GLuint raw = fetch_vector1ui(&inst->SrcReg[0], machine); in _mesa_execute_program()
1813 store_vector4(inst, machine, result); in _mesa_execute_program()
1818 const GLuint raw = fetch_vector1ui(&inst->SrcReg[0], machine); in _mesa_execute_program()
1824 store_vector4(inst, machine, result); in _mesa_execute_program()
1830 fetch_vector4ui(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1831 fetch_vector4ui(&inst->SrcReg[1], machine, b); in _mesa_execute_program()
1836 store_vector4ui(inst, machine, result); in _mesa_execute_program()
1842 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1843 fetch_vector4(&inst->SrcReg[1], machine, b); in _mesa_execute_program()
1848 store_vector4(inst, machine, result); in _mesa_execute_program()
1859 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()
1860 fetch_vector4(&inst->SrcReg[1], machine, b); in _mesa_execute_program()
1861 fetch_vector4(&inst->SrcReg[2], machine, c); in _mesa_execute_program()
1866 store_vector4(inst, machine, result); in _mesa_execute_program()
1873 fetch_vector4(&inst->SrcReg[0], machine, a); in _mesa_execute_program()