Skip to content

Commit

Permalink
Merge branch 'master' of github.com:pboechat/FastCG
Browse files Browse the repository at this point in the history
  • Loading branch information
pboechat committed Dec 7, 2024
2 parents e25b594 + 84f615c commit c5b02a7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
5 changes: 3 additions & 2 deletions FastCG/include/FastCG/Rendering/ShaderConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ namespace FastCG
struct PCSSData
{
ShadowMapData shadowMapData;
float uvScale{
// TODO: solve this in a more elegant way
float uvScale
{
// TODO: solve this in a more elegant way
#if FASTCG_VULKAN
0.001f
#else
Expand Down
4 changes: 2 additions & 2 deletions FastCG/src/Graphics/TextureLoaderPlain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ namespace FastCG
}

auto *pTexture = GraphicsSystem::GetInstance()->CreateTexture(
{rFilePath.stem().string(), (uint32_t)width, (uint32_t)height, 1, 1, TextureType::TEXTURE_2D, settings.usage, format,
settings.filter, settings.wrapMode, pData});
{rFilePath.stem().string(), (uint32_t)width, (uint32_t)height, 1, 1, TextureType::TEXTURE_2D,
settings.usage, format, settings.filter, settings.wrapMode, pData});
if (transformedData == nullptr)
{
stbi_image_free(pData);
Expand Down
15 changes: 9 additions & 6 deletions FastCG/src/Graphics/Vulkan/VulkanGraphicsContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,21 +462,23 @@ namespace FastCG
pRenderTarget = VulkanGraphicsSystem::GetInstance()->GetCurrentSwapChainTexture();
}

mClearCommands.emplace_back(ClearCommand{
mClearCommands.emplace_back(ClearCommand {
#if _DEBUG
mMarkerCommands.size(),
#endif
pRenderTarget, rClearRequest});
pRenderTarget, rClearRequest
});
}
}
if (mRenderPassDescription.pDepthStencilBuffer != nullptr &&
mRenderPassDescription.depthStencilClearRequest.flags != VulkanClearRequestFlagBit::NONE)
{
mClearCommands.emplace_back(ClearCommand{
mClearCommands.emplace_back(ClearCommand {
#if _DEBUG
mMarkerCommands.size(),
#endif
mRenderPassDescription.pDepthStencilBuffer, mRenderPassDescription.depthStencilClearRequest});
mRenderPassDescription.pDepthStencilBuffer, mRenderPassDescription.depthStencilClearRequest
});
}
}
mRenderPassDescription.renderTargetCount = renderTargetCount;
Expand Down Expand Up @@ -532,11 +534,12 @@ namespace FastCG

void VulkanGraphicsContext::EnqueueCopyCommand(CopyCommandType type, const CopyCommandArgs &rArgs)
{
mCopyCommands.emplace_back(CopyCommand{
mCopyCommands.emplace_back(CopyCommand {
#if _DEBUG
mMarkerCommands.size(),
#endif
type, rArgs});
type, rArgs
});
}

void VulkanGraphicsContext::EnqueueDrawCommand(DrawCommandType type, PrimitiveType primitiveType,
Expand Down

0 comments on commit c5b02a7

Please sign in to comment.