Files
GhostEngine/Ghost.Graphics/D3D12/ResourceViewGroup.cs
Misaki 0ec318a9ab Add sampler support and refactor resource handling
Enhanced shader and resource systems with `Sampler` support, including updates to `ShaderPropertyType`, HLSL code, and resource management. Refactored `Result` structs for better type safety and added new enums for texture and comparison settings. Improved `MeshRenderPass` to dynamically load textures and samplers. Updated SDL compiler and token lexicon for `Sampler` handling. Embedded debug info in project files and streamlined resource state tracking.
2025-11-29 18:27:47 +09:00

28 lines
997 B
C#

using Ghost.Core;
namespace Ghost.Graphics.D3D12;
internal readonly struct RTVDescriptor : IIdentifierType;
internal readonly struct DSVDescriptor : IIdentifierType;
internal readonly struct CbvSrvUavDescriptor : IIdentifierType;
internal readonly struct SamplerDescriptor : IIdentifierType;
internal struct ResourceViewGroup
{
public Identifier<RTVDescriptor> rtv;
public Identifier<DSVDescriptor> dsv;
public Identifier<CbvSrvUavDescriptor> srv;
public Identifier<CbvSrvUavDescriptor> cbv;
public Identifier<CbvSrvUavDescriptor> uav;
public Identifier<SamplerDescriptor> sampler;
public static ResourceViewGroup Invalid => new()
{
rtv = Identifier<RTVDescriptor>.Invalid,
dsv = Identifier<DSVDescriptor>.Invalid,
srv = Identifier<CbvSrvUavDescriptor>.Invalid,
cbv = Identifier<CbvSrvUavDescriptor>.Invalid,
uav = Identifier<CbvSrvUavDescriptor>.Invalid,
sampler = Identifier<SamplerDescriptor>.Invalid,
};
}