Implement extension GL_NV_shader_atomic_int64
This commit is contained in:
@@ -4749,12 +4749,12 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv
|
||||
case glslang::EOpAtomicMin:
|
||||
case glslang::EOpImageAtomicMin:
|
||||
case glslang::EOpAtomicCounterMin:
|
||||
opCode = typeProxy == glslang::EbtUint ? spv::OpAtomicUMin : spv::OpAtomicSMin;
|
||||
opCode = (typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64) ? spv::OpAtomicUMin : spv::OpAtomicSMin;
|
||||
break;
|
||||
case glslang::EOpAtomicMax:
|
||||
case glslang::EOpImageAtomicMax:
|
||||
case glslang::EOpAtomicCounterMax:
|
||||
opCode = typeProxy == glslang::EbtUint ? spv::OpAtomicUMax : spv::OpAtomicSMax;
|
||||
opCode = (typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64) ? spv::OpAtomicUMax : spv::OpAtomicSMax;
|
||||
break;
|
||||
case glslang::EOpAtomicAnd:
|
||||
case glslang::EOpImageAtomicAnd:
|
||||
@@ -4795,6 +4795,9 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv
|
||||
break;
|
||||
}
|
||||
|
||||
if (typeProxy == glslang::EbtInt64 || typeProxy == glslang::EbtUint64)
|
||||
builder.addCapability(spv::CapabilityInt64Atomics);
|
||||
|
||||
// Sort out the operands
|
||||
// - mapping from glslang -> SPV
|
||||
// - there are extra SPV operands with no glslang source
|
||||
|
||||
Reference in New Issue
Block a user