diff --git a/internal/TextureCompare.inl b/internal/TextureCompare.inl index b0d468cf..fcf081f9 100644 --- a/internal/TextureCompare.inl +++ b/internal/TextureCompare.inl @@ -1,9 +1,9 @@ -DECORATE(None, VK_COMPARE_OP_NEVER, D3D12_COMPARISON_FUNC_NEVER) -DECORATE(LEqual, VK_COMPARE_OP_LESS_OR_EQUAL, D3D12_COMPARISON_FUNC_LESS_EQUAL) -DECORATE(GEqual, VK_COMPARE_OP_GREATER_OR_EQUAL, D3D12_COMPARISON_FUNC_GREATER_EQUAL) -DECORATE(Less, VK_COMPARE_OP_LESS, D3D12_COMPARISON_FUNC_LESS) -DECORATE(Greater, VK_COMPARE_OP_GREATER, D3D12_COMPARISON_FUNC_GREATER) -DECORATE(Equal, VK_COMPARE_OP_EQUAL, D3D12_COMPARISON_FUNC_EQUAL) -DECORATE(NotEqual, VK_COMPARE_OP_NOT_EQUAL, D3D12_COMPARISON_FUNC_NOT_EQUAL) -DECORATE(Always, VK_COMPARE_OP_ALWAYS, D3D12_COMPARISON_FUNC_ALWAYS) -DECORATE(Never, VK_COMPARE_OP_NEVER, D3D12_COMPARISON_FUNC_NEVER) \ No newline at end of file +DECORATE(None, VK_COMPARE_OP_NEVER, D3D12_COMPARISON_FUNC_NEVER) +DECORATE(LEqual, VK_COMPARE_OP_LESS_OR_EQUAL, D3D12_COMPARISON_FUNC_LESS_EQUAL) +DECORATE(GEqual, VK_COMPARE_OP_GREATER_OR_EQUAL, D3D12_COMPARISON_FUNC_GREATER_EQUAL) +DECORATE(Less, VK_COMPARE_OP_LESS, D3D12_COMPARISON_FUNC_LESS) +DECORATE(Greater, VK_COMPARE_OP_GREATER, D3D12_COMPARISON_FUNC_GREATER) +DECORATE(Equal, VK_COMPARE_OP_EQUAL, D3D12_COMPARISON_FUNC_EQUAL) +DECORATE(NotEqual, VK_COMPARE_OP_NOT_EQUAL, D3D12_COMPARISON_FUNC_NOT_EQUAL) +DECORATE(Always, VK_COMPARE_OP_ALWAYS, D3D12_COMPARISON_FUNC_ALWAYS) +DECORATE(Never, VK_COMPARE_OP_NEVER, D3D12_COMPARISON_FUNC_NEVER) \ No newline at end of file diff --git a/internal/TextureFilter.inl b/internal/TextureFilter.inl index 8abd6213..9c85cfc3 100644 --- a/internal/TextureFilter.inl +++ b/internal/TextureFilter.inl @@ -1,3 +1,3 @@ -DECORATE(Nearest, VK_FILTER_NEAREST, VK_SAMPLER_MIPMAP_MODE_NEAREST, D3D12_FILTER_MIN_MAG_MIP_POINT) -DECORATE(Bilinear, VK_FILTER_LINEAR, VK_SAMPLER_MIPMAP_MODE_NEAREST, D3D12_FILTER_MIN_MAG_LINEAR_MIP_POINT) -DECORATE(Trilinear, VK_FILTER_LINEAR, VK_SAMPLER_MIPMAP_MODE_LINEAR, D3D12_FILTER_MIN_MAG_MIP_LINEAR) \ No newline at end of file +DECORATE(Nearest, VK_FILTER_NEAREST, VK_SAMPLER_MIPMAP_MODE_NEAREST, D3D12_FILTER_MIN_MAG_MIP_POINT) +DECORATE(Bilinear, VK_FILTER_LINEAR, VK_SAMPLER_MIPMAP_MODE_NEAREST, D3D12_FILTER_MIN_MAG_LINEAR_MIP_POINT) +DECORATE(Trilinear, VK_FILTER_LINEAR, VK_SAMPLER_MIPMAP_MODE_LINEAR, D3D12_FILTER_MIN_MAG_MIP_LINEAR) \ No newline at end of file diff --git a/internal/TextureFormat.inl b/internal/TextureFormat.inl index ed5c96de..86137364 100644 --- a/internal/TextureFormat.inl +++ b/internal/TextureFormat.inl @@ -11,7 +11,6 @@ DECORATE(R32UI, 1, 4, VK_FORMAT_R32_UINT, DXGI_FORMAT_ DECORATE(RG8, 2, 2, VK_FORMAT_R8G8_UNORM, DXGI_FORMAT_R8G8_UNORM) DECORATE(RGB32F, 3, 12, VK_FORMAT_R32G32B32_SFLOAT, DXGI_FORMAT_R32G32B32_FLOAT) DECORATE(RGBA32F, 4, 16, VK_FORMAT_R32G32B32A32_SFLOAT, DXGI_FORMAT_R32G32B32A32_FLOAT) -DECORATE(RGBE8, 4, 4, VK_FORMAT_UNDEFINED, DXGI_FORMAT_UNKNOWN) DECORATE(RGB16F, 3, 6, VK_FORMAT_R16G16B16_SFLOAT, DXGI_FORMAT_UNKNOWN) DECORATE(RGBA16F, 4, 8, VK_FORMAT_R16G16B16A16_SFLOAT, DXGI_FORMAT_R16G16B16A16_FLOAT) DECORATE(RG16_snorm, 2, 4, VK_FORMAT_R16G16_SNORM, DXGI_FORMAT_R16G16_SNORM) @@ -19,7 +18,7 @@ DECORATE(RG16, 2, 4, VK_FORMAT_R16G16_UNORM, DXGI_FORMAT_ DECORATE(RG16F, 2, 4, VK_FORMAT_R16G16_SFLOAT, DXGI_FORMAT_R16G16_FLOAT) DECORATE(RG32F, 2, 8, VK_FORMAT_R32G32_SFLOAT, DXGI_FORMAT_R32G32_FLOAT) DECORATE(RG32UI, 2, 8, VK_FORMAT_R32G32_UINT, DXGI_FORMAT_R32G32_UINT) -DECORATE(RGB10_A2, 3, 4, VK_FORMAT_A2B10G10R10_UNORM_PACK32, DXGI_FORMAT_R10G10B10A2_UNORM) +DECORATE(RGB10_A2, 4, 4, VK_FORMAT_A2B10G10R10_UNORM_PACK32, DXGI_FORMAT_R10G10B10A2_UNORM) DECORATE(RG11F_B10F, 3, 4, VK_FORMAT_B10G11R11_UFLOAT_PACK32, DXGI_FORMAT_R11G11B10_FLOAT) DECORATE(D16, 1, 2, VK_FORMAT_D16_UNORM, DXGI_FORMAT_D16_UNORM) DECORATE(D24_S8, 2, 4, VK_FORMAT_D24_UNORM_S8_UINT, DXGI_FORMAT_D24_UNORM_S8_UINT) diff --git a/internal/TextureParams.cpp b/internal/TextureParams.cpp index db35cc45..e3a92e24 100644 --- a/internal/TextureParams.cpp +++ b/internal/TextureParams.cpp @@ -40,7 +40,7 @@ int Ray::GetChannelCount(const eTexFormat format) { int Ray::GetPerPixelDataLen(const eTexFormat format) { return g_tex_format_info[int(format)].pp_data_len; } int Ray::GetBlockLenBytes(const eTexFormat format, const eTexBlock block) { - static_assert(int(eTexFormat::_Count) == 32, "Update the list below!"); + static_assert(int(eTexFormat::_Count) == 31, "Update the list below!"); switch (format) { case eTexFormat::BC1: assert(block == eTexBlock::_4x4); diff --git a/internal/TextureParams.h b/internal/TextureParams.h index 15ff09f0..38b5e3c5 100644 --- a/internal/TextureParams.h +++ b/internal/TextureParams.h @@ -13,18 +13,18 @@ enum class eTexFormat : uint8_t { #undef DECORATE inline bool IsDepthFormat(const eTexFormat format) { - static_assert(int(eTexFormat::_Count) == 32, "Update the list below!"); + static_assert(int(eTexFormat::_Count) == 31, "Update the list below!"); return format == eTexFormat::D16 || format == eTexFormat::D24_S8 || format == eTexFormat::D32_S8 || format == eTexFormat::D32; } inline bool IsDepthStencilFormat(const eTexFormat format) { - static_assert(int(eTexFormat::_Count) == 32, "Update the list below!"); + static_assert(int(eTexFormat::_Count) == 31, "Update the list below!"); return format == eTexFormat::D24_S8 || format == eTexFormat::D32_S8; } inline bool IsCompressedFormat(const eTexFormat format) { - static_assert(int(eTexFormat::_Count) == 32, "Update the list below!"); + static_assert(int(eTexFormat::_Count) == 31, "Update the list below!"); switch (format) { case eTexFormat::BC1: case eTexFormat::BC2: @@ -39,7 +39,7 @@ inline bool IsCompressedFormat(const eTexFormat format) { } inline bool IsUintFormat(const eTexFormat format) { - static_assert(int(eTexFormat::_Count) == 32, "Update the list below!"); + static_assert(int(eTexFormat::_Count) == 31, "Update the list below!"); if (format == eTexFormat::R16UI || format == eTexFormat::R32UI || format == eTexFormat::RG32UI) { return true; }