MCPcopy Create free account
hub / github.com/csyonghe/Spire / OpImageSampleImplicitLod

Method OpImageSampleImplicitLod

Source/SpireCore/SpirVCodeGen.cpp:1413–1444  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1411 streamFunctionBody.Add(indexID);
1412 }
1413 void OpImageSampleImplicitLod(
1414 const int ID,
1415 const int typeID,
1416 const int textureID,
1417 const int coordinateID,
1418 const int Bias = -1)
1419 {
1420 sbTextFunctionBody << LR"(%)" << ID << LR"( = OpImageSampleImplicitLod %)"
1421 << typeID << LR"( %)" << textureID << LR"( %)" << coordinateID;
1422 if (Bias != -1)
1423 sbTextFunctionBody << LR"( Bias %)" << Bias;
1424 sbTextFunctionBody << EndLine;
1425
1426 int len = 5;
1427 int IO = 0;
1428 if (Bias != -1)
1429 {
1430 len++;
1431 IO |= (int)ImageOperands::Bias;
1432 }
1433 if (IO)
1434 len++;
1435 streamFunctionBody.Add(87 + (len << 16));
1436 streamFunctionBody.Add(typeID);
1437 streamFunctionBody.Add(ID);
1438 streamFunctionBody.Add(textureID);
1439 streamFunctionBody.Add(coordinateID);
1440 if (IO)
1441 streamFunctionBody.Add(IO);
1442 if (Bias != -1)
1443 streamFunctionBody.Add(Bias);
1444 }
1445 void OpImageSampleExplicitLod(
1446 const int ID,
1447 const int typeID,

Callers 1

AddInstrTextureMethod · 0.80

Calls 1

AddMethod · 0.45

Tested by

no test coverage detected