MCPcopy Create free account
hub / github.com/KhronosGroup/glslang / makeFpConstant

Method makeFpConstant

SPIRV/SpvBuilder.cpp:2175–2194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2173}
2174
2175Id Builder::makeFpConstant(Id type, double d, bool specConstant)
2176{
2177 const int width = getScalarTypeWidth(type);
2178
2179 assert(isFloatType(type));
2180
2181 switch (width) {
2182 case 16:
2183 return makeFloat16Constant((float)d, specConstant);
2184 case 32:
2185 return makeFloatConstant((float)d, specConstant);
2186 case 64:
2187 return makeDoubleConstant(d, specConstant);
2188 default:
2189 break;
2190 }
2191
2192 assert(false);
2193 return NoResult;
2194}
2195
2196Id Builder::importNonSemanticShaderDebugInfoInstructions()
2197{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected