| 2628 | } |
| 2629 | |
| 2630 | int AddInstrTexture( |
| 2631 | ILOperand *op, |
| 2632 | int textureID, |
| 2633 | int coordinateID, |
| 2634 | ExecutionModel currentExecutionModel, |
| 2635 | int Bias = -1, |
| 2636 | int GradX = -1, |
| 2637 | int GradY = -1) |
| 2638 | { |
| 2639 | RefPtr<ILType> typeIL = GetTypeFromString("vec4"); |
| 2640 | int typeID = DefineType(typeIL); |
| 2641 | |
| 2642 | ++CurrentID; |
| 2643 | if (currentExecutionModel == ExecutionModel::Fragment && GradX == -1) |
| 2644 | { |
| 2645 | //implicit LOD |
| 2646 | CodeGen.OpImageSampleImplicitLod(CurrentID, typeID, textureID, coordinateID, Bias); |
| 2647 | } |
| 2648 | else |
| 2649 | { |
| 2650 | //explicit LOD |
| 2651 | int zeroID = AddInstrConstantInt(0); |
| 2652 | CodeGen.OpImageSampleExplicitLod(CurrentID, typeID, textureID, coordinateID, zeroID, Bias, GradX, GradY); |
| 2653 | } |
| 2654 | IDInfos[CurrentID] = IDInfo::CreateIDInfoForValue( |
| 2655 | CurrentID, |
| 2656 | typeIL, |
| 2657 | op, |
| 2658 | typeID |
| 2659 | ); |
| 2660 | UpdateValue(op, CurrentID); |
| 2661 | |
| 2662 | return CurrentID; |
| 2663 | } |
| 2664 | |
| 2665 | int AddInstrTextureShadow( |
| 2666 | ILOperand *op, |
no test coverage detected