Split backend/common in backend/ and common/

This directory used to contain both the state tracking code for the
backends, and the common utilities that could be used both by the
backends and the rest of the code. Things are now:

 - src/common is utility code for the whole repo
 - src/backend contains libNXT's code
 - src/utils is utility code that we don't want in libNXT

This commit also changes all includes to use global paths from src/
bacause it had to touch a bunch of #include statements anyway.
This commit is contained in:
Corentin Wallez
2017-07-06 14:41:13 -04:00
committed by Corentin Wallez
parent a9b2a9871c
commit fffe6dfa16
161 changed files with 673 additions and 599 deletions

View File

@@ -15,7 +15,7 @@
#ifndef BACKEND_METAL_BUFFERMTL_H_
#define BACKEND_METAL_BUFFERMTL_H_
#include "common/Buffer.h"
#include "backend/Buffer.h"
#include "common/SerialQueue.h"
#import <Metal/Metal.h>

View File

@@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "BufferMTL.h"
#include "backend/metal/BufferMTL.h"
#include "MetalBackend.h"
#include "ResourceUploader.h"
#include "backend/metal/MetalBackend.h"
#include "backend/metal/ResourceUploader.h"
namespace backend {
namespace metal {

View File

@@ -15,7 +15,7 @@
#ifndef BACKEND_METAL_COMMANDBUFFERMTL_H_
#define BACKEND_METAL_COMMANDBUFFERMTL_H_
#include "common/CommandBuffer.h"
#include "backend/CommandBuffer.h"
#import <Metal/Metal.h>

View File

@@ -12,17 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "CommandBufferMTL.h"
#include "backend/metal/CommandBufferMTL.h"
#include "common/Commands.h"
#include "BufferMTL.h"
#include "DepthStencilStateMTL.h"
#include "InputStateMTL.h"
#include "MetalBackend.h"
#include "PipelineMTL.h"
#include "PipelineLayoutMTL.h"
#include "SamplerMTL.h"
#include "TextureMTL.h"
#include "backend/Commands.h"
#include "backend/metal/BufferMTL.h"
#include "backend/metal/DepthStencilStateMTL.h"
#include "backend/metal/InputStateMTL.h"
#include "backend/metal/MetalBackend.h"
#include "backend/metal/PipelineMTL.h"
#include "backend/metal/PipelineLayoutMTL.h"
#include "backend/metal/SamplerMTL.h"
#include "backend/metal/TextureMTL.h"
namespace backend {
namespace metal {

View File

@@ -15,7 +15,7 @@
#ifndef BACKEND_METAL_DEPTHSTENCILSTATEMTL_H_
#define BACKEND_METAL_DEPTHSTENCILSTATEMTL_H_
#include "common/DepthStencilState.h"
#include "backend/DepthStencilState.h"
#import <Metal/Metal.h>

View File

@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "DepthStencilStateMTL.h"
#include "backend/metal/DepthStencilStateMTL.h"
#include "MetalBackend.h"
#include "backend/metal/MetalBackend.h"
namespace backend {
namespace metal {

View File

@@ -12,13 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "MetalBackend.h"
#include "BufferMTL.h"
#include "CommandBufferMTL.h"
#include "DepthStencilStateMTL.h"
#include "InputStateMTL.h"
#include "PipelineMTL.h"
#include "PipelineLayoutMTL.h"
#include "SamplerMTL.h"
#include "ShaderModuleMTL.h"
#include "TextureMTL.h"
#include "backend/metal/MetalBackend.h"
#include "backend/metal/BufferMTL.h"
#include "backend/metal/CommandBufferMTL.h"
#include "backend/metal/DepthStencilStateMTL.h"
#include "backend/metal/InputStateMTL.h"
#include "backend/metal/PipelineMTL.h"
#include "backend/metal/PipelineLayoutMTL.h"
#include "backend/metal/SamplerMTL.h"
#include "backend/metal/ShaderModuleMTL.h"
#include "backend/metal/TextureMTL.h"

View File

@@ -15,7 +15,7 @@
#ifndef BACKEND_METAL_INPUTSTATEMTL_H_
#define BACKEND_METAL_INPUTSTATEMTL_H_
#include "common/InputState.h"
#include "backend/InputState.h"
#import <Metal/Metal.h>

View File

@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "InputStateMTL.h"
#include "backend/metal/InputStateMTL.h"
#include "MetalBackend.h"
#include "backend/metal/MetalBackend.h"
namespace backend {
namespace metal {

View File

@@ -17,13 +17,14 @@
#include "nxt/nxtcpp.h"
#include "common/BindGroup.h"
#include "common/BindGroupLayout.h"
#include "common/Device.h"
#include "common/Framebuffer.h"
#include "common/Queue.h"
#include "common/RenderPass.h"
#include "common/ToBackend.h"
#include "backend/BindGroup.h"
#include "backend/BindGroupLayout.h"
#include "backend/Device.h"
#include "backend/Framebuffer.h"
#include "backend/Queue.h"
#include "backend/RenderPass.h"
#include "backend/ToBackend.h"
#include "common/Serial.h"
#include <type_traits>
#import <Metal/Metal.h>

View File

@@ -12,20 +12,18 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// TODO(kainino@chromium.org): split this backend into many files
#include "backend/metal/MetalBackend.h"
#include "MetalBackend.h"
#include "BufferMTL.h"
#include "CommandBufferMTL.h"
#include "DepthStencilStateMTL.h"
#include "InputStateMTL.h"
#include "PipelineMTL.h"
#include "PipelineLayoutMTL.h"
#include "ResourceUploader.h"
#include "SamplerMTL.h"
#include "ShaderModuleMTL.h"
#include "TextureMTL.h"
#include "backend/metal/BufferMTL.h"
#include "backend/metal/CommandBufferMTL.h"
#include "backend/metal/DepthStencilStateMTL.h"
#include "backend/metal/InputStateMTL.h"
#include "backend/metal/PipelineMTL.h"
#include "backend/metal/PipelineLayoutMTL.h"
#include "backend/metal/ResourceUploader.h"
#include "backend/metal/SamplerMTL.h"
#include "backend/metal/ShaderModuleMTL.h"
#include "backend/metal/TextureMTL.h"
namespace backend {
namespace metal {

View File

@@ -15,9 +15,9 @@
#ifndef BACKEND_METAL_PIPELINELAYOUTMTL_H_
#define BACKEND_METAL_PIPELINELAYOUTMTL_H_
#include "common/PipelineLayout.h"
#include "backend/PipelineLayout.h"
#include "common/PerStage.h"
#include "backend/PerStage.h"
#import <Metal/Metal.h>

View File

@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "PipelineLayoutMTL.h"
#include "backend/metal/PipelineLayoutMTL.h"
#include "MetalBackend.h"
#include "backend/metal/MetalBackend.h"
namespace backend {
namespace metal {

View File

@@ -15,7 +15,7 @@
#ifndef BACKEND_METAL_PIPELINEMTL_H_
#define BACKEND_METAL_PIPELINEMTL_H_
#include "common/Pipeline.h"
#include "backend/Pipeline.h"
#import <Metal/Metal.h>

View File

@@ -12,13 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "PipelineMTL.h"
#include "backend/metal/PipelineMTL.h"
#include "DepthStencilStateMTL.h"
#include "InputStateMTL.h"
#include "MetalBackend.h"
#include "PipelineLayoutMTL.h"
#include "ShaderModuleMTL.h"
#include "backend/metal/DepthStencilStateMTL.h"
#include "backend/metal/InputStateMTL.h"
#include "backend/metal/MetalBackend.h"
#include "backend/metal/PipelineLayoutMTL.h"
#include "backend/metal/ShaderModuleMTL.h"
namespace backend {
namespace metal {

View File

@@ -15,6 +15,7 @@
#ifndef BACKEND_METAL_RESOURCEUPLOADER_H_
#define BACKEND_METAL_RESOURCEUPLOADER_H_
#include "common/Serial.h"
#include "common/SerialQueue.h"
#import <Metal/Metal.h>

View File

@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "ResourceUploader.h"
#include "backend/metal/ResourceUploader.h"
#include "MetalBackend.h"
#include "backend/metal/MetalBackend.h"
namespace backend {
namespace metal {

View File

@@ -15,7 +15,7 @@
#ifndef BACKEND_METAL_SAMPLERMTL_H_
#define BACKEND_METAL_SAMPLERMTL_H_
#include "common/Sampler.h"
#include "backend/Sampler.h"
#import <Metal/Metal.h>

View File

@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "SamplerMTL.h"
#include "backend/metal/SamplerMTL.h"
#include "MetalBackend.h"
#include "backend/metal/MetalBackend.h"
namespace backend {
namespace metal {

View File

@@ -15,7 +15,7 @@
#ifndef BACKEND_METAL_SHADERMODULEMTL_H_
#define BACKEND_METAL_SHADERMODULEMTL_H_
#include "common/ShaderModule.h"
#include "backend/ShaderModule.h"
#import <Metal/Metal.h>

View File

@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "ShaderModuleMTL.h"
#include "backend/metal/ShaderModuleMTL.h"
#include "MetalBackend.h"
#include "backend/metal/MetalBackend.h"
#include <spirv-cross/spirv_msl.hpp>

View File

@@ -15,7 +15,7 @@
#ifndef BACKEND_METAL_TEXTUREMTL_H_
#define BACKEND_METAL_TEXTUREMTL_H_
#include "common/Texture.h"
#include "backend/Texture.h"
#import <Metal/Metal.h>

View File

@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "TextureMTL.h"
#include "backend/metal/TextureMTL.h"
#include "MetalBackend.h"
#include "backend/metal/MetalBackend.h"
namespace backend {
namespace metal {