Hash :
0ecb18b9
Author :
Date :
2016-02-03T13:40:37
Avoid a copy in TextureStorage11::setData This is essentially a reland of 9cf9bcbecaa1e54a47a92eb784e7f591f7b65c57 This code always allocates a new memory buffer for the texture memory, picks a load function to copy/convert the input data into it, and the uploads. In the case where the input format matches the upload format we should be able to skip the allocation and copy and be much happier. Change-Id: If4281aeb4cd7bbbebba60122a10610a916833052 Reviewed-on: https://chromium-review.googlesource.com/326852 Tryjob-Request: John Bauman <jbauman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: John Bauman <jbauman@chromium.org>
//
// Copyright 2015 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// load_functions_table:
// Contains load functions table depending on internal format and dxgi format
//
#ifndef LIBANGLE_RENDERER_D3D_D3D11_LOADFUNCTIONSTABLE_H_
#define LIBANGLE_RENDERER_D3D_D3D11_LOADFUNCTIONSTABLE_H_
#include <map>
#include "libANGLE/renderer/d3d/d3d11/Renderer11.h"
#include "libANGLE/renderer/d3d/d3d11/texture_format_table.h"
namespace rx
{
namespace d3d11
{
const std::map<GLenum, LoadImageFunctionInfo> &GetLoadFunctionsMap(GLenum internalFormat,
DXGI_FORMAT dxgiFormat);
} // namespace d3d11
} // namespace rx
#endif // LIBANGLE_RENDERER_D3D_D3D11_LOADFUNCTIONSTABLE_H_