Skip to content

Commit

Permalink
rename some 'view id' in comments to 'view ID'
Browse files Browse the repository at this point in the history
  • Loading branch information
xazhangAMD committed Oct 26, 2023
1 parent 8905249 commit ab72336
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lgc/builder/InOutBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ Value *BuilderImpl::CreateReadBuiltInInput(BuiltInKind builtIn, InOutInfo inputI
assert(isBuiltInInput(builtIn));
Value *builtInVal = readBuiltIn(false, builtIn, inputInfo, vertexIndex, index, instName);
if (builtIn == BuiltInViewIndex)
// View index can only use bit[3:0] of view id register.
// View index can only use bit[3:0] of view ID register.
builtInVal = CreateAnd(builtInVal, getInt32(0xF));
return builtInVal;
}
Expand Down
6 changes: 3 additions & 3 deletions lgc/patch/MeshTaskShader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1767,14 +1767,14 @@ void MeshTaskShader::exportPrimitive() {
const auto entryArgIdxs = m_pipelineState->getShaderInterfaceData(ShaderStageMesh)->entryArgIdxs.mesh;
Value *viewId = getFunctionArgument(entryPoint, entryArgIdxs.viewId);

// RT layer id is view id in simple mode (view index only).
// RT layer is view ID in simple mode (view index only).
Value *layerFromViewId = viewId;
if (m_pipelineState->getInputAssemblyState().multiView == MultiViewMode::PerView) {
// RT layer id is in the high 24 bits of view id in per-view mode.
// RT layer is in the high 24 bits of view ID in per-view mode.
layerFromViewId = m_builder.CreateLShr(viewId, m_builder.getInt32(8));
if (layer)
layerFromViewId = m_builder.CreateAdd(layerFromViewId, layer);
// Viewport index is in [7:4] of view id.
// Viewport index is in [7:4] of view ID.
Value *viewportIndexFromViewId =
m_builder.CreateAnd(m_builder.CreateLShr(viewId, m_builder.getInt32(4)), m_builder.getInt32(0xF));
if (viewportIndex)
Expand Down

0 comments on commit ab72336

Please sign in to comment.