summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-10-19 19:08:40 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-10-19 19:08:40 +0000
commite5f36378de4a7258fcc9d6ca7a349df1136b7444 (patch)
tree2470fdcc8e1ed3d029ce30f6ac8d63e6fba4f005 /Graphics/GraphicsEngine
parentRenamed static sampler to immutable sampler (API240076) (diff)
downloadDiligentCore-e5f36378de4a7258fcc9d6ca7a349df1136b7444.tar.gz
DiligentCore-e5f36378de4a7258fcc9d6ca7a349df1136b7444.zip
Renamed USAGE_STATIC to USAGE_IMMUTABLE (API240077)
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/interface/APIInfo.h2
-rw-r--r--Graphics/GraphicsEngine/interface/GraphicsTypes.h4
-rw-r--r--Graphics/GraphicsEngine/interface/RenderDevice.h4
-rw-r--r--Graphics/GraphicsEngine/src/BufferBase.cpp6
4 files changed, 8 insertions, 8 deletions
diff --git a/Graphics/GraphicsEngine/interface/APIInfo.h b/Graphics/GraphicsEngine/interface/APIInfo.h
index a32511d2..327f54c7 100644
--- a/Graphics/GraphicsEngine/interface/APIInfo.h
+++ b/Graphics/GraphicsEngine/interface/APIInfo.h
@@ -30,7 +30,7 @@
/// \file
/// Diligent API information
-#define DILIGENT_API_VERSION 240076
+#define DILIGENT_API_VERSION 240077
#include "../../../Primitives/interface/BasicTypes.h"
diff --git a/Graphics/GraphicsEngine/interface/GraphicsTypes.h b/Graphics/GraphicsEngine/interface/GraphicsTypes.h
index 74e16535..0f6b4b82 100644
--- a/Graphics/GraphicsEngine/interface/GraphicsTypes.h
+++ b/Graphics/GraphicsEngine/interface/GraphicsTypes.h
@@ -103,7 +103,7 @@ DILIGENT_TYPED_ENUM(USAGE, Uint8)
/// when it is created, since it cannot be changed after creation. \n
/// D3D11 Counterpart: D3D11_USAGE_IMMUTABLE. OpenGL counterpart: GL_STATIC_DRAW
/// \remarks Static buffers do not allow CPU access and must use CPU_ACCESS_NONE flag.
- USAGE_STATIC = 0,
+ USAGE_IMMUTABLE = 0,
/// A resource that requires read and write access by the GPU and can also be occasionally
/// written by the CPU. \n
@@ -1706,7 +1706,7 @@ struct GraphicsAdapterInfo
/// The amount of local video memory that is inaccessible by CPU, in bytes.
- /// \note Device-local memory is where USAGE_DEFAULT and USAGE_STATIC resources
+ /// \note Device-local memory is where USAGE_DEFAULT and USAGE_IMMUTABLE resources
/// are typically allocated.
///
/// On some devices it may not be possible to query the memory size,
diff --git a/Graphics/GraphicsEngine/interface/RenderDevice.h b/Graphics/GraphicsEngine/interface/RenderDevice.h
index 5c72c81a..252daf1a 100644
--- a/Graphics/GraphicsEngine/interface/RenderDevice.h
+++ b/Graphics/GraphicsEngine/interface/RenderDevice.h
@@ -75,7 +75,7 @@ DILIGENT_BEGIN_INTERFACE(IRenderDevice, IObject)
/// \param [in] BuffDesc - Buffer description, see Diligent::BufferDesc for details.
/// \param [in] pBuffData - Pointer to Diligent::BufferData structure that describes
/// initial buffer data or nullptr if no data is provided.
- /// Static buffers (USAGE_STATIC) must be initialized at creation time.
+ /// Immutable buffers (USAGE_IMMUTABLE) must be initialized at creation time.
/// \param [out] ppBuffer - Address of the memory location where the pointer to the
/// buffer interface will be stored. The function calls AddRef(),
/// so that the new buffer will contain one reference and must be
@@ -106,7 +106,7 @@ DILIGENT_BEGIN_INTERFACE(IRenderDevice, IObject)
/// \param [in] TexDesc - Texture description, see Diligent::TextureDesc for details.
/// \param [in] pData - Pointer to Diligent::TextureData structure that describes
/// initial texture data or nullptr if no data is provided.
- /// Static textures (USAGE_STATIC) must be initialized at creation time.
+ /// Immutable textures (USAGE_IMMUTABLE) must be initialized at creation time.
///
/// \param [out] ppTexture - Address of the memory location where the pointer to the
/// texture interface will be stored.
diff --git a/Graphics/GraphicsEngine/src/BufferBase.cpp b/Graphics/GraphicsEngine/src/BufferBase.cpp
index 4aff91a0..0239ed92 100644
--- a/Graphics/GraphicsEngine/src/BufferBase.cpp
+++ b/Graphics/GraphicsEngine/src/BufferBase.cpp
@@ -71,7 +71,7 @@ void ValidateBufferDesc(const BufferDesc& Desc, const DeviceCaps& deviceCaps)
switch (Desc.Usage)
{
- case USAGE_STATIC:
+ case USAGE_IMMUTABLE:
case USAGE_DEFAULT:
VERIFY_BUFFER(Desc.CPUAccessFlags == CPU_ACCESS_NONE, "static and default buffers can't have any CPU access flags set.");
break;
@@ -114,8 +114,8 @@ void ValidateBufferDesc(const BufferDesc& Desc, const DeviceCaps& deviceCaps)
void ValidateBufferInitData(const BufferDesc& Desc, const BufferData* pBuffData)
{
- if (Desc.Usage == USAGE_STATIC && (pBuffData == nullptr || pBuffData->pData == nullptr))
- LOG_BUFFER_ERROR_AND_THROW("initial data must not be null as static buffers must be initialized at creation time.");
+ if (Desc.Usage == USAGE_IMMUTABLE && (pBuffData == nullptr || pBuffData->pData == nullptr))
+ LOG_BUFFER_ERROR_AND_THROW("initial data must not be null as immutable buffers must be initialized at creation time.");
if (Desc.Usage == USAGE_DYNAMIC && pBuffData != nullptr && pBuffData->pData != nullptr)
LOG_BUFFER_ERROR_AND_THROW("initial data must be null for dynamic buffers.");