Commit 3c52207e by John Kessenich

SPV capabilities: Add int16, int64, float16, and float64.

parent 103bef9d
......@@ -165,6 +165,18 @@ Id Builder::makeIntegerType(int width, bool hasSign)
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
module.mapInstruction(type);
// deal with capabilities
switch (width) {
case 16:
addCapability(CapabilityInt16);
break;
case 64:
addCapability(CapabilityInt64);
break;
default:
break;
}
return type->getResultId();
}
......@@ -185,6 +197,18 @@ Id Builder::makeFloatType(int width)
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
module.mapInstruction(type);
// deal with capabilities
switch (width) {
case 16:
addCapability(CapabilityFloat16);
break;
case 64:
addCapability(CapabilityFloat64);
break;
default:
break;
}
return type->getResultId();
}
......
......@@ -10,6 +10,7 @@ Linked fragment stage:
// Id's are bound by 1104
Capability Shader
Capability Float64
Capability ClipDistance
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
......
......@@ -10,6 +10,7 @@ Linked compute stage:
// Id's are bound by 62
Capability Shader
Capability Float64
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main" 26 33
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment