Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/vsg/vk/Descriptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ namespace vsg
};

/// transfer Data to graphics memory, returning ImageData configuration.
extern VSG_DECLSPEC vsg::ImageData transferImageData(Device* device, CommandPool* commandPool, VkQueue graphicsQueue, const Data* data);
extern VSG_DECLSPEC vsg::ImageData transferImageData(Device* device, CommandPool* commandPool, VkQueue graphicsQueue, const Data* data, Sampler* sampler = nullptr);

using ImageDataList = std::vector<ImageData>;

Expand Down
4 changes: 2 additions & 2 deletions src/vsg/vk/Descriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI

using namespace vsg;

ImageData vsg::transferImageData(Device* device, CommandPool* commandPool, VkQueue graphicsQueue, const Data* data)
ImageData vsg::transferImageData(Device* device, CommandPool* commandPool, VkQueue graphicsQueue, const Data* data, Sampler* sampler)
{
if (!data)
{
Expand Down Expand Up @@ -107,7 +107,7 @@ ImageData vsg::transferImageData(Device* device, CommandPool* commandPool, VkQue
imageStagingBuffer = 0;
imageStagingMemory = 0;

ref_ptr<Sampler> textureSampler = Sampler::create(device);
ref_ptr<Sampler> textureSampler = sampler != nullptr ? Sampler::Result(sampler) : Sampler::create(device);
ref_ptr<ImageView> textureImageView = ImageView::create(device, textureImage, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_ASPECT_COLOR_BIT);

return ImageData(textureSampler, textureImageView, VK_IMAGE_LAYOUT_UNDEFINED);
Expand Down