Skip to content

Commit

Permalink
Update llpc from commit ba41c3f58
Browse files Browse the repository at this point in the history
Update gfx900-based lgc tests to gfx1010
Update hasher with some missing options
Update llvm-dialects
Handle constant GEPs into the RT LDS allocation
Implement color-related compatibility mode built-in variables.
Improve in/out matching printing info
Include GNUInstallDirs for llpc_version
Increase lgc::Options size to fix build error
Make lgc::ShaderStage more class-like
Make ShaderStage optional in some places
Mask off type field of null descriptor
Prepare for trans OpAccessChain with multi value map
Recalculate the arraysize when the dimension exceeds 1.
Refine build pipeline code
Refine Vertex fetch. Support ext formats
Remove unused class member m_atomicInsts
Rename pipeline dump file for color export shader
Repair the malfunctioning oglp OSIBuild pipeline
Replace deprecated starts/endswith
Replace the IA_MULTI_VGT_PARAM_PIPED
Return full pipeline when enabling xfb
Set noReciprocalFragCoordW
Simplify how we ensure a single unified return block for outputs
Support 'start-lower-after' for llpc spv lower
Support atomic counter array with multiple dimensions
Support disablePerCompFetch in uber fetch shader
Support waveMatrix_Fill
Use a stable function signature when compiling libraries
Use ShaderStageMask for masks
Use strided buffers for shader record buffer
[Continuations] Add _AmdContStack* interface
[Continuations] Add global memory payload test.
[Continuations] Add header for gpurt
[Continuations] Add llvm_unreachable
[Continuations] Add LowerSwitchPass
[Continuations] Add ShaderStageHelper class.
[Continuations] Add store-to-load forwarding
[Continuations] Change lgc.cps. stack lowering to work with i32 offsets.
[Continuations] Cleanup uses of amd.dx prefix
[Continuations] DX: Directly access cont state on the CPS stack
[CONTINUATIONS] Fix Gpurt hlsl spirv compiling
[CONTINUATIONS] Guard getStructName() with hasName() check
[Continuations] Merge payload type MD removal into `fixupDxilMetadata`.
[CONTINUATIONS] Move setLocalRootIndex at shader entry out of LowerRayTracingPipeline
[Continuations] Move type helpers together
[CONTINUATIONS] Pass RCR/ShaderIndex to lgc.cps.jump
[Continuations] Remove CpsMutator from LowerRaytracingPipelinePass.
[Continuations] Remove DialectUtils namespace.
[Continuations] Remove getSystemData intrinsic
[Continuations] Remove using namespace in CpsStackLowering
[CONTINUATIONS] Rename dxil.payload.type
[Continuations] Simplify some assertions.
[Continuations] Specify namespace for llvm_dialects
[Continuations] Support compilation of launch kernel
[CONTINUATIONS] Switch to LgcRt HitAttribute metadata
[Continuations] Unify GPURT function discovery + signature precondition checks in LowerRaytracingPipeline.
[Continuations] Use Arg::getParent to get function
[Continuations] Use isa with multiple args
[Continuations]Add Function type
Add constant load dword intrinsics
Add floatOpWithRoundMode intrinsic for lgc
Add helper for getWithSamePointeeType
Add LibraryMode and library summaries
Add type map for struct/array type with sampler
Adjust the order of AlwaysInline/GlobalDCE passes
Change transCooperativeMatrixKHRFromConstruct to CreateCooperativeMatrixFill
Clean up translation of binary opcodes. NFC.
Continuations: Implement store to load forwarding
Continuations: Lower lgr.rt intrinsic in CleanupContinuations
CPS lowing adjustments for dVGPR
Don't fill xfb info to xfb_matadata if xfb_offset is not assigned
Emit shader data SQTT tokens when required
Expose KHR_SHADER_QUAD_CONTROL support in lgc
Fix a regression of handling TCS per-vertex outputs
Fix assert caused by OpDecorationGroup
Fix bug in building shader module usage
Fix bug in translate image pointer
Fix inline compiles when Continufy mode is enabled
Fix struct copy bug during translate spirv OpStore
Fix the addrspace of all transitive users of output globals
Fix typo in building shader module usage
Fix unresolved GPURT dialect in build BVH shaders
  • Loading branch information
qiaojbao committed Jan 26, 2024
1 parent 9d4dfa3 commit 33f4320
Show file tree
Hide file tree
Showing 505 changed files with 18,807 additions and 14,083 deletions.
3 changes: 2 additions & 1 deletion .typos.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# For information about the config format, see https://github.com/crate-ci/typos

[files]
extend-exclude = ["imported/"]
extend-exclude = ["imported/", "*.pipe"]

[default.extend-identifiers]
# Needs to be fixed in xgl first
Expand All @@ -24,4 +24,5 @@ USCALED = "USCALED"
Datas = "Datas"
HSA = "HSA"
VALU = "VALU"
offen = "offen"
Derivate = "Derivate"
20 changes: 12 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
##
#######################################################################################################################
#
# Copyright (c) 2017-2023 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
Expand All @@ -17,9 +17,9 @@
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
#######################################################################################################################

Expand All @@ -35,6 +35,10 @@ endif()

### Version info ###
include(cmake/llpc_version.cmake)
if(NOT ICD_BUILD_LLPC)
set(DISABLE_LLPC_VERSION_USES_LLVM ON)
endif()

add_llpc_version_projects()

### Top-level VKGC Interface ###
Expand Down
16 changes: 8 additions & 8 deletions cmake/CompilerStandalone.cmake
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
##
#######################################################################################################################
#
# Copyright (c) 2021-2023 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2021-2024 Advanced Micro Devices, Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
Expand All @@ -17,9 +17,9 @@
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
#######################################################################################################################

Expand Down
16 changes: 8 additions & 8 deletions cmake/compilerutils.cmake
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
##
#######################################################################################################################
#
# Copyright (c) 2023 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2023-2024 Advanced Micro Devices, Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
Expand All @@ -17,9 +17,9 @@
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
#######################################################################################################################

Expand Down
16 changes: 8 additions & 8 deletions cmake/continuations.cmake
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
##
#######################################################################################################################
#
# Copyright (c) 2023 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2023-2024 Advanced Micro Devices, Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
Expand All @@ -17,9 +17,9 @@
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
#######################################################################################################################

Expand Down
16 changes: 8 additions & 8 deletions cmake/lgc.cmake
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
##
#######################################################################################################################
#
# Copyright (c) 2023 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2023-2024 Advanced Micro Devices, Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
Expand All @@ -17,9 +17,9 @@
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
#######################################################################################################################

Expand Down
16 changes: 8 additions & 8 deletions cmake/llpc_version.cmake
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
##
#######################################################################################################################
#
# Copyright (c) 2023 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2023-2024 Advanced Micro Devices, Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
Expand All @@ -17,9 +17,9 @@
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
#######################################################################################################################

Expand Down
16 changes: 8 additions & 8 deletions compilerutils/include/compilerutils/CompilerUtils.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/*
***********************************************************************************************************************
*
* Copyright (c) 2023 Advanced Micro Devices, Inc. All Rights Reserved.
* Copyright (c) 2023-2024 Advanced Micro Devices, Inc. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
Expand All @@ -17,9 +17,9 @@
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
**********************************************************************************************************************/

Expand Down
30 changes: 22 additions & 8 deletions compilerutils/include/compilerutils/LoweringPointerTupleMap.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/*
***********************************************************************************************************************
*
* Copyright (c) 2020-2023 Advanced Micro Devices, Inc. All Rights Reserved.
* Copyright (c) 2020-2024 Advanced Micro Devices, Inc. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
Expand All @@ -17,9 +17,9 @@
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
**********************************************************************************************************************/
/**
Expand Down Expand Up @@ -116,6 +116,20 @@ template <typename KeyT, typename ValueT, bool TrackReverse> class LoweringPoint
return decode(&it->second);
}

KeyT lookupUniqueKey(ValueT value) const {
static_assert(TrackReverse);

auto it = m_reverseMap.find(value);
if (it == m_reverseMap.end())
return nullptr;

uintptr_t keyValue = it->second[0];
if (keyValue & 1u) // 1-N mapping, keyValue is N number but not key ptr
return nullptr;

return reinterpret_cast<KeyT>(it->second[0]);
}

llvm::ArrayRef<ValueT> set(KeyT key, llvm::ArrayRef<ValueT> value) {
if (value.empty()) {
auto it = m_map.find(key);
Expand Down
16 changes: 8 additions & 8 deletions compilerutils/include/compilerutils/TypeLowering.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/*
***********************************************************************************************************************
*
* Copyright (c) 2020-2023 Advanced Micro Devices, Inc. All Rights Reserved.
* Copyright (c) 2020-2024 Advanced Micro Devices, Inc. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
Expand All @@ -17,9 +17,9 @@
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
**********************************************************************************************************************/
/**
Expand Down
Loading

0 comments on commit 33f4320

Please sign in to comment.