Skip to content

Commit

Permalink
Remove LLPC_CLIENT_INTERFACE_MAJOR_VERSION in lgc (#2869)
Browse files Browse the repository at this point in the history
LLPC_CLIENT_INTERFACE_MAJOR_VERSION is disallowed in lgc. In addition,
location mask is also forced to be used in the driver.
  • Loading branch information
AMD-dwang authored and qiaojbao committed Jan 2, 2024
1 parent 47eef3e commit 2577bf1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lgc/patch/VertexFetch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -627,11 +627,10 @@ bool LowerVertexFetch::runImpl(Module &module, PipelineState *pipelineState) {

auto descPtr = builder.CreateIntToPtr(desc, builder.getPtrTy(ADDR_SPACE_CONST));

Value *locationMasks = builder.getInt64(~0);
#if LLPC_CLIENT_INTERFACE_MAJOR_VERSION >= 67
locationMasks = builder.CreateLoad(builder.getInt64Ty(), descPtr);
// 64 bit location masks.
Value *locationMasks = builder.CreateLoad(builder.getInt64Ty(), descPtr);
descPtr = builder.CreateGEP(builder.getInt64Ty(), descPtr, {builder.getInt32(1)});
#endif

for (InputImportGenericOp *inst : vertexFetches) {
builder.SetInsertPoint(inst);
Value *vertex = vertexFetch->fetchVertex(inst, descPtr, locationMasks, BuilderBase::get(builder));
Expand Down

0 comments on commit 2577bf1

Please sign in to comment.