Vulkan: Push constants #104880

Merged
Jeroen Bakker merged 73 commits from Jeroen-Bakker/blender:vulkan-push-constants into main 2023-03-06 12:29:06 +01:00
10 changed files with 25 additions and 46 deletions
Showing only changes of commit 6225cb7c94 - Show all commits

View File

@ -217,6 +217,7 @@ set(VULKAN_SRC
vulkan/vk_buffer.hh
vulkan/vk_context.hh
vulkan/vk_command_buffer.hh
vulkan/vk_common.hh
vulkan/vk_descriptor_pools.hh
vulkan/vk_descriptor_set.hh
vulkan/vk_drawlist.hh

View File

@ -9,11 +9,8 @@
#include "gpu_backend.hh"
#ifdef __APPLE__
# include <MoltenVK/vk_mvk_moltenvk.h>
#else
# include <vulkan/vulkan.h>
#endif
#include "vk_common.hh"
#include "shaderc/shaderc.hpp"
namespace blender::gpu {

View File

@ -8,13 +8,9 @@
#pragma once
#include "gpu_context_private.hh"
#include "vk_context.hh"
#ifdef __APPLE__
# include <MoltenVK/vk_mvk_moltenvk.h>
#else
# include <vulkan/vulkan.h>
#endif
#include "vk_common.hh"
#include "vk_context.hh"
#include "vk_mem_alloc.h"

View File

@ -7,12 +7,7 @@
#pragma once
#ifdef __APPLE__
# include <MoltenVK/vk_mvk_moltenvk.h>
#else
# include <vulkan/vulkan.h>
#endif
#include "vk_common.hh"
#include "vk_pipeline.hh"
namespace blender::gpu {

View File

@ -0,0 +1,14 @@
/* SPDX-License-Identifier: GPL-2.0-or-later
* Copyright 2023 Blender Foundation. All rights reserved. */
/** \file
* \ingroup gpu
*/
#pragma once
#ifdef __APPLE__
# include <MoltenVK/vk_mvk_moltenvk.h>
#else
# include <vulkan/vulkan.h>
#endif

View File

@ -14,12 +14,6 @@
#include "vk_mem_alloc.h"
#ifdef __APPLE__
# include <MoltenVK/vk_mvk_moltenvk.h>
#else
# include <vulkan/vulkan.h>
#endif
namespace blender::gpu {
class VKContext : public Context {

View File

@ -9,12 +9,6 @@
#include "BLI_vector.hh"
#ifdef __APPLE__
# include <MoltenVK/vk_mvk_moltenvk.h>
#else
# include <vulkan/vulkan.h>
#endif
#include "vk_descriptor_set.hh"
namespace blender::gpu {

View File

@ -10,11 +10,7 @@
#include "BLI_utility_mixins.hh"
#include "BLI_vector.hh"
#ifdef __APPLE__
# include <MoltenVK/vk_mvk_moltenvk.h>
#else
# include <vulkan/vulkan.h>
#endif
#include "vk_common.hh"
namespace blender::gpu {
class VKStorageBuffer;

View File

@ -7,11 +7,7 @@
#pragma once
#ifdef __APPLE__
# include <MoltenVK/vk_mvk_moltenvk.h>
#else
# include <vulkan/vulkan.h>
#endif
#include "vk_common.hh"
namespace blender::gpu {
@ -55,7 +51,8 @@ constexpr VkAllocationCallbacks vk_allocation_callbacks_init(const char *name)
# define VK_ALLOCATION_CALLBACKS \
static constexpr const VkAllocationCallbacks vk_allocation_callbacks_ = \
vk_allocation_callbacks_init(__func__); \
static constexpr const VkAllocationCallbacks *vk_allocation_callbacks = &vk_allocation_callbacks_;
static constexpr const VkAllocationCallbacks *vk_allocation_callbacks = \
&vk_allocation_callbacks_;
#else
# define VK_ALLOCATION_CALLBACKS \
static constexpr const VkAllocationCallbacks *vk_allocation_callbacks = nullptr;

View File

@ -7,15 +7,10 @@
#pragma once
#ifdef __APPLE__
# include <MoltenVK/vk_mvk_moltenvk.h>
#else
# include <vulkan/vulkan.h>
#endif
#include "BLI_utility_mixins.hh"
#include "BLI_vector.hh"
#include "vk_common.hh"
#include "vk_descriptor_set.hh"
namespace blender::gpu {