Trying to fix other passes
This commit is contained in:
@@ -314,7 +314,7 @@ void RenderCommand::draw(uint32 vertexCount, uint32 instanceCount, int32 firstVe
|
||||
void RenderCommand::drawIndexed(uint32 indexCount, uint32 instanceCount, int32 firstIndex, uint32 vertexOffset, uint32 firstInstance)
|
||||
{
|
||||
assert(threadId == std::this_thread::get_id());
|
||||
vkCmdDrawIndexed(handle, indexCount, instanceCount, firstIndex, vertexOffset, firstIndex);
|
||||
vkCmdDrawIndexed(handle, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance);
|
||||
}
|
||||
void RenderCommand::dispatch(uint32 groupX, uint32 groupY, uint32 groupZ)
|
||||
{
|
||||
@@ -530,4 +530,4 @@ void CommandBufferManager::submitCommands(PSemaphore signalSemaphore)
|
||||
allocatedBuffers.add(new CmdBuffer(graphics, commandPool, this));
|
||||
activeCmdBuffer = allocatedBuffers.back();
|
||||
activeCmdBuffer->begin();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,17 +4,17 @@
|
||||
#include <iostream>
|
||||
|
||||
#define VK_CHECK(f) \
|
||||
{ \
|
||||
VkResult res = (f); \
|
||||
if (res != VK_SUCCESS) \
|
||||
{ \
|
||||
if(res == VK_ERROR_DEVICE_LOST) \
|
||||
{ \
|
||||
std::this_thread::sleep_for(std::chrono::seconds(3)); \
|
||||
} \
|
||||
std::cout << "Fatal : VkResult is \"" << res << "\" in " << __FILE__ << " at line " << __LINE__ << std::endl; \
|
||||
assert(res == VK_SUCCESS); \
|
||||
} \
|
||||
{ \
|
||||
VkResult res = (f); \
|
||||
if (res != VK_SUCCESS) \
|
||||
{ \
|
||||
if(res == VK_ERROR_DEVICE_LOST) \
|
||||
{ \
|
||||
std::this_thread::sleep_for(std::chrono::seconds(3)); \
|
||||
} \
|
||||
std::cout << "Fatal : VkResult is " << res << " in " << __FILE__ << " at line " << __LINE__ << std::endl; \
|
||||
assert(res == VK_SUCCESS); \
|
||||
} \
|
||||
}
|
||||
|
||||
namespace Seele
|
||||
@@ -62,4 +62,4 @@ Gfx::SeFilter cast(const VkFilter &filter);
|
||||
VkSamplerMipmapMode cast(const Gfx::SeSamplerMipmapMode &filter);
|
||||
Gfx::SeSamplerMipmapMode cast(const VkSamplerMipmapMode &filter);
|
||||
} // namespace Vulkan
|
||||
} // namespace Seele
|
||||
} // namespace Seele
|
||||
|
||||
@@ -62,6 +62,7 @@ Window::Window(PGraphics graphics, const WindowCreateInfo &createInfo)
|
||||
GLFWwindow *handle = glfwCreateWindow(createInfo.width, createInfo.height, createInfo.title, createInfo.bFullscreen ? glfwGetPrimaryMonitor() : nullptr, nullptr);
|
||||
windowHandle = handle;
|
||||
glfwSetWindowUserPointer(handle, this);
|
||||
glfwGetWindowSize(handle, &windowState.width, &windowState.height);
|
||||
|
||||
glfwSetKeyCallback(handle, &glfwKeyCallback);
|
||||
glfwSetCursorPosCallback(handle, &glfwMouseMoveCallback);
|
||||
@@ -93,7 +94,7 @@ Window::Window(PGraphics graphics, const WindowCreateInfo &createInfo)
|
||||
std::cerr << "Device not suitable for presenting to surface " << surface << ", use a different one" << std::endl;
|
||||
}
|
||||
|
||||
recreateSwapchain(createInfo);
|
||||
recreateSwapchain(windowState);
|
||||
}
|
||||
|
||||
Window::~Window()
|
||||
@@ -364,10 +365,10 @@ void Window::choosePresentMode(const Array<VkPresentModeKHR> &modes)
|
||||
Viewport::Viewport(PGraphics graphics, PWindow owner, const ViewportCreateInfo &viewportInfo)
|
||||
: Gfx::Viewport(owner, viewportInfo), graphics(graphics)
|
||||
{
|
||||
handle.width = static_cast<float>(viewportInfo.dimensions.size.x);
|
||||
handle.height = static_cast<float>(viewportInfo.dimensions.size.y);
|
||||
handle.x = static_cast<float>(viewportInfo.dimensions.offset.x);
|
||||
handle.y = static_cast<float>(viewportInfo.dimensions.offset.y) + handle.height;
|
||||
handle.width = static_cast<float>(sizeX);
|
||||
handle.height = static_cast<float>(sizeY);
|
||||
handle.x = static_cast<float>(offsetX);
|
||||
handle.y = static_cast<float>(offsetY) + handle.height;
|
||||
handle.height = -handle.height;
|
||||
handle.minDepth = 0.f;
|
||||
handle.maxDepth = 1.f;
|
||||
@@ -392,4 +393,4 @@ void Viewport::move(uint32 newOffsetX, uint32 newOffsetY)
|
||||
offsetY = newOffsetY;
|
||||
handle.x = static_cast<float>(offsetX);
|
||||
handle.y = static_cast<float>(offsetY + sizeY);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user