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.
diff --git a/src/backend/common/BindGroup.cpp b/src/backend/BindGroup.cpp
similarity index 97%
rename from src/backend/common/BindGroup.cpp
rename to src/backend/BindGroup.cpp
index cd50ed8..1e17ed3 100644
--- a/src/backend/common/BindGroup.cpp
+++ b/src/backend/BindGroup.cpp
@@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "BindGroup.h"
+#include "backend/BindGroup.h"
-#include "BindGroupLayout.h"
-#include "Buffer.h"
-#include "Device.h"
-#include "Texture.h"
+#include "backend/BindGroupLayout.h"
+#include "backend/Buffer.h"
+#include "backend/Device.h"
+#include "backend/Texture.h"
namespace backend {
diff --git a/src/backend/common/BindGroup.h b/src/backend/BindGroup.h
similarity index 93%
rename from src/backend/common/BindGroup.h
rename to src/backend/BindGroup.h
index 72ad021..9865513 100644
--- a/src/backend/common/BindGroup.h
+++ b/src/backend/BindGroup.h
@@ -12,12 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef BACKEND_COMMON_BINDGROUP_H_
-#define BACKEND_COMMON_BINDGROUP_H_
+#ifndef BACKEND_BINDGROUP_H_
+#define BACKEND_BINDGROUP_H_
-#include "Forward.h"
-#include "Builder.h"
-#include "RefCounted.h"
+#include "backend/Builder.h"
+#include "backend/Forward.h"
+#include "backend/RefCounted.h"
+#include "common/Constants.h"
#include "nxt/nxtcpp.h"
@@ -89,4 +90,4 @@
}
-#endif // BACKEND_COMMON_BINDGROUP_H_
+#endif // BACKEND_BINDGROUP_H_
diff --git a/src/backend/common/BindGroupLayout.cpp b/src/backend/BindGroupLayout.cpp
similarity index 98%
rename from src/backend/common/BindGroupLayout.cpp
rename to src/backend/BindGroupLayout.cpp
index e72faeb..a757139 100644
--- a/src/backend/common/BindGroupLayout.cpp
+++ b/src/backend/BindGroupLayout.cpp
@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "BindGroupLayout.h"
+#include "backend/BindGroupLayout.h"
-#include "Device.h"
+#include "backend/Device.h"
#include <functional>
diff --git a/src/backend/common/BindGroupLayout.h b/src/backend/BindGroupLayout.h
similarity index 90%
rename from src/backend/common/BindGroupLayout.h
rename to src/backend/BindGroupLayout.h
index d2334d2..77fcb57 100644
--- a/src/backend/common/BindGroupLayout.h
+++ b/src/backend/BindGroupLayout.h
@@ -12,12 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef BACKEND_COMMON_BINDGROUPLAYOUT_H_
-#define BACKEND_COMMON_BINDGROUPLAYOUT_H_
+#ifndef BACKEND_BINDGROUPLAYOUT_H_
+#define BACKEND_BINDGROUPLAYOUT_H_
-#include "Forward.h"
-#include "Builder.h"
-#include "RefCounted.h"
+#include "backend/Forward.h"
+#include "backend/Builder.h"
+#include "backend/RefCounted.h"
+#include "common/Constants.h"
#include "nxt/nxtcpp.h"
@@ -72,4 +73,4 @@
}
-#endif // BACKEND_COMMON_BINDGROUPLAYOUT_H_
+#endif // BACKEND_BINDGROUPLAYOUT_H_
diff --git a/src/backend/common/Buffer.cpp b/src/backend/Buffer.cpp
similarity index 99%
rename from src/backend/common/Buffer.cpp
rename to src/backend/Buffer.cpp
index 0fa57db..5299f69 100644
--- a/src/backend/common/Buffer.cpp
+++ b/src/backend/Buffer.cpp
@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "Buffer.h"
+#include "backend/Buffer.h"
-#include "Device.h"
+#include "backend/Device.h"
#include <utility>
#include <cstdio>
diff --git a/src/backend/common/Buffer.h b/src/backend/Buffer.h
similarity index 95%
rename from src/backend/common/Buffer.h
rename to src/backend/Buffer.h
index d09cae2..bace9df 100644
--- a/src/backend/common/Buffer.h
+++ b/src/backend/Buffer.h
@@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef BACKEND_COMMON_BUFFER_H_
-#define BACKEND_COMMON_BUFFER_H_
+#ifndef BACKEND_BUFFER_H_
+#define BACKEND_BUFFER_H_
-#include "Forward.h"
-#include "Builder.h"
-#include "RefCounted.h"
+#include "backend/Forward.h"
+#include "backend/Builder.h"
+#include "backend/RefCounted.h"
#include "nxt/nxtcpp.h"
@@ -123,4 +123,4 @@
}
-#endif // BACKEND_COMMON_BUFFER_H_
+#endif // BACKEND_BUFFER_H_
diff --git a/src/backend/common/Builder.cpp b/src/backend/Builder.cpp
similarity index 97%
rename from src/backend/common/Builder.cpp
rename to src/backend/Builder.cpp
index 27e3318..de3c8de 100644
--- a/src/backend/common/Builder.cpp
+++ b/src/backend/Builder.cpp
@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "Builder.h"
+#include "backend/Builder.h"
-#include "Device.h"
+#include "backend/Device.h"
namespace backend {
diff --git a/src/backend/common/Builder.h b/src/backend/Builder.h
similarity index 95%
rename from src/backend/common/Builder.h
rename to src/backend/Builder.h
index 6021e09..ccc57d0 100644
--- a/src/backend/common/Builder.h
+++ b/src/backend/Builder.h
@@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef BACKEND_COMMON_BUILDER_H_
-#define BACKEND_COMMON_BUILDER_H_
+#ifndef BACKEND_BUILDER_H_
+#define BACKEND_BUILDER_H_
-#include "Forward.h"
-#include "RefCounted.h"
+#include "backend/Forward.h"
+#include "backend/RefCounted.h"
#include "nxt/nxtcpp.h"
@@ -107,4 +107,4 @@
}
-#endif // BACKEND_COMMON_BUILDER_H_
+#endif // BACKEND_BUILDER_H_
diff --git a/src/backend/CMakeLists.txt b/src/backend/CMakeLists.txt
index a19870e..6da612b 100644
--- a/src/backend/CMakeLists.txt
+++ b/src/backend/CMakeLists.txt
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-set(COMMON_DIR ${CMAKE_CURRENT_SOURCE_DIR}/common)
+set(BACKEND_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(METAL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/metal)
set(NULL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/null)
set(OPENGL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/opengl)
@@ -20,52 +20,48 @@
set(TESTS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tests)
list(APPEND BACKEND_SOURCES
- ${COMMON_DIR}/BindGroup.cpp
- ${COMMON_DIR}/BindGroup.h
- ${COMMON_DIR}/BindGroupLayout.cpp
- ${COMMON_DIR}/BindGroupLayout.h
- ${COMMON_DIR}/BitSetIterator.h
- ${COMMON_DIR}/Builder.cpp
- ${COMMON_DIR}/Builder.h
- ${COMMON_DIR}/Buffer.cpp
- ${COMMON_DIR}/Buffer.h
- ${COMMON_DIR}/CommandAllocator.cpp
- ${COMMON_DIR}/CommandAllocator.h
- ${COMMON_DIR}/CommandBuffer.cpp
- ${COMMON_DIR}/CommandBuffer.h
- ${COMMON_DIR}/DepthStencilState.cpp
- ${COMMON_DIR}/DepthStencilState.h
- ${COMMON_DIR}/CommandBufferStateTracker.cpp
- ${COMMON_DIR}/CommandBufferStateTracker.h
- ${COMMON_DIR}/Device.cpp
- ${COMMON_DIR}/Device.h
- ${COMMON_DIR}/Forward.h
- ${COMMON_DIR}/Framebuffer.cpp
- ${COMMON_DIR}/Framebuffer.h
- ${COMMON_DIR}/InputState.cpp
- ${COMMON_DIR}/InputState.h
- ${COMMON_DIR}/Math.cpp
- ${COMMON_DIR}/Math.h
- ${COMMON_DIR}/PerStage.cpp
- ${COMMON_DIR}/PerStage.h
- ${COMMON_DIR}/Pipeline.cpp
- ${COMMON_DIR}/Pipeline.h
- ${COMMON_DIR}/PipelineLayout.cpp
- ${COMMON_DIR}/PipelineLayout.h
- ${COMMON_DIR}/Queue.cpp
- ${COMMON_DIR}/Queue.h
- ${COMMON_DIR}/RenderPass.cpp
- ${COMMON_DIR}/RenderPass.h
- ${COMMON_DIR}/RefCounted.cpp
- ${COMMON_DIR}/RefCounted.h
- ${COMMON_DIR}/Sampler.cpp
- ${COMMON_DIR}/Sampler.h
- ${COMMON_DIR}/SerialQueue.h
- ${COMMON_DIR}/ShaderModule.cpp
- ${COMMON_DIR}/ShaderModule.h
- ${COMMON_DIR}/Texture.cpp
- ${COMMON_DIR}/Texture.h
- ${COMMON_DIR}/ToBackend.h
+ ${BACKEND_DIR}/BindGroup.cpp
+ ${BACKEND_DIR}/BindGroup.h
+ ${BACKEND_DIR}/BindGroupLayout.cpp
+ ${BACKEND_DIR}/BindGroupLayout.h
+ ${BACKEND_DIR}/Builder.cpp
+ ${BACKEND_DIR}/Builder.h
+ ${BACKEND_DIR}/Buffer.cpp
+ ${BACKEND_DIR}/Buffer.h
+ ${BACKEND_DIR}/CommandAllocator.cpp
+ ${BACKEND_DIR}/CommandAllocator.h
+ ${BACKEND_DIR}/CommandBuffer.cpp
+ ${BACKEND_DIR}/CommandBuffer.h
+ ${BACKEND_DIR}/DepthStencilState.cpp
+ ${BACKEND_DIR}/DepthStencilState.h
+ ${BACKEND_DIR}/CommandBufferStateTracker.cpp
+ ${BACKEND_DIR}/CommandBufferStateTracker.h
+ ${BACKEND_DIR}/Device.cpp
+ ${BACKEND_DIR}/Device.h
+ ${BACKEND_DIR}/Forward.h
+ ${BACKEND_DIR}/Framebuffer.cpp
+ ${BACKEND_DIR}/Framebuffer.h
+ ${BACKEND_DIR}/InputState.cpp
+ ${BACKEND_DIR}/InputState.h
+ ${BACKEND_DIR}/PerStage.cpp
+ ${BACKEND_DIR}/PerStage.h
+ ${BACKEND_DIR}/Pipeline.cpp
+ ${BACKEND_DIR}/Pipeline.h
+ ${BACKEND_DIR}/PipelineLayout.cpp
+ ${BACKEND_DIR}/PipelineLayout.h
+ ${BACKEND_DIR}/Queue.cpp
+ ${BACKEND_DIR}/Queue.h
+ ${BACKEND_DIR}/RenderPass.cpp
+ ${BACKEND_DIR}/RenderPass.h
+ ${BACKEND_DIR}/RefCounted.cpp
+ ${BACKEND_DIR}/RefCounted.h
+ ${BACKEND_DIR}/Sampler.cpp
+ ${BACKEND_DIR}/Sampler.h
+ ${BACKEND_DIR}/ShaderModule.cpp
+ ${BACKEND_DIR}/ShaderModule.h
+ ${BACKEND_DIR}/Texture.cpp
+ ${BACKEND_DIR}/Texture.h
+ ${BACKEND_DIR}/ToBackend.h
)
# OpenGL Backend
@@ -79,7 +75,7 @@
-T opengl
)
target_link_libraries(opengl_autogen glfw glad nxtcpp)
-target_include_directories(opengl_autogen PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
+target_include_directories(opengl_autogen PRIVATE ${SRC_DIR})
target_include_directories(opengl_autogen PUBLIC ${GENERATED_DIR})
SetCXX14(opengl_autogen)
SetPIC(opengl_autogen)
@@ -116,7 +112,7 @@
)
target_link_libraries(null_autogen nxtcpp)
target_include_directories(null_autogen PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
-target_include_directories(null_autogen PUBLIC ${GENERATED_DIR})
+target_include_directories(null_autogen PUBLIC ${SRC_DIR})
SetCXX14(null_autogen)
SetPIC(null_autogen)
@@ -137,7 +133,7 @@
-T metal
)
target_link_libraries(metal_autogen glfw glad nxtcpp "-framework QuartzCore" "-framework Metal")
- target_include_directories(metal_autogen PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
+ target_include_directories(metal_autogen PRIVATE ${SRC_DIR})
target_include_directories(metal_autogen PUBLIC ${GENERATED_DIR})
SetCXX14(metal_autogen)
SetPIC(metal_autogen)
@@ -231,7 +227,7 @@
target_link_libraries(d3d12_autogen glfw nxtcpp ${D3D12_LIBRARIES})
target_include_directories(d3d12_autogen SYSTEM PRIVATE ${D3D12_INCLUDE_DIR} ${DXGI_INCLUDE_DIR})
- target_include_directories(d3d12_autogen PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
+ target_include_directories(d3d12_autogen PRIVATE ${SRC_DIR})
target_include_directories(d3d12_autogen PUBLIC ${GENERATED_DIR})
SetCXX14(d3d12_autogen)
SetPIC(d3d12_autogen)
@@ -274,12 +270,11 @@
add_library(nxt_backend STATIC ${BACKEND_SOURCES})
-target_link_libraries(nxt_backend opengl_autogen null_autogen glfw glad spirv-cross)
+target_link_libraries(nxt_backend nxt_common opengl_autogen null_autogen glfw glad spirv-cross)
if (APPLE)
target_link_libraries(nxt_backend metal_autogen)
endif()
if (WIN32)
target_link_libraries(nxt_backend d3d12_autogen)
endif()
-target_include_directories(nxt_backend PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
SetCXX14(nxt_backend)
diff --git a/src/backend/common/CommandAllocator.cpp b/src/backend/CommandAllocator.cpp
similarity index 98%
rename from src/backend/common/CommandAllocator.cpp
rename to src/backend/CommandAllocator.cpp
index e53ca0d..bc9513f 100644
--- a/src/backend/common/CommandAllocator.cpp
+++ b/src/backend/CommandAllocator.cpp
@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "CommandAllocator.h"
+#include "backend/CommandAllocator.h"
-#include "Math.h"
+#include "common/Math.h"
#include <algorithm>
#include <cassert>
diff --git a/src/backend/common/CommandAllocator.h b/src/backend/CommandAllocator.h
similarity index 97%
rename from src/backend/common/CommandAllocator.h
rename to src/backend/CommandAllocator.h
index 3633d2e..716c26d 100644
--- a/src/backend/common/CommandAllocator.h
+++ b/src/backend/CommandAllocator.h
@@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef BACKEND_COMMON_COMMAND_ALLOCATOR_H_
-#define BACKEND_COMMON_COMMAND_ALLOCATOR_H_
+#ifndef BACKEND_COMMAND_ALLOCATOR_H_
+#define BACKEND_COMMAND_ALLOCATOR_H_
#include <cstdint>
#include <cstddef>
@@ -147,4 +147,4 @@
}
-#endif // BACKEND_COMMON_COMMAND_ALLOCATOR_H_
+#endif // BACKEND_COMMAND_ALLOCATOR_H_
diff --git a/src/backend/common/CommandBuffer.cpp b/src/backend/CommandBuffer.cpp
similarity index 98%
rename from src/backend/common/CommandBuffer.cpp
rename to src/backend/CommandBuffer.cpp
index fbfa4c7..17c55aee 100644
--- a/src/backend/common/CommandBuffer.cpp
+++ b/src/backend/CommandBuffer.cpp
@@ -12,17 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "CommandBuffer.h"
+#include "backend/CommandBuffer.h"
-#include "BindGroup.h"
-#include "Buffer.h"
-#include "Commands.h"
-#include "CommandBufferStateTracker.h"
-#include "Device.h"
-#include "InputState.h"
-#include "Pipeline.h"
-#include "PipelineLayout.h"
-#include "Texture.h"
+#include "backend/BindGroup.h"
+#include "backend/Buffer.h"
+#include "backend/Commands.h"
+#include "backend/CommandBufferStateTracker.h"
+#include "backend/Device.h"
+#include "backend/InputState.h"
+#include "backend/Pipeline.h"
+#include "backend/PipelineLayout.h"
+#include "backend/Texture.h"
#include <cstring>
#include <map>
diff --git a/src/backend/common/CommandBuffer.h b/src/backend/CommandBuffer.h
similarity index 95%
rename from src/backend/common/CommandBuffer.h
rename to src/backend/CommandBuffer.h
index 2f62614..adc5be7 100644
--- a/src/backend/common/CommandBuffer.h
+++ b/src/backend/CommandBuffer.h
@@ -12,14 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef BACKEND_COMMON_COMMANDBUFFER_H_
-#define BACKEND_COMMON_COMMANDBUFFER_H_
+#ifndef BACKEND_COMMANDBUFFER_H_
+#define BACKEND_COMMANDBUFFER_H_
#include "nxt/nxtcpp.h"
-#include "CommandAllocator.h"
-#include "Builder.h"
-#include "RefCounted.h"
+#include "backend/CommandAllocator.h"
+#include "backend/Builder.h"
+#include "backend/RefCounted.h"
#include <memory>
#include <set>
@@ -103,4 +103,4 @@
}
-#endif // BACKEND_COMMON_COMMANDBUFFER_H_
+#endif // BACKEND_COMMANDBUFFER_H_
diff --git a/src/backend/common/CommandBufferStateTracker.cpp b/src/backend/CommandBufferStateTracker.cpp
similarity index 97%
rename from src/backend/common/CommandBufferStateTracker.cpp
rename to src/backend/CommandBufferStateTracker.cpp
index a8ca513..45e5ba2 100644
--- a/src/backend/common/CommandBufferStateTracker.cpp
+++ b/src/backend/CommandBufferStateTracker.cpp
@@ -12,19 +12,19 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "CommandBufferStateTracker.h"
+#include "backend/CommandBufferStateTracker.h"
-#include "Forward.h"
-#include "BindGroup.h"
-#include "BindGroupLayout.h"
-#include "BitSetIterator.h"
-#include "Buffer.h"
-#include "Framebuffer.h"
-#include "InputState.h"
-#include "Pipeline.h"
-#include "PipelineLayout.h"
-#include "RenderPass.h"
-#include "Texture.h"
+#include "backend/Forward.h"
+#include "backend/BindGroup.h"
+#include "backend/BindGroupLayout.h"
+#include "backend/Buffer.h"
+#include "backend/Framebuffer.h"
+#include "backend/InputState.h"
+#include "backend/Pipeline.h"
+#include "backend/PipelineLayout.h"
+#include "backend/RenderPass.h"
+#include "backend/Texture.h"
+#include "common/BitSetIterator.h"
namespace backend {
CommandBufferStateTracker::CommandBufferStateTracker(CommandBufferBuilder* builder)
diff --git a/src/backend/common/CommandBufferStateTracker.h b/src/backend/CommandBufferStateTracker.h
similarity index 95%
rename from src/backend/common/CommandBufferStateTracker.h
rename to src/backend/CommandBufferStateTracker.h
index 04f12b5..290596e 100644
--- a/src/backend/common/CommandBufferStateTracker.h
+++ b/src/backend/CommandBufferStateTracker.h
@@ -12,10 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef BACKEND_COMMON_COMMANDBUFFERSTATETRACKER_H
-#define BACKEND_COMMON_COMMANDBUFFERSTATETRACKER_H
+#ifndef BACKEND_COMMANDBUFFERSTATETRACKER_H
+#define BACKEND_COMMANDBUFFERSTATETRACKER_H
-#include "CommandBuffer.h"
+#include "backend/CommandBuffer.h"
+#include "common/Constants.h"
#include <bitset>
#include <map>
@@ -100,4 +101,4 @@
};
}
-#endif // BACKEND_COMMON_COMMANDBUFFERSTATETRACKER_H
+#endif // BACKEND_COMMANDBUFFERSTATETRACKER_H
diff --git a/src/backend/common/Commands.h b/src/backend/Commands.h
similarity index 95%
rename from src/backend/common/Commands.h
rename to src/backend/Commands.h
index 4ba48c3..c02d955 100644
--- a/src/backend/common/Commands.h
+++ b/src/backend/Commands.h
@@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef BACKEND_COMMON_COMMANDS_H_
-#define BACKEND_COMMON_COMMANDS_H_
+#ifndef BACKEND_COMMANDS_H_
+#define BACKEND_COMMANDS_H_
-#include "Framebuffer.h"
-#include "RenderPass.h"
-#include "Texture.h"
+#include "backend/Framebuffer.h"
+#include "backend/RenderPass.h"
+#include "backend/Texture.h"
#include "nxt/nxtcpp.h"
@@ -155,4 +155,4 @@
}
-#endif // BACKEND_COMMON_COMMANDS_H_
+#endif // BACKEND_COMMANDS_H_
diff --git a/src/backend/common/DepthStencilState.cpp b/src/backend/DepthStencilState.cpp
similarity index 98%
rename from src/backend/common/DepthStencilState.cpp
rename to src/backend/DepthStencilState.cpp
index 86e5b2e..130d4eb 100644
--- a/src/backend/common/DepthStencilState.cpp
+++ b/src/backend/DepthStencilState.cpp
@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "DepthStencilState.h"
+#include "backend/DepthStencilState.h"
-#include "Device.h"
+#include "backend/Device.h"
namespace backend {
diff --git a/src/backend/common/DepthStencilState.h b/src/backend/DepthStencilState.h
similarity index 92%
rename from src/backend/common/DepthStencilState.h
rename to src/backend/DepthStencilState.h
index 5bcaf18..9013472 100644
--- a/src/backend/common/DepthStencilState.h
+++ b/src/backend/DepthStencilState.h
@@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef BACKEND_COMMON_DEPTHSTENCILSTATE_H_
-#define BACKEND_COMMON_DEPTHSTENCILSTATE_H_
+#ifndef BACKEND_DEPTHSTENCILSTATE_H_
+#define BACKEND_DEPTHSTENCILSTATE_H_
-#include "Forward.h"
-#include "Builder.h"
-#include "RefCounted.h"
+#include "backend/Forward.h"
+#include "backend/Builder.h"
+#include "backend/RefCounted.h"
#include "nxt/nxtcpp.h"
@@ -81,4 +81,4 @@
}
-#endif // BACKEND_COMMON_DEPTHSTENCILSTATE_H_
+#endif // BACKEND_DEPTHSTENCILSTATE_H_
diff --git a/src/backend/common/Device.cpp b/src/backend/Device.cpp
similarity index 89%
rename from src/backend/common/Device.cpp
rename to src/backend/Device.cpp
index ce5ba62..ee6128d 100644
--- a/src/backend/common/Device.cpp
+++ b/src/backend/Device.cpp
@@ -12,22 +12,22 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "Device.h"
+#include "backend/Device.h"
-#include "BindGroup.h"
-#include "BindGroupLayout.h"
-#include "Buffer.h"
-#include "CommandBuffer.h"
-#include "DepthStencilState.h"
-#include "Framebuffer.h"
-#include "InputState.h"
-#include "Pipeline.h"
-#include "PipelineLayout.h"
-#include "Queue.h"
-#include "RenderPass.h"
-#include "Sampler.h"
-#include "ShaderModule.h"
-#include "Texture.h"
+#include "backend/BindGroup.h"
+#include "backend/BindGroupLayout.h"
+#include "backend/Buffer.h"
+#include "backend/CommandBuffer.h"
+#include "backend/DepthStencilState.h"
+#include "backend/Framebuffer.h"
+#include "backend/InputState.h"
+#include "backend/Pipeline.h"
+#include "backend/PipelineLayout.h"
+#include "backend/Queue.h"
+#include "backend/RenderPass.h"
+#include "backend/Sampler.h"
+#include "backend/ShaderModule.h"
+#include "backend/Texture.h"
#include <unordered_set>
diff --git a/src/backend/common/Device.h b/src/backend/Device.h
similarity index 96%
rename from src/backend/common/Device.h
rename to src/backend/Device.h
index e4f9902..f35707d 100644
--- a/src/backend/common/Device.h
+++ b/src/backend/Device.h
@@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef BACKEND_COMMON_DEVICEBASE_H_
-#define BACKEND_COMMON_DEVICEBASE_H_
+#ifndef BACKEND_DEVICEBASE_H_
+#define BACKEND_DEVICEBASE_H_
-#include "common/Forward.h"
-#include "common/RefCounted.h"
+#include "backend/Forward.h"
+#include "backend/RefCounted.h"
#include "nxt/nxtcpp.h"
@@ -103,4 +103,4 @@
}
-#endif // BACKEND_COMMON_DEVICEBASE_H_
+#endif // BACKEND_DEVICEBASE_H_
diff --git a/src/backend/common/Forward.h b/src/backend/Forward.h
similarity index 72%
rename from src/backend/common/Forward.h
rename to src/backend/Forward.h
index 10c8643..d08dd76 100644
--- a/src/backend/common/Forward.h
+++ b/src/backend/Forward.h
@@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef BACKEND_COMMON_FORWARD_H_
-#define BACKEND_COMMON_FORWARD_H_
+#ifndef BACKEND_FORWARD_H_
+#define BACKEND_FORWARD_H_
#include <cassert>
#include <cstdint>
@@ -63,18 +63,7 @@
template<typename T>
class PerStage;
- using Serial = uint64_t;
-
- // TODO(cwallez@chromium.org): where should constants live?
- static constexpr uint32_t kMaxPushConstants = 32u;
- static constexpr uint32_t kMaxBindGroups = 4u;
- static constexpr uint32_t kMaxBindingsPerGroup = 16u; // TODO(cwallez@chromium.org): investigate bindgroup limits
- static constexpr uint32_t kMaxVertexAttributes = 16u;
- static constexpr uint32_t kMaxVertexInputs = 16u;
- static constexpr uint32_t kNumStages = 3;
- static constexpr uint32_t kMaxColorAttachments = 4u;
-
enum PushConstantType : uint8_t;
}
-#endif // BACKEND_COMMON_FORWARD_H_
+#endif // BACKEND_FORWARD_H_
diff --git a/src/backend/common/Framebuffer.cpp b/src/backend/Framebuffer.cpp
similarity index 96%
rename from src/backend/common/Framebuffer.cpp
rename to src/backend/Framebuffer.cpp
index e6a24d3..0de6521 100644
--- a/src/backend/common/Framebuffer.cpp
+++ b/src/backend/Framebuffer.cpp
@@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "Framebuffer.h"
+#include "backend/Framebuffer.h"
-#include "Buffer.h"
-#include "Device.h"
-#include "RenderPass.h"
-#include "Texture.h"
+#include "backend/Buffer.h"
+#include "backend/Device.h"
+#include "backend/RenderPass.h"
+#include "backend/Texture.h"
namespace backend {
diff --git a/src/backend/common/Framebuffer.h b/src/backend/Framebuffer.h
similarity index 90%
rename from src/backend/common/Framebuffer.h
rename to src/backend/Framebuffer.h
index 53c23aa..cdc87c4 100644
--- a/src/backend/common/Framebuffer.h
+++ b/src/backend/Framebuffer.h
@@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef BACKEND_COMMON_FRAMEBUFFER_H_
-#define BACKEND_COMMON_FRAMEBUFFER_H_
+#ifndef BACKEND_FRAMEBUFFER_H_
+#define BACKEND_FRAMEBUFFER_H_
-#include "Builder.h"
-#include "Forward.h"
-#include "RefCounted.h"
+#include "backend/Builder.h"
+#include "backend/Forward.h"
+#include "backend/RefCounted.h"
#include "nxt/nxtcpp.h"
@@ -66,4 +66,4 @@
}
-#endif // BACKEND_COMMON_FRAMEBUFFER_H_
+#endif // BACKEND_FRAMEBUFFER_H_
diff --git a/src/backend/common/InputState.cpp b/src/backend/InputState.cpp
similarity index 98%
rename from src/backend/common/InputState.cpp
rename to src/backend/InputState.cpp
index e4c434e..c4a7dc1 100644
--- a/src/backend/common/InputState.cpp
+++ b/src/backend/InputState.cpp
@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "InputState.h"
+#include "backend/InputState.h"
-#include "Device.h"
+#include "backend/Device.h"
namespace backend {
diff --git a/src/backend/common/InputState.h b/src/backend/InputState.h
similarity index 92%
rename from src/backend/common/InputState.h
rename to src/backend/InputState.h
index f14af2f..3ee8e50 100644
--- a/src/backend/common/InputState.h
+++ b/src/backend/InputState.h
@@ -12,12 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef BACKEND_COMMON_INPUTSTATE_H_
-#define BACKEND_COMMON_INPUTSTATE_H_
+#ifndef BACKEND_INPUTSTATE_H_
+#define BACKEND_INPUTSTATE_H_
-#include "Forward.h"
-#include "Builder.h"
-#include "RefCounted.h"
+#include "backend/Forward.h"
+#include "backend/Builder.h"
+#include "backend/RefCounted.h"
+#include "common/Constants.h"
#include "nxt/nxtcpp.h"
@@ -80,4 +81,4 @@
}
-#endif // BACKEND_COMMON_INPUTSTATE_H_
+#endif // BACKEND_INPUTSTATE_H_
diff --git a/src/backend/common/PerStage.cpp b/src/backend/PerStage.cpp
similarity index 96%
rename from src/backend/common/PerStage.cpp
rename to src/backend/PerStage.cpp
index cdccac5..8cf48b7 100644
--- a/src/backend/common/PerStage.cpp
+++ b/src/backend/PerStage.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "PerStage.h"
+#include "backend/PerStage.h"
namespace backend {
diff --git a/src/backend/common/PerStage.h b/src/backend/PerStage.h
similarity index 92%
rename from src/backend/common/PerStage.h
rename to src/backend/PerStage.h
index c14dde8..90636e1 100644
--- a/src/backend/common/PerStage.h
+++ b/src/backend/PerStage.h
@@ -12,14 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef BACKEND_COMMON_PERSTAGE_H_
-#define BACKEND_COMMON_PERSTAGE_H_
+#ifndef BACKEND_PERSTAGE_H_
+#define BACKEND_PERSTAGE_H_
-#include "BitSetIterator.h"
+#include "common/BitSetIterator.h"
+#include "common/Constants.h"
#include "nxt/nxtcpp.h"
#include <array>
+#include <cassert>
+#define ASSERT assert
namespace backend {
@@ -65,4 +68,4 @@
}
-#endif // BACKEND_COMMON_PERSTAGE_H_
+#endif // BACKEND_PERSTAGE_H_
diff --git a/src/backend/common/Pipeline.cpp b/src/backend/Pipeline.cpp
similarity index 95%
rename from src/backend/common/Pipeline.cpp
rename to src/backend/Pipeline.cpp
index 0722106..b5ece5a 100644
--- a/src/backend/common/Pipeline.cpp
+++ b/src/backend/Pipeline.cpp
@@ -12,14 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "Pipeline.h"
+#include "backend/Pipeline.h"
-#include "Device.h"
-#include "DepthStencilState.h"
-#include "InputState.h"
-#include "PipelineLayout.h"
-#include "RenderPass.h"
-#include "ShaderModule.h"
+#include "backend/Device.h"
+#include "backend/DepthStencilState.h"
+#include "backend/InputState.h"
+#include "backend/PipelineLayout.h"
+#include "backend/RenderPass.h"
+#include "backend/ShaderModule.h"
namespace backend {
diff --git a/src/backend/common/Pipeline.h b/src/backend/Pipeline.h
similarity index 93%
rename from src/backend/common/Pipeline.h
rename to src/backend/Pipeline.h
index 837f4fe..bf51e88 100644
--- a/src/backend/common/Pipeline.h
+++ b/src/backend/Pipeline.h
@@ -12,13 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef BACKEND_COMMON_PIPELINE_H_
-#define BACKEND_COMMON_PIPELINE_H_
+#ifndef BACKEND_PIPELINE_H_
+#define BACKEND_PIPELINE_H_
-#include "Forward.h"
-#include "Builder.h"
-#include "PerStage.h"
-#include "RefCounted.h"
+#include "backend/Forward.h"
+#include "backend/Builder.h"
+#include "backend/PerStage.h"
+#include "backend/RefCounted.h"
#include "nxt/nxtcpp.h"
@@ -97,4 +97,4 @@
}
-#endif // BACKEND_COMMON_PIPELINE_H_
+#endif // BACKEND_PIPELINE_H_
diff --git a/src/backend/common/PipelineLayout.cpp b/src/backend/PipelineLayout.cpp
similarity index 95%
rename from src/backend/common/PipelineLayout.cpp
rename to src/backend/PipelineLayout.cpp
index cbca824..0445f24 100644
--- a/src/backend/common/PipelineLayout.cpp
+++ b/src/backend/PipelineLayout.cpp
@@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "PipelineLayout.h"
+#include "backend/PipelineLayout.h"
-#include "BindGroupLayout.h"
-#include "Device.h"
+#include "backend/BindGroupLayout.h"
+#include "backend/Device.h"
namespace backend {
diff --git a/src/backend/common/PipelineLayout.h b/src/backend/PipelineLayout.h
similarity index 87%
rename from src/backend/common/PipelineLayout.h
rename to src/backend/PipelineLayout.h
index 2f28f16..6ad1d56 100644
--- a/src/backend/common/PipelineLayout.h
+++ b/src/backend/PipelineLayout.h
@@ -12,12 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef BACKEND_COMMON_PIPELINELAYOUT_H_
-#define BACKEND_COMMON_PIPELINELAYOUT_H_
+#ifndef BACKEND_PIPELINELAYOUT_H_
+#define BACKEND_PIPELINELAYOUT_H_
-#include "Forward.h"
-#include "Builder.h"
-#include "RefCounted.h"
+#include "backend/Forward.h"
+#include "backend/Builder.h"
+#include "backend/RefCounted.h"
+#include "common/Constants.h"
#include "nxt/nxtcpp.h"
@@ -58,4 +59,4 @@
}
-#endif // BACKEND_COMMON_PIPELINELAYOUT_H_
+#endif // BACKEND_PIPELINELAYOUT_H_
diff --git a/src/backend/common/Queue.cpp b/src/backend/Queue.cpp
similarity index 92%
rename from src/backend/common/Queue.cpp
rename to src/backend/Queue.cpp
index e4e9cb9..7a72a0b 100644
--- a/src/backend/common/Queue.cpp
+++ b/src/backend/Queue.cpp
@@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "Queue.h"
+#include "backend/Queue.h"
-#include "Device.h"
-#include "CommandBuffer.h"
+#include "backend/Device.h"
+#include "backend/CommandBuffer.h"
namespace backend {
diff --git a/src/backend/common/Queue.h b/src/backend/Queue.h
similarity index 90%
rename from src/backend/common/Queue.h
rename to src/backend/Queue.h
index 4398276..017296b 100644
--- a/src/backend/common/Queue.h
+++ b/src/backend/Queue.h
@@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef BACKEND_COMMON_QUEUE_H_
-#define BACKEND_COMMON_QUEUE_H_
+#ifndef BACKEND_QUEUE_H_
+#define BACKEND_QUEUE_H_
-#include "Forward.h"
-#include "Builder.h"
-#include "RefCounted.h"
+#include "backend/Forward.h"
+#include "backend/Builder.h"
+#include "backend/RefCounted.h"
#include "nxt/nxtcpp.h"
@@ -58,4 +58,4 @@
}
-#endif // BACKEND_COMMON_QUEUE_H_
+#endif // BACKEND_QUEUE_H_
diff --git a/src/backend/common/RefCounted.cpp b/src/backend/RefCounted.cpp
similarity index 97%
rename from src/backend/common/RefCounted.cpp
rename to src/backend/RefCounted.cpp
index 076b57f..4339b19 100644
--- a/src/backend/common/RefCounted.cpp
+++ b/src/backend/RefCounted.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "RefCounted.h"
+#include "backend/RefCounted.h"
#include <cassert>
#define ASSERT assert
diff --git a/src/backend/common/RefCounted.h b/src/backend/RefCounted.h
similarity index 96%
rename from src/backend/common/RefCounted.h
rename to src/backend/RefCounted.h
index a9aa304..fd77eb0 100644
--- a/src/backend/common/RefCounted.h
+++ b/src/backend/RefCounted.h
@@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef BACKEND_COMMON_REFCOUNTED_H_
-#define BACKEND_COMMON_REFCOUNTED_H_
+#ifndef BACKEND_REFCOUNTED_H_
+#define BACKEND_REFCOUNTED_H_
#include <cstdint>
@@ -123,4 +123,4 @@
}
-#endif // BACKEND_COMMON_REFCOUNTED_H_
+#endif // BACKEND_REFCOUNTED_H_
diff --git a/src/backend/common/RenderPass.cpp b/src/backend/RenderPass.cpp
similarity index 97%
rename from src/backend/common/RenderPass.cpp
rename to src/backend/RenderPass.cpp
index 72a013b..dbdc5a2 100644
--- a/src/backend/common/RenderPass.cpp
+++ b/src/backend/RenderPass.cpp
@@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "RenderPass.h"
+#include "backend/RenderPass.h"
-#include "Buffer.h"
-#include "Device.h"
-#include "Texture.h"
+#include "backend/Buffer.h"
+#include "backend/Device.h"
+#include "backend/Texture.h"
namespace backend {
diff --git a/src/backend/common/RenderPass.h b/src/backend/RenderPass.h
similarity index 92%
rename from src/backend/common/RenderPass.h
rename to src/backend/RenderPass.h
index a5bee3b..449e5ba 100644
--- a/src/backend/common/RenderPass.h
+++ b/src/backend/RenderPass.h
@@ -12,12 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef BACKEND_COMMON_RENDERPASS_H_
-#define BACKEND_COMMON_RENDERPASS_H_
+#ifndef BACKEND_RENDERPASS_H_
+#define BACKEND_RENDERPASS_H_
-#include "Builder.h"
-#include "Forward.h"
-#include "RefCounted.h"
+#include "backend/Builder.h"
+#include "backend/Forward.h"
+#include "backend/RefCounted.h"
+#include "common/Constants.h"
#include "nxt/nxtcpp.h"
@@ -80,4 +81,4 @@
}
-#endif // BACKEND_COMMON_RENDERPASS_H_
+#endif // BACKEND_RENDERPASS_H_
diff --git a/src/backend/common/Sampler.cpp b/src/backend/Sampler.cpp
similarity index 96%
rename from src/backend/common/Sampler.cpp
rename to src/backend/Sampler.cpp
index 17cd753..554f0a5 100644
--- a/src/backend/common/Sampler.cpp
+++ b/src/backend/Sampler.cpp
@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "Sampler.h"
+#include "backend/Sampler.h"
-#include "Device.h"
+#include "backend/Device.h"
namespace backend {
diff --git a/src/backend/common/Sampler.h b/src/backend/Sampler.h
similarity index 89%
rename from src/backend/common/Sampler.h
rename to src/backend/Sampler.h
index f4fbcb6..4abcbe2 100644
--- a/src/backend/common/Sampler.h
+++ b/src/backend/Sampler.h
@@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef BACKEND_COMMON_SAMPLER_H_
-#define BACKEND_COMMON_SAMPLER_H_
+#ifndef BACKEND_SAMPLER_H_
+#define BACKEND_SAMPLER_H_
-#include "Forward.h"
-#include "Buffer.h"
-#include "RefCounted.h"
+#include "backend/Forward.h"
+#include "backend/Buffer.h"
+#include "backend/RefCounted.h"
#include "nxt/nxtcpp.h"
@@ -53,4 +53,4 @@
}
-#endif // BACKEND_COMMON_SAMPLER_H_
+#endif // BACKEND_SAMPLER_H_
diff --git a/src/backend/common/ShaderModule.cpp b/src/backend/ShaderModule.cpp
similarity index 97%
rename from src/backend/common/ShaderModule.cpp
rename to src/backend/ShaderModule.cpp
index 50b46db..a119931 100644
--- a/src/backend/common/ShaderModule.cpp
+++ b/src/backend/ShaderModule.cpp
@@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "ShaderModule.h"
+#include "backend/ShaderModule.h"
-#include "BindGroupLayout.h"
-#include "Device.h"
-#include "Pipeline.h"
-#include "PipelineLayout.h"
+#include "backend/BindGroupLayout.h"
+#include "backend/Device.h"
+#include "backend/Pipeline.h"
+#include "backend/PipelineLayout.h"
#include <spirv-cross/spirv_cross.hpp>
diff --git a/src/backend/common/ShaderModule.h b/src/backend/ShaderModule.h
similarity index 92%
rename from src/backend/common/ShaderModule.h
rename to src/backend/ShaderModule.h
index 816fd0d..c13fc9a 100644
--- a/src/backend/common/ShaderModule.h
+++ b/src/backend/ShaderModule.h
@@ -12,12 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef BACKEND_COMMON_SHADERMODULE_H_
-#define BACKEND_COMMON_SHADERMODULE_H_
+#ifndef BACKEND_SHADERMODULE_H_
+#define BACKEND_SHADERMODULE_H_
-#include "Forward.h"
-#include "Builder.h"
-#include "RefCounted.h"
+#include "backend/Forward.h"
+#include "backend/Builder.h"
+#include "backend/RefCounted.h"
+#include "common/Constants.h"
#include "nxt/nxtcpp.h"
@@ -90,4 +91,4 @@
}
-#endif // BACKEND_COMMON_SHADERMODULE_H_
+#endif // BACKEND_SHADERMODULE_H_
diff --git a/src/backend/common/Texture.cpp b/src/backend/Texture.cpp
similarity index 98%
rename from src/backend/common/Texture.cpp
rename to src/backend/Texture.cpp
index 06cd5c0..7f0d865 100644
--- a/src/backend/common/Texture.cpp
+++ b/src/backend/Texture.cpp
@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "Texture.h"
+#include "backend/Texture.h"
-#include "Device.h"
+#include "backend/Device.h"
namespace backend {
diff --git a/src/backend/common/Texture.h b/src/backend/Texture.h
similarity index 95%
rename from src/backend/common/Texture.h
rename to src/backend/Texture.h
index acad001..4f40f30 100644
--- a/src/backend/common/Texture.h
+++ b/src/backend/Texture.h
@@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef BACKEND_COMMON_TEXTURE_H_
-#define BACKEND_COMMON_TEXTURE_H_
+#ifndef BACKEND_TEXTURE_H_
+#define BACKEND_TEXTURE_H_
-#include "Forward.h"
-#include "Builder.h"
-#include "RefCounted.h"
+#include "backend/Forward.h"
+#include "backend/Builder.h"
+#include "backend/RefCounted.h"
#include "nxt/nxtcpp.h"
@@ -115,4 +115,4 @@
}
-#endif // BACKEND_COMMON_TEXTURE_H_
+#endif // BACKEND_TEXTURE_H_
diff --git a/src/backend/common/ToBackend.h b/src/backend/ToBackend.h
similarity index 97%
rename from src/backend/common/ToBackend.h
rename to src/backend/ToBackend.h
index a822b3b..2c3466a 100644
--- a/src/backend/common/ToBackend.h
+++ b/src/backend/ToBackend.h
@@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef BACKEND_COMMON_TOBACKEND_H_
-#define BACKEND_COMMON_TOBACKEND_H_
+#ifndef BACKEND_TOBACKEND_H_
+#define BACKEND_TOBACKEND_H_
-#include "Forward.h"
+#include "backend/Forward.h"
namespace backend {
@@ -137,4 +137,4 @@
}
-#endif // BACKEND_COMMON_TOBACKEND_H_
+#endif // BACKEND_TOBACKEND_H_
diff --git a/src/backend/common/BitSetIterator.h b/src/backend/common/BitSetIterator.h
deleted file mode 100644
index 32337dd..0000000
--- a/src/backend/common/BitSetIterator.h
+++ /dev/null
@@ -1,135 +0,0 @@
-// Copyright 2017 The NXT Authors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#ifndef BACKEND_COMMON_BITSETITERATOR_H_
-#define BACKEND_COMMON_BITSETITERATOR_H_
-
-#include "Forward.h"
-#include "Math.h"
-
-#include <bitset>
-#include <limits>
-
-// This is ANGLE's BitSetIterator class with a customizable return type
-// TODO(cwallez@chromium.org): it could be optimized, in particular when N <= 64
-
-namespace backend {
-
- template <typename T>
- T roundUp(const T value, const T alignment) {
- auto temp = value + alignment - static_cast<T>(1);
- return temp - temp % alignment;
- }
-
- template <size_t N, typename T>
- class BitSetIterator final {
- public:
- BitSetIterator(const std::bitset<N>& bitset);
- BitSetIterator(const BitSetIterator& other);
- BitSetIterator &operator=(const BitSetIterator& other);
-
- class Iterator final {
- public:
- Iterator(const std::bitset<N>& bits);
- Iterator& operator++();
-
- bool operator==(const Iterator& other) const;
- bool operator!=(const Iterator& other) const;
- T operator*() const { return static_cast<T>(mCurrentBit); }
-
- private:
- unsigned long getNextBit();
-
- static const size_t BitsPerWord = sizeof(uint32_t) * 8;
- std::bitset<N> mBits;
- unsigned long mCurrentBit;
- unsigned long mOffset;
- };
-
- Iterator begin() const { return Iterator(mBits); }
- Iterator end() const { return Iterator(std::bitset<N>(0)); }
-
- private:
- const std::bitset<N> mBits;
- };
-
- template <size_t N, typename T>
- BitSetIterator<N, T>::BitSetIterator(const std::bitset<N>& bitset)
- : mBits(bitset) {
- }
-
- template <size_t N, typename T>
- BitSetIterator<N, T>::BitSetIterator(const BitSetIterator& other)
- : mBits(other.mBits) {
- }
-
- template <size_t N, typename T>
- BitSetIterator<N, T>& BitSetIterator<N, T>::operator=(const BitSetIterator& other) {
- mBits = other.mBits;
- return *this;
- }
-
- template <size_t N, typename T>
- BitSetIterator<N, T>::Iterator::Iterator(const std::bitset<N>& bits)
- : mBits(bits), mCurrentBit(0), mOffset(0) {
- if (bits.any()) {
- mCurrentBit = getNextBit();
- } else {
- mOffset = static_cast<unsigned long>(roundUp(N, BitsPerWord));
- }
- }
-
- template <size_t N, typename T>
- typename BitSetIterator<N, T>::Iterator& BitSetIterator<N, T>::Iterator::operator++() {
- ASSERT(mBits.any());
- mBits.set(mCurrentBit - mOffset, 0);
- mCurrentBit = getNextBit();
- return *this;
- }
-
- template <size_t N, typename T>
- bool BitSetIterator<N, T>::Iterator::operator==(const Iterator& other) const {
- return mOffset == other.mOffset && mBits == other.mBits;
- }
-
- template <size_t N, typename T>
- bool BitSetIterator<N, T>::Iterator::operator!=(const Iterator& other) const {
- return !(*this == other);
- }
-
- template <size_t N, typename T>
- unsigned long BitSetIterator<N, T>::Iterator::getNextBit() {
- static std::bitset<N> wordMask(std::numeric_limits<uint32_t>::max());
-
- while (mOffset < N) {
- uint32_t wordBits = (mBits & wordMask).to_ulong();
- if (wordBits != 0ul) {
- return ScanForward(wordBits) + mOffset;
- }
-
- mBits >>= BitsPerWord;
- mOffset += BitsPerWord;
- }
- return 0;
- }
-
- // Helper to avoid needing to specify the template parameter size
- template <size_t N>
- BitSetIterator<N, uint32_t> IterateBitSet(const std::bitset<N>& bitset) {
- return BitSetIterator<N, uint32_t>(bitset);
- }
-
-}
-
-#endif // BACKEND_COMMON_BITSETITERATOR_H_
diff --git a/src/backend/common/Math.cpp b/src/backend/common/Math.cpp
deleted file mode 100644
index 874aee0..0000000
--- a/src/backend/common/Math.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2017 The NXT Authors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "Math.h"
-
-#if defined(_WIN32) || defined(_WIN64)
- #include <intrin.h>
-#endif
-
-#include "Forward.h"
-
-namespace backend {
-
- uint32_t ScanForward(uint32_t bits) {
- ASSERT(bits != 0);
- #if defined(_WIN32) || defined(_WIN64)
- unsigned long firstBitIndex = 0ul;
- unsigned char ret = _BitScanForward(&firstBitIndex, bits);
- ASSERT(ret != 0);
- return firstBitIndex;
- #else
- return static_cast<unsigned long>(__builtin_ctz(bits));
- #endif
- }
-
- uint32_t Log2(uint32_t value) {
- ASSERT(value != 0);
- #if defined(_WIN32) || defined(_WIN64)
- unsigned long firstBitIndex = 0ul;
- unsigned char ret = _BitScanReverse(&firstBitIndex, value);
- ASSERT(ret != 0);
- return firstBitIndex;
- #else
- return 31 - __builtin_clz(value);
- #endif
- }
-
- bool IsPowerOfTwo(size_t n) {
- ASSERT(n != 0);
- return (n & (n - 1)) == 0;
- }
-
- bool IsAligned(const void* ptr, size_t alignment) {
- ASSERT(IsPowerOfTwo(alignment));
- ASSERT(alignment != 0);
- return (reinterpret_cast<intptr_t>(ptr) & (alignment - 1)) == 0;
- }
-
- void* AlignVoidPtr(void* ptr, size_t alignment) {
- ASSERT(alignment != 0);
- return reinterpret_cast<void*>((reinterpret_cast<intptr_t>(ptr) + (alignment - 1)) & ~(alignment - 1));
- }
-
-}
diff --git a/src/backend/common/Math.h b/src/backend/common/Math.h
deleted file mode 100644
index 9eaafd3..0000000
--- a/src/backend/common/Math.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2017 The NXT Authors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#ifndef BACKEND_COMMON_MATH_H_
-#define BACKEND_COMMON_MATH_H_
-
-#include <cstddef>
-#include "cstdint"
-
-namespace backend {
-
- // The following are not valid for 0
- uint32_t ScanForward(uint32_t bits);
- uint32_t Log2(uint32_t value);
- bool IsPowerOfTwo(size_t n);
-
- bool IsAligned(const void* ptr, size_t alignment);
- void* AlignVoidPtr(void* ptr, size_t alignment);
-
- template<typename T>
- T* Align(T* ptr, size_t alignment) {
- return reinterpret_cast<T*>(AlignVoidPtr(ptr, alignment));
- }
-
- template<typename T>
- const T* Align(const T* ptr, size_t alignment) {
- return reinterpret_cast<const T*>(AlignVoidPtr(const_cast<T*>(ptr), alignment));
- }
-
-}
-
-#endif // BACKEND_COMMON_MATH_H_
diff --git a/src/backend/common/SerialQueue.h b/src/backend/common/SerialQueue.h
deleted file mode 100644
index 09dcbfc..0000000
--- a/src/backend/common/SerialQueue.h
+++ /dev/null
@@ -1,333 +0,0 @@
-// Copyright 2017 The NXT Authors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#ifndef BACKEND_COMMON_SERIALQUEUE_H_
-#define BACKEND_COMMON_SERIALQUEUE_H_
-
-#include "Forward.h"
-
-#include <cstdint>
-#include <vector>
-
-namespace backend {
-
- template<typename T>
- class SerialQueue {
- private:
- using SerialPair = std::pair<Serial, std::vector<T>>;
- using Storage = std::vector<SerialPair>;
- using StorageIterator = typename Storage::iterator;
- using ConstStorageIterator = typename Storage::const_iterator;
-
- public:
- class Iterator {
- public:
- Iterator(StorageIterator start);
- Iterator& operator++();
-
- bool operator==(const Iterator& other) const;
- bool operator!=(const Iterator& other) const;
- T& operator*() const;
-
- private:
- StorageIterator storageIterator;
- // Special case the serialIterator when it should be equal to storageIterator.begin()
- // otherwise we could ask storageIterator.begin() when storageIterator is storage.end()
- // which is invalid. storageIterator.begin() is tagged with a nullptr.
- T* serialIterator;
- };
-
- class ConstIterator {
- public:
- ConstIterator(ConstStorageIterator start);
- ConstIterator& operator++();
-
- bool operator==(const ConstIterator& other) const;
- bool operator!=(const ConstIterator& other) const;
- const T& operator*() const;
-
- private:
- ConstStorageIterator storageIterator;
- const T* serialIterator;
- };
-
- class BeginEnd {
- public:
- BeginEnd(StorageIterator start, StorageIterator end);
-
- Iterator begin() const;
- Iterator end() const;
-
- private:
- StorageIterator startIt;
- StorageIterator endIt;
- };
-
- class ConstBeginEnd {
- public:
- ConstBeginEnd(ConstStorageIterator start, ConstStorageIterator end);
-
- ConstIterator begin() const;
- ConstIterator end() const;
-
- private:
- ConstStorageIterator startIt;
- ConstStorageIterator endIt;
- };
-
- // The serial must be given in (not strictly) increasing order.
- void Enqueue(const T& value, Serial serial);
- void Enqueue(T&& value, Serial serial);
- void Enqueue(const std::vector<T>& values, Serial serial);
- void Enqueue(std::vector<T>&& values, Serial serial);
-
- bool Empty() const;
-
- // The UpTo variants of Iterate and Clear affect all values associated to a serial
- // that is smaller OR EQUAL to the given serial. Iterating is done like so:
- // for (const T& value : queue.IterateAll()) { stuff(T); }
- ConstBeginEnd IterateAll() const;
- ConstBeginEnd IterateUpTo(Serial serial) const;
- BeginEnd IterateAll();
- BeginEnd IterateUpTo(Serial serial);
-
- void Clear();
- void ClearUpTo(Serial serial);
-
- Serial FirstSerial() const;
-
- private:
- // Returns the first StorageIterator that a serial bigger than serial.
- ConstStorageIterator FindUpTo(Serial serial) const;
- StorageIterator FindUpTo(Serial serial);
- Storage storage;
- };
-
- // SerialQueue
-
- template<typename T>
- void SerialQueue<T>::Enqueue(const T& value, Serial serial) {
- ASSERT(Empty() || storage.back().first <= serial);
-
- if (Empty() || storage.back().first < serial) {
- storage.emplace_back(SerialPair(serial, {}));
- }
- storage.back().second.emplace_back(value);
- }
-
- template<typename T>
- void SerialQueue<T>::Enqueue(T&& value, Serial serial) {
- ASSERT(Empty() || storage.back().first <= serial);
-
- if (Empty() || storage.back().first < serial) {
- storage.emplace_back(SerialPair(serial, {}));
- }
- storage.back().second.emplace_back(value);
- }
-
- template<typename T>
- void SerialQueue<T>::Enqueue(const std::vector<T>& values, Serial serial) {
- ASSERT(values.size() > 0);
- ASSERT(Empty() || storage.back().first <= serial);
- storage.emplace_back(SerialPair(serial, {values}));
- }
-
- template<typename T>
- void SerialQueue<T>::Enqueue(std::vector<T>&& values, Serial serial) {
- ASSERT(values.size() > 0);
- ASSERT(Empty() || storage.back().first <= serial);
- storage.emplace_back(SerialPair(serial, {values}));
- }
-
- template<typename T>
- bool SerialQueue<T>::Empty() const {
- return storage.empty();
- }
-
- template<typename T>
- typename SerialQueue<T>::ConstBeginEnd SerialQueue<T>::IterateAll() const {
- return {storage.begin(), storage.end()};
- }
-
- template<typename T>
- typename SerialQueue<T>::ConstBeginEnd SerialQueue<T>::IterateUpTo(Serial serial) const {
- return {storage.begin(), FindUpTo(serial)};
- }
-
- template<typename T>
- typename SerialQueue<T>::BeginEnd SerialQueue<T>::IterateAll() {
- return {storage.begin(), storage.end()};
- }
-
- template<typename T>
- typename SerialQueue<T>::BeginEnd SerialQueue<T>::IterateUpTo(Serial serial) {
- return {storage.begin(), FindUpTo(serial)};
- }
-
- template<typename T>
- void SerialQueue<T>::Clear() {
- storage.clear();
- }
-
- template<typename T>
- void SerialQueue<T>::ClearUpTo(Serial serial) {
- storage.erase(storage.begin(), FindUpTo(serial));
- }
-
- template<typename T>
- Serial SerialQueue<T>::FirstSerial() const {
- ASSERT(!Empty());
- return storage.front().first;
- }
-
- template<typename T>
- typename SerialQueue<T>::ConstStorageIterator SerialQueue<T>::FindUpTo(Serial serial) const {
- auto it = storage.begin();
- while (it != storage.end() && it->first <= serial) {
- it ++;
- }
- return it;
- }
-
- template<typename T>
- typename SerialQueue<T>::StorageIterator SerialQueue<T>::FindUpTo(Serial serial) {
- auto it = storage.begin();
- while (it != storage.end() && it->first <= serial) {
- it ++;
- }
- return it;
- }
-
- // SerialQueue::BeginEnd
-
- template<typename T>
- SerialQueue<T>::BeginEnd::BeginEnd(typename SerialQueue<T>::StorageIterator start, typename SerialQueue<T>::StorageIterator end)
- : startIt(start), endIt(end) {
- }
-
- template<typename T>
- typename SerialQueue<T>::Iterator SerialQueue<T>::BeginEnd::begin() const {
- return {startIt};
- }
-
- template<typename T>
- typename SerialQueue<T>::Iterator SerialQueue<T>::BeginEnd::end() const {
- return {endIt};
- }
-
- // SerialQueue::Iterator
-
- template<typename T>
- SerialQueue<T>::Iterator::Iterator(typename SerialQueue<T>::StorageIterator start)
- : storageIterator(start), serialIterator(nullptr) {
- }
-
- template<typename T>
- typename SerialQueue<T>::Iterator& SerialQueue<T>::Iterator::operator++() {
- T* vectorData = storageIterator->second.data();
-
- if (serialIterator == nullptr) {
- serialIterator = vectorData + 1;
- } else {
- serialIterator ++;
- }
-
- if (serialIterator >= vectorData + storageIterator->second.size()) {
- serialIterator = nullptr;
- storageIterator ++;
- }
-
- return *this;
- }
-
- template<typename T>
- bool SerialQueue<T>::Iterator::operator==(const typename SerialQueue<T>::Iterator& other) const {
- return other.storageIterator == storageIterator && other.serialIterator == serialIterator;
- }
-
- template<typename T>
- bool SerialQueue<T>::Iterator::operator!=(const typename SerialQueue<T>::Iterator& other) const {
- return !(*this == other);
- }
-
- template<typename T>
- T& SerialQueue<T>::Iterator::operator*() const {
- if (serialIterator == nullptr) {
- return *storageIterator->second.begin();
- }
- return *serialIterator;
- }
-
- // SerialQueue::ConstBeginEnd
-
- template<typename T>
- SerialQueue<T>::ConstBeginEnd::ConstBeginEnd(typename SerialQueue<T>::ConstStorageIterator start, typename SerialQueue<T>::ConstStorageIterator end)
- : startIt(start), endIt(end) {
- }
-
- template<typename T>
- typename SerialQueue<T>::ConstIterator SerialQueue<T>::ConstBeginEnd::begin() const {
- return {startIt};
- }
-
- template<typename T>
- typename SerialQueue<T>::ConstIterator SerialQueue<T>::ConstBeginEnd::end() const {
- return {endIt};
- }
-
- // SerialQueue::ConstIterator
-
- template<typename T>
- SerialQueue<T>::ConstIterator::ConstIterator(typename SerialQueue<T>::ConstStorageIterator start)
- : storageIterator(start), serialIterator(nullptr) {
- }
-
- template<typename T>
- typename SerialQueue<T>::ConstIterator& SerialQueue<T>::ConstIterator::operator++() {
- const T* vectorData = storageIterator->second.data();
-
- if (serialIterator == nullptr) {
- serialIterator = vectorData + 1;
- } else {
- serialIterator ++;
- }
-
- if (serialIterator >= vectorData + storageIterator->second.size()) {
- serialIterator = nullptr;
- storageIterator ++;
- }
-
- return *this;
- }
-
- template<typename T>
- bool SerialQueue<T>::ConstIterator::operator==(const typename SerialQueue<T>::ConstIterator& other) const {
- return other.storageIterator == storageIterator && other.serialIterator == serialIterator;
- }
-
- template<typename T>
- bool SerialQueue<T>::ConstIterator::operator!=(const typename SerialQueue<T>::ConstIterator& other) const {
- return !(*this == other);
- }
-
- template<typename T>
- const T& SerialQueue<T>::ConstIterator::operator*() const {
- if (serialIterator == nullptr) {
- return *storageIterator->second.begin();
- }
- return *serialIterator;
- }
-}
-
-#endif // BACKEND_COMMON_SERIALQUEUE_H_
diff --git a/src/backend/d3d12/BindGroupD3D12.cpp b/src/backend/d3d12/BindGroupD3D12.cpp
index e278ed9..a5d16c9 100644
--- a/src/backend/d3d12/BindGroupD3D12.cpp
+++ b/src/backend/d3d12/BindGroupD3D12.cpp
@@ -13,13 +13,13 @@
// limitations under the License.
#include "common/BitSetIterator.h"
-#include "BindGroupD3D12.h"
-#include "BindGroupLayoutD3D12.h"
-#include "BufferD3D12.h"
-#include "SamplerD3D12.h"
-#include "TextureD3D12.h"
+#include "backend/d3d12/BindGroupD3D12.h"
+#include "backend/d3d12/BindGroupLayoutD3D12.h"
+#include "backend/d3d12/BufferD3D12.h"
+#include "backend/d3d12/SamplerD3D12.h"
+#include "backend/d3d12/TextureD3D12.h"
-#include "D3D12Backend.h"
+#include "backend/d3d12/D3D12Backend.h"
namespace backend {
namespace d3d12 {
diff --git a/src/backend/d3d12/BindGroupD3D12.h b/src/backend/d3d12/BindGroupD3D12.h
index 49d89fe..4b38c86 100644
--- a/src/backend/d3d12/BindGroupD3D12.h
+++ b/src/backend/d3d12/BindGroupD3D12.h
@@ -15,11 +15,11 @@
#ifndef BACKEND_D3D12_BINDGROUPD3D12_H_
#define BACKEND_D3D12_BINDGROUPD3D12_H_
-#include "common/BindGroup.h"
+#include "backend/BindGroup.h"
-#include "d3d12_platform.h"
+#include "backend/d3d12/d3d12_platform.h"
-#include "DescriptorHeapAllocator.h"
+#include "backend/d3d12/DescriptorHeapAllocator.h"
namespace backend {
namespace d3d12 {
diff --git a/src/backend/d3d12/BindGroupLayoutD3D12.cpp b/src/backend/d3d12/BindGroupLayoutD3D12.cpp
index c7a5172..65db74b 100644
--- a/src/backend/d3d12/BindGroupLayoutD3D12.cpp
+++ b/src/backend/d3d12/BindGroupLayoutD3D12.cpp
@@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "BindGroupLayoutD3D12.h"
+#include "backend/d3d12/BindGroupLayoutD3D12.h"
#include "common/BitSetIterator.h"
-#include "D3D12Backend.h"
+#include "backend/d3d12/D3D12Backend.h"
namespace backend {
namespace d3d12 {
diff --git a/src/backend/d3d12/BindGroupLayoutD3D12.h b/src/backend/d3d12/BindGroupLayoutD3D12.h
index 1d310703..96bd2ec 100644
--- a/src/backend/d3d12/BindGroupLayoutD3D12.h
+++ b/src/backend/d3d12/BindGroupLayoutD3D12.h
@@ -15,9 +15,9 @@
#ifndef BACKEND_D3D12_BINDGROUPLAYOUTD3D12_H_
#define BACKEND_D3D12_BINDGROUPLAYOUTD3D12_H_
-#include "common/BindGroupLayout.h"
+#include "backend/BindGroupLayout.h"
-#include "d3d12_platform.h"
+#include "backend/d3d12/d3d12_platform.h"
namespace backend {
namespace d3d12 {
diff --git a/src/backend/d3d12/BufferD3D12.cpp b/src/backend/d3d12/BufferD3D12.cpp
index 42085c3..5cb12ca 100644
--- a/src/backend/d3d12/BufferD3D12.cpp
+++ b/src/backend/d3d12/BufferD3D12.cpp
@@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "BufferD3D12.h"
+#include "backend/d3d12/BufferD3D12.h"
-#include "D3D12Backend.h"
-#include "ResourceAllocator.h"
-#include "ResourceUploader.h"
+#include "backend/d3d12/D3D12Backend.h"
+#include "backend/d3d12/ResourceAllocator.h"
+#include "backend/d3d12/ResourceUploader.h"
namespace backend {
namespace d3d12 {
diff --git a/src/backend/d3d12/BufferD3D12.h b/src/backend/d3d12/BufferD3D12.h
index 7518abc..dd7ef07 100644
--- a/src/backend/d3d12/BufferD3D12.h
+++ b/src/backend/d3d12/BufferD3D12.h
@@ -15,10 +15,10 @@
#ifndef BACKEND_D3D12_BUFFERD3D12_H_
#define BACKEND_D3D12_BUFFERD3D12_H_
-#include "common/Buffer.h"
+#include "backend/Buffer.h"
#include "common/SerialQueue.h"
-#include "d3d12_platform.h"
+#include "backend/d3d12/d3d12_platform.h"
namespace backend {
namespace d3d12 {
diff --git a/src/backend/d3d12/CommandAllocatorManager.cpp b/src/backend/d3d12/CommandAllocatorManager.cpp
index 284e183..08531af 100644
--- a/src/backend/d3d12/CommandAllocatorManager.cpp
+++ b/src/backend/d3d12/CommandAllocatorManager.cpp
@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "CommandAllocatorManager.h"
+#include "backend/d3d12/CommandAllocatorManager.h"
-#include "D3D12Backend.h"
+#include "backend/d3d12/D3D12Backend.h"
#include "common/BitSetIterator.h"
diff --git a/src/backend/d3d12/CommandAllocatorManager.h b/src/backend/d3d12/CommandAllocatorManager.h
index 1510afd..33817c7 100644
--- a/src/backend/d3d12/CommandAllocatorManager.h
+++ b/src/backend/d3d12/CommandAllocatorManager.h
@@ -15,7 +15,7 @@
#ifndef BACKEND_D3D12_COMMANDALLOCATORMANAGER_H_
#define BACKEND_D3D12_COMMANDALLOCATORMANAGER_H_
-#include "d3d12_platform.h"
+#include "backend/d3d12/d3d12_platform.h"
#include "common/SerialQueue.h"
diff --git a/src/backend/d3d12/CommandBufferD3D12.cpp b/src/backend/d3d12/CommandBufferD3D12.cpp
index ba233d1..e4197e7 100644
--- a/src/backend/d3d12/CommandBufferD3D12.cpp
+++ b/src/backend/d3d12/CommandBufferD3D12.cpp
@@ -12,19 +12,19 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "CommandBufferD3D12.h"
+#include "backend/d3d12/CommandBufferD3D12.h"
-#include "common/Commands.h"
-#include "D3D12Backend.h"
-#include "BindGroupD3D12.h"
-#include "BindGroupLayoutD3D12.h"
-#include "BufferD3D12.h"
-#include "DescriptorHeapAllocator.h"
-#include "InputStateD3D12.h"
-#include "PipelineD3D12.h"
-#include "PipelineLayoutD3D12.h"
-#include "SamplerD3D12.h"
-#include "TextureD3D12.h"
+#include "backend/Commands.h"
+#include "backend/d3d12/D3D12Backend.h"
+#include "backend/d3d12/BindGroupD3D12.h"
+#include "backend/d3d12/BindGroupLayoutD3D12.h"
+#include "backend/d3d12/BufferD3D12.h"
+#include "backend/d3d12/DescriptorHeapAllocator.h"
+#include "backend/d3d12/InputStateD3D12.h"
+#include "backend/d3d12/PipelineD3D12.h"
+#include "backend/d3d12/PipelineLayoutD3D12.h"
+#include "backend/d3d12/SamplerD3D12.h"
+#include "backend/d3d12/TextureD3D12.h"
#include "ResourceAllocator.h"
diff --git a/src/backend/d3d12/CommandBufferD3D12.h b/src/backend/d3d12/CommandBufferD3D12.h
index c9e434d..de2c3fb 100644
--- a/src/backend/d3d12/CommandBufferD3D12.h
+++ b/src/backend/d3d12/CommandBufferD3D12.h
@@ -15,10 +15,10 @@
#ifndef BACKEND_D3D12_COMMANDBUFFERD3D12_H_
#define BACKEND_D3D12_COMMANDBUFFERD3D12_H_
-#include "common/CommandAllocator.h"
-#include "common/CommandBuffer.h"
+#include "backend/CommandAllocator.h"
+#include "backend/CommandBuffer.h"
-#include "d3d12_platform.h"
+#include "backend/d3d12/d3d12_platform.h"
namespace backend {
namespace d3d12 {
diff --git a/src/backend/d3d12/D3D12Backend.cpp b/src/backend/d3d12/D3D12Backend.cpp
index 8e8dfe0..f6df78b 100644
--- a/src/backend/d3d12/D3D12Backend.cpp
+++ b/src/backend/d3d12/D3D12Backend.cpp
@@ -12,24 +12,24 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "D3D12Backend.h"
+#include "backend/d3d12/D3D12Backend.h"
-#include "BindGroupD3D12.h"
-#include "BindGroupLayoutD3D12.h"
-#include "BufferD3D12.h"
-#include "CommandBufferD3D12.h"
-#include "InputStateD3D12.h"
-#include "PipelineD3D12.h"
-#include "PipelineLayoutD3D12.h"
-#include "QueueD3D12.h"
-#include "SamplerD3D12.h"
-#include "ShaderModuleD3D12.h"
-#include "TextureD3D12.h"
+#include "backend/d3d12/BindGroupD3D12.h"
+#include "backend/d3d12/BindGroupLayoutD3D12.h"
+#include "backend/d3d12/BufferD3D12.h"
+#include "backend/d3d12/CommandBufferD3D12.h"
+#include "backend/d3d12/InputStateD3D12.h"
+#include "backend/d3d12/PipelineD3D12.h"
+#include "backend/d3d12/PipelineLayoutD3D12.h"
+#include "backend/d3d12/QueueD3D12.h"
+#include "backend/d3d12/SamplerD3D12.h"
+#include "backend/d3d12/ShaderModuleD3D12.h"
+#include "backend/d3d12/TextureD3D12.h"
-#include "CommandAllocatorManager.h"
-#include "DescriptorHeapAllocator.h"
-#include "ResourceAllocator.h"
-#include "ResourceUploader.h"
+#include "backend/d3d12/CommandAllocatorManager.h"
+#include "backend/d3d12/DescriptorHeapAllocator.h"
+#include "backend/d3d12/ResourceAllocator.h"
+#include "backend/d3d12/ResourceUploader.h"
namespace backend {
namespace d3d12 {
diff --git a/src/backend/d3d12/D3D12Backend.h b/src/backend/d3d12/D3D12Backend.h
index 4ea37ba..827249e 100644
--- a/src/backend/d3d12/D3D12Backend.h
+++ b/src/backend/d3d12/D3D12Backend.h
@@ -17,21 +17,21 @@
#include "nxt/nxtcpp.h"
-#include "common/Buffer.h"
-#include "common/BindGroup.h"
-#include "common/BindGroupLayout.h"
-#include "common/Device.h"
-#include "common/Framebuffer.h"
-#include "common/DepthStencilState.h"
-#include "common/InputState.h"
-#include "common/PipelineLayout.h"
-#include "common/Queue.h"
-#include "common/RenderPass.h"
-#include "common/Sampler.h"
-#include "common/Texture.h"
-#include "common/ToBackend.h"
+#include "backend/Buffer.h"
+#include "backend/BindGroup.h"
+#include "backend/BindGroupLayout.h"
+#include "backend/Device.h"
+#include "backend/Framebuffer.h"
+#include "backend/DepthStencilState.h"
+#include "backend/InputState.h"
+#include "backend/PipelineLayout.h"
+#include "backend/Queue.h"
+#include "backend/RenderPass.h"
+#include "backend/Sampler.h"
+#include "backend/Texture.h"
+#include "backend/ToBackend.h"
-#include "d3d12_platform.h"
+#include "backend/d3d12/d3d12_platform.h"
namespace backend {
namespace d3d12 {
diff --git a/src/backend/d3d12/DescriptorHeapAllocator.cpp b/src/backend/d3d12/DescriptorHeapAllocator.cpp
index 1e4c1ff..4ef34c7 100644
--- a/src/backend/d3d12/DescriptorHeapAllocator.cpp
+++ b/src/backend/d3d12/DescriptorHeapAllocator.cpp
@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "DescriptorHeapAllocator.h"
+#include "backend/d3d12/DescriptorHeapAllocator.h"
-#include "D3D12Backend.h"
+#include "backend/d3d12/D3D12Backend.h"
namespace backend {
namespace d3d12 {
diff --git a/src/backend/d3d12/DescriptorHeapAllocator.h b/src/backend/d3d12/DescriptorHeapAllocator.h
index 07aab8f..1c5ad2e 100644
--- a/src/backend/d3d12/DescriptorHeapAllocator.h
+++ b/src/backend/d3d12/DescriptorHeapAllocator.h
@@ -15,7 +15,7 @@
#ifndef BACKEND_D3D12_DESCRIPTORHEAPALLOCATOR_H_
#define BACKEND_D3D12_DESCRIPTORHEAPALLOCATOR_H_
-#include "d3d12_platform.h"
+#include "backend/d3d12/d3d12_platform.h"
#include "common/SerialQueue.h"
#include <array>
diff --git a/src/backend/d3d12/GeneratedCodeIncludes.h b/src/backend/d3d12/GeneratedCodeIncludes.h
index fbf10566..7ec9e6f 100644
--- a/src/backend/d3d12/GeneratedCodeIncludes.h
+++ b/src/backend/d3d12/GeneratedCodeIncludes.h
@@ -12,15 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "D3D12Backend.h"
-#include "BindGroupD3D12.h"
-#include "BindGroupLayoutD3D12.h"
-#include "BufferD3D12.h"
-#include "CommandBufferD3D12.h"
-#include "InputStateD3D12.h"
-#include "PipelineD3D12.h"
-#include "PipelineLayoutD3D12.h"
-#include "QueueD3D12.h"
-#include "SamplerD3D12.h"
-#include "ShaderModuleD3D12.h"
-#include "TextureD3D12.h"
+#include "backend/d3d12/D3D12Backend.h"
+#include "backend/d3d12/BindGroupD3D12.h"
+#include "backend/d3d12/BindGroupLayoutD3D12.h"
+#include "backend/d3d12/BufferD3D12.h"
+#include "backend/d3d12/CommandBufferD3D12.h"
+#include "backend/d3d12/InputStateD3D12.h"
+#include "backend/d3d12/PipelineD3D12.h"
+#include "backend/d3d12/PipelineLayoutD3D12.h"
+#include "backend/d3d12/QueueD3D12.h"
+#include "backend/d3d12/SamplerD3D12.h"
+#include "backend/d3d12/ShaderModuleD3D12.h"
+#include "backend/d3d12/TextureD3D12.h"
diff --git a/src/backend/d3d12/InputStateD3D12.cpp b/src/backend/d3d12/InputStateD3D12.cpp
index 0d53e85..5a9e559 100644
--- a/src/backend/d3d12/InputStateD3D12.cpp
+++ b/src/backend/d3d12/InputStateD3D12.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "InputStateD3D12.h"
+#include "backend/d3d12/InputStateD3D12.h"
namespace backend {
namespace d3d12 {
diff --git a/src/backend/d3d12/InputStateD3D12.h b/src/backend/d3d12/InputStateD3D12.h
index 5dc2187..be48238 100644
--- a/src/backend/d3d12/InputStateD3D12.h
+++ b/src/backend/d3d12/InputStateD3D12.h
@@ -15,9 +15,9 @@
#ifndef BACKEND_D3D12_INPUTSTATED3D12_H_
#define BACKEND_D3D12_INPUTSTATED3D12_H_
-#include "common/InputState.h"
+#include "backend/InputState.h"
-#include "d3d12_platform.h"
+#include "backend/d3d12/d3d12_platform.h"
namespace backend {
namespace d3d12 {
diff --git a/src/backend/d3d12/PipelineD3D12.cpp b/src/backend/d3d12/PipelineD3D12.cpp
index 290dd98..d1eeec1 100644
--- a/src/backend/d3d12/PipelineD3D12.cpp
+++ b/src/backend/d3d12/PipelineD3D12.cpp
@@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "PipelineD3D12.h"
+#include "backend/d3d12/PipelineD3D12.h"
-#include "D3D12Backend.h"
-#include "InputStateD3D12.h"
-#include "ShaderModuleD3D12.h"
-#include "PipelineLayoutD3D12.h"
+#include "backend/d3d12/D3D12Backend.h"
+#include "backend/d3d12/InputStateD3D12.h"
+#include "backend/d3d12/ShaderModuleD3D12.h"
+#include "backend/d3d12/PipelineLayoutD3D12.h"
#include <d3dcompiler.h>
diff --git a/src/backend/d3d12/PipelineD3D12.h b/src/backend/d3d12/PipelineD3D12.h
index ec88b46..2b9faa7 100644
--- a/src/backend/d3d12/PipelineD3D12.h
+++ b/src/backend/d3d12/PipelineD3D12.h
@@ -15,9 +15,9 @@
#ifndef BACKEND_D3D12_PIPELINED3D12_H_
#define BACKEND_D3D12_PIPELINED3D12_H_
-#include "common/Pipeline.h"
+#include "backend/Pipeline.h"
-#include "d3d12_platform.h"
+#include "backend/d3d12/d3d12_platform.h"
namespace backend {
namespace d3d12 {
diff --git a/src/backend/d3d12/PipelineLayoutD3D12.cpp b/src/backend/d3d12/PipelineLayoutD3D12.cpp
index 883cd2d..4c27fed 100644
--- a/src/backend/d3d12/PipelineLayoutD3D12.cpp
+++ b/src/backend/d3d12/PipelineLayoutD3D12.cpp
@@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "PipelineLayoutD3D12.h"
+#include "backend/d3d12/PipelineLayoutD3D12.h"
-#include "D3D12Backend.h"
-#include "BindGroupLayoutD3D12.h"
+#include "backend/d3d12/D3D12Backend.h"
+#include "backend/d3d12/BindGroupLayoutD3D12.h"
using Microsoft::WRL::ComPtr;
diff --git a/src/backend/d3d12/PipelineLayoutD3D12.h b/src/backend/d3d12/PipelineLayoutD3D12.h
index fe87a05..8309c66 100644
--- a/src/backend/d3d12/PipelineLayoutD3D12.h
+++ b/src/backend/d3d12/PipelineLayoutD3D12.h
@@ -15,9 +15,9 @@
#ifndef BACKEND_D3D12_PIPELINELAYOUTD3D12_H_
#define BACKEND_D3D12_PIPELINELAYOUTD3D12_H_
-#include "common/PipelineLayout.h"
+#include "backend/PipelineLayout.h"
-#include "d3d12_platform.h"
+#include "backend/d3d12/d3d12_platform.h"
namespace backend {
namespace d3d12 {
diff --git a/src/backend/d3d12/QueueD3D12.cpp b/src/backend/d3d12/QueueD3D12.cpp
index a03162a..48ef895 100644
--- a/src/backend/d3d12/QueueD3D12.cpp
+++ b/src/backend/d3d12/QueueD3D12.cpp
@@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "QueueD3D12.h"
+#include "backend/d3d12/QueueD3D12.h"
-#include "D3D12Backend.h"
-#include "CommandBufferD3D12.h"
+#include "backend/d3d12/D3D12Backend.h"
+#include "backend/d3d12/CommandBufferD3D12.h"
namespace backend {
namespace d3d12 {
diff --git a/src/backend/d3d12/QueueD3D12.h b/src/backend/d3d12/QueueD3D12.h
index 1e14d99..839bb91 100644
--- a/src/backend/d3d12/QueueD3D12.h
+++ b/src/backend/d3d12/QueueD3D12.h
@@ -15,9 +15,9 @@
#ifndef BACKEND_D3D12_QUEUED3D12_H_
#define BACKEND_D3D12_QUEUED3D12_H_
-#include "common/Queue.h"
+#include "backend/Queue.h"
-#include "d3d12_platform.h"
+#include "backend/d3d12/d3d12_platform.h"
namespace backend {
namespace d3d12 {
diff --git a/src/backend/d3d12/ResourceAllocator.cpp b/src/backend/d3d12/ResourceAllocator.cpp
index c2e1fde..f7f5e5f 100644
--- a/src/backend/d3d12/ResourceAllocator.cpp
+++ b/src/backend/d3d12/ResourceAllocator.cpp
@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "ResourceAllocator.h"
+#include "backend/d3d12/ResourceAllocator.h"
-#include "D3D12Backend.h"
+#include "backend/d3d12/D3D12Backend.h"
namespace backend {
namespace d3d12 {
diff --git a/src/backend/d3d12/ResourceAllocator.h b/src/backend/d3d12/ResourceAllocator.h
index 19aef02..63823d3 100644
--- a/src/backend/d3d12/ResourceAllocator.h
+++ b/src/backend/d3d12/ResourceAllocator.h
@@ -15,7 +15,7 @@
#ifndef BACKEND_D3D12_RESOURCEALLOCATIONMANAGER_H_
#define BACKEND_D3D12_RESOURCEALLOCATIONMANAGER_H_
-#include "d3d12_platform.h"
+#include "backend/d3d12/d3d12_platform.h"
#include "common/SerialQueue.h"
diff --git a/src/backend/d3d12/ResourceUploader.cpp b/src/backend/d3d12/ResourceUploader.cpp
index 80f1137..972b615 100644
--- a/src/backend/d3d12/ResourceUploader.cpp
+++ b/src/backend/d3d12/ResourceUploader.cpp
@@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "ResourceUploader.h"
+#include "backend/d3d12/ResourceUploader.h"
-#include "D3D12Backend.h"
-#include "ResourceAllocator.h"
+#include "backend/d3d12/D3D12Backend.h"
+#include "backend/d3d12/ResourceAllocator.h"
namespace backend {
namespace d3d12 {
diff --git a/src/backend/d3d12/ResourceUploader.h b/src/backend/d3d12/ResourceUploader.h
index 470f001..2550625 100644
--- a/src/backend/d3d12/ResourceUploader.h
+++ b/src/backend/d3d12/ResourceUploader.h
@@ -15,9 +15,9 @@
#ifndef BACKEND_D3D12_RESOURCEUPLOADER_H_
#define BACKEND_D3D12_RESOURCEUPLOADER_H_
-#include "d3d12_platform.h"
+#include "backend/d3d12/d3d12_platform.h"
-#include "common/Forward.h"
+#include "backend/Forward.h"
namespace backend {
namespace d3d12 {
diff --git a/src/backend/d3d12/SamplerD3D12.cpp b/src/backend/d3d12/SamplerD3D12.cpp
index b337b39..67e5d91 100644
--- a/src/backend/d3d12/SamplerD3D12.cpp
+++ b/src/backend/d3d12/SamplerD3D12.cpp
@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "SamplerD3D12.h"
+#include "backend/d3d12/SamplerD3D12.h"
-#include "D3D12Backend.h"
+#include "backend/d3d12/D3D12Backend.h"
namespace backend {
namespace d3d12 {
diff --git a/src/backend/d3d12/SamplerD3D12.h b/src/backend/d3d12/SamplerD3D12.h
index 87198b7..9201cd3 100644
--- a/src/backend/d3d12/SamplerD3D12.h
+++ b/src/backend/d3d12/SamplerD3D12.h
@@ -15,9 +15,9 @@
#ifndef BACKEND_D3D12_SAMPLERD3D12_H_
#define BACKEND_D3D12_SAMPLERD3D12_H_
-#include "common/Sampler.h"
+#include "backend/Sampler.h"
-#include "d3d12_platform.h"
+#include "backend/d3d12/d3d12_platform.h"
namespace backend {
namespace d3d12 {
diff --git a/src/backend/d3d12/ShaderModuleD3D12.cpp b/src/backend/d3d12/ShaderModuleD3D12.cpp
index ee52a28..ec6fc9f 100644
--- a/src/backend/d3d12/ShaderModuleD3D12.cpp
+++ b/src/backend/d3d12/ShaderModuleD3D12.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "ShaderModuleD3D12.h"
+#include "backend/d3d12/ShaderModuleD3D12.h"
#include <spirv-cross/spirv_hlsl.hpp>
diff --git a/src/backend/d3d12/ShaderModuleD3D12.h b/src/backend/d3d12/ShaderModuleD3D12.h
index d703cd8..4670f82 100644
--- a/src/backend/d3d12/ShaderModuleD3D12.h
+++ b/src/backend/d3d12/ShaderModuleD3D12.h
@@ -15,7 +15,7 @@
#ifndef BACKEND_D3D12_SHADERMODULED3D12_H_
#define BACKEND_D3D12_SHADERMODULED3D12_H_
-#include "common/ShaderModule.h"
+#include "backend/ShaderModule.h"
namespace backend {
namespace d3d12 {
diff --git a/src/backend/d3d12/TextureD3D12.cpp b/src/backend/d3d12/TextureD3D12.cpp
index a4b94af..6ac6666 100644
--- a/src/backend/d3d12/TextureD3D12.cpp
+++ b/src/backend/d3d12/TextureD3D12.cpp
@@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "TextureD3D12.h"
+#include "backend/d3d12/TextureD3D12.h"
-#include "D3D12Backend.h"
-#include "ResourceAllocator.h"
+#include "backend/d3d12/D3D12Backend.h"
+#include "backend/d3d12/ResourceAllocator.h"
namespace backend {
namespace d3d12 {
diff --git a/src/backend/d3d12/TextureD3D12.h b/src/backend/d3d12/TextureD3D12.h
index 26f45d8..e8029b4 100644
--- a/src/backend/d3d12/TextureD3D12.h
+++ b/src/backend/d3d12/TextureD3D12.h
@@ -15,9 +15,9 @@
#ifndef BACKEND_D3D12_TEXTURED3D12_H_
#define BACKEND_D3D12_TEXTURED3D12_H_
-#include "common/Texture.h"
+#include "backend/Texture.h"
-#include "d3d12_platform.h"
+#include "backend/d3d12/d3d12_platform.h"
namespace backend {
namespace d3d12 {
diff --git a/src/backend/metal/BufferMTL.h b/src/backend/metal/BufferMTL.h
index 26b29a3..d14a79b 100644
--- a/src/backend/metal/BufferMTL.h
+++ b/src/backend/metal/BufferMTL.h
@@ -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>
diff --git a/src/backend/metal/BufferMTL.mm b/src/backend/metal/BufferMTL.mm
index ed1bf18..4f8f99f 100644
--- a/src/backend/metal/BufferMTL.mm
+++ b/src/backend/metal/BufferMTL.mm
@@ -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 {
diff --git a/src/backend/metal/CommandBufferMTL.h b/src/backend/metal/CommandBufferMTL.h
index 0c95dca..2c390e3 100644
--- a/src/backend/metal/CommandBufferMTL.h
+++ b/src/backend/metal/CommandBufferMTL.h
@@ -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>
diff --git a/src/backend/metal/CommandBufferMTL.mm b/src/backend/metal/CommandBufferMTL.mm
index 44c8c72..24fbdd4 100644
--- a/src/backend/metal/CommandBufferMTL.mm
+++ b/src/backend/metal/CommandBufferMTL.mm
@@ -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 {
diff --git a/src/backend/metal/DepthStencilStateMTL.h b/src/backend/metal/DepthStencilStateMTL.h
index e0dc97f..e8f3df7 100644
--- a/src/backend/metal/DepthStencilStateMTL.h
+++ b/src/backend/metal/DepthStencilStateMTL.h
@@ -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>
diff --git a/src/backend/metal/DepthStencilStateMTL.mm b/src/backend/metal/DepthStencilStateMTL.mm
index 3c727f9..b41bbe5 100644
--- a/src/backend/metal/DepthStencilStateMTL.mm
+++ b/src/backend/metal/DepthStencilStateMTL.mm
@@ -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 {
diff --git a/src/backend/metal/GeneratedCodeIncludes.h b/src/backend/metal/GeneratedCodeIncludes.h
index 808462e..37bd1a1 100644
--- a/src/backend/metal/GeneratedCodeIncludes.h
+++ b/src/backend/metal/GeneratedCodeIncludes.h
@@ -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"
diff --git a/src/backend/metal/InputStateMTL.h b/src/backend/metal/InputStateMTL.h
index 8011f40..771bf2b 100644
--- a/src/backend/metal/InputStateMTL.h
+++ b/src/backend/metal/InputStateMTL.h
@@ -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>
diff --git a/src/backend/metal/InputStateMTL.mm b/src/backend/metal/InputStateMTL.mm
index 2867f73..bbe75a8 100644
--- a/src/backend/metal/InputStateMTL.mm
+++ b/src/backend/metal/InputStateMTL.mm
@@ -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 {
diff --git a/src/backend/metal/MetalBackend.h b/src/backend/metal/MetalBackend.h
index 33c01b4..c72d942 100644
--- a/src/backend/metal/MetalBackend.h
+++ b/src/backend/metal/MetalBackend.h
@@ -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>
diff --git a/src/backend/metal/MetalBackend.mm b/src/backend/metal/MetalBackend.mm
index 64789de..e3d1f0a 100644
--- a/src/backend/metal/MetalBackend.mm
+++ b/src/backend/metal/MetalBackend.mm
@@ -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 {
diff --git a/src/backend/metal/PipelineLayoutMTL.h b/src/backend/metal/PipelineLayoutMTL.h
index e944e33..34b4fda 100644
--- a/src/backend/metal/PipelineLayoutMTL.h
+++ b/src/backend/metal/PipelineLayoutMTL.h
@@ -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>
diff --git a/src/backend/metal/PipelineLayoutMTL.mm b/src/backend/metal/PipelineLayoutMTL.mm
index 5fcadb9..071c144 100644
--- a/src/backend/metal/PipelineLayoutMTL.mm
+++ b/src/backend/metal/PipelineLayoutMTL.mm
@@ -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 {
diff --git a/src/backend/metal/PipelineMTL.h b/src/backend/metal/PipelineMTL.h
index d3e97f2..9d049f3 100644
--- a/src/backend/metal/PipelineMTL.h
+++ b/src/backend/metal/PipelineMTL.h
@@ -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>
diff --git a/src/backend/metal/PipelineMTL.mm b/src/backend/metal/PipelineMTL.mm
index 8b92aee..6f77a4b 100644
--- a/src/backend/metal/PipelineMTL.mm
+++ b/src/backend/metal/PipelineMTL.mm
@@ -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 {
diff --git a/src/backend/metal/ResourceUploader.h b/src/backend/metal/ResourceUploader.h
index ecd307b..c95f74f 100644
--- a/src/backend/metal/ResourceUploader.h
+++ b/src/backend/metal/ResourceUploader.h
@@ -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>
diff --git a/src/backend/metal/ResourceUploader.mm b/src/backend/metal/ResourceUploader.mm
index 1d8c6f0..058bfc6 100644
--- a/src/backend/metal/ResourceUploader.mm
+++ b/src/backend/metal/ResourceUploader.mm
@@ -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 {
diff --git a/src/backend/metal/SamplerMTL.h b/src/backend/metal/SamplerMTL.h
index 5990e55..84b485d 100644
--- a/src/backend/metal/SamplerMTL.h
+++ b/src/backend/metal/SamplerMTL.h
@@ -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>
diff --git a/src/backend/metal/SamplerMTL.mm b/src/backend/metal/SamplerMTL.mm
index fbaa8b2..a3ef42c 100644
--- a/src/backend/metal/SamplerMTL.mm
+++ b/src/backend/metal/SamplerMTL.mm
@@ -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 {
diff --git a/src/backend/metal/ShaderModuleMTL.h b/src/backend/metal/ShaderModuleMTL.h
index 6b7c3f7..3896922 100644
--- a/src/backend/metal/ShaderModuleMTL.h
+++ b/src/backend/metal/ShaderModuleMTL.h
@@ -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>
diff --git a/src/backend/metal/ShaderModuleMTL.mm b/src/backend/metal/ShaderModuleMTL.mm
index 5247eaf..5b2b804 100644
--- a/src/backend/metal/ShaderModuleMTL.mm
+++ b/src/backend/metal/ShaderModuleMTL.mm
@@ -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>
diff --git a/src/backend/metal/TextureMTL.h b/src/backend/metal/TextureMTL.h
index bc72cd1..019276c 100644
--- a/src/backend/metal/TextureMTL.h
+++ b/src/backend/metal/TextureMTL.h
@@ -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>
diff --git a/src/backend/metal/TextureMTL.mm b/src/backend/metal/TextureMTL.mm
index 46119ab..b00faf4 100644
--- a/src/backend/metal/TextureMTL.mm
+++ b/src/backend/metal/TextureMTL.mm
@@ -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 {
diff --git a/src/backend/null/GeneratedCodeIncludes.h b/src/backend/null/GeneratedCodeIncludes.h
index 22c328d..d06abba 100644
--- a/src/backend/null/GeneratedCodeIncludes.h
+++ b/src/backend/null/GeneratedCodeIncludes.h
@@ -12,4 +12,4 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "NullBackend.h"
+#include "backend/null/NullBackend.h"
diff --git a/src/backend/null/NullBackend.cpp b/src/backend/null/NullBackend.cpp
index 0e0ff38..397e4b4 100644
--- a/src/backend/null/NullBackend.cpp
+++ b/src/backend/null/NullBackend.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "NullBackend.h"
+#include "backend/null/NullBackend.h"
#include <spirv-cross/spirv_cross.hpp>
diff --git a/src/backend/null/NullBackend.h b/src/backend/null/NullBackend.h
index d2ebf72..0c5ea7b 100644
--- a/src/backend/null/NullBackend.h
+++ b/src/backend/null/NullBackend.h
@@ -17,22 +17,22 @@
#include "nxt/nxtcpp.h"
-#include "common/Buffer.h"
-#include "common/BindGroup.h"
-#include "common/BindGroupLayout.h"
-#include "common/Device.h"
-#include "common/CommandBuffer.h"
-#include "common/DepthStencilState.h"
-#include "common/InputState.h"
-#include "common/Framebuffer.h"
-#include "common/Pipeline.h"
-#include "common/PipelineLayout.h"
-#include "common/Queue.h"
-#include "common/RenderPass.h"
-#include "common/Sampler.h"
-#include "common/ShaderModule.h"
-#include "common/Texture.h"
-#include "common/ToBackend.h"
+#include "backend/Buffer.h"
+#include "backend/BindGroup.h"
+#include "backend/BindGroupLayout.h"
+#include "backend/Device.h"
+#include "backend/CommandBuffer.h"
+#include "backend/DepthStencilState.h"
+#include "backend/InputState.h"
+#include "backend/Framebuffer.h"
+#include "backend/Pipeline.h"
+#include "backend/PipelineLayout.h"
+#include "backend/Queue.h"
+#include "backend/RenderPass.h"
+#include "backend/Sampler.h"
+#include "backend/ShaderModule.h"
+#include "backend/Texture.h"
+#include "backend/ToBackend.h"
namespace backend {
namespace null {
diff --git a/src/backend/opengl/CommandBufferGL.cpp b/src/backend/opengl/CommandBufferGL.cpp
index 9a86d5a..485035c 100644
--- a/src/backend/opengl/CommandBufferGL.cpp
+++ b/src/backend/opengl/CommandBufferGL.cpp
@@ -12,15 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "CommandBufferGL.h"
+#include "backend/opengl/CommandBufferGL.h"
-#include "common/Commands.h"
-#include "OpenGLBackend.h"
-#include "PersistentPipelineStateGL.h"
-#include "PipelineGL.h"
-#include "PipelineLayoutGL.h"
-#include "SamplerGL.h"
-#include "TextureGL.h"
+#include "backend/Commands.h"
+#include "backend/opengl/OpenGLBackend.h"
+#include "backend/opengl/PersistentPipelineStateGL.h"
+#include "backend/opengl/PipelineGL.h"
+#include "backend/opengl/PipelineLayoutGL.h"
+#include "backend/opengl/SamplerGL.h"
+#include "backend/opengl/TextureGL.h"
#include <cstring>
diff --git a/src/backend/opengl/CommandBufferGL.h b/src/backend/opengl/CommandBufferGL.h
index 69aa8a9..79891de 100644
--- a/src/backend/opengl/CommandBufferGL.h
+++ b/src/backend/opengl/CommandBufferGL.h
@@ -15,8 +15,8 @@
#ifndef BACKEND_OPENGL_COMMANDBUFFERGL_H_
#define BACKEND_OPENGL_COMMANDBUFFERGL_H_
-#include "common/CommandAllocator.h"
-#include "common/CommandBuffer.h"
+#include "backend/CommandAllocator.h"
+#include "backend/CommandBuffer.h"
namespace backend {
namespace opengl {
diff --git a/src/backend/opengl/DepthStencilStateGL.cpp b/src/backend/opengl/DepthStencilStateGL.cpp
index fd947e8..97d1830 100644
--- a/src/backend/opengl/DepthStencilStateGL.cpp
+++ b/src/backend/opengl/DepthStencilStateGL.cpp
@@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "DepthStencilStateGL.h"
+#include "backend/opengl/DepthStencilStateGL.h"
-#include "OpenGLBackend.h"
-#include "PersistentPipelineStateGL.h"
+#include "backend/opengl/OpenGLBackend.h"
+#include "backend/opengl/PersistentPipelineStateGL.h"
namespace backend {
namespace opengl {
diff --git a/src/backend/opengl/DepthStencilStateGL.h b/src/backend/opengl/DepthStencilStateGL.h
index 8245a87..5c5d781 100644
--- a/src/backend/opengl/DepthStencilStateGL.h
+++ b/src/backend/opengl/DepthStencilStateGL.h
@@ -15,7 +15,7 @@
#ifndef BACKEND_OPENGL_DEPTHSTENCILSTATEGL_H_
#define BACKEND_OPENGL_DEPTHSTENCILSTATEGL_H_
-#include "common/DepthStencilState.h"
+#include "backend/DepthStencilState.h"
namespace backend {
namespace opengl {
diff --git a/src/backend/opengl/GeneratedCodeIncludes.h b/src/backend/opengl/GeneratedCodeIncludes.h
index bc9913f..47ae6bd 100644
--- a/src/backend/opengl/GeneratedCodeIncludes.h
+++ b/src/backend/opengl/GeneratedCodeIncludes.h
@@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "OpenGLBackend.h"
-#include "CommandBufferGL.h"
-#include "DepthStencilStateGL.h"
-#include "PersistentPipelineStateGL.h"
-#include "PipelineGL.h"
-#include "PipelineLayoutGL.h"
-#include "SamplerGL.h"
-#include "ShaderModuleGL.h"
-#include "TextureGL.h"
+#include "backend/opengl/OpenGLBackend.h"
+#include "backend/opengl/CommandBufferGL.h"
+#include "backend/opengl/DepthStencilStateGL.h"
+#include "backend/opengl/PersistentPipelineStateGL.h"
+#include "backend/opengl/PipelineGL.h"
+#include "backend/opengl/PipelineLayoutGL.h"
+#include "backend/opengl/SamplerGL.h"
+#include "backend/opengl/ShaderModuleGL.h"
+#include "backend/opengl/TextureGL.h"
diff --git a/src/backend/opengl/OpenGLBackend.cpp b/src/backend/opengl/OpenGLBackend.cpp
index 4cf071c..8a771ff 100644
--- a/src/backend/opengl/OpenGLBackend.cpp
+++ b/src/backend/opengl/OpenGLBackend.cpp
@@ -12,15 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "OpenGLBackend.h"
+#include "backend/opengl/OpenGLBackend.h"
-#include "CommandBufferGL.h"
-#include "DepthStencilStateGL.h"
-#include "PipelineGL.h"
-#include "PipelineLayoutGL.h"
-#include "ShaderModuleGL.h"
-#include "SamplerGL.h"
-#include "TextureGL.h"
+#include "backend/opengl/CommandBufferGL.h"
+#include "backend/opengl/DepthStencilStateGL.h"
+#include "backend/opengl/PipelineGL.h"
+#include "backend/opengl/PipelineLayoutGL.h"
+#include "backend/opengl/ShaderModuleGL.h"
+#include "backend/opengl/SamplerGL.h"
+#include "backend/opengl/TextureGL.h"
namespace backend {
namespace opengl {
diff --git a/src/backend/opengl/OpenGLBackend.h b/src/backend/opengl/OpenGLBackend.h
index a6ab353..82dcfbe 100644
--- a/src/backend/opengl/OpenGLBackend.h
+++ b/src/backend/opengl/OpenGLBackend.h
@@ -17,16 +17,16 @@
#include "nxt/nxtcpp.h"
-#include "common/Buffer.h"
-#include "common/BindGroup.h"
-#include "common/BindGroupLayout.h"
-#include "common/Device.h"
-#include "common/DepthStencilState.h"
-#include "common/Framebuffer.h"
-#include "common/InputState.h"
-#include "common/Queue.h"
-#include "common/RenderPass.h"
-#include "common/ToBackend.h"
+#include "backend/Buffer.h"
+#include "backend/BindGroup.h"
+#include "backend/BindGroupLayout.h"
+#include "backend/Device.h"
+#include "backend/DepthStencilState.h"
+#include "backend/Framebuffer.h"
+#include "backend/InputState.h"
+#include "backend/Queue.h"
+#include "backend/RenderPass.h"
+#include "backend/ToBackend.h"
#include "glad/glad.h"
diff --git a/src/backend/opengl/PersistentPipelineStateGL.cpp b/src/backend/opengl/PersistentPipelineStateGL.cpp
index 480c521..bb81e75 100644
--- a/src/backend/opengl/PersistentPipelineStateGL.cpp
+++ b/src/backend/opengl/PersistentPipelineStateGL.cpp
@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "PersistentPipelineStateGL.h"
+#include "backend/opengl/PersistentPipelineStateGL.h"
-#include "OpenGLBackend.h"
+#include "backend/opengl/OpenGLBackend.h"
namespace backend {
namespace opengl {
diff --git a/src/backend/opengl/PipelineGL.cpp b/src/backend/opengl/PipelineGL.cpp
index ae0edbe..01cbfee 100644
--- a/src/backend/opengl/PipelineGL.cpp
+++ b/src/backend/opengl/PipelineGL.cpp
@@ -12,13 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "PipelineGL.h"
+#include "backend/opengl/PipelineGL.h"
-#include "DepthStencilStateGL.h"
-#include "OpenGLBackend.h"
-#include "PersistentPipelineStateGL.h"
-#include "PipelineLayoutGL.h"
-#include "ShaderModuleGL.h"
+#include "backend/opengl/DepthStencilStateGL.h"
+#include "backend/opengl/OpenGLBackend.h"
+#include "backend/opengl/PersistentPipelineStateGL.h"
+#include "backend/opengl/PipelineLayoutGL.h"
+#include "backend/opengl/ShaderModuleGL.h"
#include <iostream>
#include <set>
diff --git a/src/backend/opengl/PipelineGL.h b/src/backend/opengl/PipelineGL.h
index 89b54e8..1dc8af6 100644
--- a/src/backend/opengl/PipelineGL.h
+++ b/src/backend/opengl/PipelineGL.h
@@ -15,7 +15,7 @@
#ifndef BACKEND_OPENGL_PIPELINEGL_H_
#define BACKEND_OPENGL_PIPELINEGL_H_
-#include "common/Pipeline.h"
+#include "backend/Pipeline.h"
#include "glad/glad.h"
diff --git a/src/backend/opengl/PipelineLayoutGL.cpp b/src/backend/opengl/PipelineLayoutGL.cpp
index 1ee6b12..cff8413 100644
--- a/src/backend/opengl/PipelineLayoutGL.cpp
+++ b/src/backend/opengl/PipelineLayoutGL.cpp
@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "PipelineLayoutGL.h"
+#include "backend/opengl/PipelineLayoutGL.h"
-#include "OpenGLBackend.h"
+#include "backend/opengl/OpenGLBackend.h"
namespace backend {
namespace opengl {
diff --git a/src/backend/opengl/PipelineLayoutGL.h b/src/backend/opengl/PipelineLayoutGL.h
index e285ccd..3ebfe0e8 100644
--- a/src/backend/opengl/PipelineLayoutGL.h
+++ b/src/backend/opengl/PipelineLayoutGL.h
@@ -15,7 +15,7 @@
#ifndef BACKEND_OPENGL_PIPELINELAYOUTGL_H_
#define BACKEND_OPENGL_PIPELINELAYOUTGL_H_
-#include "common/PipelineLayout.h"
+#include "backend/PipelineLayout.h"
#include "glad/glad.h"
diff --git a/src/backend/opengl/SamplerGL.cpp b/src/backend/opengl/SamplerGL.cpp
index c48fc96..35489c5 100644
--- a/src/backend/opengl/SamplerGL.cpp
+++ b/src/backend/opengl/SamplerGL.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "SamplerGL.h"
+#include "backend/opengl/SamplerGL.h"
namespace backend {
namespace opengl {
diff --git a/src/backend/opengl/SamplerGL.h b/src/backend/opengl/SamplerGL.h
index eeae99d..86c729d 100644
--- a/src/backend/opengl/SamplerGL.h
+++ b/src/backend/opengl/SamplerGL.h
@@ -15,7 +15,7 @@
#ifndef BACKEND_OPENGL_SAMPLERGL_H_
#define BACKEND_OPENGL_SAMPLERGL_H_
-#include "common/Sampler.h"
+#include "backend/Sampler.h"
#include "glad/glad.h"
diff --git a/src/backend/opengl/ShaderModuleGL.cpp b/src/backend/opengl/ShaderModuleGL.cpp
index 80939e2..8f3e0c8 100644
--- a/src/backend/opengl/ShaderModuleGL.cpp
+++ b/src/backend/opengl/ShaderModuleGL.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "ShaderModuleGL.h"
+#include "backend/opengl/ShaderModuleGL.h"
#include <spirv-cross/spirv_glsl.hpp>
diff --git a/src/backend/opengl/ShaderModuleGL.h b/src/backend/opengl/ShaderModuleGL.h
index d4f3860..8d8f0d6 100644
--- a/src/backend/opengl/ShaderModuleGL.h
+++ b/src/backend/opengl/ShaderModuleGL.h
@@ -15,7 +15,7 @@
#ifndef BACKEND_OPENGL_SHADERMODULEGL_H_
#define BACKEND_OPENGL_SHADERMODULEGL_H_
-#include "common/ShaderModule.h"
+#include "backend/ShaderModule.h"
#include "glad/glad.h"
diff --git a/src/backend/opengl/TextureGL.cpp b/src/backend/opengl/TextureGL.cpp
index bd9d1e2..9670b67 100644
--- a/src/backend/opengl/TextureGL.cpp
+++ b/src/backend/opengl/TextureGL.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "TextureGL.h"
+#include "backend/opengl/TextureGL.h"
#include <algorithm>
#include <vector>
diff --git a/src/backend/opengl/TextureGL.h b/src/backend/opengl/TextureGL.h
index 0c46f8d..08b37d1 100644
--- a/src/backend/opengl/TextureGL.h
+++ b/src/backend/opengl/TextureGL.h
@@ -15,7 +15,7 @@
#ifndef BACKEND_OPENGL_TEXTUREGL_H_
#define BACKEND_OPENGL_TEXTUREGL_H_
-#include "common/Texture.h"
+#include "backend/Texture.h"
#include "glad/glad.h"