Fixing warnings
This commit is contained in:
@@ -82,7 +82,11 @@ if(WIN32)
|
||||
${SLANG_ROOT}/lib/slang.lib
|
||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
||||
elseif(APPLE)
|
||||
|
||||
set(SLANG_ROOT ${EXTERNAL_ROOT}/vcpkg/packages/shader-slang_arm64-osx/)
|
||||
set_target_properties(shader-slang PROPERTIES IMPORTED_LOCATION ${SLANG_ROOT}/bin/libslang.dylib)
|
||||
install(FILES
|
||||
${SLANG_ROOT}/bin/libslang.dylib
|
||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
endif()
|
||||
target_include_directories(shader-slang INTERFACE
|
||||
$<BUILD_INTERFACE:${SLANG_ROOT}/include/>
|
||||
|
||||
@@ -16,8 +16,6 @@ DepthPrepass::DepthPrepass(Gfx::PGraphics graphics, PScene scene)
|
||||
: RenderPass(graphics, scene)
|
||||
, descriptorSets(3)
|
||||
{
|
||||
UniformBufferCreateInfo uniformInitializer;
|
||||
|
||||
depthPrepassLayout = graphics->createPipelineLayout();
|
||||
depthPrepassLayout->addDescriptorLayout(INDEX_VIEW_PARAMS, viewParamsLayout);
|
||||
if (graphics->supportMeshShading())
|
||||
@@ -174,6 +172,6 @@ void DepthPrepass::createRenderPass()
|
||||
renderPass = graphics->createRenderPass(std::move(layout), viewport);
|
||||
}
|
||||
|
||||
void DepthPrepass::modifyRenderPassMacros(Map<const char*, const char*>& defines)
|
||||
void DepthPrepass::modifyRenderPassMacros(Map<const char*, const char*>&)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
@@ -58,7 +58,10 @@ public:
|
||||
{
|
||||
return allocatedMemory;
|
||||
}
|
||||
|
||||
constexpr VkMemoryPropertyFlags getProperties() const
|
||||
{
|
||||
return properties;
|
||||
}
|
||||
constexpr void* map()
|
||||
{
|
||||
if (!canMap)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
@@ -33,7 +33,6 @@ public:
|
||||
return subpassContents;
|
||||
}
|
||||
private:
|
||||
uint32 framebufferHash;
|
||||
PGraphics graphics;
|
||||
VkRenderPass renderPass;
|
||||
Array<VkClearValue> clearValues;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -28,7 +28,7 @@ void KeyboardInput::update(Component::KeyboardInput& input)
|
||||
lastMouseY = mouseY;
|
||||
}
|
||||
|
||||
void KeyboardInput::keyCallback(KeyCode code, InputAction action, KeyModifier modifier)
|
||||
void KeyboardInput::keyCallback(KeyCode code, InputAction action, KeyModifier)
|
||||
{
|
||||
keys[code] = action != InputAction::RELEASE;
|
||||
}
|
||||
@@ -39,7 +39,7 @@ void KeyboardInput::mouseCallback(double x, double y)
|
||||
mouseY = y;
|
||||
}
|
||||
|
||||
void KeyboardInput::mouseButtonCallback(MouseButton button, InputAction action, KeyModifier modifier)
|
||||
void KeyboardInput::mouseButtonCallback(MouseButton button, InputAction action, KeyModifier)
|
||||
{
|
||||
if (button == MouseButton::MOUSE_BUTTON_1)
|
||||
{
|
||||
|
||||
@@ -74,7 +74,7 @@ void GameView::render()
|
||||
renderGraph.render(cam);
|
||||
}
|
||||
|
||||
void GameView::applyArea(URect rect)
|
||||
void GameView::applyArea(URect)
|
||||
{
|
||||
renderGraph.updateViewport(viewport);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user