mem type index, typo
This commit is contained in:
parent
d5b71dffc3
commit
8a90eba81f
2 changed files with 2 additions and 3 deletions
|
|
@ -199,7 +199,6 @@ public:
|
||||||
void prepareTextureTarget(vkTools::VulkanTexture *target, VkFormat format)
|
void prepareTextureTarget(vkTools::VulkanTexture *target, VkFormat format)
|
||||||
{
|
{
|
||||||
VkFormatProperties formatProperties;
|
VkFormatProperties formatProperties;
|
||||||
VkResult err;
|
|
||||||
|
|
||||||
uint32_t width = TEX_DIM;
|
uint32_t width = TEX_DIM;
|
||||||
uint32_t height = TEX_DIM;
|
uint32_t height = TEX_DIM;
|
||||||
|
|
@ -323,7 +322,7 @@ public:
|
||||||
VK_CHECK_RESULT(vkCreateImage(device, &image, nullptr, &attachment->image));
|
VK_CHECK_RESULT(vkCreateImage(device, &image, nullptr, &attachment->image));
|
||||||
vkGetImageMemoryRequirements(device, attachment->image, &memReqs);
|
vkGetImageMemoryRequirements(device, attachment->image, &memReqs);
|
||||||
memAlloc.allocationSize = memReqs.size;
|
memAlloc.allocationSize = memReqs.size;
|
||||||
getMemoryType(memReqs.memoryTypeBits, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, &memAlloc.memoryTypeIndex);
|
memAlloc.memoryTypeIndex = getMemoryType(memReqs.memoryTypeBits, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT);
|
||||||
VK_CHECK_RESULT(vkAllocateMemory(device, &memAlloc, nullptr, &attachment->mem));
|
VK_CHECK_RESULT(vkAllocateMemory(device, &memAlloc, nullptr, &attachment->mem));
|
||||||
VK_CHECK_RESULT(vkBindImageMemory(device, attachment->image, attachment->mem, 0));
|
VK_CHECK_RESULT(vkBindImageMemory(device, attachment->image, attachment->mem, 0));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -247,7 +247,7 @@ public:
|
||||||
colorImageView.image = offScreenFrameBuf.color.image;
|
colorImageView.image = offScreenFrameBuf.color.image;
|
||||||
VK_CHECK_RESULT(vkCreateImageView(device, &colorImageView, nullptr, &offScreenFrameBuf.color.view));
|
VK_CHECK_RESULT(vkCreateImageView(device, &colorImageView, nullptr, &offScreenFrameBuf.color.view));
|
||||||
|
|
||||||
// Create sampler to sample from to collor attachment
|
// Create sampler to sample from to color attachment
|
||||||
// Used to sample in the fragment shader for final rendering
|
// Used to sample in the fragment shader for final rendering
|
||||||
VkSamplerCreateInfo sampler = vkTools::initializers::samplerCreateInfo();
|
VkSamplerCreateInfo sampler = vkTools::initializers::samplerCreateInfo();
|
||||||
sampler.magFilter = VK_FILTER_LINEAR;
|
sampler.magFilter = VK_FILTER_LINEAR;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue