Skip to content

Commit

Permalink
upate the additional mode name
Browse files Browse the repository at this point in the history
  • Loading branch information
RenfengLiu committed Aug 14, 2024
1 parent 8d2e8bb commit 73bf8a5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion benchmarks/graphics_pipeline/GraphicsBenchmarkApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ Result GraphicsBenchmarkApp::CompilePipeline(const QuadPipelineKey& key)
gpCreateInfo.frontFace = grfx::FRONT_FACE_CW;
gpCreateInfo.depthReadEnable = false;
gpCreateInfo.depthWriteEnable = false;
gpCreateInfo.blendModes[0] = pKnobDisablePsOutput->GetValue() ? grfx::BLEND_MODE_BENCHMARK_DISABLE_OUTPUT : grfx::BLEND_MODE_NONE;
gpCreateInfo.blendModes[0] = pKnobDisablePsOutput->GetValue() ? grfx::BLEND_MODE_DISABLE_OUTPUT : grfx::BLEND_MODE_NONE;
gpCreateInfo.outputState.renderTargetCount = 1;
gpCreateInfo.outputState.renderTargetFormats[0] = key.renderFormat;
gpCreateInfo.outputState.depthStencilFormat = GetSwapchain()->GetDepthFormat();
Expand Down
14 changes: 7 additions & 7 deletions include/ppx/grfx/grfx_enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ enum BlendFactor
//!
enum BlendMode
{
BLEND_MODE_NONE = 0,
BLEND_MODE_ADDITIVE = 1,
BLEND_MODE_ALPHA = 2,
BLEND_MODE_OVER = 3,
BLEND_MODE_UNDER = 4,
BLEND_MODE_PREMULT_ALPHA = 5,
BLEND_MODE_BENCHMARK_DISABLE_OUTPUT = 6, // Mode used for benchmark app to disable vs output.
BLEND_MODE_NONE = 0,
BLEND_MODE_ADDITIVE = 1,
BLEND_MODE_ALPHA = 2,
BLEND_MODE_OVER = 3,
BLEND_MODE_UNDER = 4,
BLEND_MODE_PREMULT_ALPHA = 5,
BLEND_MODE_DISABLE_OUTPUT = 6, // Mode used to disable vs output.
};

enum BlendOp
Expand Down
2 changes: 1 addition & 1 deletion include/ppx/grfx/grfx_pipeline.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ struct BlendAttachmentState
static grfx::BlendAttachmentState BlendModeOver();
static grfx::BlendAttachmentState BlendModeUnder();
static grfx::BlendAttachmentState BlendModePremultAlpha();
static grfx::BlendAttachmentState BlendModeBenchmarkDisableOutput();
static grfx::BlendAttachmentState BlendModeDisableOutput();
};

struct ColorBlendState
Expand Down
6 changes: 3 additions & 3 deletions src/ppx/grfx/grfx_pipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ grfx::BlendAttachmentState BlendAttachmentState::BlendModePremultAlpha()
return state;
}

grfx::BlendAttachmentState BlendAttachmentState::BlendModeBenchmarkDisableOutput()
grfx::BlendAttachmentState BlendAttachmentState::BlendModeDisableOutput()
{
grfx::BlendAttachmentState state = {};
state.blendEnable = false;
Expand Down Expand Up @@ -193,8 +193,8 @@ void FillOutGraphicsPipelineCreateInfo(
case grfx::BLEND_MODE_PREMULT_ALPHA: {
pDstCreateInfo->colorBlendState.blendAttachments[i] = grfx::BlendAttachmentState::BlendModePremultAlpha();
} break;
case grfx::BLEND_MODE_BENCHMARK_DISABLE_OUTPUT: {
pDstCreateInfo->colorBlendState.blendAttachments[i] = grfx::BlendAttachmentState::BlendModeBenchmarkDisableOutput();
case grfx::BLEND_MODE_DISABLE_OUTPUT: {
pDstCreateInfo->colorBlendState.blendAttachments[i] = grfx::BlendAttachmentState::BlendModeDisableOutput();
}
}
}
Expand Down

0 comments on commit 73bf8a5

Please sign in to comment.