Merge pull request #2783 from chrisforbes/untangle
Untangle use of core glslang version enums in SpvPostProcess
This commit is contained in:
commit
2598bc7a5b
1 changed files with 3 additions and 5 deletions
|
|
@ -44,10 +44,8 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "SpvBuilder.h"
|
#include "SpvBuilder.h"
|
||||||
|
|
||||||
#include "spirv.hpp"
|
#include "spirv.hpp"
|
||||||
#include "GlslangToSpv.h"
|
|
||||||
#include "SpvBuilder.h"
|
|
||||||
namespace spv {
|
namespace spv {
|
||||||
#include "GLSL.std.450.h"
|
#include "GLSL.std.450.h"
|
||||||
#include "GLSL.ext.KHR.h"
|
#include "GLSL.ext.KHR.h"
|
||||||
|
|
@ -161,13 +159,13 @@ void Builder::postProcessType(const Instruction& inst, Id typeId)
|
||||||
switch (inst.getImmediateOperand(1)) {
|
switch (inst.getImmediateOperand(1)) {
|
||||||
case GLSLstd450Frexp:
|
case GLSLstd450Frexp:
|
||||||
case GLSLstd450FrexpStruct:
|
case GLSLstd450FrexpStruct:
|
||||||
if (getSpvVersion() < glslang::EShTargetSpv_1_3 && containsType(typeId, OpTypeInt, 16))
|
if (getSpvVersion() < spv::Spv_1_3 && containsType(typeId, OpTypeInt, 16))
|
||||||
addExtension(spv::E_SPV_AMD_gpu_shader_int16);
|
addExtension(spv::E_SPV_AMD_gpu_shader_int16);
|
||||||
break;
|
break;
|
||||||
case GLSLstd450InterpolateAtCentroid:
|
case GLSLstd450InterpolateAtCentroid:
|
||||||
case GLSLstd450InterpolateAtSample:
|
case GLSLstd450InterpolateAtSample:
|
||||||
case GLSLstd450InterpolateAtOffset:
|
case GLSLstd450InterpolateAtOffset:
|
||||||
if (getSpvVersion() < glslang::EShTargetSpv_1_3 && containsType(typeId, OpTypeFloat, 16))
|
if (getSpvVersion() < spv::Spv_1_3 && containsType(typeId, OpTypeFloat, 16))
|
||||||
addExtension(spv::E_SPV_AMD_gpu_shader_half_float);
|
addExtension(spv::E_SPV_AMD_gpu_shader_half_float);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue