Commit 0ea0caeb by Jamie Madill Committed by Commit Bot

Move load functions table to renderer layer.

We will be able to use it for the Vulkan formats table. BUG=angleproject:1455 Change-Id: Iddc09fe560b06880af72a6fa8eb03fa2792e2f8c Reviewed-on: https://chromium-review.googlesource.com/367454Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 17605b61
//
// 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 "libANGLE/renderer/Format.h"
namespace rx
{
namespace d3d11
{
LoadFunctionMap GetLoadFunctionsMap(GLenum internalFormat, angle::Format::ID angleFormat);
} // namespace d3d11
} // namespace rx
#endif // LIBANGLE_RENDERER_D3D_D3D11_LOADFUNCTIONSTABLE_H_
......@@ -7,7 +7,7 @@
#include "libANGLE/renderer/d3d/d3d11/texture_format_table.h"
#include "libANGLE/renderer/d3d/d3d11/load_functions_table.h"
#include "libANGLE/renderer/load_functions_table.h"
namespace rx
{
......
......@@ -8,6 +8,7 @@
#
import json, sys
from datetime import date
sys.path.append('../..')
import angle_format
......@@ -15,7 +16,7 @@ import angle_format
template = """// GENERATED FILE - DO NOT EDIT.
// Generated by gen_load_functions_table.py using data from load_functions_data.json
//
// Copyright 2015 The ANGLE Project Authors. All rights reserved.
// Copyright {copyright_year} 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.
//
......@@ -23,18 +24,15 @@ template = """// GENERATED FILE - DO NOT EDIT.
// Contains the GetLoadFunctionsMap for texture_format_util.h
//
#include "libANGLE/renderer/d3d/d3d11/load_functions_table.h"
#include "libANGLE/renderer/load_functions_table.h"
#include "image_util/copyimage.h"
#include "image_util/generatemip.h"
#include "image_util/loadimage.h"
using namespace angle;
using namespace rx;
namespace rx
{{
namespace d3d11
namespace angle
{{
namespace
......@@ -91,9 +89,7 @@ LoadFunctionMap GetLoadFunctionsMap(GLenum {internal_format}, Format::ID {angle_
}} // GetLoadFunctionsMap
}} // namespace d3d11
}} // namespace rx
}} // namespace angle
"""
internal_format_param = 'internalFormat'
......@@ -187,7 +183,8 @@ switch_data, load_functions_data = parse_json(json_data)
output = template.format(internal_format = internal_format_param,
angle_format = angle_format_param,
switch_data = switch_data,
load_functions_data = load_functions_data)
load_functions_data = load_functions_data,
copyright_year = date.today().year)
with open('load_functions_table_autogen.cpp', 'wt') as out_file:
out_file.write(output)
......
//
// 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 ANGLE format.
//
#ifndef LIBANGLE_RENDERER_LOADFUNCTIONSTABLE_H_
#define LIBANGLE_RENDERER_LOADFUNCTIONSTABLE_H_
#include "libANGLE/renderer/Format.h"
namespace angle
{
rx::LoadFunctionMap GetLoadFunctionsMap(GLenum internalFormat, Format::ID angleFormat);
} // namespace angle
#endif // LIBANGLE_RENDERER_LOADFUNCTIONSTABLE_H_
// GENERATED FILE - DO NOT EDIT.
// Generated by gen_load_functions_table.py using data from load_functions_data.json
//
// Copyright 2015 The ANGLE Project Authors. All rights reserved.
// Copyright 2016 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.
//
......@@ -9,18 +9,15 @@
// Contains the GetLoadFunctionsMap for texture_format_util.h
//
#include "libANGLE/renderer/d3d/d3d11/load_functions_table.h"
#include "libANGLE/renderer/load_functions_table.h"
#include "image_util/copyimage.h"
#include "image_util/generatemip.h"
#include "image_util/loadimage.h"
using namespace angle;
using namespace rx;
namespace rx
{
namespace d3d11
namespace angle
{
namespace
......@@ -2311,6 +2308,4 @@ LoadFunctionMap GetLoadFunctionsMap(GLenum internalFormat, Format::ID angleForma
} // GetLoadFunctionsMap
} // namespace d3d11
} // namespace rx
} // namespace angle
......@@ -189,6 +189,8 @@
'libANGLE/renderer/TextureImpl.h',
'libANGLE/renderer/TransformFeedbackImpl.h',
'libANGLE/renderer/VertexArrayImpl.h',
'libANGLE/renderer/load_functions_table.h',
'libANGLE/renderer/load_functions_table_autogen.cpp',
'libANGLE/renderer/renderer_utils.cpp',
'libANGLE/renderer/renderer_utils.h',
'libANGLE/signal_utils.cpp',
......@@ -339,8 +341,6 @@
'libANGLE/renderer/d3d/d3d11/IndexBuffer11.h',
'libANGLE/renderer/d3d/d3d11/InputLayoutCache.cpp',
'libANGLE/renderer/d3d/d3d11/InputLayoutCache.h',
'libANGLE/renderer/d3d/d3d11/load_functions_table.h',
'libANGLE/renderer/d3d/d3d11/load_functions_table_autogen.cpp',
'libANGLE/renderer/d3d/d3d11/NativeWindow11.h',
'libANGLE/renderer/d3d/d3d11/PixelTransfer11.cpp',
'libANGLE/renderer/d3d/d3d11/PixelTransfer11.h',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment