Skip to content

Commit

Permalink
Fix a regression of removing isOffChip input
Browse files Browse the repository at this point in the history
This is to fix a regression of
#2861. When TES is mapped to
HW VS (no NGG), this SGPR must be present.
  • Loading branch information
amdrexu committed Dec 16, 2023
1 parent 2cee36d commit 796a333
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lgc/patch/ShaderInputs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -607,9 +607,16 @@ uint64_t ShaderInputs::getShaderArgTys(PipelineState *pipelineState, ShaderStage
break;
case ShaderStageTessEval:
if (!hasGs) {
// TES as hardware VS: handle HW stream-out.
if (enableHwXfb) {
// TES as hardware VS
if (!pipelineState->getNggControl()->enableNgg) {
// NOTE: The SGPR corresponding to streamOutInfo is shared with isOffChip for off-chip tessellation. It is
// controlled by SPI_SHADER_PGM_RSRC2_VS.SO_EN or SPI_SHADER_PGM_RSRC2_VS.OC_LDS_EN. Since we are always in
// off-chip tessellation mode, it must be present even if there is no stream-out.
getShaderInputUsage(shaderStage, ShaderInput::StreamOutInfo)->enable();
}

// Handle HW stream-out.
if (enableHwXfb) {
getShaderInputUsage(shaderStage, ShaderInput::StreamOutWriteIndex)->enable();
for (unsigned i = 0; i < MaxTransformFeedbackBuffers; ++i) {
if (xfbStrides[i] > 0)
Expand Down

0 comments on commit 796a333

Please sign in to comment.