Commit 4b4f0f2d authored by Jordi Mallach's avatar Jordi Mallach 🐗

Merge tag 'upstream/0.183'

Upstream version 0.183
parents 64ee1ac2 23892b5f

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

...@@ -135,7 +135,7 @@ namespace Forsyth ...@@ -135,7 +135,7 @@ namespace Forsyth
float FindVertexScore(uint numActiveFaces, uint cachePosition, uint vertexCacheSize) float FindVertexScore(uint numActiveFaces, uint cachePosition, uint vertexCacheSize)
{ {
assert(s_vertexScoresComputed); assert(s_vertexScoresComputed); (void)s_vertexScoresComputed;
if ( numActiveFaces == 0 ) if ( numActiveFaces == 0 )
{ {
......
...@@ -6,6 +6,8 @@ option(ENABLE_GLSLANG_BINARIES "Builds glslangValidator and spirv-remap" ON) ...@@ -6,6 +6,8 @@ option(ENABLE_GLSLANG_BINARIES "Builds glslangValidator and spirv-remap" ON)
option(ENABLE_NV_EXTENSIONS "Enables support of Nvidia-specific extensions" ON) option(ENABLE_NV_EXTENSIONS "Enables support of Nvidia-specific extensions" ON)
option(ENABLE_HLSL "Enables HLSL input support" ON)
enable_testing() enable_testing()
set(CMAKE_INSTALL_PREFIX "install" CACHE STRING "prefix") set(CMAKE_INSTALL_PREFIX "install" CACHE STRING "prefix")
...@@ -20,6 +22,10 @@ if(ENABLE_NV_EXTENSIONS) ...@@ -20,6 +22,10 @@ if(ENABLE_NV_EXTENSIONS)
add_definitions(-DNV_EXTENSIONS) add_definitions(-DNV_EXTENSIONS)
endif(ENABLE_NV_EXTENSIONS) endif(ENABLE_NV_EXTENSIONS)
if(ENABLE_HLSL)
add_definitions(-DENABLE_HLSL)
endif(ENABLE_HLSL)
if(WIN32) if(WIN32)
set(CMAKE_DEBUG_POSTFIX "d") set(CMAKE_DEBUG_POSTFIX "d")
include(ChooseMSVCCRT.cmake) include(ChooseMSVCCRT.cmake)
...@@ -63,5 +69,7 @@ if(ENABLE_GLSLANG_BINARIES) ...@@ -63,5 +69,7 @@ if(ENABLE_GLSLANG_BINARIES)
add_subdirectory(StandAlone) add_subdirectory(StandAlone)
endif() endif()
add_subdirectory(SPIRV) add_subdirectory(SPIRV)
add_subdirectory(hlsl) if(ENABLE_HLSL)
add_subdirectory(hlsl)
endif(ENABLE_HLSL)
add_subdirectory(gtests) add_subdirectory(gtests)
// //
//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
//All rights reserved. // All rights reserved.
// //
//Redistribution and use in source and binary forms, with or without // Redistribution and use in source and binary forms, with or without
//modification, are permitted provided that the following conditions // modification, are permitted provided that the following conditions
//are met: // are met:
// //
// Redistributions of source code must retain the above copyright // Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer. // notice, this list of conditions and the following disclaimer.
...@@ -18,18 +18,18 @@ ...@@ -18,18 +18,18 @@
// contributors may be used to endorse or promote products derived // contributors may be used to endorse or promote products derived
// from this software without specific prior written permission. // from this software without specific prior written permission.
// //
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
//POSSIBILITY OF SUCH DAMAGE. // POSSIBILITY OF SUCH DAMAGE.
// //
#define SH_EXPORTING #define SH_EXPORTING
......
// //
//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
//All rights reserved. // All rights reserved.
// //
//Redistribution and use in source and binary forms, with or without // Redistribution and use in source and binary forms, with or without
//modification, are permitted provided that the following conditions // modification, are permitted provided that the following conditions
//are met: // are met:
// //
// Redistributions of source code must retain the above copyright // Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer. // notice, this list of conditions and the following disclaimer.
...@@ -18,23 +18,22 @@ ...@@ -18,23 +18,22 @@
// contributors may be used to endorse or promote products derived // contributors may be used to endorse or promote products derived
// from this software without specific prior written permission. // from this software without specific prior written permission.
// //
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
//POSSIBILITY OF SUCH DAMAGE. // POSSIBILITY OF SUCH DAMAGE.
// //
#ifndef __INITIALIZEDLL_H #ifndef __INITIALIZEDLL_H
#define __INITIALIZEDLL_H #define __INITIALIZEDLL_H
#include "../glslang/OSDependent/osinclude.h" #include "../glslang/OSDependent/osinclude.h"
namespace glslang { namespace glslang {
......
...@@ -17,7 +17,7 @@ There are several components: ...@@ -17,7 +17,7 @@ There are several components:
1. A GLSL/ESSL front-end for reference validation and translation of GLSL/ESSL into an AST. 1. A GLSL/ESSL front-end for reference validation and translation of GLSL/ESSL into an AST.
2. An HLSL front-end for translation of a broad generic HLL into the AST. 2. An HLSL front-end for translation of a broad generic HLL into the AST. See [issue 362](https://github.com/KhronosGroup/glslang/issues/362) and [issue 701](https://github.com/KhronosGroup/glslang/issues/701) for current status.
3. A SPIR-V back end for translating the AST to SPIR-V. 3. A SPIR-V back end for translating the AST to SPIR-V.
......
...@@ -34,12 +34,14 @@ if(ENABLE_AMD_EXTENSIONS) ...@@ -34,12 +34,14 @@ if(ENABLE_AMD_EXTENSIONS)
endif(ENABLE_AMD_EXTENSIONS) endif(ENABLE_AMD_EXTENSIONS)
if(ENABLE_NV_EXTENSIONS) if(ENABLE_NV_EXTENSIONS)
set(HEADERS list(APPEND
GLSL.ext.NV.h) HEADERS
GLSL.ext.NV.h)
endif(ENABLE_NV_EXTENSIONS) endif(ENABLE_NV_EXTENSIONS)
add_library(SPIRV STATIC ${SOURCES} ${HEADERS}) add_library(SPIRV STATIC ${SOURCES} ${HEADERS})
set_property(TARGET SPIRV PROPERTY FOLDER glslang) set_property(TARGET SPIRV PROPERTY FOLDER glslang)
target_link_libraries(SPIRV glslang)
add_library(SPVRemapper STATIC ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS}) add_library(SPVRemapper STATIC ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS})
set_property(TARGET SPVRemapper PROPERTY FOLDER glslang) set_property(TARGET SPVRemapper PROPERTY FOLDER glslang)
...@@ -51,3 +53,5 @@ endif(WIN32) ...@@ -51,3 +53,5 @@ endif(WIN32)
install(TARGETS SPIRV SPVRemapper install(TARGETS SPIRV SPVRemapper
ARCHIVE DESTINATION lib) ARCHIVE DESTINATION lib)
install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION include/SPIRV/)
...@@ -32,5 +32,5 @@ static const char* const E_SPV_KHR_shader_ballot = "SPV_KHR_shade ...@@ -32,5 +32,5 @@ static const char* const E_SPV_KHR_shader_ballot = "SPV_KHR_shade
// SPV_KHR_shader_draw_parameters // SPV_KHR_shader_draw_parameters
static const char* const E_SPV_KHR_shader_draw_parameters = "SPV_KHR_shader_draw_parameters"; static const char* const E_SPV_KHR_shader_draw_parameters = "SPV_KHR_shader_draw_parameters";
static const char* const E_SPV_KHR_subgroup_vote = "SPV_KHR_subgroup_vote";
#endif // #ifndef GLSLextKHR_H #endif // #ifndef GLSLextKHR_H
...@@ -30,20 +30,45 @@ ...@@ -30,20 +30,45 @@
enum BuiltIn; enum BuiltIn;
enum Decoration; enum Decoration;
enum Op; enum Op;
enum Capability;
static const int GLSLextNVVersion = 100; static const int GLSLextNVVersion = 100;
static const int GLSLextNVRevision = 2; static const int GLSLextNVRevision = 4;
//SPV_NV_sample_mask_override_coverage //SPV_NV_sample_mask_override_coverage
const char* const E_SPV_NV_sample_mask_override_coverage = "SPV_NV_sample_mask_override_coverage"; const char* const E_SPV_NV_sample_mask_override_coverage = "SPV_NV_sample_mask_override_coverage";
static const Decoration OverrideCoverageNV = static_cast<Decoration>(5248);