aboutsummaryrefslogtreecommitdiff
path: root/source/val
diff options
context:
space:
mode:
authorAndrey Tuganov <andreyt@google.com>2018-03-06 15:44:05 -0500
committerDavid Neto <dneto@google.com>2018-03-07 11:07:58 -0500
commit03b8a3fe540e72794646195fe261a679203c13ac (patch)
treecfa5c9a6b5b1c31d1100a5b85772638d15ec6df6 /source/val
parent01f32ee001409893773219d1a0cc8e696287628e (diff)
downloadspirv-tools-03b8a3fe540e72794646195fe261a679203c13ac.tar.gz
AMD_gpu_shader_half_float enables float16
Fixes https://github.com/KhronosGroup/SPIRV-Tools/issues/1375 Hardcoded float16 feature enabling if extension SPV_AMD_gpu_shader_half_float is present.
Diffstat (limited to 'source/val')
-rw-r--r--source/val/validation_state.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/val/validation_state.cpp b/source/val/validation_state.cpp
index 36bfbc2c..50ebb622 100644
--- a/source/val/validation_state.cpp
+++ b/source/val/validation_state.cpp
@@ -331,6 +331,11 @@ void ValidationState_t::RegisterExtension(Extension ext) {
module_extensions_.Add(ext);
switch (ext) {
+ case kSPV_AMD_gpu_shader_half_float:
+ // SPV_AMD_gpu_shader_half_float enables float16 type.
+ // https://github.com/KhronosGroup/SPIRV-Tools/issues/1375
+ features_.declare_float16_type = true;
+ break;
case kSPV_AMD_shader_ballot:
// The grammar doesn't encode the fact that SPV_AMD_shader_ballot
// enables the use of group operations Reduce, InclusiveScan,