From 05c9c69781c9682d25570e74743b4a9b8473910c Mon Sep 17 00:00:00 2001 From: Jon Creighton Date: Thu, 12 May 2022 11:46:41 +0100 Subject: [PATCH] Consistent naming of capabilities bits enum --- pxr/imaging/hdSt/codeGen.cpp | 4 ++-- pxr/imaging/hgi/enums.h | 2 +- pxr/imaging/hgiMetal/capabilities.mm | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pxr/imaging/hdSt/codeGen.cpp b/pxr/imaging/hdSt/codeGen.cpp index 2c9963e632..e37362f0b5 100644 --- a/pxr/imaging/hdSt/codeGen.cpp +++ b/pxr/imaging/hdSt/codeGen.cpp @@ -1387,7 +1387,7 @@ HdSt_CodeGen::Compile(HdStResourceRegistry*const registry) const bool metalTessellationEnabled = capabilities->IsSet(HgiDeviceCapabilitiesBitsMetalTessellation); const bool requiresBasePrimitiveOffset = - capabilities->IsSet(HgiDeviceCapabilitiesBasePrimitiveOffset); + capabilities->IsSet(HgiDeviceCapabilitiesBitsBasePrimitiveOffset); const bool doublePrecisionEnabled = capabilities->IsSet(HgiDeviceCapabilitiesBitsShaderDoublePrecision); const bool minusOneToOneDepth = @@ -3131,7 +3131,7 @@ static void _EmitTextureAccessors( << _GetPackedTypeAccessor(dataType, false) << "(HgiGet_" << name; if (isArray) { - accessors << "(index, sampleCoord)\n"; + accessors << "(index, sampleCoord)"; } else { accessors << "(sampleCoord)"; } diff --git a/pxr/imaging/hgi/enums.h b/pxr/imaging/hgi/enums.h index 93e156fa5e..da9e396f3f 100644 --- a/pxr/imaging/hgi/enums.h +++ b/pxr/imaging/hgi/enums.h @@ -90,7 +90,7 @@ enum HgiDeviceCapabilitiesBits : HgiBits HgiDeviceCapabilitiesBitsStencilReadback = 1 << 12, HgiDeviceCapabilitiesBitsCustomDepthRange = 1 << 13, HgiDeviceCapabilitiesBitsMetalTessellation = 1 << 14, - HgiDeviceCapabilitiesBasePrimitiveOffset = 1 << 15, + HgiDeviceCapabilitiesBitsBasePrimitiveOffset = 1 << 15, }; using HgiDeviceCapabilities = HgiBits; diff --git a/pxr/imaging/hgiMetal/capabilities.mm b/pxr/imaging/hgiMetal/capabilities.mm index d38bc8b841..529027317b 100644 --- a/pxr/imaging/hgiMetal/capabilities.mm +++ b/pxr/imaging/hgiMetal/capabilities.mm @@ -78,7 +78,7 @@ //bool isMacOs13OrLess = NSProcessInfo.processInfo.operatingSystemVersion.majorVersion <= 13 //bool requireBasePrimitiveOffset = hasAppleSilicon && isMacOs13OrLess; bool requiresBasePrimitiveOffset = hasAppleSilicon; - _SetFlag(HgiDeviceCapabilitiesBasePrimitiveOffset, + _SetFlag(HgiDeviceCapabilitiesBitsBasePrimitiveOffset, requiresBasePrimitiveOffset); if (!unifiedMemory) {