Updated glslang.

This commit is contained in:
Бранимир Караџић 2019-10-19 22:28:32 -07:00
parent f450d227c0
commit 0bac1a719c
29 changed files with 446 additions and 273 deletions

View File

@ -159,7 +159,7 @@ source_set("glslang_sources") {
} }
if (is_clang) { if (is_clang) {
cflags_cc = [ cflags = [
"-Wno-extra-semi", "-Wno-extra-semi",
"-Wno-ignored-qualifiers", "-Wno-ignored-qualifiers",
"-Wno-implicit-fallthrough", "-Wno-implicit-fallthrough",
@ -181,6 +181,9 @@ source_set("glslang_sources") {
"${spirv_tools_dir}:spvtools_opt", "${spirv_tools_dir}:spvtools_opt",
"${spirv_tools_dir}:spvtools_val", "${spirv_tools_dir}:spvtools_val",
] ]
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
} }
source_set("glslang_default_resource_limits_sources") { source_set("glslang_default_resource_limits_sources") {
@ -192,6 +195,9 @@ source_set("glslang_default_resource_limits_sources") {
":glslang_sources", ":glslang_sources",
] ]
public_configs = [ ":glslang_public" ] public_configs = [ ":glslang_public" ]
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
} }
executable("glslang_validator") { executable("glslang_validator") {
@ -207,6 +213,9 @@ executable("glslang_validator") {
":glslang_default_resource_limits_sources", ":glslang_default_resource_limits_sources",
":glslang_sources", ":glslang_sources",
] ]
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
} }
executable("spirv-remap") { executable("spirv-remap") {
@ -217,4 +226,7 @@ executable("spirv-remap") {
deps = [ deps = [
":glslang_sources", ":glslang_sources",
] ]
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
} }

View File

@ -13,6 +13,7 @@ include(GNUInstallDirs)
include(CMakeDependentOption) include(CMakeDependentOption)
option(BUILD_SHARED_LIBS "Build Shared Libraries" OFF) option(BUILD_SHARED_LIBS "Build Shared Libraries" OFF)
option(BUILD_EXTERNAL "Build external dependencies in /External" ON)
set(LIB_TYPE STATIC) set(LIB_TYPE STATIC)
@ -36,6 +37,7 @@ option(ENABLE_EMSCRIPTEN_ENVIRONMENT_NODE "If using Emscripten, builds to run on
CMAKE_DEPENDENT_OPTION(ENABLE_HLSL "Enables HLSL input support" ON "NOT ENABLE_GLSLANG_WEB" OFF) CMAKE_DEPENDENT_OPTION(ENABLE_HLSL "Enables HLSL input support" ON "NOT ENABLE_GLSLANG_WEB" OFF)
option(ENABLE_OPT "Enables spirv-opt capability if present" ON) option(ENABLE_OPT "Enables spirv-opt capability if present" ON)
option(ENABLE_PCH "Enables Precompiled header" ON)
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND WIN32) if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND WIN32)
set(CMAKE_INSTALL_PREFIX "install" CACHE STRING "..." FORCE) set(CMAKE_INSTALL_PREFIX "install" CACHE STRING "..." FORCE)
@ -51,7 +53,7 @@ endif()
# Precompiled header macro. Parameters are source file list and filename for pch cpp file. # Precompiled header macro. Parameters are source file list and filename for pch cpp file.
macro(glslang_pch SRCS PCHCPP) macro(glslang_pch SRCS PCHCPP)
if(MSVC AND CMAKE_GENERATOR MATCHES "^Visual Studio") if(MSVC AND CMAKE_GENERATOR MATCHES "^Visual Studio" AND ENABLE_PCH)
set(PCH_NAME "$(IntDir)\\pch.pch") set(PCH_NAME "$(IntDir)\\pch.pch")
# make source files use/depend on PCH_NAME # make source files use/depend on PCH_NAME
set_source_files_properties(${${SRCS}} PROPERTIES COMPILE_FLAGS "/Yupch.h /FIpch.h /Fp${PCH_NAME} /Zm300" OBJECT_DEPENDS "${PCH_NAME}") set_source_files_properties(${${SRCS}} PROPERTIES COMPILE_FLAGS "/Yupch.h /FIpch.h /Fp${PCH_NAME} /Zm300" OBJECT_DEPENDS "${PCH_NAME}")
@ -148,12 +150,12 @@ endfunction(glslang_set_link_args)
# CMake needs to find the right version of python, right from the beginning, # CMake needs to find the right version of python, right from the beginning,
# otherwise, it will find the wrong version and fail later # otherwise, it will find the wrong version and fail later
if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/External) if(BUILD_EXTERNAL AND IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/External)
find_package(PythonInterp 3 REQUIRED) find_package(PythonInterp 3 REQUIRED)
endif()
# We depend on these for later projects, so they should come first. # We depend on these for later projects, so they should come first.
add_subdirectory(External) add_subdirectory(External)
endif()
if(NOT TARGET SPIRV-Tools-opt) if(NOT TARGET SPIRV-Tools-opt)
set(ENABLE_OPT OFF) set(ENABLE_OPT OFF)
@ -179,3 +181,26 @@ if(ENABLE_HLSL)
add_subdirectory(hlsl) add_subdirectory(hlsl)
endif(ENABLE_HLSL) endif(ENABLE_HLSL)
add_subdirectory(gtests) add_subdirectory(gtests)
if(BUILD_TESTING)
# glslang-testsuite runs a bash script on Windows.
# Make sure to use '-o igncr' flag to ignore carriage returns (\r).
set(IGNORE_CR_FLAG "")
if(WIN32)
set(IGNORE_CR_FLAG -o igncr)
endif()
if (CMAKE_CONFIGURATION_TYPES)
set(RESULTS_PATH ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>/localResults)
set(VALIDATOR_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$<CONFIGURATION>/glslangValidator)
set(REMAP_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$<CONFIGURATION>/spirv-remap)
else(CMAKE_CONFIGURATION_TYPES)
set(RESULTS_PATH ${CMAKE_CURRENT_BINARY_DIR}/localResults)
set(VALIDATOR_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/glslangValidator)
set(REMAP_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/spirv-remap)
endif(CMAKE_CONFIGURATION_TYPES)
add_test(NAME glslang-testsuite
COMMAND bash ${IGNORE_CR_FLAG} runtests ${RESULTS_PATH} ${VALIDATOR_PATH} ${REMAP_PATH}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Test/)
endif(BUILD_TESTING)

View File

@ -9,6 +9,7 @@ if(WIN32)
endif(WIN32) endif(WIN32)
if(ENABLE_GLSLANG_INSTALL) if(ENABLE_GLSLANG_INSTALL)
install(TARGETS OGLCompiler install(TARGETS OGLCompiler EXPORT OGLCompilerTargets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(EXPORT OGLCompilerTargets DESTINATION lib/cmake)
endif(ENABLE_GLSLANG_INSTALL) endif(ENABLE_GLSLANG_INSTALL)

View File

@ -307,7 +307,7 @@ See `ShaderLang.h` and the usage of it in `StandAlone/StandAlone.cpp` for more
details. There is a block comment giving more detail above the calls for details. There is a block comment giving more detail above the calls for
`setEnvInput, setEnvClient, and setEnvTarget`. `setEnvInput, setEnvClient, and setEnvTarget`.
### C Functional Interface (orignal) ### C Functional Interface (original)
This interface is in roughly the first 2/3 of `ShaderLang.h`, and referred to This interface is in roughly the first 2/3 of `ShaderLang.h`, and referred to
as the `Sh*()` interface, as all the entry points start `Sh`. as the `Sh*()` interface, as all the entry points start `Sh`.

View File

@ -36,7 +36,9 @@ set(SPVREMAP_HEADERS
add_library(SPIRV ${LIB_TYPE} ${SOURCES} ${HEADERS}) add_library(SPIRV ${LIB_TYPE} ${SOURCES} ${HEADERS})
set_property(TARGET SPIRV PROPERTY FOLDER glslang) set_property(TARGET SPIRV PROPERTY FOLDER glslang)
set_property(TARGET SPIRV PROPERTY POSITION_INDEPENDENT_CODE ON) set_property(TARGET SPIRV PROPERTY POSITION_INDEPENDENT_CODE ON)
target_include_directories(SPIRV PUBLIC ..) target_include_directories(SPIRV PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
if (ENABLE_SPVREMAPPER) if (ENABLE_SPVREMAPPER)
add_library(SPVRemapper ${LIB_TYPE} ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS}) add_library(SPVRemapper ${LIB_TYPE} ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS})
@ -57,7 +59,9 @@ if(ENABLE_OPT)
PRIVATE ${spirv-tools_SOURCE_DIR}/source PRIVATE ${spirv-tools_SOURCE_DIR}/source
) )
target_link_libraries(SPIRV glslang SPIRV-Tools-opt) target_link_libraries(SPIRV glslang SPIRV-Tools-opt)
target_include_directories(SPIRV PUBLIC ../External) target_include_directories(SPIRV PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/External>)
else() else()
target_link_libraries(SPIRV glslang) target_link_libraries(SPIRV glslang)
endif(ENABLE_OPT) endif(ENABLE_OPT)
@ -70,22 +74,25 @@ endif(WIN32)
if(ENABLE_GLSLANG_INSTALL) if(ENABLE_GLSLANG_INSTALL)
if(BUILD_SHARED_LIBS) if(BUILD_SHARED_LIBS)
if (ENABLE_SPVREMAPPER) if (ENABLE_SPVREMAPPER)
install(TARGETS SPVRemapper install(TARGETS SPVRemapper EXPORT SPVRemapperTargets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif() endif()
install(TARGETS SPIRV install(TARGETS SPIRV EXPORT SPIRVTargets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
else() else()
if (ENABLE_SPVREMAPPER) if (ENABLE_SPVREMAPPER)
install(TARGETS SPVRemapper install(TARGETS SPVRemapper EXPORT SPVRemapperTargets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif() endif()
install(TARGETS SPIRV install(TARGETS SPIRV EXPORT SPIRVTargets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif() endif()
install(EXPORT SPVRemapperTargets DESTINATION lib/cmake)
install(EXPORT SPIRVTargets DESTINATION lib/cmake)
install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang/SPIRV/) install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang/SPIRV/)
endif(ENABLE_GLSLANG_INSTALL) endif(ENABLE_GLSLANG_INSTALL)

View File

@ -100,11 +100,11 @@ struct OpDecorations {
spv::Decoration precision; spv::Decoration precision;
#ifdef GLSLANG_WEB #ifdef GLSLANG_WEB
void addNoContraction(spv::Builder&, spv::Id) const { }; void addNoContraction(spv::Builder&, spv::Id) const { }
void addNonUniform(spv::Builder&, spv::Id) const { }; void addNonUniform(spv::Builder&, spv::Id) const { }
#else #else
void addNoContraction(spv::Builder& builder, spv::Id t) { builder.addDecoration(t, noContraction); }; void addNoContraction(spv::Builder& builder, spv::Id t) { builder.addDecoration(t, noContraction); }
void addNonUniform(spv::Builder& builder, spv::Id t) { builder.addDecoration(t, nonUniform); }; void addNonUniform(spv::Builder& builder, spv::Id t) { builder.addDecoration(t, nonUniform); }
protected: protected:
spv::Decoration noContraction; spv::Decoration noContraction;
spv::Decoration nonUniform; spv::Decoration nonUniform;
@ -6401,7 +6401,7 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv
scopeId = builder.makeUintConstant(spv::ScopeDevice); scopeId = builder.makeUintConstant(spv::ScopeDevice);
} }
// semantics default to relaxed // semantics default to relaxed
spv::Id semanticsId = builder.makeUintConstant(lvalueCoherentFlags.isVolatile() ? spv::Id semanticsId = builder.makeUintConstant(lvalueCoherentFlags.isVolatile() && glslangIntermediate->usingVulkanMemoryModel() ?
spv::MemorySemanticsVolatileMask : spv::MemorySemanticsVolatileMask :
spv::MemorySemanticsMaskNone); spv::MemorySemanticsMaskNone);
spv::Id semanticsId2 = semanticsId; spv::Id semanticsId2 = semanticsId;

View File

@ -33,21 +33,27 @@ endif(WIN32)
target_link_libraries(glslangValidator ${LIBRARIES}) target_link_libraries(glslangValidator ${LIBRARIES})
target_link_libraries(spirv-remap ${LIBRARIES}) target_link_libraries(spirv-remap ${LIBRARIES})
target_include_directories(glslangValidator PUBLIC ../External) target_include_directories(glslangValidator PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/External>)
if(WIN32) if(WIN32)
source_group("Source" FILES ${SOURCES}) source_group("Source" FILES ${SOURCES})
endif(WIN32) endif(WIN32)
if(ENABLE_GLSLANG_INSTALL) if(ENABLE_GLSLANG_INSTALL)
install(TARGETS glslangValidator install(TARGETS glslangValidator EXPORT glslangValidatorTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS spirv-remap install(TARGETS spirv-remap EXPORT spirv-remapTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(EXPORT glslangValidatorTargets DESTINATION lib/cmake)
install(EXPORT spirv-remapTargets DESTINATION lib/cmake)
if(BUILD_SHARED_LIBS) if(BUILD_SHARED_LIBS)
install(TARGETS glslang-default-resource-limits install(TARGETS glslang-default-resource-limits EXPORT glslang-default-resource-limitsTargets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(EXPORT glslang-default-resource-limitsTargets DESTINATION lib/cmake)
endif() endif()
endif(ENABLE_GLSLANG_INSTALL) endif(ENABLE_GLSLANG_INSTALL)

View File

@ -167,3 +167,12 @@ void qux2()
} }
layout(early_fragment_tests) out; // ERROR layout(early_fragment_tests) out; // ERROR
#extension GL_ARB_explicit_uniform_location : enable
layout(location = 3) uniform vec4 ucolor0; // ERROR: explicit attrib location is also required for version < 330
#extension GL_ARB_explicit_attrib_location : enable
layout(location = 4) uniform vec4 ucolor1;

View File

@ -149,4 +149,17 @@ void fooKeyMem()
KeyMem.precise; KeyMem.precise;
} }
layout(location=28, index=2) out vec4 outIndex2; // ERROR index out of range layout(location=28, index=2) out vec4 outIndex2; // ERROR index out of range
layout(location=4) uniform vec4 ucolor0; // ERROR: extension is not enabled
#extension GL_ARB_explicit_uniform_location : enable
layout(location=5) uniform vec4 ucolor1;
layout(location=6) uniform ColorsBuffer // ERROR: location cannot be applied in uniform buffer block
{
vec4 colors[128];
} colorsBuffer;

View File

@ -29,10 +29,13 @@ ERROR: 0:153: 'early_fragment_tests' : not supported for this version or the ena
ERROR: 0:154: 'image load store' : not supported for this version or the enabled extensions ERROR: 0:154: 'image load store' : not supported for this version or the enabled extensions
ERROR: 0:154: 'iimage2D' : Reserved word. ERROR: 0:154: 'iimage2D' : Reserved word.
ERROR: 0:169: 'early_fragment_tests' : can only apply to 'in' ERROR: 0:169: 'early_fragment_tests' : can only apply to 'in'
ERROR: 28 compilation errors. No code generated. ERROR: 0:173: 'location qualifier on uniform or buffer' : not supported for this version or the enabled extensions
ERROR: 29 compilation errors. No code generated.
Shader version: 130 Shader version: 130
Requested GL_ARB_explicit_attrib_location
Requested GL_ARB_explicit_uniform_location
Requested GL_ARB_gpu_shader5 Requested GL_ARB_gpu_shader5
Requested GL_ARB_separate_shader_objects Requested GL_ARB_separate_shader_objects
Requested GL_ARB_shader_image_load_store Requested GL_ARB_shader_image_load_store
@ -402,12 +405,16 @@ ERROR: node is still EOpNull!
0:? 'gl_FogFragCoord' ( smooth in float) 0:? 'gl_FogFragCoord' ( smooth in float)
0:? 'iimg2Dbad' (layout( r32i) uniform iimage2D) 0:? 'iimg2Dbad' (layout( r32i) uniform iimage2D)
0:? 'iimg2D' (layout( r32i) uniform iimage2D) 0:? 'iimg2D' (layout( r32i) uniform iimage2D)
0:? 'ucolor0' (layout( location=3) uniform 4-component vector of float)
0:? 'ucolor1' (layout( location=4) uniform 4-component vector of float)
Linked fragment stage: Linked fragment stage:
Shader version: 130 Shader version: 130
Requested GL_ARB_explicit_attrib_location
Requested GL_ARB_explicit_uniform_location
Requested GL_ARB_gpu_shader5 Requested GL_ARB_gpu_shader5
Requested GL_ARB_separate_shader_objects Requested GL_ARB_separate_shader_objects
Requested GL_ARB_shader_image_load_store Requested GL_ARB_shader_image_load_store
@ -457,4 +464,6 @@ ERROR: node is still EOpNull!
0:? 'gl_FogFragCoord' ( smooth in float) 0:? 'gl_FogFragCoord' ( smooth in float)
0:? 'iimg2Dbad' (layout( r32i) uniform iimage2D) 0:? 'iimg2Dbad' (layout( r32i) uniform iimage2D)
0:? 'iimg2D' (layout( r32i) uniform iimage2D) 0:? 'iimg2D' (layout( r32i) uniform iimage2D)
0:? 'ucolor0' (layout( location=3) uniform 4-component vector of float)
0:? 'ucolor1' (layout( location=4) uniform 4-component vector of float)

View File

@ -40,11 +40,14 @@ ERROR: 0:140: 'assign' : cannot convert from ' const float' to ' temp 2-compone
ERROR: 0:141: 'textureQueryLod' : no matching overloaded function found ERROR: 0:141: 'textureQueryLod' : no matching overloaded function found
ERROR: 0:141: 'assign' : cannot convert from ' const float' to ' temp 2-component vector of float' ERROR: 0:141: 'assign' : cannot convert from ' const float' to ' temp 2-component vector of float'
ERROR: 0:152: 'index' : value must be 0 or 1 ERROR: 0:152: 'index' : value must be 0 or 1
ERROR: 41 compilation errors. No code generated. ERROR: 0:154: 'location qualifier on uniform or buffer' : not supported for this version or the enabled extensions
ERROR: 0:160: 'location' : cannot apply to uniform or buffer block
ERROR: 43 compilation errors. No code generated.
Shader version: 330 Shader version: 330
Requested GL_ARB_enhanced_layouts Requested GL_ARB_enhanced_layouts
Requested GL_ARB_explicit_uniform_location
Requested GL_ARB_separate_shader_objects Requested GL_ARB_separate_shader_objects
ERROR: node is still EOpNull! ERROR: node is still EOpNull!
0:8 Function Definition: main( ( global void) 0:8 Function Definition: main( ( global void)
@ -126,6 +129,9 @@ ERROR: node is still EOpNull!
0:? 'precise' ( global int) 0:? 'precise' ( global int)
0:? 'KeyMem' ( global structure{ global int precise}) 0:? 'KeyMem' ( global structure{ global int precise})
0:? 'outIndex2' (layout( location=28 index=0) out 4-component vector of float) 0:? 'outIndex2' (layout( location=28 index=0) out 4-component vector of float)
0:? 'ucolor0' (layout( location=4) uniform 4-component vector of float)
0:? 'ucolor1' (layout( location=5) uniform 4-component vector of float)
0:? 'colorsBuffer' (layout( location=6 column_major shared) uniform block{layout( column_major shared) uniform 128-element array of 4-component vector of float colors})
Linked fragment stage: Linked fragment stage:
@ -135,6 +141,7 @@ ERROR: Linking fragment stage: Cannot use both gl_FragColor and gl_FragData
Shader version: 330 Shader version: 330
Requested GL_ARB_enhanced_layouts Requested GL_ARB_enhanced_layouts
Requested GL_ARB_explicit_uniform_location
Requested GL_ARB_separate_shader_objects Requested GL_ARB_separate_shader_objects
ERROR: node is still EOpNull! ERROR: node is still EOpNull!
0:8 Function Definition: main( ( global void) 0:8 Function Definition: main( ( global void)
@ -191,4 +198,7 @@ ERROR: node is still EOpNull!
0:? 'precise' ( global int) 0:? 'precise' ( global int)
0:? 'KeyMem' ( global structure{ global int precise}) 0:? 'KeyMem' ( global structure{ global int precise})
0:? 'outIndex2' (layout( location=28 index=0) out 4-component vector of float) 0:? 'outIndex2' (layout( location=28 index=0) out 4-component vector of float)
0:? 'ucolor0' (layout( location=4) uniform 4-component vector of float)
0:? 'ucolor1' (layout( location=5) uniform 4-component vector of float)
0:? 'colorsBuffer' (layout( location=6 column_major shared) uniform block{layout( column_major shared) uniform 128-element array of 4-component vector of float colors})

View File

@ -85,11 +85,13 @@ ERROR: 0:95: 'subgroupPartitionedExclusiveMaxNV' : required extension not reques
ERROR: 0:96: 'subgroupPartitionedExclusiveAndNV' : required extension not requested: GL_NV_shader_subgroup_partitioned ERROR: 0:96: 'subgroupPartitionedExclusiveAndNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
ERROR: 0:97: 'subgroupPartitionedExclusiveOrNV' : required extension not requested: GL_NV_shader_subgroup_partitioned ERROR: 0:97: 'subgroupPartitionedExclusiveOrNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
ERROR: 0:98: 'subgroupPartitionedExclusiveXorNV' : required extension not requested: GL_NV_shader_subgroup_partitioned ERROR: 0:98: 'subgroupPartitionedExclusiveXorNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
ERROR: 0:232: 'gl_WarpsPerSMNV' : required extension not requested: GL_NV_shader_sm_builtins ERROR: 0:124: 'id' : argument must be compile-time constant
ERROR: 0:233: 'gl_SMCountNV' : required extension not requested: GL_NV_shader_sm_builtins ERROR: 0:199: 'id' : argument must be compile-time constant
ERROR: 0:234: 'gl_WarpIDNV' : required extension not requested: GL_NV_shader_sm_builtins ERROR: 0:236: 'gl_WarpsPerSMNV' : required extension not requested: GL_NV_shader_sm_builtins
ERROR: 0:235: 'gl_SMIDNV' : required extension not requested: GL_NV_shader_sm_builtins ERROR: 0:237: 'gl_SMCountNV' : required extension not requested: GL_NV_shader_sm_builtins
ERROR: 90 compilation errors. No code generated. ERROR: 0:238: 'gl_WarpIDNV' : required extension not requested: GL_NV_shader_sm_builtins
ERROR: 0:239: 'gl_SMIDNV' : required extension not requested: GL_NV_shader_sm_builtins
ERROR: 92 compilation errors. No code generated.
Shader version: 450 Shader version: 450
@ -352,270 +354,278 @@ ERROR: node is still EOpNull!
0:116 Function Definition: ballot_works(vf4; ( global void) 0:116 Function Definition: ballot_works(vf4; ( global void)
0:116 Function Parameters: 0:116 Function Parameters:
0:116 'f4' ( in 4-component vector of float) 0:116 'f4' ( in 4-component vector of float)
0:117 Sequence 0:? Sequence
0:117 'gl_SubgroupEqMask' ( flat in 4-component vector of uint SubgroupEqMask) 0:118 'gl_SubgroupEqMask' ( flat in 4-component vector of uint SubgroupEqMask)
0:118 'gl_SubgroupGeMask' ( flat in 4-component vector of uint SubgroupGeMask) 0:119 'gl_SubgroupGeMask' ( flat in 4-component vector of uint SubgroupGeMask)
0:119 'gl_SubgroupGtMask' ( flat in 4-component vector of uint SubgroupGtMask) 0:120 'gl_SubgroupGtMask' ( flat in 4-component vector of uint SubgroupGtMask)
0:120 'gl_SubgroupLeMask' ( flat in 4-component vector of uint SubgroupLeMask) 0:121 'gl_SubgroupLeMask' ( flat in 4-component vector of uint SubgroupLeMask)
0:121 'gl_SubgroupLtMask' ( flat in 4-component vector of uint SubgroupLtMask) 0:122 'gl_SubgroupLtMask' ( flat in 4-component vector of uint SubgroupLtMask)
0:122 subgroupBroadcast ( global 4-component vector of float) 0:123 subgroupBroadcast ( global 4-component vector of float)
0:122 'f4' ( in 4-component vector of float)
0:122 Constant:
0:122 0 (const uint)
0:123 subgroupBroadcastFirst ( global 4-component vector of float)
0:123 'f4' ( in 4-component vector of float) 0:123 'f4' ( in 4-component vector of float)
0:124 Sequence 0:123 Constant:
0:124 move second child to first child ( temp 4-component vector of uint) 0:123 0 (const uint)
0:124 'ballot' ( temp 4-component vector of uint) 0:124 subgroupBroadcast ( global 4-component vector of float)
0:124 subgroupBallot ( global 4-component vector of uint) 0:124 'f4' ( in 4-component vector of float)
0:124 Constant: 0:124 Convert int to uint ( temp uint)
0:124 false (const bool) 0:124 'i' ( temp int)
0:125 subgroupInverseBallot ( global bool) 0:125 subgroupBroadcastFirst ( global 4-component vector of float)
0:125 Constant: 0:125 'f4' ( in 4-component vector of float)
0:125 1 (const uint) 0:126 Sequence
0:125 1 (const uint) 0:126 move second child to first child ( temp 4-component vector of uint)
0:125 1 (const uint) 0:126 'ballot' ( temp 4-component vector of uint)
0:125 1 (const uint) 0:126 subgroupBallot ( global 4-component vector of uint)
0:126 subgroupBallotBitExtract ( global bool) 0:126 Constant:
0:126 'ballot' ( temp 4-component vector of uint) 0:126 false (const bool)
0:126 Constant: 0:127 subgroupInverseBallot ( global bool)
0:126 0 (const uint) 0:127 Constant:
0:127 subgroupBallotBitCount ( global uint) 0:127 1 (const uint)
0:127 'ballot' ( temp 4-component vector of uint) 0:127 1 (const uint)
0:128 subgroupBallotInclusiveBitCount ( global uint) 0:127 1 (const uint)
0:127 1 (const uint)
0:128 subgroupBallotBitExtract ( global bool)
0:128 'ballot' ( temp 4-component vector of uint) 0:128 'ballot' ( temp 4-component vector of uint)
0:129 subgroupBallotExclusiveBitCount ( global uint) 0:128 Constant:
0:128 0 (const uint)
0:129 subgroupBallotBitCount ( global uint)
0:129 'ballot' ( temp 4-component vector of uint) 0:129 'ballot' ( temp 4-component vector of uint)
0:130 subgroupBallotFindLSB ( global uint) 0:130 subgroupBallotInclusiveBitCount ( global uint)
0:130 'ballot' ( temp 4-component vector of uint) 0:130 'ballot' ( temp 4-component vector of uint)
0:131 subgroupBallotFindMSB ( global uint) 0:131 subgroupBallotExclusiveBitCount ( global uint)
0:131 'ballot' ( temp 4-component vector of uint) 0:131 'ballot' ( temp 4-component vector of uint)
0:135 Function Definition: vote_works(vf4; ( global void) 0:132 subgroupBallotFindLSB ( global uint)
0:135 Function Parameters: 0:132 'ballot' ( temp 4-component vector of uint)
0:135 'f4' ( in 4-component vector of float) 0:133 subgroupBallotFindMSB ( global uint)
0:137 Sequence 0:133 'ballot' ( temp 4-component vector of uint)
0:137 subgroupAll ( global bool) 0:137 Function Definition: vote_works(vf4; ( global void)
0:137 Constant: 0:137 Function Parameters:
0:137 true (const bool) 0:137 'f4' ( in 4-component vector of float)
0:138 subgroupAny ( global bool) 0:139 Sequence
0:138 Constant: 0:139 subgroupAll ( global bool)
0:138 false (const bool) 0:139 Constant:
0:139 subgroupAllEqual ( global bool) 0:139 true (const bool)
0:139 'f4' ( in 4-component vector of float) 0:140 subgroupAny ( global bool)
0:144 Function Definition: shuffle_works(vf4; ( global void) 0:140 Constant:
0:144 Function Parameters: 0:140 false (const bool)
0:144 'f4' ( in 4-component vector of float) 0:141 subgroupAllEqual ( global bool)
0:146 Sequence 0:141 'f4' ( in 4-component vector of float)
0:146 subgroupShuffle ( global 4-component vector of float) 0:146 Function Definition: shuffle_works(vf4; ( global void)
0:146 'f4' ( in 4-component vector of float) 0:146 Function Parameters:
0:146 Constant: 0:146 'f4' ( in 4-component vector of float)
0:146 0 (const uint) 0:148 Sequence
0:147 subgroupShuffleXor ( global 4-component vector of float) 0:148 subgroupShuffle ( global 4-component vector of float)
0:147 'f4' ( in 4-component vector of float)
0:147 Constant:
0:147 1 (const uint)
0:148 subgroupShuffleUp ( global 4-component vector of float)
0:148 'f4' ( in 4-component vector of float) 0:148 'f4' ( in 4-component vector of float)
0:148 Constant: 0:148 Constant:
0:148 1 (const uint) 0:148 0 (const uint)
0:149 subgroupShuffleDown ( global 4-component vector of float) 0:149 subgroupShuffleXor ( global 4-component vector of float)
0:149 'f4' ( in 4-component vector of float) 0:149 'f4' ( in 4-component vector of float)
0:149 Constant: 0:149 Constant:
0:149 1 (const uint) 0:149 1 (const uint)
0:153 Function Definition: arith_works(vf4; ( global void) 0:150 subgroupShuffleUp ( global 4-component vector of float)
0:153 Function Parameters: 0:150 'f4' ( in 4-component vector of float)
0:153 'f4' ( in 4-component vector of float) 0:150 Constant:
0:150 1 (const uint)
0:151 subgroupShuffleDown ( global 4-component vector of float)
0:151 'f4' ( in 4-component vector of float)
0:151 Constant:
0:151 1 (const uint)
0:155 Function Definition: arith_works(vf4; ( global void)
0:155 Function Parameters:
0:155 'f4' ( in 4-component vector of float)
0:? Sequence 0:? Sequence
0:156 subgroupAdd ( global 4-component vector of float) 0:158 subgroupAdd ( global 4-component vector of float)
0:156 'f4' ( in 4-component vector of float)
0:157 subgroupMul ( global 4-component vector of float)
0:157 'f4' ( in 4-component vector of float)
0:158 subgroupMin ( global 4-component vector of float)
0:158 'f4' ( in 4-component vector of float) 0:158 'f4' ( in 4-component vector of float)
0:159 subgroupMax ( global 4-component vector of float) 0:159 subgroupMul ( global 4-component vector of float)
0:159 'f4' ( in 4-component vector of float) 0:159 'f4' ( in 4-component vector of float)
0:160 subgroupAnd ( global 4-component vector of uint) 0:160 subgroupMin ( global 4-component vector of float)
0:160 'ballot' ( temp 4-component vector of uint) 0:160 'f4' ( in 4-component vector of float)
0:161 subgroupOr ( global 4-component vector of uint) 0:161 subgroupMax ( global 4-component vector of float)
0:161 'ballot' ( temp 4-component vector of uint) 0:161 'f4' ( in 4-component vector of float)
0:162 subgroupXor ( global 4-component vector of uint) 0:162 subgroupAnd ( global 4-component vector of uint)
0:162 'ballot' ( temp 4-component vector of uint) 0:162 'ballot' ( temp 4-component vector of uint)
0:163 subgroupInclusiveAdd ( global 4-component vector of float) 0:163 subgroupOr ( global 4-component vector of uint)
0:163 'f4' ( in 4-component vector of float) 0:163 'ballot' ( temp 4-component vector of uint)
0:164 subgroupInclusiveMul ( global 4-component vector of float) 0:164 subgroupXor ( global 4-component vector of uint)
0:164 'f4' ( in 4-component vector of float) 0:164 'ballot' ( temp 4-component vector of uint)
0:165 subgroupInclusiveMin ( global 4-component vector of float) 0:165 subgroupInclusiveAdd ( global 4-component vector of float)
0:165 'f4' ( in 4-component vector of float) 0:165 'f4' ( in 4-component vector of float)
0:166 subgroupInclusiveMax ( global 4-component vector of float) 0:166 subgroupInclusiveMul ( global 4-component vector of float)
0:166 'f4' ( in 4-component vector of float) 0:166 'f4' ( in 4-component vector of float)
0:167 subgroupInclusiveAnd ( global 4-component vector of uint) 0:167 subgroupInclusiveMin ( global 4-component vector of float)
0:167 'ballot' ( temp 4-component vector of uint) 0:167 'f4' ( in 4-component vector of float)
0:168 subgroupInclusiveOr ( global 4-component vector of uint) 0:168 subgroupInclusiveMax ( global 4-component vector of float)
0:168 'ballot' ( temp 4-component vector of uint) 0:168 'f4' ( in 4-component vector of float)
0:169 subgroupInclusiveXor ( global 4-component vector of uint) 0:169 subgroupInclusiveAnd ( global 4-component vector of uint)
0:169 'ballot' ( temp 4-component vector of uint) 0:169 'ballot' ( temp 4-component vector of uint)
0:170 subgroupExclusiveAdd ( global 4-component vector of float) 0:170 subgroupInclusiveOr ( global 4-component vector of uint)
0:170 'f4' ( in 4-component vector of float) 0:170 'ballot' ( temp 4-component vector of uint)
0:171 subgroupExclusiveMul ( global 4-component vector of float) 0:171 subgroupInclusiveXor ( global 4-component vector of uint)
0:171 'f4' ( in 4-component vector of float) 0:171 'ballot' ( temp 4-component vector of uint)
0:172 subgroupExclusiveMin ( global 4-component vector of float) 0:172 subgroupExclusiveAdd ( global 4-component vector of float)
0:172 'f4' ( in 4-component vector of float) 0:172 'f4' ( in 4-component vector of float)
0:173 subgroupExclusiveMax ( global 4-component vector of float) 0:173 subgroupExclusiveMul ( global 4-component vector of float)
0:173 'f4' ( in 4-component vector of float) 0:173 'f4' ( in 4-component vector of float)
0:174 subgroupExclusiveAnd ( global 4-component vector of uint) 0:174 subgroupExclusiveMin ( global 4-component vector of float)
0:174 'ballot' ( temp 4-component vector of uint) 0:174 'f4' ( in 4-component vector of float)
0:175 subgroupExclusiveOr ( global 4-component vector of uint) 0:175 subgroupExclusiveMax ( global 4-component vector of float)
0:175 'ballot' ( temp 4-component vector of uint) 0:175 'f4' ( in 4-component vector of float)
0:176 subgroupExclusiveXor ( global 4-component vector of uint) 0:176 subgroupExclusiveAnd ( global 4-component vector of uint)
0:176 'ballot' ( temp 4-component vector of uint) 0:176 'ballot' ( temp 4-component vector of uint)
0:180 Function Definition: clustered_works(vf4; ( global void) 0:177 subgroupExclusiveOr ( global 4-component vector of uint)
0:180 Function Parameters: 0:177 'ballot' ( temp 4-component vector of uint)
0:180 'f4' ( in 4-component vector of float) 0:178 subgroupExclusiveXor ( global 4-component vector of uint)
0:182 Sequence 0:178 'ballot' ( temp 4-component vector of uint)
0:182 Sequence 0:182 Function Definition: clustered_works(vf4; ( global void)
0:182 move second child to first child ( temp 4-component vector of uint) 0:182 Function Parameters:
0:182 'ballot' ( temp 4-component vector of uint) 0:182 'f4' ( in 4-component vector of float)
0:182 Constant: 0:184 Sequence
0:182 85 (const uint) 0:184 Sequence
0:182 0 (const uint) 0:184 move second child to first child ( temp 4-component vector of uint)
0:182 0 (const uint) 0:184 'ballot' ( temp 4-component vector of uint)
0:182 0 (const uint) 0:184 Constant:
0:183 subgroupClusteredAdd ( global 4-component vector of float) 0:184 85 (const uint)
0:183 'f4' ( in 4-component vector of float) 0:184 0 (const uint)
0:183 Constant: 0:184 0 (const uint)
0:183 2 (const uint) 0:184 0 (const uint)
0:184 subgroupClusteredMul ( global 4-component vector of float) 0:185 subgroupClusteredAdd ( global 4-component vector of float)
0:184 'f4' ( in 4-component vector of float)
0:184 Constant:
0:184 2 (const uint)
0:185 subgroupClusteredMin ( global 4-component vector of float)
0:185 'f4' ( in 4-component vector of float) 0:185 'f4' ( in 4-component vector of float)
0:185 Constant: 0:185 Constant:
0:185 2 (const uint) 0:185 2 (const uint)
0:186 subgroupClusteredMax ( global 4-component vector of float) 0:186 subgroupClusteredMul ( global 4-component vector of float)
0:186 'f4' ( in 4-component vector of float) 0:186 'f4' ( in 4-component vector of float)
0:186 Constant: 0:186 Constant:
0:186 2 (const uint) 0:186 2 (const uint)
0:187 subgroupClusteredAnd ( global 4-component vector of uint) 0:187 subgroupClusteredMin ( global 4-component vector of float)
0:187 'ballot' ( temp 4-component vector of uint) 0:187 'f4' ( in 4-component vector of float)
0:187 Constant: 0:187 Constant:
0:187 2 (const uint) 0:187 2 (const uint)
0:188 subgroupClusteredOr ( global 4-component vector of uint) 0:188 subgroupClusteredMax ( global 4-component vector of float)
0:188 'ballot' ( temp 4-component vector of uint) 0:188 'f4' ( in 4-component vector of float)
0:188 Constant: 0:188 Constant:
0:188 2 (const uint) 0:188 2 (const uint)
0:189 subgroupClusteredXor ( global 4-component vector of uint) 0:189 subgroupClusteredAnd ( global 4-component vector of uint)
0:189 'ballot' ( temp 4-component vector of uint) 0:189 'ballot' ( temp 4-component vector of uint)
0:189 Constant: 0:189 Constant:
0:189 2 (const uint) 0:189 2 (const uint)
0:193 Function Definition: quad_works(vf4; ( global void) 0:190 subgroupClusteredOr ( global 4-component vector of uint)
0:193 Function Parameters: 0:190 'ballot' ( temp 4-component vector of uint)
0:193 'f4' ( in 4-component vector of float) 0:190 Constant:
0:195 Sequence 0:190 2 (const uint)
0:195 subgroupQuadBroadcast ( global 4-component vector of float) 0:191 subgroupClusteredXor ( global 4-component vector of uint)
0:195 'f4' ( in 4-component vector of float) 0:191 'ballot' ( temp 4-component vector of uint)
0:195 Constant: 0:191 Constant:
0:195 0 (const uint) 0:191 2 (const uint)
0:196 subgroupQuadSwapHorizontal ( global 4-component vector of float) 0:195 Function Definition: quad_works(vf4; ( global void)
0:196 'f4' ( in 4-component vector of float) 0:195 Function Parameters:
0:197 subgroupQuadSwapVertical ( global 4-component vector of float) 0:195 'f4' ( in 4-component vector of float)
0:197 'f4' ( in 4-component vector of float) 0:? Sequence
0:198 subgroupQuadSwapDiagonal ( global 4-component vector of float) 0:198 subgroupQuadBroadcast ( global 4-component vector of float)
0:198 'f4' ( in 4-component vector of float) 0:198 'f4' ( in 4-component vector of float)
0:202 Function Definition: partitioned_works(vf4; ( global void) 0:198 Constant:
0:202 Function Parameters: 0:198 0 (const uint)
0:202 'f4' ( in 4-component vector of float) 0:199 subgroupQuadBroadcast ( global 4-component vector of float)
0:204 Sequence 0:199 'f4' ( in 4-component vector of float)
0:204 Sequence 0:199 Convert int to uint ( temp uint)
0:204 move second child to first child ( temp 4-component vector of uint) 0:199 'i' ( temp int)
0:204 'parti' ( temp 4-component vector of uint) 0:200 subgroupQuadSwapHorizontal ( global 4-component vector of float)
0:204 subgroupPartitionNV ( global 4-component vector of uint) 0:200 'f4' ( in 4-component vector of float)
0:204 'f4' ( in 4-component vector of float) 0:201 subgroupQuadSwapVertical ( global 4-component vector of float)
0:205 Sequence 0:201 'f4' ( in 4-component vector of float)
0:205 move second child to first child ( temp 4-component vector of uint) 0:202 subgroupQuadSwapDiagonal ( global 4-component vector of float)
0:205 'ballot' ( temp 4-component vector of uint) 0:202 'f4' ( in 4-component vector of float)
0:205 Constant: 0:206 Function Definition: partitioned_works(vf4; ( global void)
0:205 85 (const uint) 0:206 Function Parameters:
0:205 0 (const uint) 0:206 'f4' ( in 4-component vector of float)
0:205 0 (const uint) 0:208 Sequence
0:205 0 (const uint) 0:208 Sequence
0:206 subgroupPartitionedAddNV ( global 4-component vector of float) 0:208 move second child to first child ( temp 4-component vector of uint)
0:206 'f4' ( in 4-component vector of float) 0:208 'parti' ( temp 4-component vector of uint)
0:206 'parti' ( temp 4-component vector of uint) 0:208 subgroupPartitionNV ( global 4-component vector of uint)
0:207 subgroupPartitionedMulNV ( global 4-component vector of float) 0:208 'f4' ( in 4-component vector of float)
0:207 'f4' ( in 4-component vector of float) 0:209 Sequence
0:207 'parti' ( temp 4-component vector of uint) 0:209 move second child to first child ( temp 4-component vector of uint)
0:208 subgroupPartitionedMinNV ( global 4-component vector of float) 0:209 'ballot' ( temp 4-component vector of uint)
0:208 'f4' ( in 4-component vector of float) 0:209 Constant:
0:208 'parti' ( temp 4-component vector of uint) 0:209 85 (const uint)
0:209 subgroupPartitionedMaxNV ( global 4-component vector of float) 0:209 0 (const uint)
0:209 'f4' ( in 4-component vector of float) 0:209 0 (const uint)
0:209 'parti' ( temp 4-component vector of uint) 0:209 0 (const uint)
0:210 subgroupPartitionedAndNV ( global 4-component vector of uint) 0:210 subgroupPartitionedAddNV ( global 4-component vector of float)
0:210 'ballot' ( temp 4-component vector of uint) 0:210 'f4' ( in 4-component vector of float)
0:210 'parti' ( temp 4-component vector of uint) 0:210 'parti' ( temp 4-component vector of uint)
0:211 subgroupPartitionedOrNV ( global 4-component vector of uint) 0:211 subgroupPartitionedMulNV ( global 4-component vector of float)
0:211 'ballot' ( temp 4-component vector of uint) 0:211 'f4' ( in 4-component vector of float)
0:211 'parti' ( temp 4-component vector of uint) 0:211 'parti' ( temp 4-component vector of uint)
0:212 subgroupPartitionedXorNV ( global 4-component vector of uint) 0:212 subgroupPartitionedMinNV ( global 4-component vector of float)
0:212 'ballot' ( temp 4-component vector of uint) 0:212 'f4' ( in 4-component vector of float)
0:212 'parti' ( temp 4-component vector of uint) 0:212 'parti' ( temp 4-component vector of uint)
0:213 subgroupPartitionedInclusiveAddNV ( global 4-component vector of float) 0:213 subgroupPartitionedMaxNV ( global 4-component vector of float)
0:213 'f4' ( in 4-component vector of float) 0:213 'f4' ( in 4-component vector of float)
0:213 'parti' ( temp 4-component vector of uint) 0:213 'parti' ( temp 4-component vector of uint)
0:214 subgroupPartitionedInclusiveMulNV ( global 4-component vector of float) 0:214 subgroupPartitionedAndNV ( global 4-component vector of uint)
0:214 'f4' ( in 4-component vector of float) 0:214 'ballot' ( temp 4-component vector of uint)
0:214 'parti' ( temp 4-component vector of uint) 0:214 'parti' ( temp 4-component vector of uint)
0:215 subgroupPartitionedInclusiveMinNV ( global 4-component vector of float) 0:215 subgroupPartitionedOrNV ( global 4-component vector of uint)
0:215 'f4' ( in 4-component vector of float) 0:215 'ballot' ( temp 4-component vector of uint)
0:215 'parti' ( temp 4-component vector of uint) 0:215 'parti' ( temp 4-component vector of uint)
0:216 subgroupPartitionedInclusiveMaxNV ( global 4-component vector of float) 0:216 subgroupPartitionedXorNV ( global 4-component vector of uint)
0:216 'f4' ( in 4-component vector of float) 0:216 'ballot' ( temp 4-component vector of uint)
0:216 'parti' ( temp 4-component vector of uint) 0:216 'parti' ( temp 4-component vector of uint)
0:217 subgroupPartitionedInclusiveAndNV ( global 4-component vector of uint) 0:217 subgroupPartitionedInclusiveAddNV ( global 4-component vector of float)
0:217 'ballot' ( temp 4-component vector of uint) 0:217 'f4' ( in 4-component vector of float)
0:217 'parti' ( temp 4-component vector of uint) 0:217 'parti' ( temp 4-component vector of uint)
0:218 subgroupPartitionedInclusiveOrNV ( global 4-component vector of uint) 0:218 subgroupPartitionedInclusiveMulNV ( global 4-component vector of float)
0:218 'ballot' ( temp 4-component vector of uint) 0:218 'f4' ( in 4-component vector of float)
0:218 'parti' ( temp 4-component vector of uint) 0:218 'parti' ( temp 4-component vector of uint)
0:219 subgroupPartitionedInclusiveXorNV ( global 4-component vector of uint) 0:219 subgroupPartitionedInclusiveMinNV ( global 4-component vector of float)
0:219 'ballot' ( temp 4-component vector of uint) 0:219 'f4' ( in 4-component vector of float)
0:219 'parti' ( temp 4-component vector of uint) 0:219 'parti' ( temp 4-component vector of uint)
0:220 subgroupPartitionedExclusiveAddNV ( global 4-component vector of float) 0:220 subgroupPartitionedInclusiveMaxNV ( global 4-component vector of float)
0:220 'f4' ( in 4-component vector of float) 0:220 'f4' ( in 4-component vector of float)
0:220 'parti' ( temp 4-component vector of uint) 0:220 'parti' ( temp 4-component vector of uint)
0:221 subgroupPartitionedExclusiveMulNV ( global 4-component vector of float) 0:221 subgroupPartitionedInclusiveAndNV ( global 4-component vector of uint)
0:221 'f4' ( in 4-component vector of float) 0:221 'ballot' ( temp 4-component vector of uint)
0:221 'parti' ( temp 4-component vector of uint) 0:221 'parti' ( temp 4-component vector of uint)
0:222 subgroupPartitionedExclusiveMinNV ( global 4-component vector of float) 0:222 subgroupPartitionedInclusiveOrNV ( global 4-component vector of uint)
0:222 'f4' ( in 4-component vector of float) 0:222 'ballot' ( temp 4-component vector of uint)
0:222 'parti' ( temp 4-component vector of uint) 0:222 'parti' ( temp 4-component vector of uint)
0:223 subgroupPartitionedExclusiveMaxNV ( global 4-component vector of float) 0:223 subgroupPartitionedInclusiveXorNV ( global 4-component vector of uint)
0:223 'f4' ( in 4-component vector of float) 0:223 'ballot' ( temp 4-component vector of uint)
0:223 'parti' ( temp 4-component vector of uint) 0:223 'parti' ( temp 4-component vector of uint)
0:224 subgroupPartitionedExclusiveAndNV ( global 4-component vector of uint) 0:224 subgroupPartitionedExclusiveAddNV ( global 4-component vector of float)
0:224 'ballot' ( temp 4-component vector of uint) 0:224 'f4' ( in 4-component vector of float)
0:224 'parti' ( temp 4-component vector of uint) 0:224 'parti' ( temp 4-component vector of uint)
0:225 subgroupPartitionedExclusiveOrNV ( global 4-component vector of uint) 0:225 subgroupPartitionedExclusiveMulNV ( global 4-component vector of float)
0:225 'ballot' ( temp 4-component vector of uint) 0:225 'f4' ( in 4-component vector of float)
0:225 'parti' ( temp 4-component vector of uint) 0:225 'parti' ( temp 4-component vector of uint)
0:226 subgroupPartitionedExclusiveXorNV ( global 4-component vector of uint) 0:226 subgroupPartitionedExclusiveMinNV ( global 4-component vector of float)
0:226 'ballot' ( temp 4-component vector of uint) 0:226 'f4' ( in 4-component vector of float)
0:226 'parti' ( temp 4-component vector of uint) 0:226 'parti' ( temp 4-component vector of uint)
0:230 Function Definition: sm_builtins_err( ( global void) 0:227 subgroupPartitionedExclusiveMaxNV ( global 4-component vector of float)
0:230 Function Parameters: 0:227 'f4' ( in 4-component vector of float)
0:232 Sequence 0:227 'parti' ( temp 4-component vector of uint)
0:232 'gl_WarpsPerSMNV' ( flat in uint WarpsPerSMNV) 0:228 subgroupPartitionedExclusiveAndNV ( global 4-component vector of uint)
0:233 'gl_SMCountNV' ( flat in uint SMCountNV) 0:228 'ballot' ( temp 4-component vector of uint)
0:234 'gl_WarpIDNV' ( flat in uint WarpIDNV) 0:228 'parti' ( temp 4-component vector of uint)
0:235 'gl_SMIDNV' ( flat in uint SMIDNV) 0:229 subgroupPartitionedExclusiveOrNV ( global 4-component vector of uint)
0:242 Function Definition: sm_builtins( ( global void) 0:229 'ballot' ( temp 4-component vector of uint)
0:242 Function Parameters: 0:229 'parti' ( temp 4-component vector of uint)
0:244 Sequence 0:230 subgroupPartitionedExclusiveXorNV ( global 4-component vector of uint)
0:244 'gl_WarpsPerSMNV' ( flat in uint WarpsPerSMNV) 0:230 'ballot' ( temp 4-component vector of uint)
0:245 'gl_SMCountNV' ( flat in uint SMCountNV) 0:230 'parti' ( temp 4-component vector of uint)
0:246 'gl_WarpIDNV' ( flat in uint WarpIDNV) 0:234 Function Definition: sm_builtins_err( ( global void)
0:247 'gl_SMIDNV' ( flat in uint SMIDNV) 0:234 Function Parameters:
0:236 Sequence
0:236 'gl_WarpsPerSMNV' ( flat in uint WarpsPerSMNV)
0:237 'gl_SMCountNV' ( flat in uint SMCountNV)
0:238 'gl_WarpIDNV' ( flat in uint WarpIDNV)
0:239 'gl_SMIDNV' ( flat in uint SMIDNV)
0:246 Function Definition: sm_builtins( ( global void)
0:246 Function Parameters:
0:248 Sequence
0:248 'gl_WarpsPerSMNV' ( flat in uint WarpsPerSMNV)
0:249 'gl_SMCountNV' ( flat in uint SMCountNV)
0:250 'gl_WarpIDNV' ( flat in uint WarpIDNV)
0:251 'gl_SMIDNV' ( flat in uint SMIDNV)
0:? Linker Objects 0:? Linker Objects
0:? 'data' (layout( location=0) out 4-component vector of uint) 0:? 'data' (layout( location=0) out 4-component vector of uint)

View File

@ -0,0 +1,40 @@
spv.volatileAtomic.comp
// Module Version 10000
// Generated by (magic number): 80007
// Id's are bound by 18
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main"
ExecutionMode 4 LocalSize 1 1 1
Source GLSL 450
Name 4 "main"
Name 8 "D"
MemberName 8(D) 0 "d"
Name 10 "d"
Decorate 7 ArrayStride 4
MemberDecorate 8(D) 0 Volatile
MemberDecorate 8(D) 0 Coherent
MemberDecorate 8(D) 0 Offset 0
Decorate 8(D) BufferBlock
Decorate 10(d) DescriptorSet 0
Decorate 10(d) Binding 3
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
7: TypeRuntimeArray 6(int)
8(D): TypeStruct 7
9: TypePointer Uniform 8(D)
10(d): 9(ptr) Variable Uniform
11: TypeInt 32 1
12: 11(int) Constant 0
13: TypePointer Uniform 6(int)
15: 6(int) Constant 0
16: 6(int) Constant 1
4(main): 2 Function None 3
5: Label
14: 13(ptr) AccessChain 10(d) 12 12
17: 6(int) AtomicExchange 14 16 15 15
Return
FunctionEnd

View File

@ -114,12 +114,14 @@ void main (void)
#extension GL_KHR_shader_subgroup_ballot: enable #extension GL_KHR_shader_subgroup_ballot: enable
void ballot_works(vec4 f4) { void ballot_works(vec4 f4) {
int i;
gl_SubgroupEqMask; gl_SubgroupEqMask;
gl_SubgroupGeMask; gl_SubgroupGeMask;
gl_SubgroupGtMask; gl_SubgroupGtMask;
gl_SubgroupLeMask; gl_SubgroupLeMask;
gl_SubgroupLtMask; gl_SubgroupLtMask;
subgroupBroadcast(f4, 0); subgroupBroadcast(f4, 0);
subgroupBroadcast(f4, i);
subgroupBroadcastFirst(f4); subgroupBroadcastFirst(f4);
uvec4 ballot = subgroupBallot(false); uvec4 ballot = subgroupBallot(false);
subgroupInverseBallot(uvec4(0x1)); subgroupInverseBallot(uvec4(0x1));
@ -192,7 +194,9 @@ void clustered_works(vec4 f4)
#extension GL_KHR_shader_subgroup_quad: enable #extension GL_KHR_shader_subgroup_quad: enable
void quad_works(vec4 f4) void quad_works(vec4 f4)
{ {
int i;
subgroupQuadBroadcast(f4, 0); subgroupQuadBroadcast(f4, 0);
subgroupQuadBroadcast(f4, i);
subgroupQuadSwapHorizontal(f4); subgroupQuadSwapHorizontal(f4);
subgroupQuadSwapVertical(f4); subgroupQuadSwapVertical(f4);
subgroupQuadSwapDiagonal(f4); subgroupQuadSwapDiagonal(f4);

View File

@ -1,11 +1,16 @@
#!/usr/bin/env bash #!/usr/bin/env bash
TARGETDIR=localResults # Arguments:
# 1- TargetDirectory, where to write test results and intermediary files
# 2- Path to glslangValidator
# 3- Path to spirv-remap
TARGETDIR=${1:-localResults}
BASEDIR=baseResults BASEDIR=baseResults
EXE=../build/install/bin/glslangValidator EXE=${2:-../build/install/bin/glslangValidator}
REMAPEXE=../build/install/bin/spirv-remap REMAPEXE=${3:-../build/install/bin/spirv-remap}
HASERROR=0 HASERROR=0
mkdir -p localResults mkdir -p $TARGETDIR
if [ -a localtestlist ] if [ -a localtestlist ]
then then
@ -55,13 +60,13 @@ diff -b $BASEDIR/hlsl.automap.frag.out $TARGETDIR/hlsl.automap.frag.out || HASER
# multi-threaded test # multi-threaded test
# #
echo Comparing single thread to multithread for all tests in current directory... echo Comparing single thread to multithread for all tests in current directory...
$EXE -i -C *.vert *.geom *.frag *.tesc *.tese *.comp > singleThread.out $EXE -i -C *.vert *.geom *.frag *.tesc *.tese *.comp > $TARGETDIR/singleThread.out
$EXE -i -C *.vert *.geom *.frag *.tesc *.tese *.comp -t > multiThread.out $EXE -i -C *.vert *.geom *.frag *.tesc *.tese *.comp -t > $TARGETDIR/multiThread.out
diff singleThread.out multiThread.out || HASERROR=1 diff $TARGETDIR/singleThread.out $TARGETDIR/multiThread.out || HASERROR=1
if [ $HASERROR -eq 0 ] if [ $HASERROR -eq 0 ]
then then
rm singleThread.out rm $TARGETDIR/singleThread.out
rm multiThread.out rm $TARGETDIR/multiThread.out
fi fi
# #

View File

@ -0,0 +1,8 @@
#version 450 core
layout(set=0, binding=3) volatile buffer D { uint d[]; } d;
void main()
{
atomicExchange(d.d[0], 0);
}

View File

@ -82,7 +82,9 @@ add_library(glslang ${LIB_TYPE} ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${H
set_property(TARGET glslang PROPERTY FOLDER glslang) set_property(TARGET glslang PROPERTY FOLDER glslang)
set_property(TARGET glslang PROPERTY POSITION_INDEPENDENT_CODE ON) set_property(TARGET glslang PROPERTY POSITION_INDEPENDENT_CODE ON)
target_link_libraries(glslang OGLCompiler OSDependent) target_link_libraries(glslang OGLCompiler OSDependent)
target_include_directories(glslang PUBLIC ..) target_include_directories(glslang PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
if(WIN32 AND BUILD_SHARED_LIBS) if(WIN32 AND BUILD_SHARED_LIBS)
set_target_properties(glslang PROPERTIES PREFIX "") set_target_properties(glslang PROPERTIES PREFIX "")
@ -102,14 +104,15 @@ endif(WIN32)
if(ENABLE_GLSLANG_INSTALL) if(ENABLE_GLSLANG_INSTALL)
if(BUILD_SHARED_LIBS) if(BUILD_SHARED_LIBS)
install(TARGETS glslang install(TARGETS glslang EXPORT glslangTargets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
else() else()
install(TARGETS glslang install(TARGETS glslang EXPORT glslangTargets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif() endif()
install(EXPORT glslangTargets DESTINATION lib/cmake)
endif(ENABLE_GLSLANG_INSTALL) endif(ENABLE_GLSLANG_INSTALL)
if(ENABLE_GLSLANG_INSTALL) if(ENABLE_GLSLANG_INSTALL)

View File

@ -135,8 +135,8 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
bool isYuv() const { return yuv; } bool isYuv() const { return yuv; }
#endif #endif
void setCombined(bool c) { combined = c; } void setCombined(bool c) { combined = c; }
void setBasicType(TBasicType t) { type = t; }; void setBasicType(TBasicType t) { type = t; }
TBasicType getBasicType() const { return type; }; TBasicType getBasicType() const { return type; }
bool isShadow() const { return shadow; } bool isShadow() const { return shadow; }
bool isArrayed() const { return arrayed; } bool isArrayed() const { return arrayed; }

View File

@ -2155,6 +2155,7 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
break; break;
case EOpSubgroupBroadcast: case EOpSubgroupBroadcast:
case EOpSubgroupQuadBroadcast:
if (spvVersion.spv < EShTargetSpv_1_5) { if (spvVersion.spv < EShTargetSpv_1_5) {
// <id> must be an integral constant expression. // <id> must be an integral constant expression.
if ((*argp)[1]->getAsConstantUnion() == nullptr) if ((*argp)[1]->getAsConstantUnion() == nullptr)
@ -5149,7 +5150,8 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
return; return;
} else if (id == "location") { } else if (id == "location") {
profileRequires(loc, EEsProfile, 300, nullptr, "location"); profileRequires(loc, EEsProfile, 300, nullptr, "location");
const char* exts[2] = { E_GL_ARB_separate_shader_objects, E_GL_ARB_explicit_attrib_location }; const char* exts[2] = { E_GL_ARB_separate_shader_objects, E_GL_ARB_explicit_attrib_location };
// GL_ARB_explicit_uniform_location requires 330 or GL_ARB_explicit_attrib_location we do not need to add it here
profileRequires(loc, ~EEsProfile, 330, 2, exts, "location"); profileRequires(loc, ~EEsProfile, 330, 2, exts, "location");
if ((unsigned int)value >= TQualifier::layoutLocationEnd) if ((unsigned int)value >= TQualifier::layoutLocationEnd)
error(loc, "location is too large", id.c_str(), ""); error(loc, "location is too large", id.c_str(), "");
@ -5909,8 +5911,9 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier
case EvqBuffer: case EvqBuffer:
{ {
const char* feature = "location qualifier on uniform or buffer"; const char* feature = "location qualifier on uniform or buffer";
requireProfile(loc, EEsProfile | ECoreProfile | ECompatibilityProfile, feature); requireProfile(loc, EEsProfile | ECoreProfile | ECompatibilityProfile | ENoProfile, feature);
profileRequires(loc, ECoreProfile | ECompatibilityProfile, 430, nullptr, feature); profileRequires(loc, ~EEsProfile, 330, E_GL_ARB_explicit_attrib_location, feature);
profileRequires(loc, ~EEsProfile, 430, E_GL_ARB_explicit_uniform_location, feature);
profileRequires(loc, EEsProfile, 310, nullptr, feature); profileRequires(loc, EEsProfile, 310, nullptr, feature);
break; break;
} }

View File

@ -283,7 +283,7 @@ public:
const TString* entryPoint = nullptr); const TString* entryPoint = nullptr);
virtual ~TParseContext(); virtual ~TParseContext();
bool obeyPrecisionQualifiers() const { return precisionManager.respectingPrecisionQualifiers(); }; bool obeyPrecisionQualifiers() const { return precisionManager.respectingPrecisionQualifiers(); }
void setPrecisionDefaults(); void setPrecisionDefaults();
void setLimits(const TBuiltInResource&) override; void setLimits(const TBuiltInResource&) override;

View File

@ -174,6 +174,7 @@ void TParseVersions::initializeExtensionBehavior()
extensionBehavior[E_GL_ARB_texture_cube_map_array] = EBhDisable; extensionBehavior[E_GL_ARB_texture_cube_map_array] = EBhDisable;
extensionBehavior[E_GL_ARB_shader_texture_lod] = EBhDisable; extensionBehavior[E_GL_ARB_shader_texture_lod] = EBhDisable;
extensionBehavior[E_GL_ARB_explicit_attrib_location] = EBhDisable; extensionBehavior[E_GL_ARB_explicit_attrib_location] = EBhDisable;
extensionBehavior[E_GL_ARB_explicit_uniform_location] = EBhDisable;
extensionBehavior[E_GL_ARB_shader_image_load_store] = EBhDisable; extensionBehavior[E_GL_ARB_shader_image_load_store] = EBhDisable;
extensionBehavior[E_GL_ARB_shader_atomic_counters] = EBhDisable; extensionBehavior[E_GL_ARB_shader_atomic_counters] = EBhDisable;
extensionBehavior[E_GL_ARB_shader_draw_parameters] = EBhDisable; extensionBehavior[E_GL_ARB_shader_draw_parameters] = EBhDisable;
@ -378,6 +379,7 @@ void TParseVersions::getPreamble(std::string& preamble)
"#define GL_ARB_texture_cube_map_array 1\n" "#define GL_ARB_texture_cube_map_array 1\n"
"#define GL_ARB_shader_texture_lod 1\n" "#define GL_ARB_shader_texture_lod 1\n"
"#define GL_ARB_explicit_attrib_location 1\n" "#define GL_ARB_explicit_attrib_location 1\n"
"#define GL_ARB_explicit_uniform_location 1\n"
"#define GL_ARB_shader_image_load_store 1\n" "#define GL_ARB_shader_image_load_store 1\n"
"#define GL_ARB_shader_atomic_counters 1\n" "#define GL_ARB_shader_atomic_counters 1\n"
"#define GL_ARB_shader_draw_parameters 1\n" "#define GL_ARB_shader_draw_parameters 1\n"

View File

@ -126,6 +126,7 @@ const char* const E_GL_ARB_enhanced_layouts = "GL_ARB_enhanced_layou
const char* const E_GL_ARB_texture_cube_map_array = "GL_ARB_texture_cube_map_array"; const char* const E_GL_ARB_texture_cube_map_array = "GL_ARB_texture_cube_map_array";
const char* const E_GL_ARB_shader_texture_lod = "GL_ARB_shader_texture_lod"; const char* const E_GL_ARB_shader_texture_lod = "GL_ARB_shader_texture_lod";
const char* const E_GL_ARB_explicit_attrib_location = "GL_ARB_explicit_attrib_location"; const char* const E_GL_ARB_explicit_attrib_location = "GL_ARB_explicit_attrib_location";
const char* const E_GL_ARB_explicit_uniform_location = "GL_ARB_explicit_uniform_location";
const char* const E_GL_ARB_shader_image_load_store = "GL_ARB_shader_image_load_store"; const char* const E_GL_ARB_shader_image_load_store = "GL_ARB_shader_image_load_store";
const char* const E_GL_ARB_shader_atomic_counters = "GL_ARB_shader_atomic_counters"; const char* const E_GL_ARB_shader_atomic_counters = "GL_ARB_shader_atomic_counters";
const char* const E_GL_ARB_shader_draw_parameters = "GL_ARB_shader_draw_parameters"; const char* const E_GL_ARB_shader_draw_parameters = "GL_ARB_shader_draw_parameters";

View File

@ -114,7 +114,7 @@ public:
bool doAutoLocationMapping() const; bool doAutoLocationMapping() const;
TSlotSet::iterator findSlot(int set, int slot); TSlotSet::iterator findSlot(int set, int slot);
bool checkEmpty(int set, int slot); bool checkEmpty(int set, int slot);
bool validateInOut(EShLanguage /*stage*/, TVarEntryInfo& /*ent*/) override { return true; }; bool validateInOut(EShLanguage /*stage*/, TVarEntryInfo& /*ent*/) override { return true; }
int reserveSlot(int set, int slot, int size = 1); int reserveSlot(int set, int slot, int size = 1);
int getFreeSlot(int set, int base, int size = 1); int getFreeSlot(int set, int base, int size = 1);
int resolveSet(EShLanguage /*stage*/, TVarEntryInfo& ent) override; int resolveSet(EShLanguage /*stage*/, TVarEntryInfo& ent) override;
@ -125,7 +125,7 @@ public:
void addStage(EShLanguage stage) override { void addStage(EShLanguage stage) override {
if (stage < EShLangCount) if (stage < EShLangCount)
stageMask[stage] = true; stageMask[stage] = true;
}; }
uint32_t computeTypeLocationSize(const TType& type, EShLanguage stage); uint32_t computeTypeLocationSize(const TType& type, EShLanguage stage);
TSlotSetMap slots; TSlotSetMap slots;
@ -191,7 +191,7 @@ public:
typedef std::map<TString, int> TVarSlotMap; // <resourceName, location/binding> typedef std::map<TString, int> TVarSlotMap; // <resourceName, location/binding>
typedef std::map<int, TVarSlotMap> TSlotMap; // <resourceKey, TVarSlotMap> typedef std::map<int, TVarSlotMap> TSlotMap; // <resourceKey, TVarSlotMap>
TDefaultGlslIoResolver(const TIntermediate& intermediate); TDefaultGlslIoResolver(const TIntermediate& intermediate);
bool validateBinding(EShLanguage /*stage*/, TVarEntryInfo& /*ent*/) override { return true; }; bool validateBinding(EShLanguage /*stage*/, TVarEntryInfo& /*ent*/) override { return true; }
TResourceType getResourceType(const glslang::TType& type) override; TResourceType getResourceType(const glslang::TType& type) override;
int resolveInOutLocation(EShLanguage stage, TVarEntryInfo& ent) override; int resolveInOutLocation(EShLanguage stage, TVarEntryInfo& ent) override;
int resolveUniformLocation(EShLanguage /*stage*/, TVarEntryInfo& ent) override; int resolveUniformLocation(EShLanguage /*stage*/, TVarEntryInfo& ent) override;
@ -209,7 +209,7 @@ public:
int buildStorageKey(EShLanguage stage, TStorageQualifier type) { int buildStorageKey(EShLanguage stage, TStorageQualifier type) {
assert(static_cast<uint32_t>(stage) <= 0x0000ffff && static_cast<uint32_t>(type) <= 0x0000ffff); assert(static_cast<uint32_t>(stage) <= 0x0000ffff && static_cast<uint32_t>(type) <= 0x0000ffff);
return (stage << 16) | type; return (stage << 16) | type;
}; }
protected: protected:
// Use for mark pre stage, to get more interface symbol information. // Use for mark pre stage, to get more interface symbol information.
@ -242,7 +242,7 @@ struct TVarLivePair : std::pair<const TString, TVarEntryInfo> {
const_cast<TString&>(first) = _Right.first; const_cast<TString&>(first) = _Right.first;
second = _Right.second; second = _Right.second;
return (*this); return (*this);
}; }
}; };
typedef std::vector<TVarLivePair> TVarLiveVector; typedef std::vector<TVarLivePair> TVarLiveVector;
@ -253,7 +253,7 @@ public:
virtual ~TIoMapper() {} virtual ~TIoMapper() {}
// grow the reflection stage by stage // grow the reflection stage by stage
bool virtual addStage(EShLanguage, TIntermediate&, TInfoSink&, TIoMapResolver*); bool virtual addStage(EShLanguage, TIntermediate&, TInfoSink&, TIoMapResolver*);
bool virtual doMap(TIoMapResolver*, TInfoSink&) { return true; }; bool virtual doMap(TIoMapResolver*, TInfoSink&) { return true; }
}; };
// I/O mapper for OpenGL // I/O mapper for OpenGL

View File

@ -20,6 +20,7 @@ else()
endif() endif()
if(ENABLE_GLSLANG_INSTALL) if(ENABLE_GLSLANG_INSTALL)
install(TARGETS OSDependent install(TARGETS OSDependent EXPORT OSDependentTargets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(EXPORT OSDependentTargets DESTINATION lib/cmake)
endif(ENABLE_GLSLANG_INSTALL) endif(ENABLE_GLSLANG_INSTALL)

View File

@ -15,6 +15,7 @@ if(WIN32)
endif(WIN32) endif(WIN32)
if(ENABLE_GLSLANG_INSTALL) if(ENABLE_GLSLANG_INSTALL)
install(TARGETS OSDependent install(TARGETS OSDependent EXPORT OSDependentTargets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(EXPORT OSDependentTargets DESTINATION lib/cmake)
endif(ENABLE_GLSLANG_INSTALL) endif(ENABLE_GLSLANG_INSTALL)

View File

@ -487,7 +487,7 @@ public:
environment.target.version = version; environment.target.version = version;
} }
void getStrings(const char* const* &s, int& n) { s = strings; n = numStrings; }; void getStrings(const char* const* &s, int& n) { s = strings; n = numStrings; }
#ifdef ENABLE_HLSL #ifdef ENABLE_HLSL
void setEnvTargetHlslFunctionality1() { environment.target.hlslFunctionality1 = true; } void setEnvTargetHlslFunctionality1() { environment.target.hlslFunctionality1 = true; }
@ -775,7 +775,7 @@ public:
TProgram(); TProgram();
virtual ~TProgram(); virtual ~TProgram();
void addShader(TShader* shader) { stages[shader->stage].push_back(shader); } void addShader(TShader* shader) { stages[shader->stage].push_back(shader); }
std::list<TShader*>& getShaders(EShLanguage stage) { return stages[stage]; }; std::list<TShader*>& getShaders(EShLanguage stage) { return stages[stage]; }
// Link Validation interface // Link Validation interface
bool link(EShMessages); bool link(EShMessages);
const char* getInfoLog(); const char* getInfoLog();

View File

@ -31,8 +31,9 @@ if(BUILD_TESTING)
set_property(TARGET glslangtests PROPERTY FOLDER tests) set_property(TARGET glslangtests PROPERTY FOLDER tests)
glslang_set_link_args(glslangtests) glslang_set_link_args(glslangtests)
if(ENABLE_GLSLANG_INSTALL) if(ENABLE_GLSLANG_INSTALL)
install(TARGETS glslangtests install(TARGETS glslangtests EXPORT glslangtestsTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(EXPORT glslangtestsTargets DESTINATION lib/cmake)
endif(ENABLE_GLSLANG_INSTALL) endif(ENABLE_GLSLANG_INSTALL)
set(GLSLANG_TEST_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../Test") set(GLSLANG_TEST_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../Test")

View File

@ -404,6 +404,7 @@ INSTANTIATE_TEST_CASE_P(
"spv.storageBuffer.vert", "spv.storageBuffer.vert",
"spv.precise.tese", "spv.precise.tese",
"spv.precise.tesc", "spv.precise.tesc",
"spv.volatileAtomic.comp",
"spv.vulkan100.subgroupArithmetic.comp", "spv.vulkan100.subgroupArithmetic.comp",
"spv.vulkan100.subgroupPartitioned.comp", "spv.vulkan100.subgroupPartitioned.comp",
"spv.xfb.vert", "spv.xfb.vert",

View File

@ -33,12 +33,13 @@ endif(WIN32)
if(ENABLE_GLSLANG_INSTALL) if(ENABLE_GLSLANG_INSTALL)
if(BUILD_SHARED_LIBS) if(BUILD_SHARED_LIBS)
install(TARGETS HLSL install(TARGETS HLSL EXPORT HLSLTargets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
else() else()
install(TARGETS HLSL install(TARGETS HLSL EXPORT HLSLTargets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif() endif()
install(EXPORT HLSLTargets DESTINATION lib/cmake)
endif(ENABLE_GLSLANG_INSTALL) endif(ENABLE_GLSLANG_INSTALL)