Skip to content

Commit 35e6297

Browse files
committed
layers: Fix swapchain related object counting issue
The validation layers create internal image and memory objects for swapchains which makes the object count VUs report false positives in the presence of swapchains. This change fixes that by explicitly counting every object.
1 parent 05cf7e8 commit 35e6297

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+640
-133
lines changed

layers/vulkansc/base64.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (c) 2024 The Khronos Group Inc.
3-
* Copyright (c) 2024 RasterGrid Kft.
2+
* Copyright (c) 2024-2025 The Khronos Group Inc.
3+
* Copyright (c) 2024-2025 RasterGrid Kft.
44
*
55
* SPDX-License-Identifier: Apache-2.0
66
*/

layers/vulkansc/core_checks/sc_core_validation.cpp

Lines changed: 47 additions & 38 deletions
Large diffs are not rendered by default.

layers/vulkansc/core_checks/sc_core_validation.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/* Copyright (c) 2023-2024 The Khronos Group Inc.
2-
* Copyright (c) 2023-2024 RasterGrid Kft.
1+
/* Copyright (c) 2023-2025 The Khronos Group Inc.
2+
* Copyright (c) 2023-2025 RasterGrid Kft.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

layers/vulkansc/core_checks/sc_spirv_validation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/* Copyright (c) 2023-2024 The Khronos Group Inc.
2-
* Copyright (c) 2023-2024 RasterGrid Kft.
1+
/* Copyright (c) 2023-2025 The Khronos Group Inc.
2+
* Copyright (c) 2023-2025 RasterGrid Kft.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

layers/vulkansc/sc_vuid_enums.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/* Copyright (c) 2023-2024 The Khronos Group Inc.
2-
* Copyright (c) 2023-2024 RasterGrid Kft.
1+
/* Copyright (c) 2023-2025 The Khronos Group Inc.
2+
* Copyright (c) 2023-2025 RasterGrid Kft.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

layers/vulkansc/state_tracker/sc_cmd_buffer_state.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/* Copyright (c) 2023-2024 The Khronos Group Inc.
2-
* Copyright (c) 2023-2024 RasterGrid Kft.
1+
/* Copyright (c) 2023-2025 The Khronos Group Inc.
2+
* Copyright (c) 2023-2025 RasterGrid Kft.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/* Copyright (c) 2023-2025 The Khronos Group Inc.
2+
* Copyright (c) 2023-2025 RasterGrid Kft.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
* Author: Daniel Rakos <[email protected]>
17+
*/
18+
#pragma once
19+
#include "state_tracker/descriptor_sets.h"
20+
21+
#include <atomic>
22+
23+
namespace vvl::sc {
24+
25+
class DescriptorPool : public vvl::DescriptorPool {
26+
public:
27+
std::atomic_uint32_t allocated_descriptor_sets{0};
28+
29+
DescriptorPool(ValidationStateTracker &dev, const VkDescriptorPool handle, const VkDescriptorPoolCreateInfo *pCreateInfo)
30+
: vvl::DescriptorPool(dev, handle, pCreateInfo) {}
31+
};
32+
33+
} // namespace vvl::sc

layers/vulkansc/state_tracker/sc_device_state.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/* Copyright (c) 2023-2024 The Khronos Group Inc.
2-
* Copyright (c) 2023-2024 RasterGrid Kft.
1+
/* Copyright (c) 2023-2025 The Khronos Group Inc.
2+
* Copyright (c) 2023-2025 RasterGrid Kft.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

layers/vulkansc/state_tracker/sc_pipeline_state.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/* Copyright (c) 2023-2024 The Khronos Group Inc.
2-
* Copyright (c) 2023-2024 RasterGrid Kft.
1+
/* Copyright (c) 2023-2025 The Khronos Group Inc.
2+
* Copyright (c) 2023-2025 RasterGrid Kft.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

layers/vulkansc/state_tracker/sc_pipeline_state.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/* Copyright (c) 2023-2024 The Khronos Group Inc.
2-
* Copyright (c) 2023-2024 RasterGrid Kft.
1+
/* Copyright (c) 2023-2025 The Khronos Group Inc.
2+
* Copyright (c) 2023-2025 RasterGrid Kft.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)