wined3d: Don't call surface_load_ds_location() directly.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
06b5114342
commit
de8e151f6d
|
@ -203,7 +203,7 @@ void device_switch_onscreen_ds(struct wined3d_device *device,
|
|||
{
|
||||
if (device->onscreen_depth_stencil)
|
||||
{
|
||||
surface_load_ds_location(device->onscreen_depth_stencil, context, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
surface_load_location(device->onscreen_depth_stencil, context, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
|
||||
surface_modify_ds_location(device->onscreen_depth_stencil, WINED3D_LOCATION_TEXTURE_RGB,
|
||||
device->onscreen_depth_stencil->ds_current_size.cx,
|
||||
|
@ -280,7 +280,7 @@ static void prepare_ds_clear(struct wined3d_surface *ds, struct wined3d_context
|
|||
}
|
||||
|
||||
/* Full load. */
|
||||
surface_load_ds_location(ds, context, location);
|
||||
surface_load_location(ds, context, location);
|
||||
SetRect(out_rect, 0, 0, ds->ds_current_size.cx, ds->ds_current_size.cy);
|
||||
}
|
||||
|
||||
|
|
|
@ -661,7 +661,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
|||
|
||||
IntersectRect(&r, &draw_rect, ¤t_rect);
|
||||
if (!EqualRect(&r, &draw_rect))
|
||||
surface_load_ds_location(ds, context, location);
|
||||
surface_load_location(ds, context, location);
|
||||
else
|
||||
wined3d_surface_prepare(ds, context, location);
|
||||
}
|
||||
|
|
|
@ -3213,7 +3213,7 @@ void surface_modify_ds_location(struct wined3d_surface *surface,
|
|||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_context *context, DWORD location)
|
||||
static void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_context *context, DWORD location)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
struct wined3d_device *device = surface->resource.device;
|
||||
|
@ -3689,8 +3689,10 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
|
|||
|
||||
if (surface->resource.usage & WINED3DUSAGE_DEPTHSTENCIL)
|
||||
{
|
||||
if (location == WINED3D_LOCATION_TEXTURE_RGB
|
||||
if ((location == WINED3D_LOCATION_TEXTURE_RGB
|
||||
&& surface->locations & (WINED3D_LOCATION_DRAWABLE | WINED3D_LOCATION_DISCARDED))
|
||||
|| (location == WINED3D_LOCATION_DRAWABLE
|
||||
&& surface->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_DISCARDED)))
|
||||
{
|
||||
surface_load_ds_location(surface, context, location);
|
||||
return WINED3D_OK;
|
||||
|
|
|
@ -2604,8 +2604,6 @@ HRESULT wined3d_surface_init(struct wined3d_surface *surface,
|
|||
GLenum target, unsigned int level, unsigned int layer, DWORD flags) DECLSPEC_HIDDEN;
|
||||
void surface_invalidate_location(struct wined3d_surface *surface, DWORD location) DECLSPEC_HIDDEN;
|
||||
void surface_load(struct wined3d_surface *surface, struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
void surface_load_ds_location(struct wined3d_surface *surface,
|
||||
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
|
||||
void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb,
|
||||
struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||
HRESULT surface_load_location(struct wined3d_surface *surface,
|
||||
|
|
Loading…
Reference in New Issue