mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-02 09:03:37 +00:00
parent
28e252b667
commit
ce07d2be5a
|
@ -100,7 +100,7 @@ void DepthBuffer::_initDepthBufferTexture(FrameBuffer * _pBuffer, CachedTexture
|
|||
else {
|
||||
_pTexture->width = video().getWidth();
|
||||
_pTexture->height = video().getHeight();
|
||||
_pTexture->address = VI.lastOrigin;
|
||||
_pTexture->address = gDP.depthImageAddress;
|
||||
_pTexture->clampWidth = VI.width;
|
||||
_pTexture->clampHeight = VI.height;
|
||||
}
|
||||
|
@ -273,9 +273,7 @@ void DepthBufferList::saveBuffer(u32 _address)
|
|||
return;
|
||||
|
||||
FrameBuffer * pFrameBuffer = frameBufferList().findBuffer(_address);
|
||||
if (pFrameBuffer == NULL)
|
||||
pFrameBuffer = frameBufferList().getCurrent();
|
||||
else
|
||||
if (pFrameBuffer != NULL)
|
||||
pFrameBuffer->m_isDepthBuffer = true;
|
||||
|
||||
if (m_pCurrent == NULL || m_pCurrent->m_address != _address)
|
||||
|
|
|
@ -409,7 +409,10 @@ void FrameBufferList::saveBuffer(u32 _address, u16 _format, u16 _size, u16 _widt
|
|||
m_pCurrent = &buffer;
|
||||
}
|
||||
|
||||
attachDepthBuffer();
|
||||
if (_address == gDP.depthImageAddress)
|
||||
depthBufferList().saveBuffer(_address);
|
||||
else
|
||||
attachDepthBuffer();
|
||||
|
||||
#ifdef DEBUG
|
||||
DebugMsg( DEBUG_HIGH | DEBUG_HANDLED, "FrameBuffer_SaveBuffer( 0x%08X ); depth buffer is 0x%08X\n",
|
||||
|
|
|
@ -90,3 +90,11 @@ Pokemon Stadium:
|
|||
Пришлось править код коррекции высоты буфера, и вызывать метод поиска пересечений после коррекции.
|
||||
|
||||
|
||||
Blast Corps:
|
||||
Возникла проблема с depth image, которая приводила к остановке видео драйвера. Игра создавала вспомогательный depth image
|
||||
для вспомогательного color image. Адрес вспомогательного depth image совпадал с адресом основного, но ширина ставилась такая же
|
||||
как у вспомогательного color image. Из-за последовательности команд плагин не вовремя просекал изменение размеров depth image,
|
||||
что приводило к установке неверного depth buffer для FBO и к краху драйвера.
|
||||
|
||||
Решение: При вызове setcolorimage, если color image == depth image, вызывать depthBufferList().saveBuffer, который
|
||||
при необходимости пересоздаст depth buffer.
|
||||
|
|
2
gDP.cpp
2
gDP.cpp
|
@ -192,8 +192,8 @@ void gDPSetTextureImage(u32 format, u32 size, u32 width, u32 address)
|
|||
void gDPSetDepthImage( u32 address )
|
||||
{
|
||||
address = RSP_SegmentToPhysical( address );
|
||||
depthBufferList().saveBuffer(address);
|
||||
gDP.depthImageAddress = address;
|
||||
depthBufferList().saveBuffer(address);
|
||||
|
||||
#ifdef DEBUG
|
||||
DebugMsg( DEBUG_HIGH | DEBUG_HANDLED, "gDPSetDepthImage( 0x%08X );\n", gDP.depthImageAddress );
|
||||
|
|
Loading…
Reference in New Issue
Block a user