Implement extension GL_NV_shader_atomic_int64
This commit is contained in:
parent
f21c173a05
commit
e8fe8b0de9
8 changed files with 347 additions and 3 deletions
|
|
@ -923,6 +923,32 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"\n");
|
||||
}
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
if (profile != EEsProfile && version >= 440) {
|
||||
commonBuiltins.append(
|
||||
"uint64_t atomicMin(coherent volatile inout uint64_t, uint64_t);"
|
||||
" int64_t atomicMin(coherent volatile inout int64_t, int64_t);"
|
||||
|
||||
"uint64_t atomicMax(coherent volatile inout uint64_t, uint64_t);"
|
||||
" int64_t atomicMax(coherent volatile inout int64_t, int64_t);"
|
||||
|
||||
"uint64_t atomicAnd(coherent volatile inout uint64_t, uint64_t);"
|
||||
" int64_t atomicAnd(coherent volatile inout int64_t, int64_t);"
|
||||
|
||||
"uint64_t atomicOr (coherent volatile inout uint64_t, uint64_t);"
|
||||
" int64_t atomicOr (coherent volatile inout int64_t, int64_t);"
|
||||
|
||||
"uint64_t atomicXor(coherent volatile inout uint64_t, uint64_t);"
|
||||
" int64_t atomicXor(coherent volatile inout int64_t, int64_t);"
|
||||
|
||||
" int64_t atomicAdd(coherent volatile inout int64_t, int64_t);"
|
||||
" int64_t atomicExchange(coherent volatile inout int64_t, int64_t);"
|
||||
" int64_t atomicCompSwap(coherent volatile inout int64_t, int64_t, int64_t);"
|
||||
|
||||
"\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((profile == EEsProfile && version >= 310) ||
|
||||
(profile != EEsProfile && version >= 450)) {
|
||||
commonBuiltins.append(
|
||||
|
|
|
|||
|
|
@ -1551,6 +1551,23 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
|
|||
break;
|
||||
}
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
case EOpAtomicAdd:
|
||||
case EOpAtomicMin:
|
||||
case EOpAtomicMax:
|
||||
case EOpAtomicAnd:
|
||||
case EOpAtomicOr:
|
||||
case EOpAtomicXor:
|
||||
case EOpAtomicExchange:
|
||||
case EOpAtomicCompSwap:
|
||||
{
|
||||
if (arg0->getType().getBasicType() == EbtInt64 || arg0->getType().getBasicType() == EbtUint64)
|
||||
requireExtensions(loc, 1, &E_GL_NV_shader_atomic_int64, fnCandidate.getName().c_str());
|
||||
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
case EOpInterpolateAtCentroid:
|
||||
case EOpInterpolateAtSample:
|
||||
case EOpInterpolateAtOffset:
|
||||
|
|
|
|||
|
|
@ -211,6 +211,7 @@ void TParseVersions::initializeExtensionBehavior()
|
|||
extensionBehavior[E_GL_NV_viewport_array2] = EBhDisable;
|
||||
extensionBehavior[E_GL_NV_stereo_view_rendering] = EBhDisable;
|
||||
extensionBehavior[E_GL_NVX_multiview_per_view_attributes] = EBhDisable;
|
||||
extensionBehavior[E_GL_NV_shader_atomic_int64] = EBhDisable;
|
||||
#endif
|
||||
|
||||
// AEP
|
||||
|
|
@ -343,6 +344,7 @@ void TParseVersions::getPreamble(std::string& preamble)
|
|||
"#define GL_NV_sample_mask_override_coverage 1\n"
|
||||
"#define GL_NV_geometry_shader_passthrough 1\n"
|
||||
"#define GL_NV_viewport_array2 1\n"
|
||||
"#define GL_NV_shader_atomic_int64 1\n"
|
||||
#endif
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -182,6 +182,7 @@ const char* const E_SPV_NV_geometry_shader_passthrough = "GL_NV_geometr
|
|||
const char* const E_GL_NV_viewport_array2 = "GL_NV_viewport_array2";
|
||||
const char* const E_GL_NV_stereo_view_rendering = "GL_NV_stereo_view_rendering";
|
||||
const char* const E_GL_NVX_multiview_per_view_attributes = "GL_NVX_multiview_per_view_attributes";
|
||||
const char* const E_GL_NV_shader_atomic_int64 = "GL_NV_shader_atomic_int64";
|
||||
|
||||
// Arrays of extensions for the above viewportEXTs duplications
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue