mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
small code clean up:
d3d: remove the depth texture path it will not work so for now only lockable textures were available. i thing the only way will be a use a secondary render target and do a depth pass to mimic depth textures. opengl: minor cleanup here and there and a possible fix to issue 1509, but not tested because in my system the errors remarked in the issue don't show. commond: code reorganization an optimization in the pixel shader generator, trying to understand the tev stages, make some changes to make the generator faster (not much only started for the alpha test and fog). this changes try start solving the diferences bethen the hardware plugins and the soft plugin. i hope with i don't brake nothing but please test this a lot. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4465 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -534,26 +534,7 @@ u32 Renderer::AccessEFB(EFBAccessType type, int x, int y)
|
||||
RectToLock.left = 0;
|
||||
RectToLock.right = 1;
|
||||
RectToLock.top = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
//like i say in FramebufferManager this is ugly... using the pointers to decide the peek path.. but it works:)
|
||||
if(BufferFormat == D3DFMT_D32F_LOCKABLE && RBuffer == pOffScreenBuffer)
|
||||
{
|
||||
//we are using vista path so use updateSurface to copy depth data
|
||||
hr = D3D::dev->UpdateSurface(pBuffer,&RectToLock,pOffScreenBuffer,NULL);
|
||||
if(FAILED(hr))
|
||||
{
|
||||
PanicAlert("Unable to update data to mem buffer");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//we are using lockable depth buffer so change the pointer to lock it directly
|
||||
pOffScreenBuffer = pBuffer;
|
||||
}
|
||||
}
|
||||
}
|
||||
//the surface is good.. lock it
|
||||
if((hr = pOffScreenBuffer->LockRect(&drect, &RectToLock, D3DLOCK_READONLY)) != D3D_OK)
|
||||
{
|
||||
@ -571,7 +552,6 @@ u32 Renderer::AccessEFB(EFBAccessType type, int x, int y)
|
||||
val = ((float *)drect.pBits)[0];
|
||||
z = ((u32)(val * 0xffffff));// 0xFFFFFFFF;
|
||||
break;
|
||||
case (D3DFORMAT)MAKEFOURCC('D','F','1','6'):
|
||||
case D3DFMT_D16_LOCKABLE:
|
||||
val = ((float)((u16 *)drect.pBits)[0])/((float)0xFFFF);
|
||||
z = ((u32)(val * 0xffffff));
|
||||
|
Reference in New Issue
Block a user