Add ResourceStates::GenericRead and HeapType enums
This commit is contained in:
@@ -172,10 +172,20 @@ inline D3D12_RESOURCE_STATES ToD3D12(ResourceStates state) {
|
|||||||
case ResourceStates::CopySrc: return D3D12_RESOURCE_STATE_COPY_SOURCE;
|
case ResourceStates::CopySrc: return D3D12_RESOURCE_STATE_COPY_SOURCE;
|
||||||
case ResourceStates::CopyDst: return D3D12_RESOURCE_STATE_COPY_DEST;
|
case ResourceStates::CopyDst: return D3D12_RESOURCE_STATE_COPY_DEST;
|
||||||
case ResourceStates::Present: return D3D12_RESOURCE_STATE_PRESENT;
|
case ResourceStates::Present: return D3D12_RESOURCE_STATE_PRESENT;
|
||||||
|
case ResourceStates::GenericRead: return D3D12_RESOURCE_STATE_GENERIC_READ;
|
||||||
}
|
}
|
||||||
return D3D12_RESOURCE_STATE_COMMON;
|
return D3D12_RESOURCE_STATE_COMMON;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline D3D12_HEAP_TYPE ToD3D12(HeapType type) {
|
||||||
|
switch (type) {
|
||||||
|
case HeapType::Default: return D3D12_HEAP_TYPE_DEFAULT;
|
||||||
|
case HeapType::Upload: return D3D12_HEAP_TYPE_UPLOAD;
|
||||||
|
case HeapType::Readback: return D3D12_HEAP_TYPE_READBACK;
|
||||||
|
}
|
||||||
|
return D3D12_HEAP_TYPE_DEFAULT;
|
||||||
|
}
|
||||||
|
|
||||||
inline D3D12_PRIMITIVE_TOPOLOGY_TYPE ToD3D12(PrimitiveTopology topology) {
|
inline D3D12_PRIMITIVE_TOPOLOGY_TYPE ToD3D12(PrimitiveTopology topology) {
|
||||||
switch (topology) {
|
switch (topology) {
|
||||||
case PrimitiveTopology::PointList: return D3D12_PRIMITIVE_TOPOLOGY_TYPE_POINT;
|
case PrimitiveTopology::PointList: return D3D12_PRIMITIVE_TOPOLOGY_TYPE_POINT;
|
||||||
|
|||||||
@@ -280,7 +280,15 @@ enum class ResourceStates : uint32_t {
|
|||||||
PixelShaderResource,
|
PixelShaderResource,
|
||||||
CopySrc,
|
CopySrc,
|
||||||
CopyDst,
|
CopyDst,
|
||||||
Present
|
Present,
|
||||||
|
GenericRead
|
||||||
|
};
|
||||||
|
|
||||||
|
enum class HeapType : uint8_t {
|
||||||
|
Default,
|
||||||
|
Upload,
|
||||||
|
Readback,
|
||||||
|
Custom
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace RHI
|
} // namespace RHI
|
||||||
|
|||||||
Reference in New Issue
Block a user