mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00:00
d3d12: Fix depth read size
This commit is contained in:
parent
c08ac779f4
commit
18e3e74070
1 changed files with 5 additions and 1 deletions
|
@ -1427,12 +1427,16 @@ void D3D12GSRender::WriteDepthBuffer()
|
|||
char *ptrAsChar = (char*)ptr;
|
||||
float *writeDestPtr;
|
||||
check(writeDest->Map(0, nullptr, (void**)&writeDestPtr));
|
||||
// TODO : this should be done by the gpu
|
||||
for (unsigned row = 0; row < RSXThread::m_height; row++)
|
||||
{
|
||||
for (unsigned i = 0; i < RSXThread::m_width; i++)
|
||||
{
|
||||
unsigned char c = (unsigned char) (writeDestPtr[row * rowPitch / 4 + i] * 255.);
|
||||
ptrAsChar[(row * RSXThread::m_width + i)] = c;
|
||||
ptrAsChar[4 * (row * RSXThread::m_width + i)] = c;
|
||||
ptrAsChar[4 * (row * RSXThread::m_width + i) + 1] = c;
|
||||
ptrAsChar[4 * (row * RSXThread::m_width + i) + 2] = c;
|
||||
ptrAsChar[4 * (row * RSXThread::m_width + i) + 3] = c;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue