Only declare half type if shaderFloat16 is supported

* Without this, the 16-bit storage only refers to ints (if that feature is
  available).
This commit is contained in:
baldurk
2020-11-24 16:44:08 +00:00
parent d3013af91c
commit abf7e3bd90
+1 -3
View File
@@ -3105,9 +3105,7 @@ OpBranch %_bottomlabel
capabilities += "OpCapability Float64\n";
}
if(float16Int8Features.shaderFloat16 || storage16Features.storageBuffer16BitAccess ||
storage16Features.uniformAndStorageBuffer16BitAccess ||
storage16Features.storagePushConstant16 || storage16Features.storageInputOutput16)
if(float16Int8Features.shaderFloat16)
{
typesConstants += "%half = OpTypeFloat 16\n";
capabilities += "OpCapability Float16\n";