Merge pull request #1492 from NorbertGarnysAMD/shader_atomic_int64
Add GL_EXT_shader_atomic_int64
This commit is contained in:
		
						commit
						92fab62362
					
				| @ -982,7 +982,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV | |||||||
|             "\n"); |             "\n"); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| #ifdef NV_EXTENSIONS |  | ||||||
|     if (profile != EEsProfile && version >= 440) { |     if (profile != EEsProfile && version >= 440) { | ||||||
|         commonBuiltins.append( |         commonBuiltins.append( | ||||||
|             "uint64_t atomicMin(coherent volatile inout uint64_t, uint64_t);" |             "uint64_t atomicMin(coherent volatile inout uint64_t, uint64_t);" | ||||||
| @ -1032,7 +1031,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV | |||||||
|             "void atomicStore(coherent volatile out  int64_t,  int64_t, int, int, int);" |             "void atomicStore(coherent volatile out  int64_t,  int64_t, int, int, int);" | ||||||
|             "\n"); |             "\n"); | ||||||
|     } |     } | ||||||
| #endif |  | ||||||
| 
 | 
 | ||||||
|     if ((profile == EEsProfile && version >= 310) || |     if ((profile == EEsProfile && version >= 310) || | ||||||
|         (profile != EEsProfile && version >= 450)) { |         (profile != EEsProfile && version >= 450)) { | ||||||
|  | |||||||
| @ -1858,11 +1858,15 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan | |||||||
|         if (argp->size() > 3) { |         if (argp->size() > 3) { | ||||||
|             requireExtensions(loc, 1, &E_GL_KHR_memory_scope_semantics, fnCandidate.getName().c_str()); |             requireExtensions(loc, 1, &E_GL_KHR_memory_scope_semantics, fnCandidate.getName().c_str()); | ||||||
|             memorySemanticsCheck(loc, fnCandidate, callNode); |             memorySemanticsCheck(loc, fnCandidate, callNode); | ||||||
|         } |         } else if (arg0->getType().getBasicType() == EbtInt64 || arg0->getType().getBasicType() == EbtUint64) { | ||||||
| #ifdef NV_EXTENSIONS | #ifdef NV_EXTENSIONS | ||||||
|         else if (arg0->getType().getBasicType() == EbtInt64 || arg0->getType().getBasicType() == EbtUint64) |             const char* const extensions[2] = { E_GL_NV_shader_atomic_int64, | ||||||
|             requireExtensions(loc, 1, &E_GL_NV_shader_atomic_int64, fnCandidate.getName().c_str()); |                                                 E_GL_EXT_shader_atomic_int64 }; | ||||||
|  |             requireExtensions(loc, 2, extensions, fnCandidate.getName().c_str()); | ||||||
|  | #else | ||||||
|  |             requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_int64, fnCandidate.getName().c_str()); | ||||||
| #endif | #endif | ||||||
|  |         } | ||||||
|         break; |         break; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -196,6 +196,8 @@ void TParseVersions::initializeExtensionBehavior() | |||||||
|     extensionBehavior[E_GL_KHR_shader_subgroup_quad]             = EBhDisable; |     extensionBehavior[E_GL_KHR_shader_subgroup_quad]             = EBhDisable; | ||||||
|     extensionBehavior[E_GL_KHR_memory_scope_semantics]           = EBhDisable; |     extensionBehavior[E_GL_KHR_memory_scope_semantics]           = EBhDisable; | ||||||
| 
 | 
 | ||||||
|  |     extensionBehavior[E_GL_EXT_shader_atomic_int64]              = EBhDisable; | ||||||
|  | 
 | ||||||
|     extensionBehavior[E_GL_EXT_shader_non_constant_global_initializers] = EBhDisable; |     extensionBehavior[E_GL_EXT_shader_non_constant_global_initializers] = EBhDisable; | ||||||
|     extensionBehavior[E_GL_EXT_shader_image_load_formatted]             = EBhDisable; |     extensionBehavior[E_GL_EXT_shader_image_load_formatted]             = EBhDisable; | ||||||
|     extensionBehavior[E_GL_EXT_post_depth_coverage]                     = EBhDisable; |     extensionBehavior[E_GL_EXT_post_depth_coverage]                     = EBhDisable; | ||||||
| @ -381,6 +383,8 @@ void TParseVersions::getPreamble(std::string& preamble) | |||||||
|             "#define GL_KHR_shader_subgroup_clustered 1\n" |             "#define GL_KHR_shader_subgroup_clustered 1\n" | ||||||
|             "#define GL_KHR_shader_subgroup_quad 1\n" |             "#define GL_KHR_shader_subgroup_quad 1\n" | ||||||
| 
 | 
 | ||||||
|  |             "#define E_GL_EXT_shader_atomic_int64 1\n" | ||||||
|  | 
 | ||||||
| #ifdef AMD_EXTENSIONS | #ifdef AMD_EXTENSIONS | ||||||
|             "#define GL_AMD_shader_ballot 1\n" |             "#define GL_AMD_shader_ballot 1\n" | ||||||
|             "#define GL_AMD_shader_trinary_minmax 1\n" |             "#define GL_AMD_shader_trinary_minmax 1\n" | ||||||
|  | |||||||
| @ -150,6 +150,8 @@ const char* const E_GL_KHR_shader_subgroup_clustered        = "GL_KHR_shader_sub | |||||||
| const char* const E_GL_KHR_shader_subgroup_quad             = "GL_KHR_shader_subgroup_quad"; | const char* const E_GL_KHR_shader_subgroup_quad             = "GL_KHR_shader_subgroup_quad"; | ||||||
| const char* const E_GL_KHR_memory_scope_semantics           = "GL_KHR_memory_scope_semantics"; | const char* const E_GL_KHR_memory_scope_semantics           = "GL_KHR_memory_scope_semantics"; | ||||||
| 
 | 
 | ||||||
|  | const char* const E_GL_EXT_shader_atomic_int64              = "GL_EXT_shader_atomic_int64"; | ||||||
|  | 
 | ||||||
| const char* const E_GL_EXT_shader_non_constant_global_initializers = "GL_EXT_shader_non_constant_global_initializers"; | const char* const E_GL_EXT_shader_non_constant_global_initializers = "GL_EXT_shader_non_constant_global_initializers"; | ||||||
| const char* const E_GL_EXT_shader_image_load_formatted = "GL_EXT_shader_image_load_formatted"; | const char* const E_GL_EXT_shader_image_load_formatted = "GL_EXT_shader_image_load_formatted"; | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 John Kessenich
						John Kessenich