mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[d3d9] Fix NV12 conversion
Froggy is the right color now
This commit is contained in:
parent
ad524a4a52
commit
c7f8267f98
@ -4372,12 +4372,16 @@ namespace dxvk {
|
|||||||
const DxvkFormatInfo* formatInfo = imageFormatInfo(pResource->GetFormatMapping().FormatColor);
|
const DxvkFormatInfo* formatInfo = imageFormatInfo(pResource->GetFormatMapping().FormatColor);
|
||||||
VkExtent3D texLevelExtent = image->mipLevelExtent(subresource.mipLevel);
|
VkExtent3D texLevelExtent = image->mipLevelExtent(subresource.mipLevel);
|
||||||
VkExtent3D texLevelExtentBlockCount = util::computeBlockCount(texLevelExtent, formatInfo->blockSize);
|
VkExtent3D texLevelExtentBlockCount = util::computeBlockCount(texLevelExtent, formatInfo->blockSize);
|
||||||
|
// Add more blocks for the other planes that we might have.
|
||||||
|
// TODO: PLEASE CLEAN ME
|
||||||
|
texLevelExtentBlockCount.height *= std::min(convertFormat.PlaneCount, 2u);
|
||||||
|
|
||||||
D3D9BufferSlice slice = AllocTempBuffer<false>(srcSlice.length);
|
D3D9BufferSlice slice = AllocTempBuffer<false>(srcSlice.length);
|
||||||
VkDeviceSize pitch = align(texLevelExtentBlockCount.width * formatInfo->elementSize, 4);
|
VkDeviceSize pitch = align(texLevelExtentBlockCount.width * formatInfo->elementSize, 4);
|
||||||
|
|
||||||
util::packImageData(
|
util::packImageData(
|
||||||
slice.mapPtr, srcSlice.mapPtr, texLevelExtentBlockCount, formatInfo->elementSize,
|
slice.mapPtr, srcSlice.mapPtr, texLevelExtentBlockCount, formatInfo->elementSize,
|
||||||
pitch, pitch * texLevelExtentBlockCount.height);
|
pitch, std::min(convertFormat.PlaneCount, 2u) * pitch * texLevelExtentBlockCount.height);
|
||||||
|
|
||||||
Flush();
|
Flush();
|
||||||
SynchronizeCsThread();
|
SynchronizeCsThread();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user