Fixing warnings

This commit is contained in:
Dynamitos
2024-01-16 21:11:57 +01:00
parent 861c146b46
commit 876b3c98d5
11 changed files with 31 additions and 24 deletions
+1 -1
View File
@@ -365,7 +365,7 @@ OStagingBuffer StagingManager::create(uint64 size, Gfx::QueueType owner)
return stagingBuffer;
}
void StagingManager::release(OStagingBuffer buffer)
void StagingManager::release(OStagingBuffer)
{
//freeBuffers.add(std::move(buffer));
}
+4 -1
View File
@@ -58,7 +58,10 @@ public:
{
return allocatedMemory;
}
constexpr VkMemoryPropertyFlags getProperties() const
{
return properties;
}
constexpr void* map()
{
if (!canMap)
+1 -1
View File
@@ -3,7 +3,7 @@
using namespace Seele::Vulkan;
VkBool32 Seele::Vulkan::debugCallback(VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT, uint64_t, size_t, int32_t, const char *layerPrefix, const char *msg, void *)
VkBool32 Seele::Vulkan::debugCallback(VkDebugReportFlagsEXT, VkDebugReportObjectTypeEXT, uint64_t, size_t, int32_t, const char *layerPrefix, const char *msg, void *)
{
std::cerr << layerPrefix << ": " << msg << std::endl;
return VK_FALSE;
+4 -4
View File
@@ -135,8 +135,8 @@ PGraphicsPipeline PipelineCache::createPipeline(Gfx::LegacyPipelineCreateInfo gf
.depthWriteEnable = gfxInfo.depthStencilState.depthWriteEnable,
.depthCompareOp = cast(gfxInfo.depthStencilState.depthCompareOp),
.depthBoundsTestEnable = gfxInfo.depthStencilState.depthBoundsTestEnable,
.front = (VkStencilOp)gfxInfo.depthStencilState.front,
.back = (VkStencilOp)gfxInfo.depthStencilState.back,
.front = {(VkStencilOp)gfxInfo.depthStencilState.front},
.back = {(VkStencilOp)gfxInfo.depthStencilState.back},
.minDepthBounds = gfxInfo.depthStencilState.minDepthBounds,
.maxDepthBounds = gfxInfo.depthStencilState.maxDepthBounds,
};
@@ -307,8 +307,8 @@ PGraphicsPipeline PipelineCache::createPipeline(Gfx::MeshPipelineCreateInfo gfxI
.depthWriteEnable = gfxInfo.depthStencilState.depthWriteEnable,
.depthCompareOp = cast(gfxInfo.depthStencilState.depthCompareOp),
.depthBoundsTestEnable = gfxInfo.depthStencilState.depthBoundsTestEnable,
.front = (VkStencilOp)gfxInfo.depthStencilState.front,
.back = (VkStencilOp)gfxInfo.depthStencilState.back,
.front = {(VkStencilOp)gfxInfo.depthStencilState.front},
.back = {(VkStencilOp)gfxInfo.depthStencilState.back},
.minDepthBounds = gfxInfo.depthStencilState.minDepthBounds,
.maxDepthBounds = gfxInfo.depthStencilState.maxDepthBounds,
};
-1
View File
@@ -33,7 +33,6 @@ public:
return subpassContents;
}
private:
uint32 framebufferHash;
PGraphics graphics;
VkRenderPass renderPass;
Array<VkClearValue> clearValues;
+2 -7
View File
@@ -3,7 +3,7 @@
#include "slang.h"
#include "slang-com-ptr.h"
#include "stdlib.h"
#include <format>
#include <fmt/core.h>
using namespace Seele;
using namespace Seele::Vulkan;
@@ -28,7 +28,7 @@ uint32 Seele::Vulkan::Shader::getShaderHash() const
return hash;
}
#define CHECK_RESULT(x) {SlangResult r = x; if(r != 0) {throw std::runtime_error(std::format("Error: {0}", r));}}
#define CHECK_RESULT(x) {SlangResult r = x; if(r != 0) {throw std::runtime_error(fmt::format("Error: {0}", r));}}
#define CHECK_DIAGNOSTICS() {if(diagnostics) {std::cout << (const char*)diagnostics->getBufferPointer() << std::endl; assert(false);}}
void Shader::create(const ShaderCreateInfo& createInfo)
@@ -115,11 +115,6 @@ void Shader::create(const ShaderCreateInfo& createInfo)
);
CHECK_DIAGNOSTICS();
for (uint32 i = 0; i < reflection->getParameterCount(); ++i)
{
slang::VariableLayoutReflection* varLayout = reflection->getParameterByIndex(i);
//std::cout << varLayout->getName() << " in space " << varLayout->getBindingSpace() << " index " << varLayout->getBindingIndex() << std::endl;
}
VkShaderModuleCreateInfo moduleInfo =
{
.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO,
+10 -2
View File
@@ -17,15 +17,23 @@ public:
void create(const ShaderCreateInfo& createInfo);
VkShaderModule getModuleHandle() const
constexpr VkShaderModule getModuleHandle() const
{
return module;
}
const char* getEntryPointName() const
constexpr const char* getEntryPointName() const
{
//SLang renames all entry points to main, so we dont need that
return "main";//entryPointName.c_str();
}
constexpr ShaderType getShaderType() const
{
return type;
}
constexpr VkShaderStageFlags getStage() const
{
return stage;
}
//Map<uint32, PDescriptorLayout> getDescriptorLayouts();
uint32 getShaderHash() const;
private: