[PATCH 1/3] wined3d: Prepare the destination location in surface_load_location.

Henri Verbeet hverbeet at gmail.com
Wed Nov 4 07:16:40 CST 2015


On 4 November 2015 at 13:10, Stefan Dösinger <stefandoesinger at gmail.com> wrote:
> I'm also happy to keep the prepare call inside load_location, which
> would just mean dropping patch 3. Right now it's a mix of the caller
> being responsible (sysmem, renderbuffers) and surface_load_location
> being responsible (texture). I don't think that's what we want.
>
The caller is not responsible in case of renderbuffers. The general
rule is that if you're going to be reading/writing from/to a location
you need to call either load_location() or prepare_location(). The
sysmem handling does indeed violate that in some places, those are
bugs.

> Your reading of the logs is correct, although the surface is in
> sysmem, not discarded. But the renderbuffer init problem existed
Well yes, but perhaps it should be in WINED3D_LOCATION_DISCARDED.

> I could implement uploads from sysmem (going through a
> non-multisampled texture or using glDrawPixels), but what we probably
> really want is some sort of WINED3D_LOCATION_ZEROED location that will
> init whatever location is used first to zero (probably using
We'll want that at some point, but I seem to recall that the initial
contents of multisample surfaces is undefined. If it isn't it should
only be a couple of lines to add support for
WINED3D_LOCATION_RB_MULTISAMPLE to surface_load_location().



More information about the wine-devel mailing list