From 2577bf1b7353c2060c86bbec2fe95dc2790d418e Mon Sep 17 00:00:00 2001 From: amd-dwang Date: Thu, 7 Dec 2023 09:09:35 +0800 Subject: [PATCH] Remove LLPC_CLIENT_INTERFACE_MAJOR_VERSION in lgc (#2869) LLPC_CLIENT_INTERFACE_MAJOR_VERSION is disallowed in lgc. In addition, location mask is also forced to be used in the driver. --- lgc/patch/VertexFetch.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lgc/patch/VertexFetch.cpp b/lgc/patch/VertexFetch.cpp index d0ce05ead1..27741fe878 100644 --- a/lgc/patch/VertexFetch.cpp +++ b/lgc/patch/VertexFetch.cpp @@ -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));