Now shipping with premake to enable direct slang builds
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
rm -rf bin/Debug
|
||||
mkdir bin/Debug
|
||||
cd bin/Debug
|
||||
cmake ../.. -DCMAKE_BUILD_TYPE=Debug
|
||||
rm -rf bin/Debug/x64
|
||||
mkdir bin/Debug/x64
|
||||
cd bin/Debug/x64
|
||||
cmake ../../.. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PLATFORM=x64
|
||||
make
|
||||
|
||||
@@ -5,7 +5,7 @@ set_property(DIRECTORY PROPERTY EP_BASE external)
|
||||
set(DEPENDENCIES)
|
||||
set(EXTRA_CMAKE_ARGS)
|
||||
set(DEPENDENT_BINARIES "")
|
||||
#execute_process(COMMAND git submodule update --init --recursive -- ${CMAKE_SOURCE_DIR})
|
||||
execute_process(COMMAND git submodule update --init --recursive -- ${CMAKE_SOURCE_DIR})
|
||||
|
||||
#-------------BOOST----------------
|
||||
list(APPEND DEPENDENCIES boost)
|
||||
@@ -56,6 +56,7 @@ list(APPEND EXTRA_CMAKE_ARGS
|
||||
#
|
||||
#--------------SLang------------------------------
|
||||
list(APPEND DEPENDENCIES slang)
|
||||
string(TOLOWER ${CMAKE_BUILD_TYPE}_${CMAKE_PLATFORM} SLANG_CONFIG)
|
||||
if(WIN32)
|
||||
ExternalProject_Add(slang
|
||||
SOURCE_DIR ${SLANG_ROOT}
|
||||
@@ -72,14 +73,17 @@ elseif(UNIX)
|
||||
ExternalProject_Add(slang
|
||||
SOURCE_DIR ${SLANG_ROOT}
|
||||
BINARY_DIR ${CMAKE_BINARY_DIR}/lib
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND premake5 config=${CMAKE_BUILD_TYPE}_${CMAKE_PLATFORM}
|
||||
CONFIGURE_COMMAND ${CMAKE_SOURCE_DIR}/premake5 --file=${CMAKE_SOURCE_DIR}/external/slang/premake5.lua gmake2 --build-location=build.linux
|
||||
BUILD_COMMAND make -C ${CMAKE_SOURCE_DIR}/external/slang/build.linux config=${SLANG_CONFIG}
|
||||
INSTALL_COMMAND "")
|
||||
|
||||
string(TOLOWER bin/linux-${CMAKE_PLATFORM}/${CMAKE_BUILD_TYPE}/libslang.so SLANG_BINARY)
|
||||
set(SLANG_LIB_PATH)
|
||||
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
list(APPEND EXTRA_CMAKE_ARGS
|
||||
-DSLANG_INCLUDE_DIRS=${EXTERNAL_ROOT}
|
||||
-DSLANG_LIBRARY=${SLANG_LIB_PATH})
|
||||
|
||||
@@ -2,9 +2,9 @@ target_sources(SeeleEngine
|
||||
PRIVATE
|
||||
VulkanAllocator.h
|
||||
VulkanAllocator.cpp
|
||||
VulkanBuffer.cpp
|
||||
VulkanCommandBuffer.h
|
||||
VulkanCommandBuffer.cpp
|
||||
VulkanBuffer.cpp
|
||||
VulkanFramebuffer.h
|
||||
VulkanFramebuffer.cpp
|
||||
VulkanGraphics.h
|
||||
@@ -19,4 +19,4 @@ target_sources(SeeleEngine
|
||||
VulkanRenderPass.h
|
||||
VulkanRenderPass.cpp
|
||||
VulkanQueue.h
|
||||
VulkanQueue.cpp)
|
||||
VulkanQueue.cpp)
|
||||
|
||||
@@ -3,3 +3,26 @@
|
||||
|
||||
using namespace Seele;
|
||||
using namespace Seele::Vulkan;
|
||||
|
||||
QueueOwnedResource::QueueOwnedResource(WGraphics graphics, QueueType startQueueType)
|
||||
: graphics(graphics)
|
||||
, currentOwner(startQueueType)
|
||||
{
|
||||
}
|
||||
|
||||
QueueOwnedResource::~QueueOwnedResource()
|
||||
{
|
||||
}
|
||||
|
||||
Buffer::Buffer(WGraphics graphics, uint32 size, VkBufferUsageFlags usage, QueueType queueType)
|
||||
: QueueOwnedResource(graphics, queueType)
|
||||
{
|
||||
}
|
||||
|
||||
Buffer::~Buffer()
|
||||
{
|
||||
}
|
||||
|
||||
void Buffer::executeOwnershipBarrier(QueueType newOwner)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ DEFINE_REF(QueueOwnedResource);
|
||||
class Buffer : public QueueOwnedResource
|
||||
{
|
||||
public:
|
||||
Buffer(WGraphics graphics, uint32 size, VkBufferUsageFlags usage);
|
||||
Buffer(WGraphics graphics, uint32 size, VkBufferUsageFlags usage, QueueType queueType = QueueType::GRAPHICS);
|
||||
virtual ~Buffer();
|
||||
|
||||
private:
|
||||
@@ -240,4 +240,4 @@ private:
|
||||
};
|
||||
DECLARE_REF(Viewport);
|
||||
} // namespace Vulkan
|
||||
} // namespace Seele
|
||||
} // namespace Seele
|
||||
|
||||
Reference in New Issue
Block a user