aboutsummaryrefslogtreecommitdiff
path: root/src/vulkan/engine_vulkan.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/vulkan/engine_vulkan.cc')
-rw-r--r--src/vulkan/engine_vulkan.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/vulkan/engine_vulkan.cc b/src/vulkan/engine_vulkan.cc
index 33eb9d5..268a6fe 100644
--- a/src/vulkan/engine_vulkan.cc
+++ b/src/vulkan/engine_vulkan.cc
@@ -148,18 +148,17 @@ Result EngineVulkan::CreatePipeline(amber::Pipeline* pipeline) {
for (const auto& colour_info : pipeline->GetColorAttachments()) {
auto& fmt = colour_info.buffer->AsFormatBuffer()->GetFormat();
- if (!device_->IsFormatSupportedByPhysicalDevice(
- fmt, colour_info.buffer->GetBufferType())) {
+ if (!device_->IsFormatSupportedByPhysicalDevice(fmt, colour_info.buffer))
return Result("Vulkan color attachment format is not supported");
- }
}
Format depth_fmt;
if (pipeline->GetDepthBuffer().buffer) {
const auto& depth_info = pipeline->GetDepthBuffer();
+
depth_fmt = depth_info.buffer->AsFormatBuffer()->GetFormat();
- if (!device_->IsFormatSupportedByPhysicalDevice(
- depth_fmt, depth_info.buffer->GetBufferType())) {
+ if (!device_->IsFormatSupportedByPhysicalDevice(depth_fmt,
+ depth_info.buffer)) {
return Result("Vulkan depth attachment format is not supported");
}
}
@@ -195,8 +194,7 @@ Result EngineVulkan::CreatePipeline(amber::Pipeline* pipeline) {
auto& fmt = vtex_info.buffer->IsFormatBuffer()
? vtex_info.buffer->AsFormatBuffer()->GetFormat()
: Format();
- if (!device_->IsFormatSupportedByPhysicalDevice(
- fmt, vtex_info.buffer->GetBufferType()))
+ if (!device_->IsFormatSupportedByPhysicalDevice(fmt, vtex_info.buffer))
return Result("Vulkan vertex buffer format is not supported");
if (!info.vertex_buffer)