chore: sync workspace state

This commit is contained in:
2026-03-29 01:36:53 +08:00
parent eb5de3e3d4
commit e5cb79f3ce
4935 changed files with 35593 additions and 360696 deletions

View File

@@ -28,10 +28,10 @@ public:
ID3D12Resource* GetResource() const { return m_resource.Get(); }
D3D12_RESOURCE_DESC GetDesc() const { return m_resource->GetDesc(); }
uint32_t GetWidth() const override { return static_cast<uint32_t>(GetDesc().Width); }
uint32_t GetHeight() const override { return GetDesc().Height; }
uint32_t GetDepth() const override { return GetDesc().DepthOrArraySize; }
uint32_t GetMipLevels() const override { return GetDesc().MipLevels; }
uint32_t GetWidth() const override { return m_resource ? static_cast<uint32_t>(GetDesc().Width) : 0; }
uint32_t GetHeight() const override { return m_resource ? GetDesc().Height : 0; }
uint32_t GetDepth() const override { return m_resource ? GetDesc().DepthOrArraySize : 0; }
uint32_t GetMipLevels() const override { return m_resource ? GetDesc().MipLevels : 0; }
void* GetNativeHandle() override { return m_resource.Get(); }
ResourceStates GetState() const override { return m_state; }
@@ -43,22 +43,19 @@ public:
const std::string& GetName() const override { return m_name; }
void SetName(const std::string& name) override { m_name = name; }
uint32_t GetArraySize() const { return GetDesc().DepthOrArraySize; }
Format GetFormat() const override { return FromD3D12(GetDesc().Format); }
TextureType GetTextureType() const override {
switch (GetDesc().Dimension) {
case D3D12_RESOURCE_DIMENSION_TEXTURE1D: return TextureType::Texture1D;
case D3D12_RESOURCE_DIMENSION_TEXTURE2D: return TextureType::Texture2D;
case D3D12_RESOURCE_DIMENSION_TEXTURE3D: return TextureType::Texture3D;
default: return TextureType::Texture2D;
}
}
uint32_t GetArraySize() const { return m_resource ? GetDesc().DepthOrArraySize : 0; }
Format GetFormat() const override { return m_format != Format::Unknown ? m_format : (m_resource ? FromD3D12(GetDesc().Format) : Format::Unknown); }
TextureType GetTextureType() const override { return m_textureType; }
void SetFormat(Format format) { m_format = format; }
void SetTextureType(TextureType type) { m_textureType = type; }
bool OwnsResource() const { return m_ownsResource; }
private:
ComPtr<ID3D12Resource> m_resource;
ResourceStates m_state = ResourceStates::Common;
Format m_format = Format::Unknown;
TextureType m_textureType = TextureType::Texture2D;
std::string m_name;
bool m_ownsResource = false;
};

View File

@@ -21,7 +21,7 @@ public:
CommandQueueType GetType() const override { return CommandQueueType::Direct; }
uint64_t GetTimestampFrequency() const override;
void* GetNativeHandle() override { return nullptr; }
void* GetNativeHandle() override { return this; }
void WaitForPreviousFrame() override {}
uint64_t GetCurrentFrame() const override { return 0; }
};