From c8e299ca58c6cdb3c1a5a53e040b1e40478fdd16 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 3 Apr 2022 12:25:04 +0900 Subject: [PATCH] [vulkan] Use a template for the deferred attachment images It's certainly much easier to read and see what's different between the attachment. --- libs/video/renderer/vulkan/deferred.plist | 104 +++++----------------- 1 file changed, 21 insertions(+), 83 deletions(-) diff --git a/libs/video/renderer/vulkan/deferred.plist b/libs/video/renderer/vulkan/deferred.plist index e70a1bc27..74c3e7743 100644 --- a/libs/video/renderer/vulkan/deferred.plist +++ b/libs/video/renderer/vulkan/deferred.plist @@ -1,109 +1,47 @@ { + flat_color_image_template = { + imageType = `2d; + samples = 1; + extent = { + width = $output.extent.width; + height = $output.extent.height; + depth = 1; + }; + mipLevels = 1; + arrayLayers = 1; + tiling = optimal; + usage = color_attachment|input_attachment|transient_attachment; + initialLayout = undefined; + }; images = { depth = { - imageType = `2d; + @inherit = $properties.flat_color_image_template; format = x8_d24_unorm_pack32; - samples = 1; - extent = { - width = $output.extent.width; - height = $output.extent.height; - depth = 1; - }; - mipLevels = 1; - arrayLayers = 1; - tiling = optimal; usage = depth_stencil_attachment|input_attachment|transient_attachment; - initialLayout = undefined; }; color = { - imageType = `2d; + @inherit = $properties.flat_color_image_template; format = r8g8b8a8_unorm; - samples = 1; - extent = { - width = $output.extent.width; - height = $output.extent.height; - depth = 1; - }; - mipLevels = 1; - arrayLayers = 1; - tiling = optimal; - usage = color_attachment|input_attachment|transient_attachment; - initialLayout = undefined; }; emission = { - imageType = `2d; + @inherit = $properties.flat_color_image_template; format = r16g16b16a16_sfloat; - samples = 1; - extent = { - width = $output.extent.width; - height = $output.extent.height; - depth = 1; - }; - mipLevels = 1; - arrayLayers = 1; - tiling = optimal; - usage = color_attachment|input_attachment|transient_attachment; - initialLayout = undefined; }; normal = { - imageType = `2d; + @inherit = $properties.flat_color_image_template; format = r16g16b16a16_sfloat; - samples = 1; - extent = { - width = $output.extent.width; - height = $output.extent.height; - depth = 1; - }; - mipLevels = 1; - arrayLayers = 1; - tiling = optimal; - usage = color_attachment|input_attachment|transient_attachment; - initialLayout = undefined; }; position = { - imageType = `2d; + @inherit = $properties.flat_color_image_template; format = r32g32b32a32_sfloat; - samples = 1; - extent = { - width = $output.extent.width; - height = $output.extent.height; - depth = 1; - }; - mipLevels = 1; - arrayLayers = 1; - tiling = optimal; - usage = color_attachment|input_attachment|transient_attachment; - initialLayout = undefined; }; opaque = { - imageType = `2d; + @inherit = $properties.flat_color_image_template; format = r16g16b16a16_sfloat; - samples = 1; - extent = { - width = $output.extent.width; - height = $output.extent.height; - depth = 1; - }; - mipLevels = 1; - arrayLayers = 1; - tiling = optimal; - usage = color_attachment|input_attachment|transient_attachment; - initialLayout = undefined; }; translucent = { - imageType = `2d; + @inherit = $properties.flat_color_image_template; format = r8g8b8a8_unorm; - samples = 1; - extent = { - width = $output.extent.width; - height = $output.extent.height; - depth = 1; - }; - mipLevels = 1; - arrayLayers = 1; - tiling = optimal; - usage = color_attachment|input_attachment|transient_attachment; - initialLayout = undefined; }; }; flat_color_view_template = {