diff --git a/src/vht/GraphicsPipeline.cppm b/src/vht/GraphicsPipeline.cppm
index f6a8481..c8e8059 100644
--- a/src/vht/GraphicsPipeline.cppm
+++ b/src/vht/GraphicsPipeline.cppm
@@ -6,7 +6,9 @@ import vulkan_hpp;
 import DataLoader;
 import Tools;
 import Device;
-import RenderPass;
+// import RenderPass;
+import Swapchain;
+import DepthImage;
 
 export namespace vht {
 
@@ -26,14 +28,21 @@ export namespace vht {
      */
     class GraphicsPipeline {
         std::shared_ptr<vht::Device> m_device;
-        std::shared_ptr<vht::RenderPass> m_render_pass;
+        // std::shared_ptr<vht::RenderPass> m_render_pass;
+        std::shared_ptr<vht::Swapchain> m_swapchain;
+        std::shared_ptr<vht::DepthImage> m_depth_image;
         std::vector<vk::raii::DescriptorSetLayout> m_descriptor_set_layouts;
         vk::raii::PipelineLayout m_pipeline_layout{ nullptr };
         vk::raii::Pipeline m_pipeline{ nullptr };
     public:
-        explicit GraphicsPipeline(std::shared_ptr<vht::Device> device, std::shared_ptr<vht::RenderPass> render_pass)
-        :   m_device(std::move(device)),
-            m_render_pass(std::move(render_pass)) {
+        explicit GraphicsPipeline(
+            std::shared_ptr<vht::Device> device,
+            // std::shared_ptr<vht::RenderPass> render_pass 修改成员变量
+            std::shared_ptr<vht::Swapchain> swapchain,
+            std::shared_ptr<vht::DepthImage> depth_image
+        ):  m_device(std::move(device)),
+            m_swapchain(std::move(swapchain)),
+            m_depth_image(std::move(depth_image)) {
             init();
         }
 
@@ -145,23 +154,31 @@ export namespace vht {
             layout_create_info.setSetLayouts( set_layouts );
             m_pipeline_layout = m_device->device().createPipelineLayout( layout_create_info );
 
-            vk::GraphicsPipelineCreateInfo create_info;
-            create_info.layout = m_pipeline_layout;
-
-            create_info.setStages( shader_stages );
-            create_info.pVertexInputState =  &vertex_input;
-            create_info.pInputAssemblyState = &input_assembly;
-            create_info.pDynamicState = &dynamic_state;
-            create_info.pViewportState = &viewport_state;
-            create_info.pDepthStencilState = &depth_stencil;
-            create_info.pRasterizationState = &rasterizer;
-            create_info.pMultisampleState = &multisampling;
-            create_info.pColorBlendState = &color_blend;
-
-            create_info.renderPass = m_render_pass->render_pass();
-            create_info.subpass = 0;
-
-            m_pipeline = m_device->device().createGraphicsPipeline( nullptr, create_info );
+            vk::StructureChain<
+                vk::GraphicsPipelineCreateInfo,
+                vk::PipelineRenderingCreateInfo
+            > create_info;
+
+            create_info.get()
+                .setLayout( m_pipeline_layout )
+                .setStages( shader_stages )
+                .setPDynamicState( &dynamic_state )
+                .setPVertexInputState( &vertex_input )
+                .setPInputAssemblyState( &input_assembly )
+                .setPViewportState( &viewport_state )
+                .setPDepthStencilState( &depth_stencil )
+                .setPRasterizationState( &rasterizer )
+                .setPMultisampleState( &multisampling )
+                .setPColorBlendState( &color_blend );
+
+            vk::Format color_format = m_swapchain->format();
+            vk::Format depth_format = m_depth_image->format();
+            create_info.get<vk::PipelineRenderingCreateInfo>()
+                .setColorAttachmentFormats( color_format )
+                .setDepthAttachmentFormat( depth_format );
+
+
+            m_pipeline = m_device->device().createGraphicsPipeline( nullptr, create_info.get() );
         }
     };
 }
