mirror of
https://github.com/microsoft/DirectXTex
synced 2024-11-22 04:20:07 +00:00
Added noexcept to public functions
This commit is contained in:
parent
d284ff54b6
commit
79020d0f1e
@ -29,7 +29,7 @@
|
||||
|
||||
#include <OCIdl.h>
|
||||
|
||||
#define DIRECTX_TEX_VERSION 162
|
||||
#define DIRECTX_TEX_VERSION 170
|
||||
|
||||
struct IWICImagingFactory;
|
||||
struct IWICMetadataQueryReader;
|
||||
@ -40,21 +40,21 @@ namespace DirectX
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// DXGI Format Utilities
|
||||
bool __cdecl IsValid(_In_ DXGI_FORMAT fmt);
|
||||
bool __cdecl IsCompressed(_In_ DXGI_FORMAT fmt);
|
||||
bool __cdecl IsPacked(_In_ DXGI_FORMAT fmt);
|
||||
bool __cdecl IsVideo(_In_ DXGI_FORMAT fmt);
|
||||
bool __cdecl IsPlanar(_In_ DXGI_FORMAT fmt);
|
||||
bool __cdecl IsPalettized(_In_ DXGI_FORMAT fmt);
|
||||
bool __cdecl IsDepthStencil(_In_ DXGI_FORMAT fmt);
|
||||
bool __cdecl IsSRGB(_In_ DXGI_FORMAT fmt);
|
||||
bool __cdecl IsTypeless(_In_ DXGI_FORMAT fmt, _In_ bool partialTypeless = true);
|
||||
bool __cdecl IsValid(_In_ DXGI_FORMAT fmt) noexcept;
|
||||
bool __cdecl IsCompressed(_In_ DXGI_FORMAT fmt) noexcept;
|
||||
bool __cdecl IsPacked(_In_ DXGI_FORMAT fmt) noexcept;
|
||||
bool __cdecl IsVideo(_In_ DXGI_FORMAT fmt) noexcept;
|
||||
bool __cdecl IsPlanar(_In_ DXGI_FORMAT fmt) noexcept;
|
||||
bool __cdecl IsPalettized(_In_ DXGI_FORMAT fmt) noexcept;
|
||||
bool __cdecl IsDepthStencil(_In_ DXGI_FORMAT fmt) noexcept;
|
||||
bool __cdecl IsSRGB(_In_ DXGI_FORMAT fmt) noexcept;
|
||||
bool __cdecl IsTypeless(_In_ DXGI_FORMAT fmt, _In_ bool partialTypeless = true) noexcept;
|
||||
|
||||
bool __cdecl HasAlpha(_In_ DXGI_FORMAT fmt);
|
||||
bool __cdecl HasAlpha(_In_ DXGI_FORMAT fmt) noexcept;
|
||||
|
||||
size_t __cdecl BitsPerPixel(_In_ DXGI_FORMAT fmt);
|
||||
size_t __cdecl BitsPerPixel(_In_ DXGI_FORMAT fmt) noexcept;
|
||||
|
||||
size_t __cdecl BitsPerColor(_In_ DXGI_FORMAT fmt);
|
||||
size_t __cdecl BitsPerColor(_In_ DXGI_FORMAT fmt) noexcept;
|
||||
|
||||
enum CP_FLAGS
|
||||
{
|
||||
@ -72,14 +72,14 @@ namespace DirectX
|
||||
|
||||
HRESULT __cdecl ComputePitch(
|
||||
_In_ DXGI_FORMAT fmt, _In_ size_t width, _In_ size_t height,
|
||||
_Out_ size_t& rowPitch, _Out_ size_t& slicePitch, _In_ DWORD flags = CP_FLAGS_NONE);
|
||||
_Out_ size_t& rowPitch, _Out_ size_t& slicePitch, _In_ DWORD flags = CP_FLAGS_NONE) noexcept;
|
||||
|
||||
size_t __cdecl ComputeScanlines(_In_ DXGI_FORMAT fmt, _In_ size_t height);
|
||||
size_t __cdecl ComputeScanlines(_In_ DXGI_FORMAT fmt, _In_ size_t height) noexcept;
|
||||
|
||||
DXGI_FORMAT __cdecl MakeSRGB(_In_ DXGI_FORMAT fmt);
|
||||
DXGI_FORMAT __cdecl MakeTypeless(_In_ DXGI_FORMAT fmt);
|
||||
DXGI_FORMAT __cdecl MakeTypelessUNORM(_In_ DXGI_FORMAT fmt);
|
||||
DXGI_FORMAT __cdecl MakeTypelessFLOAT(_In_ DXGI_FORMAT fmt);
|
||||
DXGI_FORMAT __cdecl MakeSRGB(_In_ DXGI_FORMAT fmt) noexcept;
|
||||
DXGI_FORMAT __cdecl MakeTypeless(_In_ DXGI_FORMAT fmt) noexcept;
|
||||
DXGI_FORMAT __cdecl MakeTypelessUNORM(_In_ DXGI_FORMAT fmt) noexcept;
|
||||
DXGI_FORMAT __cdecl MakeTypelessFLOAT(_In_ DXGI_FORMAT fmt) noexcept;
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// Texture metadata
|
||||
@ -124,18 +124,18 @@ namespace DirectX
|
||||
DXGI_FORMAT format;
|
||||
TEX_DIMENSION dimension;
|
||||
|
||||
size_t __cdecl ComputeIndex(_In_ size_t mip, _In_ size_t item, _In_ size_t slice) const;
|
||||
size_t __cdecl ComputeIndex(_In_ size_t mip, _In_ size_t item, _In_ size_t slice) const noexcept;
|
||||
// Returns size_t(-1) to indicate an out-of-range error
|
||||
|
||||
bool __cdecl IsCubemap() const { return (miscFlags & TEX_MISC_TEXTURECUBE) != 0; }
|
||||
bool __cdecl IsCubemap() const noexcept { return (miscFlags & TEX_MISC_TEXTURECUBE) != 0; }
|
||||
// Helper for miscFlags
|
||||
|
||||
bool __cdecl IsPMAlpha() const { return ((miscFlags2 & TEX_MISC2_ALPHA_MODE_MASK) == TEX_ALPHA_MODE_PREMULTIPLIED) != 0; }
|
||||
void __cdecl SetAlphaMode(TEX_ALPHA_MODE mode) { miscFlags2 = (miscFlags2 & ~static_cast<uint32_t>(TEX_MISC2_ALPHA_MODE_MASK)) | static_cast<uint32_t>(mode); }
|
||||
TEX_ALPHA_MODE __cdecl GetAlphaMode() const { return static_cast<TEX_ALPHA_MODE>(miscFlags2 & TEX_MISC2_ALPHA_MODE_MASK); }
|
||||
bool __cdecl IsPMAlpha() const noexcept { return ((miscFlags2 & TEX_MISC2_ALPHA_MODE_MASK) == TEX_ALPHA_MODE_PREMULTIPLIED) != 0; }
|
||||
void __cdecl SetAlphaMode(TEX_ALPHA_MODE mode) noexcept { miscFlags2 = (miscFlags2 & ~static_cast<uint32_t>(TEX_MISC2_ALPHA_MODE_MASK)) | static_cast<uint32_t>(mode); }
|
||||
TEX_ALPHA_MODE __cdecl GetAlphaMode() const noexcept { return static_cast<TEX_ALPHA_MODE>(miscFlags2 & TEX_MISC2_ALPHA_MODE_MASK); }
|
||||
// Helpers for miscFlags2
|
||||
|
||||
bool __cdecl IsVolumemap() const { return (dimension == TEX_DIMENSION_TEXTURE3D); }
|
||||
bool __cdecl IsVolumemap() const noexcept { return (dimension == TEX_DIMENSION_TEXTURE3D); }
|
||||
// Helper for dimension
|
||||
};
|
||||
|
||||
@ -285,20 +285,20 @@ namespace DirectX
|
||||
HRESULT __cdecl InitializeCubeFromImages(_In_reads_(nImages) const Image* images, _In_ size_t nImages, _In_ DWORD flags = CP_FLAGS_NONE);
|
||||
HRESULT __cdecl Initialize3DFromImages(_In_reads_(depth) const Image* images, _In_ size_t depth, _In_ DWORD flags = CP_FLAGS_NONE);
|
||||
|
||||
void __cdecl Release();
|
||||
void __cdecl Release() noexcept;
|
||||
|
||||
bool __cdecl OverrideFormat(_In_ DXGI_FORMAT f);
|
||||
|
||||
const TexMetadata& __cdecl GetMetadata() const { return m_metadata; }
|
||||
const TexMetadata& __cdecl GetMetadata() const noexcept { return m_metadata; }
|
||||
const Image* __cdecl GetImage(_In_ size_t mip, _In_ size_t item, _In_ size_t slice) const;
|
||||
|
||||
const Image* __cdecl GetImages() const { return m_image; }
|
||||
size_t __cdecl GetImageCount() const { return m_nimages; }
|
||||
const Image* __cdecl GetImages() const noexcept { return m_image; }
|
||||
size_t __cdecl GetImageCount() const noexcept { return m_nimages; }
|
||||
|
||||
uint8_t* __cdecl GetPixels() const { return m_memory; }
|
||||
size_t __cdecl GetPixelsSize() const { return m_size; }
|
||||
uint8_t* __cdecl GetPixels() const noexcept { return m_memory; }
|
||||
size_t __cdecl GetPixelsSize() const noexcept { return m_size; }
|
||||
|
||||
bool __cdecl IsAlphaAllOpaque() const;
|
||||
bool __cdecl IsAlphaAllOpaque() const noexcept;
|
||||
|
||||
private:
|
||||
size_t m_nimages;
|
||||
@ -322,14 +322,14 @@ namespace DirectX
|
||||
Blob(const Blob&) = delete;
|
||||
Blob& operator=(const Blob&) = delete;
|
||||
|
||||
HRESULT __cdecl Initialize(_In_ size_t size);
|
||||
HRESULT __cdecl Initialize(_In_ size_t size) noexcept;
|
||||
|
||||
void __cdecl Release();
|
||||
void __cdecl Release() noexcept;
|
||||
|
||||
void *__cdecl GetBufferPointer() const { return m_buffer; }
|
||||
size_t __cdecl GetBufferSize() const { return m_size; }
|
||||
void *__cdecl GetBufferPointer() const noexcept { return m_buffer; }
|
||||
size_t __cdecl GetBufferSize() const noexcept { return m_size; }
|
||||
|
||||
HRESULT __cdecl Trim(size_t size);
|
||||
HRESULT __cdecl Trim(size_t size) noexcept;
|
||||
|
||||
private:
|
||||
void* m_buffer;
|
||||
@ -721,33 +721,33 @@ namespace DirectX
|
||||
WIC_CODEC_ICO, // Windows Icon (.ico)
|
||||
};
|
||||
|
||||
REFGUID __cdecl GetWICCodec(_In_ WICCodecs codec);
|
||||
REFGUID __cdecl GetWICCodec(_In_ WICCodecs codec) noexcept;
|
||||
|
||||
IWICImagingFactory* __cdecl GetWICFactory(bool& iswic2);
|
||||
void __cdecl SetWICFactory(_In_opt_ IWICImagingFactory* pWIC);
|
||||
IWICImagingFactory* __cdecl GetWICFactory(bool& iswic2) noexcept;
|
||||
void __cdecl SetWICFactory(_In_opt_ IWICImagingFactory* pWIC) noexcept;
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// Direct3D 11 functions
|
||||
#if defined(__d3d11_h__) || defined(__d3d11_x_h__)
|
||||
bool __cdecl IsSupportedTexture(_In_ ID3D11Device* pDevice, _In_ const TexMetadata& metadata);
|
||||
bool __cdecl IsSupportedTexture(_In_ ID3D11Device* pDevice, _In_ const TexMetadata& metadata) noexcept;
|
||||
|
||||
HRESULT __cdecl CreateTexture(
|
||||
_In_ ID3D11Device* pDevice, _In_reads_(nimages) const Image* srcImages, _In_ size_t nimages, _In_ const TexMetadata& metadata,
|
||||
_Outptr_ ID3D11Resource** ppResource);
|
||||
_Outptr_ ID3D11Resource** ppResource) noexcept;
|
||||
|
||||
HRESULT __cdecl CreateShaderResourceView(
|
||||
_In_ ID3D11Device* pDevice, _In_reads_(nimages) const Image* srcImages, _In_ size_t nimages, _In_ const TexMetadata& metadata,
|
||||
_Outptr_ ID3D11ShaderResourceView** ppSRV);
|
||||
_Outptr_ ID3D11ShaderResourceView** ppSRV) noexcept;
|
||||
|
||||
HRESULT __cdecl CreateTextureEx(
|
||||
_In_ ID3D11Device* pDevice, _In_reads_(nimages) const Image* srcImages, _In_ size_t nimages, _In_ const TexMetadata& metadata,
|
||||
_In_ D3D11_USAGE usage, _In_ unsigned int bindFlags, _In_ unsigned int cpuAccessFlags, _In_ unsigned int miscFlags, _In_ bool forceSRGB,
|
||||
_Outptr_ ID3D11Resource** ppResource);
|
||||
_Outptr_ ID3D11Resource** ppResource) noexcept;
|
||||
|
||||
HRESULT __cdecl CreateShaderResourceViewEx(
|
||||
_In_ ID3D11Device* pDevice, _In_reads_(nimages) const Image* srcImages, _In_ size_t nimages, _In_ const TexMetadata& metadata,
|
||||
_In_ D3D11_USAGE usage, _In_ unsigned int bindFlags, _In_ unsigned int cpuAccessFlags, _In_ unsigned int miscFlags, _In_ bool forceSRGB,
|
||||
_Outptr_ ID3D11ShaderResourceView** ppSRV);
|
||||
_Outptr_ ID3D11ShaderResourceView** ppSRV) noexcept;
|
||||
|
||||
HRESULT __cdecl CaptureTexture(_In_ ID3D11Device* pDevice, _In_ ID3D11DeviceContext* pContext, _In_ ID3D11Resource* pSource, _Out_ ScratchImage& result);
|
||||
#endif
|
||||
@ -755,16 +755,16 @@ namespace DirectX
|
||||
//---------------------------------------------------------------------------------
|
||||
// Direct3D 12 functions
|
||||
#if defined(__d3d12_h__) || defined(__d3d12_x_h__) || defined(__XBOX_D3D12_X__)
|
||||
bool __cdecl IsSupportedTexture(_In_ ID3D12Device* pDevice, _In_ const TexMetadata& metadata);
|
||||
bool __cdecl IsSupportedTexture(_In_ ID3D12Device* pDevice, _In_ const TexMetadata& metadata) noexcept;
|
||||
|
||||
HRESULT __cdecl CreateTexture(
|
||||
_In_ ID3D12Device* pDevice, _In_ const TexMetadata& metadata,
|
||||
_Outptr_ ID3D12Resource** ppResource);
|
||||
_Outptr_ ID3D12Resource** ppResource) noexcept;
|
||||
|
||||
HRESULT __cdecl CreateTextureEx(
|
||||
_In_ ID3D12Device* pDevice, _In_ const TexMetadata& metadata,
|
||||
_In_ D3D12_RESOURCE_FLAGS resFlags, _In_ bool forceSRGB,
|
||||
_Outptr_ ID3D12Resource** ppResource);
|
||||
_Outptr_ ID3D12Resource** ppResource) noexcept;
|
||||
|
||||
HRESULT __cdecl PrepareUpload(
|
||||
_In_ ID3D12Device* pDevice,
|
||||
|
@ -16,13 +16,13 @@
|
||||
//=====================================================================================
|
||||
|
||||
_Use_decl_annotations_
|
||||
inline bool __cdecl IsValid(DXGI_FORMAT fmt)
|
||||
inline bool __cdecl IsValid(DXGI_FORMAT fmt) noexcept
|
||||
{
|
||||
return (static_cast<size_t>(fmt) >= 1 && static_cast<size_t>(fmt) <= 190);
|
||||
}
|
||||
|
||||
_Use_decl_annotations_
|
||||
inline bool __cdecl IsCompressed(DXGI_FORMAT fmt)
|
||||
inline bool __cdecl IsCompressed(DXGI_FORMAT fmt) noexcept
|
||||
{
|
||||
switch (fmt)
|
||||
{
|
||||
@ -55,7 +55,7 @@ inline bool __cdecl IsCompressed(DXGI_FORMAT fmt)
|
||||
}
|
||||
|
||||
_Use_decl_annotations_
|
||||
inline bool __cdecl IsPalettized(DXGI_FORMAT fmt)
|
||||
inline bool __cdecl IsPalettized(DXGI_FORMAT fmt) noexcept
|
||||
{
|
||||
switch (fmt)
|
||||
{
|
||||
@ -71,7 +71,7 @@ inline bool __cdecl IsPalettized(DXGI_FORMAT fmt)
|
||||
}
|
||||
|
||||
_Use_decl_annotations_
|
||||
inline bool __cdecl IsSRGB(DXGI_FORMAT fmt)
|
||||
inline bool __cdecl IsSRGB(DXGI_FORMAT fmt) noexcept
|
||||
{
|
||||
switch (fmt)
|
||||
{
|
||||
|
@ -202,7 +202,7 @@ namespace
|
||||
_Use_decl_annotations_
|
||||
bool DirectX::IsSupportedTexture(
|
||||
ID3D11Device* pDevice,
|
||||
const TexMetadata& metadata)
|
||||
const TexMetadata& metadata) noexcept
|
||||
{
|
||||
if (!pDevice)
|
||||
return false;
|
||||
@ -403,7 +403,7 @@ HRESULT DirectX::CreateTexture(
|
||||
const Image* srcImages,
|
||||
size_t nimages,
|
||||
const TexMetadata& metadata,
|
||||
ID3D11Resource** ppResource)
|
||||
ID3D11Resource** ppResource) noexcept
|
||||
{
|
||||
return CreateTextureEx(
|
||||
pDevice, srcImages, nimages, metadata,
|
||||
@ -422,7 +422,7 @@ HRESULT DirectX::CreateTextureEx(
|
||||
unsigned int cpuAccessFlags,
|
||||
unsigned int miscFlags,
|
||||
bool forceSRGB,
|
||||
ID3D11Resource** ppResource)
|
||||
ID3D11Resource** ppResource) noexcept
|
||||
{
|
||||
if (!pDevice || !srcImages || !nimages || !ppResource)
|
||||
return E_INVALIDARG;
|
||||
@ -612,7 +612,7 @@ HRESULT DirectX::CreateShaderResourceView(
|
||||
const Image* srcImages,
|
||||
size_t nimages,
|
||||
const TexMetadata& metadata,
|
||||
ID3D11ShaderResourceView** ppSRV)
|
||||
ID3D11ShaderResourceView** ppSRV) noexcept
|
||||
{
|
||||
return CreateShaderResourceViewEx(
|
||||
pDevice, srcImages, nimages, metadata,
|
||||
@ -631,7 +631,7 @@ HRESULT DirectX::CreateShaderResourceViewEx(
|
||||
unsigned int cpuAccessFlags,
|
||||
unsigned int miscFlags,
|
||||
bool forceSRGB,
|
||||
ID3D11ShaderResourceView** ppSRV)
|
||||
ID3D11ShaderResourceView** ppSRV) noexcept
|
||||
{
|
||||
if (!ppSRV)
|
||||
return E_INVALIDARG;
|
||||
|
@ -314,7 +314,7 @@ namespace
|
||||
_Use_decl_annotations_
|
||||
bool DirectX::IsSupportedTexture(
|
||||
ID3D12Device* pDevice,
|
||||
const TexMetadata& metadata)
|
||||
const TexMetadata& metadata) noexcept
|
||||
{
|
||||
if (!pDevice)
|
||||
return false;
|
||||
@ -426,7 +426,7 @@ _Use_decl_annotations_
|
||||
HRESULT DirectX::CreateTexture(
|
||||
ID3D12Device* pDevice,
|
||||
const TexMetadata& metadata,
|
||||
ID3D12Resource** ppResource)
|
||||
ID3D12Resource** ppResource) noexcept
|
||||
{
|
||||
return CreateTextureEx(
|
||||
pDevice, metadata,
|
||||
@ -440,7 +440,7 @@ HRESULT DirectX::CreateTextureEx(
|
||||
const TexMetadata& metadata,
|
||||
D3D12_RESOURCE_FLAGS resFlags,
|
||||
bool forceSRGB,
|
||||
ID3D12Resource** ppResource)
|
||||
ID3D12Resource** ppResource) noexcept
|
||||
{
|
||||
if (!pDevice || !ppResource)
|
||||
return E_INVALIDARG;
|
||||
|
@ -677,7 +677,7 @@ HRESULT ScratchImage::Initialize3DFromImages(const Image* images, size_t depth,
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void ScratchImage::Release()
|
||||
void ScratchImage::Release() noexcept
|
||||
{
|
||||
m_nimages = 0;
|
||||
m_size = 0;
|
||||
@ -768,7 +768,7 @@ const Image* ScratchImage::GetImage(size_t mip, size_t item, size_t slice) const
|
||||
return &m_image[index];
|
||||
}
|
||||
|
||||
bool ScratchImage::IsAlphaAllOpaque() const
|
||||
bool ScratchImage::IsAlphaAllOpaque() const noexcept
|
||||
{
|
||||
if (!m_image)
|
||||
return false;
|
||||
|
@ -233,7 +233,7 @@ DWORD DirectX::_CheckWICColorSpace(_In_ const GUID& sourceGUID, _In_ const GUID&
|
||||
// Public helper function to get common WIC codec GUIDs
|
||||
//-------------------------------------------------------------------------------------
|
||||
_Use_decl_annotations_
|
||||
REFGUID DirectX::GetWICCodec(WICCodecs codec)
|
||||
REFGUID DirectX::GetWICCodec(WICCodecs codec) noexcept
|
||||
{
|
||||
switch (codec)
|
||||
{
|
||||
@ -267,7 +267,7 @@ REFGUID DirectX::GetWICCodec(WICCodecs codec)
|
||||
//-------------------------------------------------------------------------------------
|
||||
// Singleton function for WIC factory
|
||||
//-------------------------------------------------------------------------------------
|
||||
IWICImagingFactory* DirectX::GetWICFactory(bool& iswic2)
|
||||
IWICImagingFactory* DirectX::GetWICFactory(bool& iswic2) noexcept
|
||||
{
|
||||
if (g_Factory)
|
||||
{
|
||||
@ -290,7 +290,7 @@ IWICImagingFactory* DirectX::GetWICFactory(bool& iswic2)
|
||||
//-------------------------------------------------------------------------------------
|
||||
// Optional initializer for WIC factory
|
||||
//-------------------------------------------------------------------------------------
|
||||
void DirectX::SetWICFactory(_In_opt_ IWICImagingFactory* pWIC)
|
||||
void DirectX::SetWICFactory(_In_opt_ IWICImagingFactory* pWIC) noexcept
|
||||
{
|
||||
if (pWIC == g_Factory)
|
||||
return;
|
||||
@ -323,7 +323,7 @@ void DirectX::SetWICFactory(_In_opt_ IWICImagingFactory* pWIC)
|
||||
|
||||
//-------------------------------------------------------------------------------------
|
||||
_Use_decl_annotations_
|
||||
bool DirectX::IsPacked(DXGI_FORMAT fmt)
|
||||
bool DirectX::IsPacked(DXGI_FORMAT fmt) noexcept
|
||||
{
|
||||
switch (static_cast<int>(fmt))
|
||||
{
|
||||
@ -342,7 +342,7 @@ bool DirectX::IsPacked(DXGI_FORMAT fmt)
|
||||
|
||||
//-------------------------------------------------------------------------------------
|
||||
_Use_decl_annotations_
|
||||
bool DirectX::IsVideo(DXGI_FORMAT fmt)
|
||||
bool DirectX::IsVideo(DXGI_FORMAT fmt) noexcept
|
||||
{
|
||||
switch (static_cast<int>(fmt))
|
||||
{
|
||||
@ -379,7 +379,7 @@ bool DirectX::IsVideo(DXGI_FORMAT fmt)
|
||||
|
||||
//-------------------------------------------------------------------------------------
|
||||
_Use_decl_annotations_
|
||||
bool DirectX::IsPlanar(DXGI_FORMAT fmt)
|
||||
bool DirectX::IsPlanar(DXGI_FORMAT fmt) noexcept
|
||||
{
|
||||
switch (static_cast<int>(fmt))
|
||||
{
|
||||
@ -408,7 +408,7 @@ bool DirectX::IsPlanar(DXGI_FORMAT fmt)
|
||||
|
||||
//-------------------------------------------------------------------------------------
|
||||
_Use_decl_annotations_
|
||||
bool DirectX::IsDepthStencil(DXGI_FORMAT fmt)
|
||||
bool DirectX::IsDepthStencil(DXGI_FORMAT fmt) noexcept
|
||||
{
|
||||
switch (static_cast<int>(fmt))
|
||||
{
|
||||
@ -435,7 +435,7 @@ bool DirectX::IsDepthStencil(DXGI_FORMAT fmt)
|
||||
|
||||
//-------------------------------------------------------------------------------------
|
||||
_Use_decl_annotations_
|
||||
bool DirectX::IsTypeless(DXGI_FORMAT fmt, bool partialTypeless)
|
||||
bool DirectX::IsTypeless(DXGI_FORMAT fmt, bool partialTypeless) noexcept
|
||||
{
|
||||
switch (static_cast<int>(fmt))
|
||||
{
|
||||
@ -479,7 +479,7 @@ bool DirectX::IsTypeless(DXGI_FORMAT fmt, bool partialTypeless)
|
||||
|
||||
//-------------------------------------------------------------------------------------
|
||||
_Use_decl_annotations_
|
||||
bool DirectX::HasAlpha(DXGI_FORMAT fmt)
|
||||
bool DirectX::HasAlpha(DXGI_FORMAT fmt) noexcept
|
||||
{
|
||||
switch (static_cast<int>(fmt))
|
||||
{
|
||||
@ -542,7 +542,7 @@ bool DirectX::HasAlpha(DXGI_FORMAT fmt)
|
||||
// Returns bits-per-pixel for a given DXGI format, or 0 on failure
|
||||
//-------------------------------------------------------------------------------------
|
||||
_Use_decl_annotations_
|
||||
size_t DirectX::BitsPerPixel(DXGI_FORMAT fmt)
|
||||
size_t DirectX::BitsPerPixel(DXGI_FORMAT fmt) noexcept
|
||||
{
|
||||
switch (static_cast<int>(fmt))
|
||||
{
|
||||
@ -704,7 +704,7 @@ size_t DirectX::BitsPerPixel(DXGI_FORMAT fmt)
|
||||
// For mixed formats, it returns the largest color-depth in the format
|
||||
//-------------------------------------------------------------------------------------
|
||||
_Use_decl_annotations_
|
||||
size_t DirectX::BitsPerColor(DXGI_FORMAT fmt)
|
||||
size_t DirectX::BitsPerColor(DXGI_FORMAT fmt) noexcept
|
||||
{
|
||||
switch (static_cast<int>(fmt))
|
||||
{
|
||||
@ -871,7 +871,7 @@ size_t DirectX::BitsPerColor(DXGI_FORMAT fmt)
|
||||
//-------------------------------------------------------------------------------------
|
||||
_Use_decl_annotations_
|
||||
HRESULT DirectX::ComputePitch(DXGI_FORMAT fmt, size_t width, size_t height,
|
||||
size_t& rowPitch, size_t& slicePitch, DWORD flags)
|
||||
size_t& rowPitch, size_t& slicePitch, DWORD flags) noexcept
|
||||
{
|
||||
uint64_t pitch = 0;
|
||||
uint64_t slice = 0;
|
||||
@ -1070,7 +1070,7 @@ HRESULT DirectX::ComputePitch(DXGI_FORMAT fmt, size_t width, size_t height,
|
||||
|
||||
//-------------------------------------------------------------------------------------
|
||||
_Use_decl_annotations_
|
||||
size_t DirectX::ComputeScanlines(DXGI_FORMAT fmt, size_t height)
|
||||
size_t DirectX::ComputeScanlines(DXGI_FORMAT fmt, size_t height) noexcept
|
||||
{
|
||||
switch (static_cast<int>(fmt))
|
||||
{
|
||||
@ -1133,7 +1133,7 @@ size_t DirectX::ComputeScanlines(DXGI_FORMAT fmt, size_t height)
|
||||
// Converts to an SRGB equivalent type if available
|
||||
//-------------------------------------------------------------------------------------
|
||||
_Use_decl_annotations_
|
||||
DXGI_FORMAT DirectX::MakeSRGB(DXGI_FORMAT fmt)
|
||||
DXGI_FORMAT DirectX::MakeSRGB(DXGI_FORMAT fmt) noexcept
|
||||
{
|
||||
switch (fmt)
|
||||
{
|
||||
@ -1168,7 +1168,7 @@ DXGI_FORMAT DirectX::MakeSRGB(DXGI_FORMAT fmt)
|
||||
// Converts to a format to an equivalent TYPELESS format if available
|
||||
//-------------------------------------------------------------------------------------
|
||||
_Use_decl_annotations_
|
||||
DXGI_FORMAT DirectX::MakeTypeless(DXGI_FORMAT fmt)
|
||||
DXGI_FORMAT DirectX::MakeTypeless(DXGI_FORMAT fmt) noexcept
|
||||
{
|
||||
switch (static_cast<int>(fmt))
|
||||
{
|
||||
@ -1288,7 +1288,7 @@ DXGI_FORMAT DirectX::MakeTypeless(DXGI_FORMAT fmt)
|
||||
// Converts to a TYPELESS format to an equivalent UNORM format if available
|
||||
//-------------------------------------------------------------------------------------
|
||||
_Use_decl_annotations_
|
||||
DXGI_FORMAT DirectX::MakeTypelessUNORM(DXGI_FORMAT fmt)
|
||||
DXGI_FORMAT DirectX::MakeTypelessUNORM(DXGI_FORMAT fmt) noexcept
|
||||
{
|
||||
switch (fmt)
|
||||
{
|
||||
@ -1347,7 +1347,7 @@ DXGI_FORMAT DirectX::MakeTypelessUNORM(DXGI_FORMAT fmt)
|
||||
// Converts to a TYPELESS format to an equivalent FLOAT format if available
|
||||
//-------------------------------------------------------------------------------------
|
||||
_Use_decl_annotations_
|
||||
DXGI_FORMAT DirectX::MakeTypelessFLOAT(DXGI_FORMAT fmt)
|
||||
DXGI_FORMAT DirectX::MakeTypelessFLOAT(DXGI_FORMAT fmt) noexcept
|
||||
{
|
||||
switch (fmt)
|
||||
{
|
||||
@ -1383,7 +1383,7 @@ DXGI_FORMAT DirectX::MakeTypelessFLOAT(DXGI_FORMAT fmt)
|
||||
//=====================================================================================
|
||||
|
||||
_Use_decl_annotations_
|
||||
size_t TexMetadata::ComputeIndex(size_t mip, size_t item, size_t slice) const
|
||||
size_t TexMetadata::ComputeIndex(size_t mip, size_t item, size_t slice) const noexcept
|
||||
{
|
||||
if (mip >= mipLevels)
|
||||
return size_t(-1);
|
||||
@ -1451,7 +1451,7 @@ Blob& Blob::operator= (Blob&& moveFrom) noexcept
|
||||
return *this;
|
||||
}
|
||||
|
||||
void Blob::Release()
|
||||
void Blob::Release() noexcept
|
||||
{
|
||||
if (m_buffer)
|
||||
{
|
||||
@ -1463,7 +1463,7 @@ void Blob::Release()
|
||||
}
|
||||
|
||||
_Use_decl_annotations_
|
||||
HRESULT Blob::Initialize(size_t size)
|
||||
HRESULT Blob::Initialize(size_t size) noexcept
|
||||
{
|
||||
if (!size)
|
||||
return E_INVALIDARG;
|
||||
@ -1482,7 +1482,7 @@ HRESULT Blob::Initialize(size_t size)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT Blob::Trim(size_t size)
|
||||
HRESULT Blob::Trim(size_t size) noexcept
|
||||
{
|
||||
if (!size)
|
||||
return E_INVALIDARG;
|
||||
|
Loading…
Reference in New Issue
Block a user