[PATCH 2/6] wined3d: Use the resource access flags in resource_cleanup().