Skip to content

Commit

Permalink
Rename FFXDilator pass to FFDilator to prevent name collisions
Browse files Browse the repository at this point in the history
  • Loading branch information
Nukem9 committed Dec 21, 2023
1 parent 4b3f0aa commit 25ce7ec
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
22 changes: 11 additions & 11 deletions source/maindll/FFXDilation.cpp → source/maindll/FFDilator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
// project.
//
#include "FFXCommon.h"
#include "FFXDilation.h"
#include "FFDilator.h"

FFXDilation::FFXDilation(const FfxInterface& BackendInterface, uint32_t m_MaxRenderWidth, uint32_t m_MaxRenderHeight)
FFDilator::FFDilator(const FfxInterface& BackendInterface, uint32_t m_MaxRenderWidth, uint32_t m_MaxRenderHeight)
: m_MaxRenderWidth(m_MaxRenderWidth),
m_MaxRenderHeight(m_MaxRenderHeight),
m_BackendInterface(BackendInterface)
Expand All @@ -18,7 +18,7 @@ FFXDilation::FFXDilation(const FfxInterface& BackendInterface, uint32_t m_MaxRen
FFX_THROW_ON_FAIL(m_BackendInterface.fpCreateBackendContext(&m_BackendInterface, &m_EffectContextId));
}

FFXDilation::~FFXDilation()
FFDilator::~FFDilator()
{
for (auto& pipeline : m_DispatchPipelineStates)
m_BackendInterface.fpDestroyPipeline(&m_BackendInterface, &pipeline.second, m_EffectContextId);
Expand All @@ -28,7 +28,7 @@ FFXDilation::~FFXDilation()
}

// clang-format off
FfxFsr3UpscalerSharedResourceDescriptions FFXDilation::GetSharedResourceDescriptions() const
FfxFsr3UpscalerSharedResourceDescriptions FFDilator::GetSharedResourceDescriptions() const
{
FfxFsr3UpscalerSharedResourceDescriptions descs = {};

Expand Down Expand Up @@ -80,7 +80,7 @@ FfxFsr3UpscalerSharedResourceDescriptions FFXDilation::GetSharedResourceDescript
return descs;
}

FfxErrorCode FFXDilation::Dispatch(const FFXDilationDispatchParameters& Parameters)
FfxErrorCode FFDilator::Dispatch(const FFDilatorDispatchParameters& Parameters)
{
auto registerResource = [&](const FfxResource& Resource, uint32_t Index, bool UAV)
{
Expand Down Expand Up @@ -127,7 +127,7 @@ FfxErrorCode FFXDilation::Dispatch(const FFXDilationDispatchParameters& Paramete
return FFX_OK;
}

void FFXDilation::UpdateConstantBuffers(const FFXDilationDispatchParameters& Parameters, Fsr3UpscalerConstants& Constants)
void FFDilator::UpdateConstantBuffers(const FFDilatorDispatchParameters& Parameters, Fsr3UpscalerConstants& Constants)
{
Constants.renderSize[0] = Parameters.RenderSize.width;
Constants.renderSize[1] = Parameters.RenderSize.height;
Expand Down Expand Up @@ -165,7 +165,7 @@ void FFXDilation::UpdateConstantBuffers(const FFXDilationDispatchParameters& Par
memcpy(&m_DispatchConstantBuffer.data, &m_CurrentConstants, m_DispatchConstantBuffer.num32BitEntries * sizeof(uint32_t));
}

FfxErrorCode FFXDilation::ScheduleComputeDispatch(const FfxPipelineState& Pipeline, uint32_t DispatchX, uint32_t DispatchY, uint32_t DispatchZ)
FfxErrorCode FFDilator::ScheduleComputeDispatch(const FfxPipelineState& Pipeline, uint32_t DispatchX, uint32_t DispatchY, uint32_t DispatchZ)
{
FfxComputeJobDescription jobDescriptor = {};
{
Expand Down Expand Up @@ -204,7 +204,7 @@ FfxErrorCode FFXDilation::ScheduleComputeDispatch(const FfxPipelineState& Pipeli
return m_BackendInterface.fpScheduleGpuJob(&m_BackendInterface, &job);
}

FfxPipelineState& FFXDilation::GetPipelineStateForParameters(const FFXDilationDispatchParameters& Parameters)
FfxPipelineState& FFDilator::GetPipelineStateForParameters(const FFDilatorDispatchParameters& Parameters)
{
uint32_t flags = 0;

Expand All @@ -230,7 +230,7 @@ FfxPipelineState& FFXDilation::GetPipelineStateForParameters(const FFXDilationDi
return InternalCreatePipelineState(flags);
}

FfxPipelineState& FFXDilation::InternalCreatePipelineState(uint32_t PassFlags)
FfxPipelineState& FFDilator::InternalCreatePipelineState(uint32_t PassFlags)
{
FfxPipelineDescription pipelineDescription =
{
Expand Down Expand Up @@ -303,7 +303,7 @@ FfxPipelineState& FFXDilation::InternalCreatePipelineState(uint32_t PassFlags)
return pipelineState;
}

FfxErrorCode FFXDilation::RemapResourceBindings(FfxPipelineState& InOutPipeline)
FfxErrorCode FFDilator::RemapResourceBindings(FfxPipelineState& InOutPipeline)
{
auto doRemap = []<typename T, typename U>(T *PipelineBindings, size_t PipelineBindCount, const U *NameTable, size_t NameTableCount)
{
Expand Down Expand Up @@ -334,7 +334,7 @@ FfxErrorCode FFXDilation::RemapResourceBindings(FfxPipelineState& InOutPipeline)
return error;
}

uint32_t FFXDilation::GetPipelinePermutationFlags(uint32_t ContextFlags, bool Fp16, bool Force64)
uint32_t FFDilator::GetPipelinePermutationFlags(uint32_t ContextFlags, bool Fp16, bool Force64)
{
uint32_t flags = 0;
flags |= (ContextFlags & FFX_FSR3UPSCALER_ENABLE_HIGH_DYNAMIC_RANGE) ? FSR3UPSCALER_SHADER_PERMUTATION_HDR_COLOR_INPUT : 0;
Expand Down
18 changes: 9 additions & 9 deletions source/maindll/FFXDilation.h → source/maindll/FFDilator.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <FidelityFX/host/ffx_fsr3upscaler.h>
#include <FidelityFX/components/fsr3upscaler/ffx_fsr3upscaler_private.h>

struct FFXDilationDispatchParameters
struct FFDilatorDispatchParameters
{
FfxCommandList CommandList;

Expand All @@ -33,7 +33,7 @@ struct FFXDilationDispatchParameters
FfxFloatCoords2D MotionVectorJitterOffsets;
};

class FFXDilation
class FFDilator
{
private:
struct ResourceIndex
Expand Down Expand Up @@ -93,18 +93,18 @@ class FFXDilation
FfxResourceInternal m_UAVResources[ResourceIndex::Count] = {};

public:
FFXDilation(const FfxInterface& BackendInterface, uint32_t m_MaxRenderWidth, uint32_t m_MaxRenderHeight);
FFXDilation(const FFXDilation&) = delete;
FFXDilation(FFXDilation&&) = delete;
~FFXDilation();
FFDilator(const FfxInterface& BackendInterface, uint32_t m_MaxRenderWidth, uint32_t m_MaxRenderHeight);
FFDilator(const FFDilator&) = delete;
FFDilator& operator=(const FFDilator&) = delete;
~FFDilator();

FfxFsr3UpscalerSharedResourceDescriptions GetSharedResourceDescriptions() const;
FfxErrorCode Dispatch(const FFXDilationDispatchParameters& Parameters);
FfxErrorCode Dispatch(const FFDilatorDispatchParameters& Parameters);

private:
void UpdateConstantBuffers(const FFXDilationDispatchParameters& Parameters, Fsr3UpscalerConstants& Constants);
void UpdateConstantBuffers(const FFDilatorDispatchParameters& Parameters, Fsr3UpscalerConstants& Constants);
FfxErrorCode ScheduleComputeDispatch(const FfxPipelineState& Pipeline, uint32_t DispatchX, uint32_t DispatchY, uint32_t DispatchZ);
FfxPipelineState& GetPipelineStateForParameters(const FFXDilationDispatchParameters& Parameters);
FfxPipelineState& GetPipelineStateForParameters(const FFDilatorDispatchParameters& Parameters);
FfxPipelineState& InternalCreatePipelineState(uint32_t PassFlags);
FfxErrorCode RemapResourceBindings(FfxPipelineState& InOutPipeline);

Expand Down

0 comments on commit 25ce7ec

Please sign in to comment.