I think there's code that does that for render targets. It would be good if those are combined, or the render target flag adjustment just removed if it is not needed any longer
-----Original Message----- From: wine-patches-bounces@winehq.org [mailto:wine-patches- bounces@winehq.org] On Behalf Of Alexander Dorofeyev Sent: Tuesday, July 08, 2008 3:52 PM To: wine-patches@winehq.org Subject: [PATCH 1/4] ddraw: Force surfaces without memory flags to video memory on creation.
This fixes some missing textures in Forsaken, where renderer expects to see that texture is in video memory and gets confused otherwise.
Tested in patch 2/4.
dlls/ddraw/ddraw.c | 9 ++++++--- dlls/ddraw/texture.c | 6 ------ 2 files changed, 6 insertions(+), 9 deletions(-)
Stefan Dösinger wrote:
I think there's code that does that for render targets. It would be good if those are combined, or the render target flag adjustment just removed if it is not needed any longer
I found some code to that effect in IDirectDrawImpl_CreateNewSurface, but there the logic is "if rendertarget, set VIDEOMEMORY flag", which, on first glance is different from "if no memory flag present, set VIDEOMEMORY flag". It kinda depends on whether rendertarget with sysmem flag will or will not fall out somewhere earlier with invalidcall or something, but I guess one thing is for sure that it's better to keep this kind of thing in one place and close to lessen confusion, i.e. in CreateNewSurface.
Probably better not to apply it and the patch 2/2 that depends on it for now. I'll try to fix these issues and resend the next day.