Skip to content

Commit

Permalink
Improved constexpr usage
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMostDiligent committed Sep 13, 2023
1 parent 21fcefe commit 7a770a0
Show file tree
Hide file tree
Showing 32 changed files with 88 additions and 91 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ template <> struct VALUE_TYPE2CType<VT_FLOAT64>
typedef Float64 CType;
};

static const Uint32 ValueTypeToSizeMap[] =
// clang-format off
// clang-format off
static constexpr Uint32 ValueTypeToSizeMap[] =
{
0,
sizeof(VALUE_TYPE2CType<VT_INT8> :: CType),
Expand Down
2 changes: 1 addition & 1 deletion Graphics/GraphicsEngine/interface/BottomLevelAS.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static DILIGENT_CONSTEXPR INTERFACE_ID IID_BottomLevelAS =

#define DILIGENT_INVALID_INDEX 0xFFFFFFFFU

static const Uint32 INVALID_INDEX = DILIGENT_INVALID_INDEX;
static DILIGENT_CONSTEXPR Uint32 INVALID_INDEX = DILIGENT_INVALID_INDEX;

/// Defines bottom level acceleration structure triangles description.

Expand Down
4 changes: 2 additions & 2 deletions Graphics/GraphicsEngine/interface/BufferView.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 Diligent Graphics LLC
* Copyright 2019-2023 Diligent Graphics LLC
* Copyright 2015-2019 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -37,7 +37,7 @@
DILIGENT_BEGIN_NAMESPACE(Diligent)

// {E2E83490-E9D2-495B-9A83-ABB413A38B07}
static const struct INTERFACE_ID IID_BufferView =
static DILIGENT_CONSTEXPR struct INTERFACE_ID IID_BufferView =
{0xe2e83490, 0xe9d2, 0x495b, {0x9a, 0x83, 0xab, 0xb4, 0x13, 0xa3, 0x8b, 0x7}};

/// Buffer format description
Expand Down
4 changes: 2 additions & 2 deletions Graphics/GraphicsEngine/interface/CommandList.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 Diligent Graphics LLC
* Copyright 2019-2023 Diligent Graphics LLC
* Copyright 2015-2019 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -35,7 +35,7 @@
DILIGENT_BEGIN_NAMESPACE(Diligent)

// {C38C68F2-8A8C-4ED5-B7EE-69126E75DCD8}
static const struct INTERFACE_ID IID_CommandList =
static DILIGENT_CONSTEXPR struct INTERFACE_ID IID_CommandList =
{0xc38c68f2, 0x8a8c, 0x4ed5, {0xb7, 0xee, 0x69, 0x12, 0x6e, 0x75, 0xdc, 0xd8}};


Expand Down
20 changes: 10 additions & 10 deletions Graphics/GraphicsEngine/interface/Constants.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 Diligent Graphics LLC
* Copyright 2019-2023 Diligent Graphics LLC
* Copyright 2015-2019 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -62,14 +62,14 @@ DILIGENT_BEGIN_NAMESPACE(Diligent)
/// Bit shift for the the shading X-axis rate.
#define DILIGENT_SHADING_RATE_X_SHIFT 2

static const Uint32 MAX_BUFFER_SLOTS = DILIGENT_MAX_BUFFER_SLOTS;
static const Uint32 MAX_RENDER_TARGETS = DILIGENT_MAX_RENDER_TARGETS;
static const Uint32 MAX_VIEWPORTS = DILIGENT_MAX_VIEWPORTS;
static const Uint32 MAX_RESOURCE_SIGNATURES = DILIGENT_MAX_RESOURCE_SIGNATURES;
static const Uint32 MAX_ADAPTER_QUEUES = DILIGENT_MAX_ADAPTER_QUEUES;
static const Uint32 DEFAULT_ADAPTER_ID = DILIGENT_DEFAULT_ADAPTER_ID;
static const Uint8 DEFAULT_QUEUE_ID = DILIGENT_DEFAULT_QUEUE_ID;
static const Uint32 MAX_SHADING_RATES = DILIGENT_MAX_SHADING_RATES;
static const Uint32 SHADING_RATE_X_SHIFT = DILIGENT_SHADING_RATE_X_SHIFT;
static DILIGENT_CONSTEXPR Uint32 MAX_BUFFER_SLOTS = DILIGENT_MAX_BUFFER_SLOTS;
static DILIGENT_CONSTEXPR Uint32 MAX_RENDER_TARGETS = DILIGENT_MAX_RENDER_TARGETS;
static DILIGENT_CONSTEXPR Uint32 MAX_VIEWPORTS = DILIGENT_MAX_VIEWPORTS;
static DILIGENT_CONSTEXPR Uint32 MAX_RESOURCE_SIGNATURES = DILIGENT_MAX_RESOURCE_SIGNATURES;
static DILIGENT_CONSTEXPR Uint32 MAX_ADAPTER_QUEUES = DILIGENT_MAX_ADAPTER_QUEUES;
static DILIGENT_CONSTEXPR Uint32 DEFAULT_ADAPTER_ID = DILIGENT_DEFAULT_ADAPTER_ID;
static DILIGENT_CONSTEXPR Uint8 DEFAULT_QUEUE_ID = DILIGENT_DEFAULT_QUEUE_ID;
static DILIGENT_CONSTEXPR Uint32 MAX_SHADING_RATES = DILIGENT_MAX_SHADING_RATES;
static DILIGENT_CONSTEXPR Uint32 SHADING_RATE_X_SHIFT = DILIGENT_SHADING_RATE_X_SHIFT;

DILIGENT_END_NAMESPACE // namespace Diligent
8 changes: 4 additions & 4 deletions Graphics/GraphicsEngine/interface/DeviceContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -1290,7 +1290,7 @@ typedef struct BuildBLASAttribs BuildBLASAttribs;

#define DILIGENT_TLAS_INSTANCE_OFFSET_AUTO 0xFFFFFFFFU

static const Uint32 TLAS_INSTANCE_OFFSET_AUTO = DILIGENT_TLAS_INSTANCE_OFFSET_AUTO;
static DILIGENT_CONSTEXPR Uint32 TLAS_INSTANCE_OFFSET_AUTO = DILIGENT_TLAS_INSTANCE_OFFSET_AUTO;


/// Row-major matrix
Expand Down Expand Up @@ -1383,7 +1383,7 @@ typedef struct TLASBuildInstanceData TLASBuildInstanceData;

#define DILIGENT_TLAS_INSTANCE_DATA_SIZE 64

static const Uint32 TLAS_INSTANCE_DATA_SIZE = DILIGENT_TLAS_INSTANCE_DATA_SIZE;
static DILIGENT_CONSTEXPR Uint32 TLAS_INSTANCE_DATA_SIZE = DILIGENT_TLAS_INSTANCE_DATA_SIZE;


/// This structure is used by IDeviceContext::BuildTLAS().
Expand Down Expand Up @@ -1896,8 +1896,8 @@ typedef struct BindSparseResourceMemoryAttribs BindSparseResourceMemoryAttribs;
/// Special constant for all remaining array slices.
#define DILIGENT_REMAINING_ARRAY_SLICES 0xFFFFFFFFU

static const Uint32 REMAINING_MIP_LEVELS = DILIGENT_REMAINING_MIP_LEVELS;
static const Uint32 REMAINING_ARRAY_SLICES = DILIGENT_REMAINING_ARRAY_SLICES;
static DILIGENT_CONSTEXPR Uint32 REMAINING_MIP_LEVELS = DILIGENT_REMAINING_MIP_LEVELS;
static DILIGENT_CONSTEXPR Uint32 REMAINING_ARRAY_SLICES = DILIGENT_REMAINING_ARRAY_SLICES;

/// Resource state transition flags.
DILIGENT_TYPED_ENUM(STATE_TRANSITION_FLAGS, Uint8)
Expand Down
4 changes: 2 additions & 2 deletions Graphics/GraphicsEngine/interface/Framebuffer.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 Diligent Graphics LLC
* Copyright 2019-2023 Diligent Graphics LLC
* Copyright 2015-2019 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -41,7 +41,7 @@
DILIGENT_BEGIN_NAMESPACE(Diligent)

// {05DA9E47-3CA6-4F96-A967-1DDDC53181A6}
static const struct INTERFACE_ID IID_Framebuffer =
static DILIGENT_CONSTEXPR struct INTERFACE_ID IID_Framebuffer =
{ 0x5da9e47, 0x3ca6, 0x4f96, { 0xa9, 0x67, 0x1d, 0xdd, 0xc5, 0x31, 0x81, 0xa6 } };

/// Framebuffer description.
Expand Down
8 changes: 4 additions & 4 deletions Graphics/GraphicsEngine/interface/InputLayout.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 Diligent Graphics LLC
* Copyright 2019-2023 Diligent Graphics LLC
* Copyright 2015-2019 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -45,9 +45,9 @@ DILIGENT_BEGIN_NAMESPACE(Diligent)
/// Compute layout element stride automatically, see Diligen::LayoutElement::Stride for details.
#define DILIGENT_LAYOUT_ELEMENT_AUTO_STRIDE 0xFFFFFFFFU

static const Uint32 MAX_LAYOUT_ELEMENTS = DILIGENT_MAX_LAYOUT_ELEMENTS;
static const Uint32 LAYOUT_ELEMENT_AUTO_OFFSET = DILIGENT_LAYOUT_ELEMENT_AUTO_OFFSET;
static const Uint32 LAYOUT_ELEMENT_AUTO_STRIDE = DILIGENT_LAYOUT_ELEMENT_AUTO_STRIDE;
static DILIGENT_CONSTEXPR Uint32 MAX_LAYOUT_ELEMENTS = DILIGENT_MAX_LAYOUT_ELEMENTS;
static DILIGENT_CONSTEXPR Uint32 LAYOUT_ELEMENT_AUTO_OFFSET = DILIGENT_LAYOUT_ELEMENT_AUTO_OFFSET;
static DILIGENT_CONSTEXPR Uint32 LAYOUT_ELEMENT_AUTO_STRIDE = DILIGENT_LAYOUT_ELEMENT_AUTO_STRIDE;

/// Input frequency
DILIGENT_TYPED_ENUM(INPUT_ELEMENT_FREQUENCY, Uint8)
Expand Down
2 changes: 1 addition & 1 deletion Graphics/GraphicsEngine/interface/PipelineState.h
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,7 @@ typedef struct TilePipelineStateCreateInfo TilePipelineStateCreateInfo;


// {06084AE5-6A71-4FE8-84B9-395DD489A28C}
static const struct INTERFACE_ID IID_PipelineState =
static DILIGENT_CONSTEXPR struct INTERFACE_ID IID_PipelineState =
{0x6084ae5, 0x6a71, 0x4fe8, {0x84, 0xb9, 0x39, 0x5d, 0xd4, 0x89, 0xa2, 0x8c}};

#define DILIGENT_INTERFACE_NAME IPipelineState
Expand Down
8 changes: 4 additions & 4 deletions Graphics/GraphicsEngine/interface/RenderPass.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 Diligent Graphics LLC
* Copyright 2019-2023 Diligent Graphics LLC
* Copyright 2015-2019 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -37,7 +37,7 @@
DILIGENT_BEGIN_NAMESPACE(Diligent)

// {B818DEC7-174D-447A-A8E4-94D21C57B40A}
static const struct INTERFACE_ID IID_RenderPass =
static DILIGENT_CONSTEXPR struct INTERFACE_ID IID_RenderPass =
{ 0xb818dec7, 0x174d, 0x447a, { 0xa8, 0xe4, 0x94, 0xd2, 0x1c, 0x57, 0xb4, 0xa } };


Expand Down Expand Up @@ -152,7 +152,7 @@ typedef struct RenderPassAttachmentDesc RenderPassAttachmentDesc;
/// Special constant indicating that the render pass attachment is not used.
#define DILIGENT_ATTACHMENT_UNUSED 0xFFFFFFFFU

static const Uint32 ATTACHMENT_UNUSED = DILIGENT_ATTACHMENT_UNUSED;
static DILIGENT_CONSTEXPR Uint32 ATTACHMENT_UNUSED = DILIGENT_ATTACHMENT_UNUSED;

/// Attachment reference description.
struct AttachmentReference
Expand Down Expand Up @@ -358,7 +358,7 @@ typedef struct SubpassDesc SubpassDesc;
/// Special subpass index value expanding synchronization scope outside a subpass.
#define DILIGENT_SUBPASS_EXTERNAL 0xFFFFFFFFU

static const Uint32 SUBPASS_EXTERNAL = DILIGENT_SUBPASS_EXTERNAL;
static DILIGENT_CONSTEXPR Uint32 SUBPASS_EXTERNAL = DILIGENT_SUBPASS_EXTERNAL;

/// Subpass dependency description
struct SubpassDependencyDesc
Expand Down
4 changes: 2 additions & 2 deletions Graphics/GraphicsEngineD3D11/interface/BufferD3D11.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 Diligent Graphics LLC
* Copyright 2019-2023 Diligent Graphics LLC
* Copyright 2015-2019 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -35,7 +35,7 @@
DILIGENT_BEGIN_NAMESPACE(Diligent)

// {4A696D2E-44BB-4C4B-9DE2-3AF7C94DCFC0}
static const struct INTERFACE_ID IID_BufferD3D11 =
static DILIGENT_CONSTEXPR struct INTERFACE_ID IID_BufferD3D11 =
{0x4a696d2e, 0x44bb, 0x4c4b, {0x9d, 0xe2, 0x3a, 0xf7, 0xc9, 0x4d, 0xcf, 0xc0}};

#define DILIGENT_INTERFACE_NAME IBufferD3D11
Expand Down
4 changes: 2 additions & 2 deletions Graphics/GraphicsEngineD3D11/interface/BufferViewD3D11.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 Diligent Graphics LLC
* Copyright 2019-2023 Diligent Graphics LLC
* Copyright 2015-2019 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -35,7 +35,7 @@
DILIGENT_BEGIN_NAMESPACE(Diligent)

// {6ABA95FC-CD7D-4C03-8CAE-AFC45F9696B7}
static const struct INTERFACE_ID IID_BufferViewD3D11 =
static DILIGENT_CONSTEXPR struct INTERFACE_ID IID_BufferViewD3D11 =
{0x6aba95fc, 0xcd7d, 0x4c03, {0x8c, 0xae, 0xaf, 0xc4, 0x5f, 0x96, 0x96, 0xb7}};

#define DILIGENT_INTERFACE_NAME IBufferViewD3D11
Expand Down
4 changes: 2 additions & 2 deletions Graphics/GraphicsEngineD3D11/interface/DeviceContextD3D11.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 Diligent Graphics LLC
* Copyright 2019-2023 Diligent Graphics LLC
* Copyright 2015-2019 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -35,7 +35,7 @@
DILIGENT_BEGIN_NAMESPACE(Diligent)

// {F0EE0335-C8AB-4EC1-BB15-B8EE5F003B99}
static const struct INTERFACE_ID IID_DeviceContextD3D11 =
static DILIGENT_CONSTEXPR struct INTERFACE_ID IID_DeviceContextD3D11 =
{0xf0ee0335, 0xc8ab, 0x4ec1, {0xbb, 0x15, 0xb8, 0xee, 0x5f, 0x0, 0x3b, 0x99}};

#define DILIGENT_INTERFACE_NAME IDeviceContextD3D11
Expand Down
4 changes: 2 additions & 2 deletions Graphics/GraphicsEngineD3D11/interface/EngineFactoryD3D11.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 Diligent Graphics LLC
* Copyright 2019-2023 Diligent Graphics LLC
* Copyright 2015-2019 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -42,7 +42,7 @@
DILIGENT_BEGIN_NAMESPACE(Diligent)

// {62663A30-AAF0-4A9A-9729-9EAC6BF789F2}
static const struct INTERFACE_ID IID_EngineFactoryD3D11 =
static DILIGENT_CONSTEXPR struct INTERFACE_ID IID_EngineFactoryD3D11 =
{0x62663a30, 0xaaf0, 0x4a9a, {0x97, 0x29, 0x9e, 0xac, 0x6b, 0xf7, 0x89, 0xf2}};

#define DILIGENT_INTERFACE_NAME IEngineFactoryD3D11
Expand Down
4 changes: 2 additions & 2 deletions Graphics/GraphicsEngineD3D11/interface/FenceD3D11.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 Diligent Graphics LLC
* Copyright 2019-2023 Diligent Graphics LLC
* Copyright 2015-2019 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -35,7 +35,7 @@
DILIGENT_BEGIN_NAMESPACE(Diligent)

// {45F2BE28-652B-4180-B6E4-E75F83F63CC7}
static const struct INTERFACE_ID IID_FenceD3D11 =
static DILIGENT_CONSTEXPR struct INTERFACE_ID IID_FenceD3D11 =
{0x45f2be28, 0x652b, 0x4180, {0xb6, 0xe4, 0xe7, 0x5f, 0x83, 0xf6, 0x3c, 0xc7}};

#define DILIGENT_INTERFACE_NAME IFenceD3D11
Expand Down
4 changes: 2 additions & 2 deletions Graphics/GraphicsEngineD3D11/interface/PipelineStateD3D11.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 Diligent Graphics LLC
* Copyright 2019-2023 Diligent Graphics LLC
* Copyright 2015-2019 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -35,7 +35,7 @@
DILIGENT_BEGIN_NAMESPACE(Diligent)

// {3EA6E3F4-9966-47FC-8CE8-0EB3E2273061}
static const struct INTERFACE_ID IID_PipelineStateD3D11 =
static DILIGENT_CONSTEXPR struct INTERFACE_ID IID_PipelineStateD3D11 =
{0x3ea6e3f4, 0x9966, 0x47fc, {0x8c, 0xe8, 0xe, 0xb3, 0xe2, 0x27, 0x30, 0x61}};

#define DILIGENT_INTERFACE_NAME IPipelineStateD3D11
Expand Down
4 changes: 2 additions & 2 deletions Graphics/GraphicsEngineD3D11/interface/QueryD3D11.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 Diligent Graphics LLC
* Copyright 2019-2023 Diligent Graphics LLC
* Copyright 2015-2019 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -35,7 +35,7 @@
DILIGENT_BEGIN_NAMESPACE(Diligent)

// {77D95EAA-D16E-43F4-B0EB-BEBCD2EC8C57}
static const struct INTERFACE_ID IID_QueryD3D11 =
static DILIGENT_CONSTEXPR struct INTERFACE_ID IID_QueryD3D11 =
{0x77d95eaa, 0xd16e, 0x43f4, {0xb0, 0xeb, 0xbe, 0xbc, 0xd2, 0xec, 0x8c, 0x57}};

#define DILIGENT_INTERFACE_NAME IQueryD3D11
Expand Down
4 changes: 2 additions & 2 deletions Graphics/GraphicsEngineD3D11/interface/RenderDeviceD3D11.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 Diligent Graphics LLC
* Copyright 2019-2023 Diligent Graphics LLC
* Copyright 2015-2019 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -35,7 +35,7 @@
DILIGENT_BEGIN_NAMESPACE(Diligent)

// {05B1CBB8-FCAD-49EE-BADA-7801223EC3FE}
static const struct INTERFACE_ID IID_RenderDeviceD3D11 =
static DILIGENT_CONSTEXPR struct INTERFACE_ID IID_RenderDeviceD3D11 =
{0x5b1cbb8, 0xfcad, 0x49ee, {0xba, 0xda, 0x78, 0x1, 0x22, 0x3e, 0xc3, 0xfe}};

#define DILIGENT_INTERFACE_NAME IRenderDeviceD3D11
Expand Down
4 changes: 2 additions & 2 deletions Graphics/GraphicsEngineD3D11/interface/SamplerD3D11.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 Diligent Graphics LLC
* Copyright 2019-2023 Diligent Graphics LLC
* Copyright 2015-2019 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -35,7 +35,7 @@
DILIGENT_BEGIN_NAMESPACE(Diligent)

// {31A3BFAF-738E-4D8C-AD18-B021C5D948DD}
static const struct INTERFACE_ID IID_SamplerD3D11 =
static DILIGENT_CONSTEXPR struct INTERFACE_ID IID_SamplerD3D11 =
{0x31a3bfaf, 0x738e, 0x4d8c, {0xad, 0x18, 0xb0, 0x21, 0xc5, 0xd9, 0x48, 0xdd}};

#define DILIGENT_INTERFACE_NAME ISamplerD3D11
Expand Down
4 changes: 2 additions & 2 deletions Graphics/GraphicsEngineD3D11/interface/ShaderD3D11.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 Diligent Graphics LLC
* Copyright 2019-2023 Diligent Graphics LLC
* Copyright 2015-2019 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -35,7 +35,7 @@
DILIGENT_BEGIN_NAMESPACE(Diligent)

// {C513E83E-B037-405B-8B49-BF8F5C220DEE}
static const struct INTERFACE_ID IID_ShaderD3D11 =
static DILIGENT_CONSTEXPR struct INTERFACE_ID IID_ShaderD3D11 =
{0xc513e83e, 0xb037, 0x405b, {0x8b, 0x49, 0xbf, 0x8f, 0x5c, 0x22, 0xd, 0xee}};

#define DILIGENT_INTERFACE_NAME IShaderD3D11
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 Diligent Graphics LLC
* Copyright 2019-2023 Diligent Graphics LLC
* Copyright 2015-2019 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -35,7 +35,7 @@
DILIGENT_BEGIN_NAMESPACE(Diligent)

// {97A6D4AC-D4AF-4AA9-B46C-67417B89026A}
static const struct INTERFACE_ID IID_ShaderResourceBindingD3D11 =
static DILIGENT_CONSTEXPR struct INTERFACE_ID IID_ShaderResourceBindingD3D11 =
{0x97a6d4ac, 0xd4af, 0x4aa9, {0xb4, 0x6c, 0x67, 0x41, 0x7b, 0x89, 0x2, 0x6a}};

#define DILIGENT_INTERFACE_NAME IShaderResourceBindingD3D11
Expand Down
4 changes: 2 additions & 2 deletions Graphics/GraphicsEngineD3D11/interface/SwapChainD3D11.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 Diligent Graphics LLC
* Copyright 2019-2023 Diligent Graphics LLC
* Copyright 2015-2019 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -36,7 +36,7 @@
DILIGENT_BEGIN_NAMESPACE(Diligent)

// {4DAF2E76-9204-4DC4-A53A-B00097412D3A}
static const struct INTERFACE_ID IID_SwapChainD3D11 =
static DILIGENT_CONSTEXPR struct INTERFACE_ID IID_SwapChainD3D11 =
{0x4daf2e76, 0x9204, 0x4dc4, {0xa5, 0x3a, 0xb0, 0x0, 0x97, 0x41, 0x2d, 0x3a}};

#define DILIGENT_INTERFACE_NAME ISwapChainD3D11
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ void DeviceContextD3D11Impl::ClearRenderTarget(ITextureView* pView, const float*
auto* pViewD3D11 = ClassPtrCast<TextureViewD3D11Impl>(pView);
auto* pd3d11RTV = static_cast<ID3D11RenderTargetView*>(pViewD3D11->GetD3D11View());

static const float Zero[4] = {0.f, 0.f, 0.f, 0.f};
static constexpr float Zero[4] = {0.f, 0.f, 0.f, 0.f};
if (RGBA == nullptr)
RGBA = Zero;

Expand Down
Loading

0 comments on commit 7a770a0

Please sign in to comment.