[PATCH 1/3] wined3d: Handle discarded buffers in buffer_resource_sub_resource_map().