Skip to content

Commit

Permalink
Merge pull request #1155 from brimston3/main
Browse files Browse the repository at this point in the history
Fix build of samples dynamic rendering local read and host image copy
  • Loading branch information
SaschaWillems authored Sep 7, 2024
2 parents 7665efb + 82fe9d9 commit 6227cc2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,8 @@ void DynamicRenderingLocalRead::create_attachments()

void DynamicRenderingLocalRead::prepare_buffers()
{
buffers.ubo_vs = std::make_unique<vkb::core::Buffer>(get_device(), sizeof(shader_data_vs), VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT, VMA_MEMORY_USAGE_CPU_TO_GPU);
buffers.ssbo_lights = std::make_unique<vkb::core::Buffer>(get_device(), lights.size() * sizeof(Light), VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, VMA_MEMORY_USAGE_CPU_TO_GPU);
buffers.ubo_vs = std::make_unique<vkb::core::BufferC>(get_device(), sizeof(shader_data_vs), VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT, VMA_MEMORY_USAGE_CPU_TO_GPU);
buffers.ssbo_lights = std::make_unique<vkb::core::BufferC>(get_device(), lights.size() * sizeof(Light), VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, VMA_MEMORY_USAGE_CPU_TO_GPU);

update_uniform_buffer();
update_lights_buffer();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ class DynamicRenderingLocalRead : public ApiVulkanSample

struct
{
std::unique_ptr<vkb::core::Buffer> ubo_vs;
std::unique_ptr<vkb::core::Buffer> ssbo_lights;
std::unique_ptr<vkb::core::BufferC> ubo_vs;
std::unique_ptr<vkb::core::BufferC> ssbo_lights;
} buffers;

struct PushConstantSceneNode
Expand Down
8 changes: 4 additions & 4 deletions samples/extensions/host_image_copy/host_image_copy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,10 +429,10 @@ void HostImageCopy::prepare_pipelines()
void HostImageCopy::prepare_uniform_buffers()
{
// Vertex shader uniform buffer block
uniform_buffer_vs = std::make_unique<vkb::core::Buffer>(get_device(),
sizeof(ubo_vs),
VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT,
VMA_MEMORY_USAGE_CPU_TO_GPU);
uniform_buffer_vs = std::make_unique<vkb::core::BufferC>(get_device(),
sizeof(ubo_vs),
VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT,
VMA_MEMORY_USAGE_CPU_TO_GPU);

update_uniform_buffers();
}
Expand Down
2 changes: 1 addition & 1 deletion samples/extensions/host_image_copy/host_image_copy.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class HostImageCopy : public ApiVulkanSample
float lod_bias = 0.0f;
} ubo_vs;

std::unique_ptr<vkb::core::Buffer> uniform_buffer_vs;
std::unique_ptr<vkb::core::BufferC> uniform_buffer_vs;

VkPipeline pipeline{VK_NULL_HANDLE};
VkPipelineLayout pipeline_layout{VK_NULL_HANDLE};
Expand Down

0 comments on commit 6227cc2

Please sign in to comment.