Skip to content

Commit

Permalink
Remove unused vulkan functions
Browse files Browse the repository at this point in the history
  • Loading branch information
sergcpp committed Nov 8, 2024
1 parent d8872d8 commit 8b241bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 41 deletions.
20 changes: 1 addition & 19 deletions internal/Vk/Api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,6 @@ bool Ray::Vk::Api::Load(ILog *log) {

LOAD_VK_FUN(vkEnumerateDeviceExtensionProperties)

LOAD_VK_FUN(vkGetPhysicalDeviceSurfaceSupportKHR)
LOAD_VK_FUN(vkGetPhysicalDeviceSurfaceCapabilitiesKHR)
LOAD_VK_FUN(vkGetPhysicalDeviceSurfaceFormatsKHR)
LOAD_VK_FUN(vkGetPhysicalDeviceSurfacePresentModesKHR)

LOAD_VK_FUN(vkGetDeviceQueue)
LOAD_VK_FUN(vkCreateCommandPool)
LOAD_VK_FUN(vkDestroyCommandPool)
Expand Down Expand Up @@ -140,8 +135,7 @@ bool Ray::Vk::Api::Load(ILog *log) {

LOAD_VK_FUN(vkMapMemory)
LOAD_VK_FUN(vkUnmapMemory)
LOAD_VK_FUN(vkFlushMappedMemoryRanges)
LOAD_VK_FUN(vkInvalidateMappedMemoryRanges)

LOAD_VK_FUN(vkCreateShaderModule)
LOAD_VK_FUN(vkDestroyShaderModule)
LOAD_VK_FUN(vkCreateDescriptorSetLayout)
Expand Down Expand Up @@ -170,16 +164,10 @@ bool Ray::Vk::Api::Load(ILog *log) {
LOAD_VK_FUN(vkDestroyQueryPool)
LOAD_VK_FUN(vkGetQueryPoolResults)

LOAD_VK_FUN(vkCmdBeginRenderPass)
LOAD_VK_FUN(vkCmdBindPipeline)
LOAD_VK_FUN(vkCmdSetViewport)
LOAD_VK_FUN(vkCmdSetScissor)
LOAD_VK_FUN(vkCmdBindDescriptorSets)
LOAD_VK_FUN(vkCmdBindVertexBuffers)
LOAD_VK_FUN(vkCmdBindIndexBuffer)
LOAD_VK_FUN(vkCmdDraw)
LOAD_VK_FUN(vkCmdDrawIndexed)
LOAD_VK_FUN(vkCmdEndRenderPass)
LOAD_VK_FUN(vkCmdCopyBufferToImage)
LOAD_VK_FUN(vkCmdCopyImageToBuffer)
LOAD_VK_FUN(vkCmdCopyBuffer)
Expand All @@ -188,7 +176,6 @@ bool Ray::Vk::Api::Load(ILog *log) {
LOAD_VK_FUN(vkCmdPushConstants)
LOAD_VK_FUN(vkCmdBlitImage)
LOAD_VK_FUN(vkCmdClearColorImage)
LOAD_VK_FUN(vkCmdClearAttachments)
LOAD_VK_FUN(vkCmdCopyImage)
LOAD_VK_FUN(vkCmdDispatch)
LOAD_VK_FUN(vkCmdDispatchIndirect)
Expand Down Expand Up @@ -221,8 +208,6 @@ bool Ray::Vk::Api::LoadExtensions(VkInstance instance, ILog *log) {
LOAD_INSTANCE_FUN(vkCmdEndDebugUtilsLabelEXT)
LOAD_INSTANCE_FUN(vkSetDebugUtilsObjectNameEXT)

LOAD_INSTANCE_FUN(vkCmdSetDepthBias)

LOAD_INSTANCE_FUN(vkCmdBuildAccelerationStructuresKHR)
LOAD_INSTANCE_FUN(vkCmdWriteAccelerationStructuresPropertiesKHR)
LOAD_INSTANCE_FUN(vkCmdCopyAccelerationStructureKHR)
Expand All @@ -242,9 +227,6 @@ bool Ray::Vk::Api::LoadExtensions(VkInstance instance, ILog *log) {
LOAD_OPTIONAL_INSTANCE_FUN(vkCreateRayTracingPipelinesKHR)
LOAD_OPTIONAL_INSTANCE_FUN(vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR)

LOAD_OPTIONAL_INSTANCE_FUN(vkCmdBeginRenderingKHR)
LOAD_OPTIONAL_INSTANCE_FUN(vkCmdEndRenderingKHR)

#undef LOAD_INSTANCE_FUN
#undef LOAD_OPTIONAL_INSTANCE_FUN

Expand Down
29 changes: 7 additions & 22 deletions internal/Vk/Api.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
#pragma once

#define VK_NO_PROTOTYPES
#define VK_ENABLE_BETA_EXTENSIONS
#define VK_ENABLE_BETA_EXTENSIONS // needed for VK_KHR_portability_subset on mac
#ifndef NOMINMAX
#define NOMINMAX
#endif
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include "../../third-party/vulkan/vulkan.h"
#undef far
#undef near
#undef max
#undef min
#undef None
#undef Success

Expand Down Expand Up @@ -39,11 +43,6 @@ struct Api {

PFN_vkEnumerateDeviceExtensionProperties vkEnumerateDeviceExtensionProperties;

PFN_vkGetPhysicalDeviceSurfaceSupportKHR vkGetPhysicalDeviceSurfaceSupportKHR;
PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR vkGetPhysicalDeviceSurfaceCapabilitiesKHR;
PFN_vkGetPhysicalDeviceSurfaceFormatsKHR vkGetPhysicalDeviceSurfaceFormatsKHR;
PFN_vkGetPhysicalDeviceSurfacePresentModesKHR vkGetPhysicalDeviceSurfacePresentModesKHR;

PFN_vkGetDeviceQueue vkGetDeviceQueue;
PFN_vkCreateCommandPool vkCreateCommandPool;
PFN_vkDestroyCommandPool vkDestroyCommandPool;
Expand Down Expand Up @@ -96,8 +95,6 @@ struct Api {

PFN_vkMapMemory vkMapMemory;
PFN_vkUnmapMemory vkUnmapMemory;
PFN_vkFlushMappedMemoryRanges vkFlushMappedMemoryRanges;
PFN_vkInvalidateMappedMemoryRanges vkInvalidateMappedMemoryRanges;

PFN_vkCreateShaderModule vkCreateShaderModule;
PFN_vkDestroyShaderModule vkDestroyShaderModule;
Expand Down Expand Up @@ -130,16 +127,10 @@ struct Api {
PFN_vkDestroyQueryPool vkDestroyQueryPool;
PFN_vkGetQueryPoolResults vkGetQueryPoolResults;

PFN_vkCmdBeginRenderPass vkCmdBeginRenderPass;
PFN_vkCmdBindPipeline vkCmdBindPipeline;
PFN_vkCmdSetViewport vkCmdSetViewport;
PFN_vkCmdSetScissor vkCmdSetScissor;
PFN_vkCmdBindDescriptorSets vkCmdBindDescriptorSets;
PFN_vkCmdBindVertexBuffers vkCmdBindVertexBuffers;
PFN_vkCmdBindIndexBuffer vkCmdBindIndexBuffer;
PFN_vkCmdDraw vkCmdDraw;
PFN_vkCmdDrawIndexed vkCmdDrawIndexed;
PFN_vkCmdEndRenderPass vkCmdEndRenderPass;
PFN_vkCmdCopyBufferToImage vkCmdCopyBufferToImage;
PFN_vkCmdCopyImageToBuffer vkCmdCopyImageToBuffer;
PFN_vkCmdCopyBuffer vkCmdCopyBuffer;
Expand All @@ -148,7 +139,6 @@ struct Api {
PFN_vkCmdPushConstants vkCmdPushConstants;
PFN_vkCmdBlitImage vkCmdBlitImage;
PFN_vkCmdClearColorImage vkCmdClearColorImage;
PFN_vkCmdClearAttachments vkCmdClearAttachments;
PFN_vkCmdCopyImage vkCmdCopyImage;
PFN_vkCmdDispatch vkCmdDispatch;
PFN_vkCmdDispatchIndirect vkCmdDispatchIndirect;
Expand All @@ -168,8 +158,6 @@ struct Api {
PFN_vkCmdEndDebugUtilsLabelEXT vkCmdEndDebugUtilsLabelEXT;
PFN_vkSetDebugUtilsObjectNameEXT vkSetDebugUtilsObjectNameEXT;

PFN_vkCmdSetDepthBias vkCmdSetDepthBias;

PFN_vkCmdBuildAccelerationStructuresKHR vkCmdBuildAccelerationStructuresKHR;
PFN_vkCmdWriteAccelerationStructuresPropertiesKHR vkCmdWriteAccelerationStructuresPropertiesKHR;
PFN_vkCmdCopyAccelerationStructureKHR vkCmdCopyAccelerationStructureKHR;
Expand All @@ -189,9 +177,6 @@ struct Api {

PFN_vkCreateRayTracingPipelinesKHR vkCreateRayTracingPipelinesKHR;

PFN_vkCmdBeginRenderingKHR vkCmdBeginRenderingKHR;
PFN_vkCmdEndRenderingKHR vkCmdEndRenderingKHR;

bool Load(ILog *log);
bool LoadExtensions(VkInstance instance, ILog *log);
};
Expand Down

0 comments on commit 8b241bf

Please sign in to comment.