Skip to content

Commit

Permalink
Moved CommandBuffer function declarations into <LLGL/Backend/*.inl> f…
Browse files Browse the repository at this point in the history
…iles.
  • Loading branch information
LukasBanana committed Jul 3, 2023
1 parent 8f8a7da commit 3292c73
Show file tree
Hide file tree
Showing 27 changed files with 600 additions and 1,469 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ set(FilesMsvcNatvis ${PROJECT_SOURCE_DIR}/LLGL.natvis)

# Common files
file(GLOB FilesInclude ${PROJECT_INCLUDE_DIR}/LLGL/*.*)
file(GLOB FilesIncludeBackend ${PROJECT_INCLUDE_DIR}/LLGL/Backend/*.inl)
file(GLOB FilesIncludeContainer ${PROJECT_INCLUDE_DIR}/LLGL/Container/*.*)
file(GLOB FilesIncludeUtils ${PROJECT_INCLUDE_DIR}/LLGL/Utils/*.*)
file(GLOB FilesIncludePlatformBase ${PROJECT_INCLUDE_DIR}/LLGL/Platform/*.*)
Expand Down Expand Up @@ -507,6 +508,7 @@ set(FilesExample_HelloAndroid ${EXAMPLE_PROJECTS_DIR}/HelloAndroid/cpp/Example.c
source_group("NatVis" FILES ${FilesMsvcNatvis})

source_group("Include" FILES ${FilesInclude})
source_group("Include\\Backend" FILES ${FilesIncludeBackend})
source_group("Include\\Container" FILES ${FilesIncludeContainer})
source_group("Include\\Utils" FILES ${FilesIncludeUtils})
source_group("Sources\\Core" FILES ${FilesCore})
Expand Down Expand Up @@ -605,6 +607,7 @@ endif()
set(
FilesLLGL
${FilesInclude}
${FilesIncludeBackend}
${FilesIncludeContainer}
${FilesIncludeUtils}
${FilesIncludePlatformBase}
Expand Down
75 changes: 75 additions & 0 deletions include/LLGL/Backend/CommandBuffer.Blitting.inl
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/*
* CommandBuffer.Blitting.inl
*
* Copyright (c) 2015 Lukas Hermanns. All rights reserved.
* Licensed under the terms of the BSD 3-Clause license (see LICENSE.txt).
*/

/* ----- Blitting ----- */

virtual void UpdateBuffer(
Buffer& dstBuffer,
std::uint64_t dstOffset,
const void* data,
std::uint16_t dataSize
) override final;

virtual void CopyBuffer(
Buffer& dstBuffer,
std::uint64_t dstOffset,
Buffer& srcBuffer,
std::uint64_t srcOffset,
std::uint64_t size
) override final;

virtual void CopyBufferFromTexture(
Buffer& dstBuffer,
std::uint64_t dstOffset,
Texture& srcTexture,
const TextureRegion& srcRegion,
std::uint32_t rowStride = 0,
std::uint32_t layerStride = 0
) override final;

virtual void FillBuffer(
Buffer& dstBuffer,
std::uint64_t dstOffset,
std::uint32_t value,
std::uint64_t fillSize = Constants::wholeSize
) override final;

virtual void CopyTexture(
Texture& dstTexture,
const TextureLocation& dstLocation,
Texture& srcTexture,
const TextureLocation& srcLocation,
const Extent3D& extent
) override final;

virtual void CopyTextureFromBuffer(
Texture& dstTexture,
const TextureRegion& dstRegion,
Buffer& srcBuffer,
std::uint64_t srcOffset,
std::uint32_t rowStride = 0,
std::uint32_t layerStride = 0
) override final;

virtual void CopyTextureFromFramebuffer(
Texture& dstTexture,
const TextureRegion& dstRegion,
const Offset2D& srcOffset
) override final;

virtual void GenerateMips(
Texture& texture
) override final;

virtual void GenerateMips(
Texture& texture,
const TextureSubresource& subresource
) override final;



// ================================================================================
23 changes: 23 additions & 0 deletions include/LLGL/Backend/CommandBuffer.Compute.inl
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* CommandBuffer.Compute.inl
*
* Copyright (c) 2015 Lukas Hermanns. All rights reserved.
* Licensed under the terms of the BSD 3-Clause license (see LICENSE.txt).
*/

/* ----- Compute ----- */

virtual void Dispatch(
std::uint32_t numWorkGroupsX,
std::uint32_t numWorkGroupsY,
std::uint32_t numWorkGroupsZ
) override final;

virtual void DispatchIndirect(
Buffer& buffer,
std::uint64_t offset
) override final;



// ================================================================================
20 changes: 20 additions & 0 deletions include/LLGL/Backend/CommandBuffer.Debugging.inl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* CommandBuffer.Debugging.inl
*
* Copyright (c) 2015 Lukas Hermanns. All rights reserved.
* Licensed under the terms of the BSD 3-Clause license (see LICENSE.txt).
*/

/* ----- Debugging ----- */

virtual void PushDebugGroup(
const char* name
) override final;

virtual void PopDebugGroup(
void
) override final;



// ================================================================================
86 changes: 86 additions & 0 deletions include/LLGL/Backend/CommandBuffer.Drawing.inl
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/*
* CommandBuffer.Drawing.inl
*
* Copyright (c) 2015 Lukas Hermanns. All rights reserved.
* Licensed under the terms of the BSD 3-Clause license (see LICENSE.txt).
*/

/* ----- Drawing ----- */

virtual void Draw(
std::uint32_t numVertices,
std::uint32_t firstVertex
) override final;

virtual void DrawIndexed(
std::uint32_t numIndices,
std::uint32_t firstIndex
) override final;

virtual void DrawIndexed(
std::uint32_t numIndices,
std::uint32_t firstIndex,
std::int32_t vertexOffset
) override final;

virtual void DrawInstanced(
std::uint32_t numVertices,
std::uint32_t firstVertex,
std::uint32_t numInstances
) override final;

virtual void DrawInstanced(
std::uint32_t numVertices,
std::uint32_t firstVertex,
std::uint32_t numInstances,
std::uint32_t firstInstance
) override final;

virtual void DrawIndexedInstanced(
std::uint32_t numIndices,
std::uint32_t numInstances,
std::uint32_t firstIndex
) override final;

virtual void DrawIndexedInstanced(
std::uint32_t numIndices,
std::uint32_t numInstances,
std::uint32_t firstIndex,
std::int32_t vertexOffset
) override final;

virtual void DrawIndexedInstanced(
std::uint32_t numIndices,
std::uint32_t numInstances,
std::uint32_t firstIndex,
std::int32_t vertexOffset,
std::uint32_t firstInstance
) override final;

virtual void DrawIndirect(
Buffer& buffer,
std::uint64_t offset
) override final;

virtual void DrawIndirect(
Buffer& buffer,
std::uint64_t offset,
std::uint32_t numCommands,
std::uint32_t stride
) override final;

virtual void DrawIndexedIndirect(
Buffer& buffer,
std::uint64_t offset
) override final;

virtual void DrawIndexedIndirect(
Buffer& buffer,
std::uint64_t offset,
std::uint32_t numCommands,
std::uint32_t stride
) override final;



// ================================================================================
24 changes: 24 additions & 0 deletions include/LLGL/Backend/CommandBuffer.Encoding.inl
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* CommandBuffer.Encoding.inl
*
* Copyright (c) 2015 Lukas Hermanns. All rights reserved.
* Licensed under the terms of the BSD 3-Clause license (see LICENSE.txt).
*/

/* ----- Encoding ----- */

virtual void Begin(
void
) override final;

virtual void End(
void
) override final;

virtual void Execute(
CommandBuffer& deferredCommandBuffer
) override final;



// ================================================================================
17 changes: 17 additions & 0 deletions include/LLGL/Backend/CommandBuffer.Extensions.inl
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* CommandBuffer.Extensions.inl
*
* Copyright (c) 2015 Lukas Hermanns. All rights reserved.
* Licensed under the terms of the BSD 3-Clause license (see LICENSE.txt).
*/

/* ----- Extensions ----- */

virtual void SetGraphicsAPIDependentState(
const void* stateDesc,
std::size_t stateDescSize
) override final;



// ================================================================================
30 changes: 30 additions & 0 deletions include/LLGL/Backend/CommandBuffer.InputAssembly.inl
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* CommandBuffer.InputAssembly.inl
*
* Copyright (c) 2015 Lukas Hermanns. All rights reserved.
* Licensed under the terms of the BSD 3-Clause license (see LICENSE.txt).
*/

/* ----- Input Assembly ------ */

virtual void SetVertexBuffer(
Buffer& buffer
) override final;

virtual void SetVertexBufferArray(
BufferArray& bufferArray
) override final;

virtual void SetIndexBuffer(
Buffer& buffer
) override final;

virtual void SetIndexBuffer(
Buffer& buffer,
const Format format,
std::uint64_t offset = 0
) override final;



// ================================================================================
31 changes: 31 additions & 0 deletions include/LLGL/Backend/CommandBuffer.PipelineStates.inl
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* CommandBuffer.PipelineStates.inl
*
* Copyright (c) 2015 Lukas Hermanns. All rights reserved.
* Licensed under the terms of the BSD 3-Clause license (see LICENSE.txt).
*/

/* ----- Pipeline States ----- */

virtual void SetPipelineState(
PipelineState& pipelineState
) override final;

virtual void SetBlendFactor(
const float color[4]
) override final;

virtual void SetStencilReference(
std::uint32_t reference,
const StencilFace stencilFace = StencilFace::FrontAndBack
) override final;

virtual void SetUniforms(
std::uint32_t first,
const void* data,
std::uint16_t dataSize
) override final;



// ================================================================================
32 changes: 32 additions & 0 deletions include/LLGL/Backend/CommandBuffer.Queries.inl
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* CommandBuffer.Queries.inl
*
* Copyright (c) 2015 Lukas Hermanns. All rights reserved.
* Licensed under the terms of the BSD 3-Clause license (see LICENSE.txt).
*/

/* ----- Queries ----- */

virtual void BeginQuery(
QueryHeap& queryHeap,
std::uint32_t query
) override final;

virtual void EndQuery(
QueryHeap& queryHeap,
std::uint32_t query
) override final;

virtual void BeginRenderCondition(
QueryHeap& queryHeap,
std::uint32_t query,
const RenderConditionMode mode
) override final;

virtual void EndRenderCondition(
void
) override final;



// ================================================================================
Loading

0 comments on commit 3292c73

Please sign in to comment.