Skip to content

Commit 1110556

Browse files
MikhailGorobetsTheMostDiligent
authored andcommitted
Fixed a few enum names and replaced bool with Bool to make the API more consistent
1 parent aac502a commit 1110556

File tree

22 files changed

+49
-51
lines changed

22 files changed

+49
-51
lines changed

Graphics/GraphicsAccessories/src/GraphicsAccessories.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ const Char* GetBindFlagString(Uint32 BindFlag)
840840
{
841841
VERIFY(BindFlag == BIND_NONE || IsPowerOfTwo(BindFlag), "More than one bind flag is specified");
842842

843-
static_assert(BIND_FLAGS_LAST == 0x800L, "Please handle the new bind flag in the switch below");
843+
static_assert(BIND_FLAG_LAST == 0x800L, "Please handle the new bind flag in the switch below");
844844
switch (BindFlag)
845845
{
846846
#define BIND_FLAG_STR_CASE(Flag) \
@@ -868,7 +868,7 @@ String GetBindFlagsString(Uint32 BindFlags, const char* Delimiter)
868868
if (BindFlags == 0)
869869
return "0";
870870
String Str;
871-
for (Uint32 Flag = 1; BindFlags && Flag <= BIND_FLAGS_LAST; Flag <<= 1)
871+
for (Uint32 Flag = 1; BindFlags && Flag <= BIND_FLAG_LAST; Flag <<= 1)
872872
{
873873
if (BindFlags & Flag)
874874
{

Graphics/GraphicsEngine/interface/BottomLevelAS.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ DILIGENT_TYPED_ENUM(RAYTRACING_BUILD_AS_FLAGS, Uint8)
164164
/// result build, potentially at the expense of build time or trace performance.
165165
RAYTRACING_BUILD_AS_LOW_MEMORY = 0x10,
166166

167-
RAYTRACING_BUILD_AS_FLAGS_LAST = RAYTRACING_BUILD_AS_LOW_MEMORY
167+
RAYTRACING_BUILD_AS_FLAG_LAST = RAYTRACING_BUILD_AS_LOW_MEMORY
168168
};
169169
DEFINE_FLAG_ENUM_OPERATORS(RAYTRACING_BUILD_AS_FLAGS)
170170

Graphics/GraphicsEngine/interface/Dearchiver.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,9 @@ DILIGENT_BEGIN_INTERFACE(IDearchiver, IObject)
236236
///
237237
/// \warning This method is not thread-safe and must not be called simultaneously
238238
/// with other methods.
239-
VIRTUAL bool METHOD(LoadArchive)(THIS_
239+
VIRTUAL Bool METHOD(LoadArchive)(THIS_
240240
const IDataBlob* pArchive,
241-
bool MakeCopy DEFAULT_VALUE(false)) PURE;
241+
Bool MakeCopy DEFAULT_VALUE(false)) PURE;
242242

243243
/// Unpacks a shader from the device object archive.
244244

@@ -303,7 +303,7 @@ DILIGENT_BEGIN_INTERFACE(IDearchiver, IObject)
303303
///
304304
/// \warning This method is not thread-safe and must not be called simultaneously
305305
/// with other methods.
306-
VIRTUAL bool METHOD(Store)(THIS_
306+
VIRTUAL Bool METHOD(Store)(THIS_
307307
IDataBlob** ppArchive) CONST PURE;
308308

309309
/// Resets the dearchiver state and releases all loaded objects.

Graphics/GraphicsEngine/interface/DeviceContext.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,7 @@ DILIGENT_TYPED_ENUM(RAYTRACING_INSTANCE_FLAGS, Uint8)
10541054
/// geometries referenced by this instance. This behavior can be overridden in the shader with ray flags.
10551055
RAYTRACING_INSTANCE_FORCE_NO_OPAQUE = 0x08,
10561056

1057-
RAYTRACING_INSTANCE_FLAGS_LAST = RAYTRACING_INSTANCE_FORCE_NO_OPAQUE
1057+
RAYTRACING_INSTANCE_FLAG_LAST = RAYTRACING_INSTANCE_FORCE_NO_OPAQUE
10581058
};
10591059
DEFINE_FLAG_ENUM_OPERATORS(RAYTRACING_INSTANCE_FLAGS)
10601060

@@ -1090,7 +1090,7 @@ DILIGENT_TYPED_ENUM(RAYTRACING_GEOMETRY_FLAGS, Uint8)
10901090
/// If this bit is absent an implementation may invoke the any-hit shader more than once for this geometry.
10911091
RAYTRACING_GEOMETRY_FLAG_NO_DUPLICATE_ANY_HIT_INVOCATION = 0x02,
10921092

1093-
RAYTRACING_GEOMETRY_FLAGS_LAST = RAYTRACING_GEOMETRY_FLAG_NO_DUPLICATE_ANY_HIT_INVOCATION
1093+
RAYTRACING_GEOMETRY_FLAG_LAST = RAYTRACING_GEOMETRY_FLAG_NO_DUPLICATE_ANY_HIT_INVOCATION
10941094
};
10951095
DEFINE_FLAG_ENUM_OPERATORS(RAYTRACING_GEOMETRY_FLAGS)
10961096

Graphics/GraphicsEngine/interface/GraphicsTypes.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ DILIGENT_TYPED_ENUM(BIND_FLAGS, Uint32)
163163
///< A texture can be used as shading rate texture.
164164
BIND_SHADING_RATE = 1u << 11u,
165165

166-
BIND_FLAGS_LAST = BIND_SHADING_RATE
166+
BIND_FLAG_LAST = BIND_SHADING_RATE
167167
};
168168
DEFINE_FLAG_ENUM_OPERATORS(BIND_FLAGS)
169169

@@ -1475,7 +1475,7 @@ struct SwapChainDesc
14751475

14761476
/// Indicates if this is a primary swap chain. When Present() is called
14771477
/// for the primary swap chain, the engine releases stale resources.
1478-
bool IsPrimary DEFAULT_INITIALIZER(true);
1478+
Bool IsPrimary DEFAULT_INITIALIZER(true);
14791479

14801480
#if DILIGENT_CPP_INTERFACE
14811481
constexpr SwapChainDesc() noexcept
@@ -1494,7 +1494,7 @@ struct SwapChainDesc
14941494
Uint32 _BufferCount = SwapChainDesc{}.BufferCount,
14951495
Float32 _DefaultDepthValue = SwapChainDesc{}.DefaultDepthValue,
14961496
Uint8 _DefaultStencilValue = SwapChainDesc{}.DefaultStencilValue,
1497-
bool _IsPrimary = SwapChainDesc{}.IsPrimary) :
1497+
Bool _IsPrimary = SwapChainDesc{}.IsPrimary) :
14981498
Width {_Width },
14991499
Height {_Height },
15001500
ColorBufferFormat {_ColorBufferFormat },
@@ -3323,7 +3323,7 @@ struct EngineCreateInfo
33233323
/// debug layer, enable Vulkan validation layers, create debug OpenGL context, etc.).
33243324
/// The validation is enabled by default in Debug/Development builds and disabled
33253325
/// in release builds.
3326-
bool EnableValidation DEFAULT_INITIALIZER(false);
3326+
Bool EnableValidation DEFAULT_INITIALIZER(false);
33273327

33283328
/// Validation options, see Diligent::VALIDATION_FLAGS.
33293329
VALIDATION_FLAGS ValidationFlags DEFAULT_INITIALIZER(VALIDATION_FLAG_NONE);
@@ -3363,7 +3363,7 @@ struct EngineGLCreateInfo DILIGENT_DERIVE(EngineCreateInfo)
33633363

33643364
/// Enable 0..1 normalized-device Z range, if required extension is supported; -1..+1 otherwise.
33653365
/// Use IRenderDevice::GetDeviceInfo().NDC to get current NDC.
3366-
bool ZeroToOneNDZ DEFAULT_INITIALIZER(false);
3366+
Bool ZeroToOneNDZ DEFAULT_INITIALIZER(false);
33673367

33683368
#if DILIGENT_CPP_INTERFACE
33693369
EngineGLCreateInfo() noexcept : EngineGLCreateInfo{EngineCreateInfo{}}
@@ -3914,7 +3914,7 @@ struct TextureFormatAttribs
39143914
COMPONENT_TYPE ComponentType DEFAULT_INITIALIZER(COMPONENT_TYPE_UNDEFINED);
39153915

39163916
/// Bool flag indicating if the format is a typeless format
3917-
bool IsTypeless DEFAULT_INITIALIZER(false);
3917+
Bool IsTypeless DEFAULT_INITIALIZER(false);
39183918

39193919
/// For block-compressed formats, compression block width
39203920
Uint8 BlockWidth DEFAULT_INITIALIZER(0);
@@ -3962,10 +3962,10 @@ typedef struct TextureFormatAttribs TextureFormatAttribs;
39623962
struct TextureFormatInfo DILIGENT_DERIVE(TextureFormatAttribs)
39633963

39643964
/// Indicates if the format is supported by the device
3965-
bool Supported DEFAULT_INITIALIZER(false);
3965+
Bool Supported DEFAULT_INITIALIZER(false);
39663966

39673967
// Explicitly pad the structure to 8-byte boundary
3968-
bool Padding[7] DEFAULT_INITIALIZER({});
3968+
Bool Padding[7] DEFAULT_INITIALIZER({});
39693969
};
39703970
typedef struct TextureFormatInfo TextureFormatInfo;
39713971

Graphics/GraphicsEngine/interface/PipelineResourceSignature.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ struct PipelineResourceSignatureDesc DILIGENT_DERIVE(DeviceObjectAttribs)
223223
/// the sampler assigned to the shader resource view is automatically set when
224224
/// the view is bound. Otherwise samplers need to be explicitly set similar to other
225225
/// shader variables.
226-
bool UseCombinedTextureSamplers DEFAULT_INITIALIZER(false);
226+
Bool UseCombinedTextureSamplers DEFAULT_INITIALIZER(false);
227227

228228
/// If UseCombinedTextureSamplers is true, defines the suffix added to the
229229
/// texture variable name to get corresponding sampler name. For example,
@@ -316,7 +316,7 @@ DILIGENT_BEGIN_INTERFACE(IPipelineResourceSignature, IDeviceObject)
316316
/// IPipelineResourceSignature::InitializeStaticSRBResources().
317317
VIRTUAL void METHOD(CreateShaderResourceBinding)(THIS_
318318
IShaderResourceBinding** ppShaderResourceBinding,
319-
bool InitStaticResources DEFAULT_VALUE(false)) PURE;
319+
Bool InitStaticResources DEFAULT_VALUE(false)) PURE;
320320

321321

322322
/// Binds static resources for the specified shader stages in the pipeline resource signature.
@@ -412,7 +412,7 @@ DILIGENT_BEGIN_INTERFACE(IPipelineResourceSignature, IDeviceObject)
412412

413413
/// \remarks Two signatures are compatible if they contain identical resources and immutabke samplers,
414414
/// defined in the same order disregarding their names.
415-
VIRTUAL bool METHOD(IsCompatibleWith)(THIS_
415+
VIRTUAL Bool METHOD(IsCompatibleWith)(THIS_
416416
const struct IPipelineResourceSignature* pPRS) CONST PURE;
417417
};
418418
DILIGENT_END_INTERFACE

Graphics/GraphicsEngine/interface/PipelineState.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,7 @@ DILIGENT_BEGIN_INTERFACE(IPipelineState, IDeviceObject)
10681068
/// IPipelineResourceSignature::CreateShaderResourceBinding() method.
10691069
VIRTUAL void METHOD(CreateShaderResourceBinding)(THIS_
10701070
IShaderResourceBinding** ppShaderResourceBinding,
1071-
bool InitStaticResources DEFAULT_VALUE(false)) PURE;
1071+
Bool InitStaticResources DEFAULT_VALUE(false)) PURE;
10721072

10731073

10741074

Graphics/GraphicsEngine/interface/Query.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ struct QueryDataBinaryOcclusion
6161

6262
/// Indicates if at least one sample passed depth and stencil testing in between
6363
/// IDeviceContext::BeginQuery and IDeviceContext::EndQuery.
64-
bool AnySamplePassed DEFAULT_INITIALIZER(0);
64+
Bool AnySamplePassed DEFAULT_INITIALIZER(0);
6565
};
6666
typedef struct QueryDataBinaryOcclusion QueryDataBinaryOcclusion;
6767

@@ -201,10 +201,10 @@ DILIGENT_BEGIN_INTERFACE(IQuery, IDeviceObject)
201201
///
202202
/// If AutoInvalidate is set to true, and the data have been retrieved, an application
203203
/// must not call GetData() until it begins and ends the query again.
204-
VIRTUAL bool METHOD(GetData)(THIS_
204+
VIRTUAL Bool METHOD(GetData)(THIS_
205205
void* pData,
206206
Uint32 DataSize,
207-
bool AutoInvalidate DEFAULT_VALUE(true)) PURE;
207+
Bool AutoInvalidate DEFAULT_VALUE(true)) PURE;
208208

209209
/// Invalidates the query and releases associated resources.
210210
VIRTUAL void METHOD(Invalidate)(THIS) PURE;

Graphics/GraphicsEngine/interface/RenderDevice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ DILIGENT_BEGIN_INTERFACE(IRenderDevice, IObject)
371371
/// great care only if you are sure the resources are not
372372
/// in use by the GPU (such as when the device has just been idled).
373373
VIRTUAL void METHOD(ReleaseStaleResources)(THIS_
374-
bool ForceRelease DEFAULT_VALUE(false)) PURE;
374+
Bool ForceRelease DEFAULT_VALUE(false)) PURE;
375375

376376

377377
/// Waits until all outstanding operations on the GPU are complete.

Graphics/GraphicsEngine/interface/ResourceMapping.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ DILIGENT_BEGIN_INTERFACE(IResourceMapping, IObject)
119119
VIRTUAL void METHOD(AddResource)(THIS_
120120
const Char* Name,
121121
IDeviceObject* pObject,
122-
bool bIsUnique) PURE;
122+
Bool bIsUnique) PURE;
123123

124124

125125
/// Adds resource array to the mapping.
@@ -139,7 +139,7 @@ DILIGENT_BEGIN_INTERFACE(IResourceMapping, IObject)
139139
Uint32 StartIndex,
140140
IDeviceObject* const* ppObjects,
141141
Uint32 NumElements,
142-
bool bIsUnique) PURE;
142+
Bool bIsUnique) PURE;
143143

144144

145145
/// Removes a resource from the mapping using its literal name.

0 commit comments

Comments
 (0)