Vulkan: Allocate buffer space on the right frame.

This was causing crashes if the frame wasn't 0.
This commit is contained in:
Unknown W. Brackets 2016-10-09 10:56:48 -07:00
parent 363ede5e99
commit 31e46f0931

View File

@ -288,7 +288,7 @@ void DrawEngineVulkan::BeginFrame() {
VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_SAMPLED_BIT);
uint32_t bindOffset;
VkBuffer bindBuf;
uint32_t *data = (uint32_t *)frame_[0].pushUBO->Push(w * h * 4, &bindOffset, &bindBuf);
uint32_t *data = (uint32_t *)frame->pushUBO->Push(w * h * 4, &bindOffset, &bindBuf);
for (int y = 0; y < h; y++) {
for (int x = 0; x < w; x++) {
// data[y*w + x] = ((x ^ y) & 1) ? 0xFF808080 : 0xFF000000; // gray/black checkerboard