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
GPUOpen-Drivers#2861. When TES is mapped to
HW VS (no NGG), this SGPR must be present.
  • Loading branch information
amdrexu committed Dec 14, 2023
1 parent c552fb3 commit f9bdba5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lgc/patch/ShaderInputs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -607,9 +607,15 @@ uint64_t ShaderInputs::getShaderArgTys(PipelineState *pipelineState, ShaderStage
break;
case ShaderStageTessEval:
if (!hasGs) {
// TES as hardware VS: handle HW stream-out.
// TES as hardware VS

// 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::StreamOutInfo)->enable();
getShaderInputUsage(shaderStage, ShaderInput::StreamOutWriteIndex)->enable();
for (unsigned i = 0; i < MaxTransformFeedbackBuffers; ++i) {
if (xfbStrides[i] > 0)
Expand Down

0 comments on commit f9bdba5

Please sign in to comment.