mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 01:54:16 +01:00
[d3d9] Support unsupported formats in LockRect
This commit is contained in:
parent
82d40f5bba
commit
ed70f9a07c
@ -4102,7 +4102,11 @@ namespace dxvk {
|
||||
|
||||
const Rc<DxvkBuffer> mappedBuffer = pResource->GetBuffer(Subresource);
|
||||
|
||||
auto formatInfo = imageFormatInfo(pResource->GetFormatMapping().FormatColor);
|
||||
auto& formatMapping = pResource->GetFormatMapping();
|
||||
|
||||
const DxvkFormatInfo* formatInfo = formatMapping.IsValid()
|
||||
? imageFormatInfo(formatMapping.FormatColor) : UnsupportedFormatInfo(pResource->Desc()->Format);
|
||||
|
||||
auto subresource = pResource->GetSubresourceFromIndex(
|
||||
formatInfo->aspectMask, Subresource);
|
||||
|
||||
|
@ -165,7 +165,7 @@ namespace dxvk {
|
||||
VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY };
|
||||
D3D9_CONVERSION_FORMAT_INFO ConversionFormatInfo = { };
|
||||
|
||||
bool IsValid() { return FormatColor != VK_FORMAT_UNDEFINED; }
|
||||
bool IsValid() const { return FormatColor != VK_FORMAT_UNDEFINED; }
|
||||
};
|
||||
|
||||
D3D9_VK_FORMAT_MAPPING ConvertFormatUnfixed(D3D9Format Format);
|
||||
|
Loading…
x
Reference in New Issue
Block a user