Preparing for Writeup
This commit is contained in:
@@ -304,7 +304,7 @@ ComputeCommand::~ComputeCommand()
|
||||
{
|
||||
}
|
||||
|
||||
void ComputeCommand::begin(PCmdBuffer parent)
|
||||
void ComputeCommand::begin(PCmdBuffer)
|
||||
{
|
||||
ready = false;
|
||||
VkCommandBufferBeginInfo beginInfo =
|
||||
|
||||
@@ -117,7 +117,7 @@ DescriptorSet::~DescriptorSet()
|
||||
void DescriptorSet::updateBuffer(uint32_t binding, Gfx::PUniformBuffer uniformBuffer)
|
||||
{
|
||||
PUniformBuffer vulkanBuffer = uniformBuffer.cast<UniformBuffer>();
|
||||
UniformBuffer* cachedBuffer = reinterpret_cast<UniformBuffer*>(cachedData[binding]);
|
||||
//UniformBuffer* cachedBuffer = reinterpret_cast<UniformBuffer*>(cachedData[binding]);
|
||||
/*if(vulkanBuffer->isDataEquals(cachedBuffer))
|
||||
{
|
||||
std::cout << "uniform data equal, skip" << std::endl;
|
||||
|
||||
@@ -63,8 +63,8 @@ public:
|
||||
: setHandle(VK_NULL_HANDLE)
|
||||
, graphics(graphics)
|
||||
, owner(owner)
|
||||
, currentlyInUse(false)
|
||||
, currentlyBound(false)
|
||||
, currentlyInUse(false)
|
||||
{
|
||||
}
|
||||
virtual ~DescriptorSet();
|
||||
|
||||
@@ -432,16 +432,19 @@ void Graphics::pickPhysicalDevice()
|
||||
vkGetPhysicalDeviceFeatures(dev, &features);
|
||||
if (props.deviceType == VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU)
|
||||
{
|
||||
std::cout << "found dedicated gpu " << props.deviceName << std::endl;
|
||||
currentRating += 100;
|
||||
}
|
||||
else if (props.deviceType == VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU)
|
||||
{
|
||||
std::cout << "found integrated gpu " << props.deviceName << std::endl;
|
||||
currentRating += 10;
|
||||
}
|
||||
if (currentRating > deviceRating)
|
||||
{
|
||||
deviceRating = currentRating;
|
||||
bestDevice = dev;
|
||||
std::cout << "bestDevice: " << props.deviceName << std::endl;
|
||||
}
|
||||
}
|
||||
physicalDevice = bestDevice;
|
||||
|
||||
@@ -765,8 +765,7 @@ VkPipelineShaderStageCreateInfo init::PipelineShaderStageCreateInfo(VkShaderStag
|
||||
return info;
|
||||
}
|
||||
|
||||
#pragma warning(disable : 4100)
|
||||
VkBool32 Seele::Vulkan::debugCallback(VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objType, uint64_t obj, size_t location, int32_t code, const char *layerPrefix, const char *msg, void *userDataManager)
|
||||
VkBool32 Seele::Vulkan::debugCallback(VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT, uint64_t, size_t, int32_t, const char *layerPrefix, const char *msg, void *)
|
||||
{
|
||||
if(flags & VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT)
|
||||
{
|
||||
@@ -778,7 +777,6 @@ VkBool32 Seele::Vulkan::debugCallback(VkDebugReportFlagsEXT flags, VkDebugReport
|
||||
return VK_FALSE;
|
||||
}
|
||||
}
|
||||
#pragma warning(default : 4100)
|
||||
|
||||
VkResult Seele::Vulkan::CreateDebugReportCallbackEXT(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDebugReportCallbackEXT *pCallback)
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "VulkanGraphics.h"
|
||||
#include "VulkanDescriptorSets.h"
|
||||
#include "slang.h"
|
||||
//#include "spirv_cross/spirv_reflect.hpp"
|
||||
#include "stdlib.h"
|
||||
|
||||
using namespace slang;
|
||||
using namespace Seele;
|
||||
@@ -55,7 +55,7 @@ static SlangStage getStageFromShaderType(ShaderType type)
|
||||
void Shader::create(const ShaderCreateInfo& createInfo)
|
||||
{
|
||||
entryPointName = createInfo.entryPoint;
|
||||
static SlangSession* session = spCreateSession(NULL);
|
||||
static SlangSession* session = spCreateSession(nullptr);
|
||||
|
||||
SlangCompileRequest* request = spCreateCompileRequest(session);
|
||||
int targetIndex = spAddCodeGenTarget(request, SLANG_SPIRV);
|
||||
|
||||
@@ -162,9 +162,9 @@ void Window::advanceBackBuffer()
|
||||
imageAcquiredSemaphore = imageAcquired[semaphoreIndex];
|
||||
currentImageIndex = imageIndex;
|
||||
|
||||
PCmdBuffer cmdBuffer = graphics->getGraphicsCommands()->getCommands();
|
||||
backBufferImages[currentImageIndex]->changeLayout(Gfx::SE_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
|
||||
VkClearColorValue clearColor = {0.0f, 0.0f, 0.0f, 0.0f};
|
||||
PCmdBuffer cmdBuffer = graphics->getGraphicsCommands()->getCommands();
|
||||
VkImageSubresourceRange range = init::ImageSubresourceRange(VK_IMAGE_ASPECT_COLOR_BIT);
|
||||
vkCmdClearColorImage(
|
||||
cmdBuffer->getHandle(),
|
||||
|
||||
Reference in New Issue
Block a user