blob: d8284ba02eea14d59239ede5292b42a469a0f52d [file] [log] [blame]
Jeremy Gebbenb6c18132021-03-17 17:00:20 -06001/* Copyright (c) 2015-2021 The Khronos Group Inc.
2 * Copyright (c) 2015-2021 Valve Corporation
3 * Copyright (c) 2015-2021 LunarG, Inc.
4 * Copyright (C) 2015-2021 Google Inc.
Mark Lobodzinskid42e4d22017-01-17 14:14:22 -07005 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 * Mark Lobodzinski <mark@lunarg.com>
Dave Houlton0d4ad6f2018-09-05 14:53:34 -060019 * Dave Houlton <daveh@lunarg.com>
Mark Lobodzinskid42e4d22017-01-17 14:14:22 -070020 */
21#ifndef CORE_VALIDATION_BUFFER_VALIDATION_H_
22#define CORE_VALIDATION_BUFFER_VALIDATION_H_
23
Mark Lobodzinskid42e4d22017-01-17 14:14:22 -070024#include "vulkan/vk_layer.h"
Mark Lobodzinskiab9ea3e2017-02-15 12:59:00 -070025#include <limits.h>
Mark Lobodzinskid42e4d22017-01-17 14:14:22 -070026#include <memory>
Mark Lobodzinskid42e4d22017-01-17 14:14:22 -070027#include <vector>
Mark Lobodzinski9ef5d562017-01-27 12:28:30 -070028#include <utility>
Mark Lobodzinski3c0f6362017-02-01 13:35:48 -070029#include <algorithm>
Mark Lobodzinskiab9ea3e2017-02-15 12:59:00 -070030#include <bitset>
Mark Lobodzinski3c0f6362017-02-01 13:35:48 -070031
Dave Houltond9611312018-11-19 17:03:36 -070032uint32_t FullMipChainLevels(uint32_t height, uint32_t width = 1, uint32_t depth = 1);
33uint32_t FullMipChainLevels(VkExtent3D);
34uint32_t FullMipChainLevels(VkExtent2D);
35
Jeremy Gebbenb6c18132021-03-17 17:00:20 -060036GlobalImageLayoutRangeMap *GetLayoutRangeMap(GlobalImageLayoutMap &map, const IMAGE_STATE &image_state);
Jeremy Gebben6335df62021-11-01 10:50:13 -060037const GlobalImageLayoutRangeMap *GetLayoutRangeMap(const GlobalImageLayoutMap &map, const IMAGE_STATE &image);
Mark Lobodzinskid81d1012017-02-01 09:03:06 -070038
Mark Lobodzinski64318ba2017-01-26 13:34:13 -070039#endif // CORE_VALIDATION_BUFFER_VALIDATION_H_