wined3d: Call LoadLocation() on higher render targets as well, simplify some code in drawPrimitive.
It's probably rare for higher render targets to get locked or updated from sysmem, but this should still be more correct. It also makes the code simpler.
This commit is contained in:
parent
25168401af
commit
daa59e00be
|
@ -930,17 +930,9 @@ void drawPrimitive(IWineD3DDevice *iface,
|
||||||
/* Invalidate the back buffer memory so LockRect will read it the next time */
|
/* Invalidate the back buffer memory so LockRect will read it the next time */
|
||||||
for(i = 0; i < GL_LIMITS(buffers); i++) {
|
for(i = 0; i < GL_LIMITS(buffers); i++) {
|
||||||
target = (IWineD3DSurfaceImpl *) This->render_targets[i];
|
target = (IWineD3DSurfaceImpl *) This->render_targets[i];
|
||||||
|
if (target) {
|
||||||
/* TODO: Only do all that if we're going to change anything */
|
IWineD3DSurface_LoadLocation((IWineD3DSurface *) target, SFLAG_INDRAWABLE, NULL);
|
||||||
if(target /*&& target->Flags & (SFLAG_INTEXTURE | SFLAG_INSYSMEM)*/) {
|
IWineD3DSurface_ModifyLocation((IWineD3DSurface *) target, SFLAG_INDRAWABLE, TRUE);
|
||||||
if(i == 0) {
|
|
||||||
/* Need the surface in the drawable! */
|
|
||||||
IWineD3DSurface_LoadLocation((IWineD3DSurface *) target, SFLAG_INDRAWABLE, NULL);
|
|
||||||
IWineD3DSurface_ModifyLocation((IWineD3DSurface *) target, SFLAG_INDRAWABLE, TRUE);
|
|
||||||
} else {
|
|
||||||
/* Must be an fbo render target */
|
|
||||||
IWineD3DSurface_ModifyLocation((IWineD3DSurface *) target, SFLAG_INDRAWABLE, TRUE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue