On 17 February 2013 18:10, Matteo Bruni <mbr...@codeweavers.com> wrote:
> @@ -6168,18 +6172,10 @@ HRESULT surface_load_location(struct wined3d_surface 
> *surface, DWORD location, c
>
>      if (surface->resource.usage & WINED3DUSAGE_DEPTHSTENCIL)
>      {
> -        if (location == SFLAG_INTEXTURE)
> -        {
> -            struct wined3d_context *context = context_acquire(device, NULL);
> -            surface_load_ds_location(surface, context, location);
> -            context_release(context);
> -            return WINED3D_OK;
> -        }
> -        else
> -        {
> -            FIXME("Unimplemented location %s for depth/stencil buffers.\n", 
> debug_surflocation(location));
> -            return WINED3DERR_INVALIDCALL;
> -        }
> +        struct wined3d_context *context = context_acquire(device, NULL);
> +        surface_load_ds_location(surface, context, location);
> +        context_release(context);
> +        return WINED3D_OK;
>      }
This is probably wrong (and the original code is probably questionable
too), surface_load_ds_location() is only really meant for onscreen <->
offscreen blits. The original code is meant for the case where
AlwaysOffscreen is disabled and a depth stencil is used as texture.
The implication there is that the only possible locations are
SFLAG_INTEXTURE and SFLAG_INDRAWABLE, it doesn't really work with
multisampling. Fortunately you can't directly texture from
multisampled depth stencil surfaces either.

In principle we could make surface_load_ds_location() the generic
function for depth / stencil location transfers, but currently it
isn't. If you're hitting it with the RESZ code it probably only works
by accident.


Reply via email to