[PATCH 6/6] wined3d: Implement basic volume location management (try 2)

Henri Verbeet hverbeet at gmail.com
Thu Aug 22 08:33:10 CDT 2013


On 22 August 2013 14:57, Stefan Dösinger <stefan at codeweavers.com> wrote:
> +            if (volume->locations & WINED3D_LOCATION_DISCARDED)
> +            {
> +                TRACE("Volume previously discarded, nothing to do.\n");
> +                wined3d_volume_invalidate_location(volume, WINED3D_LOCATION_DISCARDED);
> +            }
I don't think the location invalidation here is strictly required,
although it probably doesn't hurt much in practice. (I.e., consider
the sequence DISCARD, load SYSMEM, load TEXTURE_RGB. There's no real
reason the RGB load needs to do an upload from SYSMEM in that case,
although it's perhaps not something that's going to happen much in
practice either way.)

> +            wined3d_volume_validate_location(volume, WINED3D_LOCATION_SYSMEM);
You could probably just have a
wined3d_volume_validate_location(volume, location); at the end of the
function and return from the default case instead. That's not
something I feel strongly about though.



More information about the wine-devel mailing list