Skip to content

Commit

Permalink
Update xgl from commit: 7a802c91
Browse files Browse the repository at this point in the history
* Move pointSizeUsed to PipelineMetadata
* Enhance ASTC software Gpu decode pass: add cache for pipeline binaries, improve CPU performance,fix memory leak
* Update PAL Version in XGL to 696
* Change order of exception handling, and add attachment count guard
* Sampler compareFunc with disabled data comparison
* PAL Version in XGL Clean Up
* Cleanup VK_IGNORE macros
* Extract command buffer ring to new class
* Add change to enable overriding the VRAM size with a value higher than actually present on the GPU
* Add 3rd heap choice
* Avoid redundant get PAL device props call
  • Loading branch information
WenqingLiAMD committed Jan 13, 2022
1 parent 0453432 commit 412fc2a
Show file tree
Hide file tree
Showing 208 changed files with 1,169 additions and 761 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
#######################################################################################################################
#
# Copyright (c) 2017-2021 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2017-2022 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
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/AmdCmakeHelper.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
#######################################################################################################################
#
# Copyright (c) 2017-2021 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2017-2022 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
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/FindAMDBoost.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
#######################################################################################################################
#
# Copyright (c) 2021 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2022 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
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/FindAMDNinja.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
#######################################################################################################################
#
# Copyright (c) 2021 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2022 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
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/FindDRM.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
#######################################################################################################################
#
# Copyright (c) 2021 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2022 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
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/FindKernelHeaders.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
#######################################################################################################################
#
# Copyright (c) 2021 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2022 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
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/FindXCB.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
#######################################################################################################################
#
# Copyright (c) 2021 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2022 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
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/XglSetupAmdGlobalRoots.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
#######################################################################################################################
#
# Copyright (c) 2021 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2022 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
Expand Down
2 changes: 1 addition & 1 deletion cmake/XglCompileDefinitions.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
#######################################################################################################################
#
# Copyright (c) 2017-2021 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2017-2022 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
Expand Down
2 changes: 1 addition & 1 deletion cmake/XglCompilerOptions.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
#######################################################################################################################
#
# Copyright (c) 2017-2021 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2017-2022 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
Expand Down
2 changes: 1 addition & 1 deletion cmake/XglHelper.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
#######################################################################################################################
#
# Copyright (c) 2017-2021 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2017-2022 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
Expand Down
2 changes: 1 addition & 1 deletion cmake/XglOptions.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
#######################################################################################################################
#
# Copyright (c) 2017-2021 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2017-2022 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
Expand Down
2 changes: 1 addition & 1 deletion cmake/XglOverrides.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
#######################################################################################################################
#
# Copyright (c) 2017-2021 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2017-2022 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
Expand Down
2 changes: 1 addition & 1 deletion cmake/XglPackaging.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
#######################################################################################################################
#
# Copyright (c) 2021 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2021-2022 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
Expand Down
3 changes: 2 additions & 1 deletion icd/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
#######################################################################################################################
#
# Copyright (c) 2017-2021 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2017-2022 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
Expand Down Expand Up @@ -87,6 +87,7 @@ target_sources(xgl PRIVATE
api/app_resource_optimizer.cpp
api/app_shader_optimizer.cpp
api/barrier_policy.cpp
api/cmd_buffer_ring.cpp
api/color_space_helper.cpp
api/compiler_solution.cpp
api/internal_mem_mgr.cpp
Expand Down
2 changes: 1 addition & 1 deletion icd/api/app_profile.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
***********************************************************************************************************************
*
* Copyright (c) 2014-2021 Advanced Micro Devices, Inc. All Rights Reserved.
* Copyright (c) 2014-2022 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
Expand Down
2 changes: 1 addition & 1 deletion icd/api/app_resource_optimizer.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
***********************************************************************************************************************
*
* Copyright (c) 2019-2021 Advanced Micro Devices, Inc. All Rights Reserved.
* Copyright (c) 2019-2022 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
Expand Down
2 changes: 1 addition & 1 deletion icd/api/app_shader_optimizer.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
***********************************************************************************************************************
*
* Copyright (c) 2014-2021 Advanced Micro Devices, Inc. All Rights Reserved.
* Copyright (c) 2014-2022 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
Expand Down
2 changes: 1 addition & 1 deletion icd/api/appopt/barrier_filter_layer.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
***********************************************************************************************************************
*
* Copyright (c) 2019-2021 Advanced Micro Devices, Inc. All Rights Reserved.
* Copyright (c) 2019-2022 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
Expand Down
2 changes: 1 addition & 1 deletion icd/api/appopt/barrier_filter_layer.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
***********************************************************************************************************************
*
* Copyright (c) 2019-2021 Advanced Micro Devices, Inc. All Rights Reserved.
* Copyright (c) 2019-2022 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
Expand Down
21 changes: 19 additions & 2 deletions icd/api/appopt/gpu_decode_layer.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
***********************************************************************************************************************
*
* Copyright (c) 2020-2021 Advanced Micro Devices, Inc. All Rights Reserved.
* Copyright (c) 2020-2022 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
Expand Down Expand Up @@ -186,6 +186,23 @@ namespace GpuTexDecoder

return result == VK_SUCCESS ? Pal::Result::Success : Pal::Result::ErrorUnknown;
}

void ClientDestroyInternalComputePipeline(
const DeviceInitInfo& initInfo,
Pal::IPipeline* pPipeline,
void* pMemory)
{
vk::Device* pDevice = reinterpret_cast<vk::Device*>(initInfo.pClientUserData);

if (pMemory == nullptr)
{
pMemory = pPipeline;
}

pPipeline->Destroy();
pPipeline = nullptr;
pDevice->VkInstance()->FreeMem(pMemory);
}
}

namespace vk
Expand All @@ -203,7 +220,7 @@ GpuDecoderLayer::~GpuDecoderLayer()
{
if(m_pGpuTexDecoder != nullptr)
{
m_pDevice->VkInstance()->FreeMem(m_pGpuTexDecoder);
Util::Destructor(m_pGpuTexDecoder);
m_pGpuTexDecoder = nullptr;
}
}
Expand Down
2 changes: 1 addition & 1 deletion icd/api/appopt/gpu_decode_layer.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
***********************************************************************************************************************
*
* Copyright (c) 2020-2021 Advanced Micro Devices, Inc. All Rights Reserved.
* Copyright (c) 2020-2022 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
Expand Down
2 changes: 1 addition & 1 deletion icd/api/appopt/opt_layer.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
***********************************************************************************************************************
*
* Copyright (c) 2019-2021 Advanced Micro Devices, Inc. All Rights Reserved.
* Copyright (c) 2019-2022 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
Expand Down
2 changes: 1 addition & 1 deletion icd/api/appopt/strange_brigade_layer.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
***********************************************************************************************************************
*
* Copyright (c) 2014-2021 Advanced Micro Devices, Inc. All Rights Reserved.
* Copyright (c) 2014-2022 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
Expand Down
2 changes: 1 addition & 1 deletion icd/api/appopt/strange_brigade_layer.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
***********************************************************************************************************************
*
* Copyright (c) 2014-2021 Advanced Micro Devices, Inc. All Rights Reserved.
* Copyright (c) 2014-2022 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
Expand Down
9 changes: 2 additions & 7 deletions icd/api/barrier_policy.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
***********************************************************************************************************************
*
* Copyright (c) 2014-2021 Advanced Micro Devices, Inc. All Rights Reserved.
* Copyright (c) 2014-2022 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
Expand Down Expand Up @@ -907,7 +907,6 @@ void ImageBarrierPolicy::InitImageLayoutUsagePolicy(
}

// We don't do anything special in case of transient attachment images
VK_IGNORE(VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT);
}

// =====================================================================================================================
Expand Down Expand Up @@ -1031,9 +1030,6 @@ void ImageBarrierPolicy::InitImageCachePolicy(
supportedInputCacheMask |= Pal::CoherDepthStencilTarget | Pal::CoherClear;
}

// We don't do anything special in case of transient attachment images
VK_IGNORE(VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT);

// Apply device specific supported cache masks to limit the scope.
supportedOutputCacheMask &= pDevice->GetBarrierPolicy().GetSupportedOutputCacheMask();
supportedInputCacheMask &= pDevice->GetBarrierPolicy().GetSupportedInputCacheMask();
Expand Down Expand Up @@ -1328,8 +1324,7 @@ void BufferBarrierPolicy::InitBufferCachePolicy(
supportedOutputCacheMask |= Pal::CoherStreamOut;
}

// Nothing to do since Pal::CoherMemory is already set
VK_IGNORE(usage & VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT);
// Nothing to do for VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT since Pal::CoherMemory is already set

// Apply device specific supported cache masks to limit the scope.
supportedOutputCacheMask &= pDevice->GetBarrierPolicy().GetSupportedOutputCacheMask();
Expand Down
2 changes: 1 addition & 1 deletion icd/api/binary_cache_serialization.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
***********************************************************************************************************************
*
* Copyright (c) 2018-2021 Advanced Micro Devices, Inc. All Rights Reserved.
* Copyright (c) 2018-2022 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
Expand Down
2 changes: 1 addition & 1 deletion icd/api/cache_adapter.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
***********************************************************************************************************************
*
* Copyright (c) 2020-2021 Advanced Micro Devices, Inc. All Rights Reserved.
* Copyright (c) 2020-2022 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
Expand Down
Loading

0 comments on commit 412fc2a

Please sign in to comment.