feat(d3d12): 实现交换链与渲染表面管理
- 新增 d3d12_surface 类,管理交换链和渲染目标 - 实现三重缓冲后台缓冲区管理 - 添加视口和裁剪矩形配置 - 修复 GraphicsPlatformInterface.h 循环包含问题 - 添加完整的中文 Doxygen 注释 - 更新 D3D12 学习 Wiki,添加交换链章节
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#include "D3D12Core.h"
|
||||
#include "D3D12Core.h"
|
||||
#include "D3D12CommonHeader.h"
|
||||
#include "D3D12Resources.h"
|
||||
|
||||
@@ -290,6 +290,9 @@ u32 deferred_release_flag[frame_buffer_count]{};
|
||||
*/
|
||||
std::mutex deferred_release_mutex{};
|
||||
|
||||
// 默认渲染目标格式
|
||||
constexpr DXGI_FORMAT render_target_format{ DXGI_FORMAT_R8G8B8A8_UNORM_SRGB };
|
||||
|
||||
// 最小支持的 Direct3D 特本级别
|
||||
constexpr D3D_FEATURE_LEVEL minumum_feature_level{ D3D_FEATURE_LEVEL_11_0 };
|
||||
|
||||
@@ -553,12 +556,25 @@ device()
|
||||
return main_device;
|
||||
}
|
||||
|
||||
descriptor_heap& rtv_heap() {return rtv_descriptor_heap;}
|
||||
descriptor_heap& dsv_heap() {return dsv_descriptor_heap;}
|
||||
descriptor_heap& uav_heap() {return uav_descriptor_heap;}
|
||||
descriptor_heap& srv_heap() {return srv_descriptor_heap;}
|
||||
|
||||
|
||||
u32
|
||||
current_frame_index()
|
||||
{
|
||||
return gfx_command.frame_index();
|
||||
}
|
||||
|
||||
DXGI_FORMAT
|
||||
default_render_target_format()
|
||||
{
|
||||
return render_target_format;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// X86结构上的整数访问权架构原子的,所以不需要加锁
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user