[PATCH] wined3d: Don't pull _ACCESS_GPU textures to system memory in texture2d_blt().

Paul Gofman gofmanp at gmail.com
Tue Nov 20 08:09:35 CST 2018


On 11/20/18 16:59, Henri Verbeet wrote:
> On Tue, 20 Nov 2018 at 15:51, Paul Gofman <gofmanp at gmail.com> wrote:
> I think this change probably makes sense, but I'm curious about the
> details. Is the destination texture a mappable rendertarget or
> offscreen-plain surface? It would need to be mappable for this to be
> an issue, but system memory surfaces wouldn't have
> WINED3D_RESOURCE_ACCESS_GPU.

It is render target:

-- snip --

009f:trace:d3d9:d3d9_device_CreateTexture iface 0x166f48, width 1920, 
height 1065, levels 1, usage 0x1, format 0x15, pool 0, texture 
0xa66e1c0, shared_handle (nil).
009f:trace:d3d:wined3d_texture_create device 0x17d1d8, desc 0xa66e084, 
layer_count 1, level_count 1, flags 0x8, data (nil), parent 0x5f8e00b0, 
parent_ops 0x7ed0cd40, texture 0x5f8e00c0.
009f:trace:d3d:wined3d_texture_gl_init texture_gl 0x5f8e00e8, device 
0x17d1d8, desc 0xa66e084, layer_count 1, level_count 1, flags 0x8, 
parent 0x5f8e00b0, parent_ops 0x7ed0cd40, sub_resources 0x5f8e02c0.
009f:trace:d3d:wined3d_texture_init texture 0x5f8e00e8, resource_type 
WINED3D_RTYPE_TEXTURE_2D, format WINED3DFMT_B8G8R8A8_UNORM, 
multisample_type 0, multisample_quality 0, usage 0, access 
WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_MAP_R | 
WINED3D_RESOURCE_ACCESS_MAP_W, width 1920, height 1065, depth 1, 
layer_count 1, level_count 1, flags 0x8, device 0x17d1d8, parent 
0x5f8e00b0, parent_ops 0x7ed0cd40, sub_resources 0x5f8e02c0, texture_ops 
0x7ecc5fb8.
--- snip ---

It gets WINED3D_LOCATION_SYSMEM right at initialiaztion and this 
location is never used again anywhere but in the fast texture load code 
path under consideration (which ultimately prefers the sysmem location). 
Application never tries to map it.

> Which API is the application calling?
> StretchRect()?
>
Yes, it is StretchRect().




More information about the wine-devel mailing list