SPV Capabilities: Image types.
SampledBuffer ImageBuffer Sampled1D Image1D SampledCubeArray ImageCubeArray SampledRect ImageRect InputAttachment ImageMSArray StorageImageMultisample
This commit is contained in:
parent
3c52207e8a
commit
b0364dcc3e
@ -406,6 +406,48 @@ Id Builder::makeImageType(Id sampledType, Dim dim, bool depth, bool arrayed, boo
|
|||||||
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
|
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
|
||||||
module.mapInstruction(type);
|
module.mapInstruction(type);
|
||||||
|
|
||||||
|
// deal with capabilities
|
||||||
|
switch (dim) {
|
||||||
|
case DimBuffer:
|
||||||
|
if (sampled)
|
||||||
|
addCapability(CapabilitySampledBuffer);
|
||||||
|
else
|
||||||
|
addCapability(CapabilityImageBuffer);
|
||||||
|
break;
|
||||||
|
case Dim1D:
|
||||||
|
if (sampled)
|
||||||
|
addCapability(CapabilitySampled1D);
|
||||||
|
else
|
||||||
|
addCapability(CapabilityImage1D);
|
||||||
|
break;
|
||||||
|
case DimCube:
|
||||||
|
if (arrayed) {
|
||||||
|
if (sampled)
|
||||||
|
addCapability(CapabilitySampledCubeArray);
|
||||||
|
else
|
||||||
|
addCapability(CapabilityImageCubeArray);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case DimRect:
|
||||||
|
if (sampled)
|
||||||
|
addCapability(CapabilitySampledRect);
|
||||||
|
else
|
||||||
|
addCapability(CapabilityImageRect);
|
||||||
|
break;
|
||||||
|
case DimSubpassData:
|
||||||
|
addCapability(CapabilityInputAttachment);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ms) {
|
||||||
|
if (arrayed)
|
||||||
|
addCapability(CapabilityImageMSArray);
|
||||||
|
if (! sampled)
|
||||||
|
addCapability(CapabilityStorageImageMultisample);
|
||||||
|
}
|
||||||
|
|
||||||
return type->getResultId();
|
return type->getResultId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,6 +11,9 @@ Linked fragment stage:
|
|||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
Capability ClipDistance
|
Capability ClipDistance
|
||||||
|
Capability SampledRect
|
||||||
|
Capability Sampled1D
|
||||||
|
Capability SampledCubeArray
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
MemoryModel Logical GLSL450
|
MemoryModel Logical GLSL450
|
||||||
EntryPoint Fragment 4 "main" 17 68 79 99 173 184 185 186
|
EntryPoint Fragment 4 "main" 17 68 79 99 173 184 185 186
|
||||||
|
@ -9,6 +9,8 @@ Linked fragment stage:
|
|||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
Capability ClipDistance
|
Capability ClipDistance
|
||||||
|
Capability SampledRect
|
||||||
|
Capability SampledBuffer
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
MemoryModel Logical GLSL450
|
MemoryModel Logical GLSL450
|
||||||
EntryPoint Fragment 4 "main" 16 28 33 43
|
EntryPoint Fragment 4 "main" 16 28 33 43
|
||||||
|
@ -12,6 +12,7 @@ Linked fragment stage:
|
|||||||
Capability Shader
|
Capability Shader
|
||||||
Capability Float64
|
Capability Float64
|
||||||
Capability ClipDistance
|
Capability ClipDistance
|
||||||
|
Capability SampledRect
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
MemoryModel Logical GLSL450
|
MemoryModel Logical GLSL450
|
||||||
EntryPoint Fragment 4 "main" 13 1025 1031 1036 1048 1074 1095 1097
|
EntryPoint Fragment 4 "main" 13 1025 1031 1036 1048 1074 1095 1097
|
||||||
|
@ -10,6 +10,11 @@ Linked fragment stage:
|
|||||||
// Id's are bound by 372
|
// Id's are bound by 372
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
Capability SampledRect
|
||||||
|
Capability Sampled1D
|
||||||
|
Capability SampledCubeArray
|
||||||
|
Capability SampledBuffer
|
||||||
|
Capability ImageMSArray
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
MemoryModel Logical GLSL450
|
MemoryModel Logical GLSL450
|
||||||
EntryPoint Fragment 4 "main" 356
|
EntryPoint Fragment 4 "main" 356
|
||||||
|
@ -10,6 +10,8 @@ Linked fragment stage:
|
|||||||
// Id's are bound by 278
|
// Id's are bound by 278
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
Capability SampledRect
|
||||||
|
Capability SampledCubeArray
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
MemoryModel Logical GLSL450
|
MemoryModel Logical GLSL450
|
||||||
EntryPoint Fragment 4 "main" 17 26 29 55 81 84 91 247 277
|
EntryPoint Fragment 4 "main" 17 26 29 55 81 84 91 247 277
|
||||||
|
@ -10,6 +10,10 @@ Linked fragment stage:
|
|||||||
// Id's are bound by 237
|
// Id's are bound by 237
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
Capability SampledRect
|
||||||
|
Capability Sampled1D
|
||||||
|
Capability SampledCubeArray
|
||||||
|
Capability SampledBuffer
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
MemoryModel Logical GLSL450
|
MemoryModel Logical GLSL450
|
||||||
EntryPoint Fragment 4 "main"
|
EntryPoint Fragment 4 "main"
|
||||||
|
@ -10,6 +10,8 @@ Linked fragment stage:
|
|||||||
// Id's are bound by 399
|
// Id's are bound by 399
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
Capability SampledRect
|
||||||
|
Capability SampledCubeArray
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
MemoryModel Logical GLSL450
|
MemoryModel Logical GLSL450
|
||||||
EntryPoint Fragment 4 "main" 384
|
EntryPoint Fragment 4 "main" 384
|
||||||
|
@ -10,6 +10,8 @@ Linked fragment stage:
|
|||||||
// Id's are bound by 360
|
// Id's are bound by 360
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
Capability SampledRect
|
||||||
|
Capability SampledCubeArray
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
MemoryModel Logical GLSL450
|
MemoryModel Logical GLSL450
|
||||||
EntryPoint Fragment 4 "main" 345
|
EntryPoint Fragment 4 "main" 345
|
||||||
|
@ -8,6 +8,7 @@ Linked fragment stage:
|
|||||||
// Id's are bound by 291
|
// Id's are bound by 291
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
Capability Sampled1D
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
MemoryModel Logical GLSL450
|
MemoryModel Logical GLSL450
|
||||||
EntryPoint Fragment 4 "main" 47 276 290
|
EntryPoint Fragment 4 "main" 47 276 290
|
||||||
|
@ -8,6 +8,7 @@ Linked vertex stage:
|
|||||||
// Id's are bound by 146
|
// Id's are bound by 146
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
|
Capability Sampled1D
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
MemoryModel Logical GLSL450
|
MemoryModel Logical GLSL450
|
||||||
EntryPoint Vertex 4 "main" 39 140 144 145
|
EntryPoint Vertex 4 "main" 39 140 144 145
|
||||||
|
Loading…
x
Reference in New Issue
Block a user