summaryrefslogtreecommitdiffstats
path: root/thirdparty/glslang/SPIRV/SpvPostProcess.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-02-11 17:50:22 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-02-11 17:50:22 +0100
commit8f4793b225b4fc396eda7f2f9b52bd5eac47c3df (patch)
treef9fd967df4099a8698e6f3f6b4ba6bab62d25f56 /thirdparty/glslang/SPIRV/SpvPostProcess.cpp
parente11f0d9bfd2d7ceae9f8d3c3fd7dd3422bb9edf6 (diff)
downloadredot-engine-8f4793b225b4fc396eda7f2f9b52bd5eac47c3df.tar.gz
Revert "vulkan: Update volk, headers and glslang to 1.3.204"
This reverts commit d233908fb6c02f96f13de8b627510a5149bfecc3.
Diffstat (limited to 'thirdparty/glslang/SPIRV/SpvPostProcess.cpp')
-rw-r--r--thirdparty/glslang/SPIRV/SpvPostProcess.cpp39
1 files changed, 13 insertions, 26 deletions
diff --git a/thirdparty/glslang/SPIRV/SpvPostProcess.cpp b/thirdparty/glslang/SPIRV/SpvPostProcess.cpp
index dd6dabce0d..23d7b5a461 100644
--- a/thirdparty/glslang/SPIRV/SpvPostProcess.cpp
+++ b/thirdparty/glslang/SPIRV/SpvPostProcess.cpp
@@ -44,8 +44,10 @@
#include <algorithm>
#include "SpvBuilder.h"
-#include "spirv.hpp"
+#include "spirv.hpp"
+#include "GlslangToSpv.h"
+#include "SpvBuilder.h"
namespace spv {
#include "GLSL.std.450.h"
#include "GLSL.ext.KHR.h"
@@ -111,6 +113,8 @@ void Builder::postProcessType(const Instruction& inst, Id typeId)
}
}
break;
+ case OpAccessChain:
+ case OpPtrAccessChain:
case OpCopyObject:
break;
case OpFConvert:
@@ -157,43 +161,26 @@ void Builder::postProcessType(const Instruction& inst, Id typeId)
switch (inst.getImmediateOperand(1)) {
case GLSLstd450Frexp:
case GLSLstd450FrexpStruct:
- if (getSpvVersion() < spv::Spv_1_3 && containsType(typeId, OpTypeInt, 16))
+ if (getSpvVersion() < glslang::EShTargetSpv_1_3 && containsType(typeId, OpTypeInt, 16))
addExtension(spv::E_SPV_AMD_gpu_shader_int16);
break;
case GLSLstd450InterpolateAtCentroid:
case GLSLstd450InterpolateAtSample:
case GLSLstd450InterpolateAtOffset:
- if (getSpvVersion() < spv::Spv_1_3 && containsType(typeId, OpTypeFloat, 16))
+ if (getSpvVersion() < glslang::EShTargetSpv_1_3 && containsType(typeId, OpTypeFloat, 16))
addExtension(spv::E_SPV_AMD_gpu_shader_half_float);
break;
default:
break;
}
break;
- case OpAccessChain:
- case OpPtrAccessChain:
- if (isPointerType(typeId))
- break;
- if (basicTypeOp == OpTypeInt) {
- if (width == 16)
- addCapability(CapabilityInt16);
- else if (width == 8)
- addCapability(CapabilityInt8);
- }
default:
- if (basicTypeOp == OpTypeInt) {
- if (width == 16)
- addCapability(CapabilityInt16);
- else if (width == 8)
- addCapability(CapabilityInt8);
- else if (width == 64)
- addCapability(CapabilityInt64);
- } else if (basicTypeOp == OpTypeFloat) {
- if (width == 16)
- addCapability(CapabilityFloat16);
- else if (width == 64)
- addCapability(CapabilityFloat64);
- }
+ if (basicTypeOp == OpTypeFloat && width == 16)
+ addCapability(CapabilityFloat16);
+ if (basicTypeOp == OpTypeInt && width == 16)
+ addCapability(CapabilityInt16);
+ if (basicTypeOp == OpTypeInt && width == 8)
+ addCapability(CapabilityInt8);
break;
}
}