Home | History | Annotate | Download | only in Shader

Lines Matching defs:If

30 		if(shader->getShaderModel() >= 0x0300)
32 if(shader->isVPosDeclared())
34 if(!halfIntegerCoordinates)
45 if(fullPixelPositionRegister)
52 if(shader->isVFaceDeclared())
70 if(shader->containsLeaveInstruction())
77 if(state.targetFormat[i] != FORMAT_NULL)
89 if(opcode == Shader::OPCODE_CALL || opcode == Shader::OPCODE_CALLNZ)
105 if(opcode == Shader::OPCODE_DCL || opcode == Shader::OPCODE_DEF || opcode == Shader::OPCODE_DEFI || opcode == Shader::OPCODE_DEFB)
130 if(opcode == Shader::OPCODE_TEXKILL) // Takes destination as input
132 if(dst.type == Shader::PARAMETER_TEXTURE)
145 if(src0.type != Shader::PARAMETER_VOID) s0 = fetchRegister(src0);
146 if(src1.type != Shader::PARAMETER_VOID) s1 = fetchRegister(src1);
147 if(src2.type != Shader::PARAMETER_VOID) s2 = fetchRegister(src2);
148 if(src3.type != Shader::PARAMETER_VOID) s3 = fetchRegister(src3);
149 if(src4.type != Shader::PARAMETER_VOID) s4 = fetchRegister(src4);
317 case Shader::OPCODE_IF: IF(src0); break;
340 if(dst.type != Shader::PARAMETER_VOID && dst.type != Shader::PARAMETER_LABEL && opcode != Shader::OPCODE_TEXKILL && opcode != Shader::OPCODE_NOP)
342 if(dst.saturate)
344 if(dst.x) d.x = Max(d.x, Float4(0.0f));
345 if(dst.y) d.y = Max(d.y, Float4(0.0f));
346 if(dst.z) d.z = Max(d.z, Float4(0.0f));
347 if(dst.w) d.w = Max(d.w, Float4(0.0f));
349 if(dst.x) d.x = Min(d.x, Float4(1.0f));
350 if(dst.y) d.y = Min(d.y, Float4(1.0f));
351 if(dst.z) d.z = Min(d.z, Float4(1.0f));
352 if(dst.w) d.w = Min(d.w, Float4(1.0f));
355 if(instruction->isPredicated())
362 if(dst.rel.type == Shader::PARAMETER_VOID)
364 if(dst.x) pDst.x = r[dst.index].x;
365 if(dst.y) pDst.y = r[dst.index].y;
366 if(dst.z) pDst.z = r[dst.index].z;
367 if(dst.w) pDst.w = r[dst.index].w;
373 if(dst.x) pDst.x = r[dst.index + a].x;
374 if(dst.y) pDst.y = r[dst.index + a].y;
375 if(dst.z) pDst.z = r[dst.index + a].z;
376 if(dst.w) pDst.w = r[dst.index + a].w;
380 if(dst.rel.type == Shader::PARAMETER_VOID)
382 if(dst.x) pDst.x = oC[dst.index].x;
383 if(dst.y) pDst.y = oC[dst.index].y;
384 if(dst.z) pDst.z = oC[dst.index].z;
385 if(dst.w) pDst.w = oC[dst.index].w;
391 if(dst.x) pDst.x = oC[a].x;
392 if(dst.y) pDst.y = oC[a].y;
393 if(dst.z) pDst.z = oC[a].z;
394 if(dst.w) pDst.w = oC[a].w;
398 if(dst.x) pDst.x = p0.x;
399 if(dst.y) pDst.y = p0.y;
400 if(dst.z) pDst.z = p0.z;
401 if(dst.w) pDst.w = p0.w;
417 if(predicate)
426 if(!instruction->predicateNot)
428 if(dst.x) xEnable = xEnable & As<Int4>(xPredicate);
429 if(dst.y) yEnable = yEnable & As<Int4>(yPredicate);
430 if(dst.z) zEnable = zEnable & As<Int4>(zPredicate);
431 if(dst.w) wEnable = wEnable & As<Int4>(wPredicate);
435 if(dst.x) xEnable = xEnable & ~As<Int4>(xPredicate);
436 if(dst.y) yEnable = yEnable & ~As<Int4>(yPredicate);
437 if(dst.z) zEnable = zEnable & ~As<Int4>(zPredicate);
438 if(dst.w) wEnable = wEnable & ~As<Int4>(wPredicate);
442 if(dst.x) d.x = As<Float4>(As<Int4>(d.x) & xEnable);
443 if(dst.y) d.y = As<Float4>(As<Int4>(d.y) & yEnable);
444 if(dst.z) d.z = As<Float4>(As<Int4>(d.z) & zEnable);
445 if(dst.w) d.w = As<Float4>(As<Int4>(d.w) & wEnable);
447 if(dst.x) d.x = As<Float4>(As<Int4>(d.x) | (As<Int4>(pDst.x) & ~xEnable));
448 if(dst.y) d.y = As<Float4>(As<Int4>(d.y) | (As<Int4>(pDst.y) & ~yEnable));
449 if(dst.z) d.z = As<Float4>(As<Int4>(d.z) | (As<Int4>(pDst.z) & ~zEnable));
450 if(dst.w) d.w = As<Float4>(As<Int4>(d.w) | (As<Int4>(pDst.w) & ~wEnable));
456 if(dst.rel.type == Shader::PARAMETER_VOID)
458 if(dst.x) r[dst.index].x = d.x;
459 if(dst.y) r[dst.index].y = d.y;
460 if(dst.z) r[dst.index].z = d.z;
461 if(dst.w) r[dst.index].w = d.w;
467 if(dst.x) r[dst.index + a].x = d.x;
468 if(dst.y) r[dst.index + a].y = d.y;
469 if(dst.z) r[dst.index + a].z = d.z;
470 if(dst.w) r[dst.index + a].w = d.w;
474 if(dst.rel.type == Shader::PARAMETER_VOID)
478 if(dst.x) { oC[dst.index].x = d.x; }
479 if(dst.y) { oC[dst.index].y = d.y; }
480 if(dst.z) { oC[dst.index].z = d.z; }
481 if(dst.w) { oC[dst.index].w = d.w; }
488 if(dst.x) { oC[a].x = d.x; }
489 if(dst.y) { oC[a].y = d.y; }
490 if(dst.z) { oC[a].z = d.z; }
491 if(dst.w) { oC[a].w = d.w; }
495 if(dst.x) p0.x = d.x;
496 if(dst.y) p0.y = d.y;
497 if(dst.z) p0.z = d.z;
498 if(dst.w) p0.w = d.w;
509 if(currentLabel != -1)
514 if(broadcastColor0)
531 if(state.depthOverride)
539 if(!state.alphaTestActive())
546 if(state.transparencyAntialiasing == TRANSPARENCY_NONE)
557 else if(state.transparencyAntialiasing == TRANSPARENCY_ALPHA_TO_COVERAGE)
577 if(!state.colorWriteActive(index))
582 if(!postBlendSRGB && state.writeSRGB && !isSRGB(index))
589 if(index == 0)
613 if(state.targetFormat[index] == FORMAT_R5G6B5)
628 if(state.multiSampleMask & (1 << q))
664 if(state.multiSampleMask & (1 << q))
681 if(sampler.type == Shader::PARAMETER_SAMPLER && sampler.rel.type == Shader::PARAMETER_VOID)
691 if(shader->usesSampler(i))
693 If(index == i)
713 #if PERF_PROFILE
720 #if PERF_PROFILE
731 if(!state.colorWriteActive(index) && !(index == 0 && state.alphaTestActive()))
796 if
798 if(shader->containsBreakInstruction() && instruction->analysisBreak)
803 if(shader->containsContinueInstruction() && instruction->analysisContinue)
808 if(shader->containsLeaveInstruction() && instruction->analysisLeave)
825 if(src.rel.type == Shader::PARAMETER_VOID)
838 if(src.rel.type == Shader::PARAMETER_VOID) // Not relative
857 if(src.index == Shader::VPosIndex) reg = vPos;
858 if(src.index == Shader::VFaceIndex) reg = vFace;
861 if(src.rel.type == Shader::PARAMETER_VOID)
865 else if(src.rel.type == Shader::PARAMETER_TEMP)
882 if(src.rel.type == Shader::PARAMETER_VOID) // Not relative
948 if(bufferIndex == -1)
968 if(src.rel.type == Shader::PARAMETER_VOID) // Not relative
977 if(shader->containsDefineInstruction()) // Constant may be known at compile time
983 if(instruction.opcode == Shader::OPCODE_DEF)
985 if(instruction.dst.index == i)
998 else if(src.rel.type == Shader::PARAMETER_LOOP)
1028 if(var.rel.type == Shader::PARAMETER_TEMP)
1032 else if(var.rel.type == Shader::PARAMETER_INPUT)
1036 else if(var.rel.type == Shader::PARAMETER_OUTPUT)
1040 else if(var.rel.type == Shader::PARAMETER_CONST)
1044 else if(var.rel.type == Shader::PARAMETER_LOOP)
1120 if(project)
1191 if(mask & 0x1) kill &= SignMask(CmpNLT(src.x, Float4(0.0f)));
1192 if(mask & 0x2) kill &= SignMask(CmpNLT(src.y, Float4(0.0f)));
1193 if(mask & 0x4) kill &= SignMask(CmpNLT(src.z, Float4(0.0f)));
1194 if(mask & 0x8) kill &= SignMask(CmpNLT(src.w, Float4(0.0f)));
1197 // if(shader->containsDynamicBranching())
1207 // FIXME: Branch to end of shader if all killed?
1214 if(shader->containsDynamicBranching())
1224 // FIXME: Branch to end of shader if all killed?
1280 if(predicateRegister.modifier == Shader::MODIFIER_NOT)
1307 if(!labelBlock[labelIndex])
1312 if(callRetBlock[labelIndex].size() > 1)
1327 if(src.type == Shader::PARAMETER_CONSTBOOL)
1331 else if(src.type == Shader::PARAMETER_PREDICATE)
1342 if(boolRegister.modifier == Shader::MODIFIER_NOT)
1347 if(!labelBlock[labelIndex])
1352 if(callRetBlock[labelIndex].size() > 1)
1369 if(predicateRegister.modifier == Shader::MODIFIER_NOT)
1376 if(!labelBlock[labelIndex])
1381 if(callRetBlock[labelIndex].size() > 1)
1405 if(isConditionalIf[ifDepth])
1434 if(isConditionalIf[ifDepth])
1494 void PixelProgram::IF(const Src &src)
1496 if(src.type == Shader::PARAMETER_CONSTBOOL)
1500 else if(src.type == Shader::PARAMETER_PREDICATE)
1507 IF(condition);
1517 if(boolRegister.modifier == Shader::MODIFIER_NOT)
1537 if(predicateRegister.modifier == Shader::MODIFIER_NOT)
1542 IF(condition);
1561 IF(condition);
1564 void PixelProgram::IF(Int4 &condition)
1586 if(!labelBlock[labelIndex])
1603 // If(increment[loopDepth] == 0)
1675 if(shader->containsLeaveInstruction()) condition &= enableLeave;
1676 if(shader->containsBreakInstruction()) condition &= enableBreak;
1711 if(currentLabel == -1)
1720 if(callRetBlock[currentLabel].size() > 1) // Pop the return destination from the call stack
1733 else if(callRetBlock[currentLabel].size() == 1) // Jump directly to the unique return destination
1751 // FIXME: Return from function if all instances left