diff --git a/WickedEngine/wiFont.h b/WickedEngine/wiFont.h index 5f0d5121a..cb93941a3 100644 --- a/WickedEngine/wiFont.h +++ b/WickedEngine/wiFont.h @@ -96,8 +96,7 @@ namespace wi::font wi::Color color = wi::Color(255, 255, 255, 255), wi::Color shadowColor = wi::Color(0, 0, 0, 0) ) : - posX(posX), - posY(posY), + position(posX, posY, 0), size(size), h_align(h_align), v_align(v_align), diff --git a/WickedEngine/wiGraphics.h b/WickedEngine/wiGraphics.h index 2f1a24a6a..e2c7599ed 100644 --- a/WickedEngine/wiGraphics.h +++ b/WickedEngine/wiGraphics.h @@ -381,6 +381,10 @@ namespace wi::graphics SPARSE_TEXTURE3D = 1 << 15, SPARSE_NULL_MAPPING = 1 << 16, GENERIC_SPARSE_TILE_POOL = 1 << 17, // alows using ResourceMiscFlag::SPARSE_TILE_POOL (non resource type specific version) + DEPTH_RESOLVE_SAMPLE_ZERO = 1 << 18, + STENCIL_RESOLVE_SAMPLE_ZERO = 1 << 19, + DEPTH_RESOLVE_MIN_MAX = 1 << 20, + STENCIL_RESOLVE_MIN_MAX = 1 << 21, }; enum class ResourceState diff --git a/WickedEngine/wiGraphicsDevice_DX12.cpp b/WickedEngine/wiGraphicsDevice_DX12.cpp index 2407b3a5a..906ab8492 100644 --- a/WickedEngine/wiGraphicsDevice_DX12.cpp +++ b/WickedEngine/wiGraphicsDevice_DX12.cpp @@ -2557,6 +2557,10 @@ using namespace dx12_internal; capabilities |= GraphicsDeviceCapability::TESSELLATION; capabilities |= GraphicsDeviceCapability::PREDICATION; + capabilities |= GraphicsDeviceCapability::DEPTH_RESOLVE_SAMPLE_ZERO; + capabilities |= GraphicsDeviceCapability::STENCIL_RESOLVE_SAMPLE_ZERO; + capabilities |= GraphicsDeviceCapability::DEPTH_RESOLVE_MIN_MAX; + capabilities |= GraphicsDeviceCapability::STENCIL_RESOLVE_MIN_MAX; // Init feature check (https://devblogs.microsoft.com/directx/introducing-a-new-api-for-checking-feature-support-in-direct3d-12/) CD3DX12FeatureSupport features; diff --git a/WickedEngine/wiGraphicsDevice_Vulkan.cpp b/WickedEngine/wiGraphicsDevice_Vulkan.cpp index 5478e6929..fd553f4ec 100644 --- a/WickedEngine/wiGraphicsDevice_Vulkan.cpp +++ b/WickedEngine/wiGraphicsDevice_Vulkan.cpp @@ -2531,8 +2531,6 @@ using namespace vulkan_internal; } assert(properties2.properties.limits.timestampComputeAndGraphics == VK_TRUE); - assert(depth_stencil_resolve_properties.supportedDepthResolveModes& VK_RESOLVE_MODE_MIN_BIT); - assert(depth_stencil_resolve_properties.supportedDepthResolveModes& VK_RESOLVE_MODE_MAX_BIT); vkGetPhysicalDeviceFeatures2(physicalDevice, &features2); @@ -2654,6 +2652,29 @@ using namespace vulkan_internal; capabilities |= GraphicsDeviceCapability::GENERIC_SPARSE_TILE_POOL; } + if (depth_stencil_resolve_properties.supportedDepthResolveModes & VK_RESOLVE_MODE_SAMPLE_ZERO_BIT) + { + capabilities |= GraphicsDeviceCapability::DEPTH_RESOLVE_SAMPLE_ZERO; + } + if (depth_stencil_resolve_properties.supportedStencilResolveModes & VK_RESOLVE_MODE_SAMPLE_ZERO_BIT) + { + capabilities |= GraphicsDeviceCapability::STENCIL_RESOLVE_SAMPLE_ZERO; + } + if ( + (depth_stencil_resolve_properties.supportedDepthResolveModes & VK_RESOLVE_MODE_MIN_BIT) && + (depth_stencil_resolve_properties.supportedDepthResolveModes & VK_RESOLVE_MODE_MAX_BIT) + ) + { + capabilities |= GraphicsDeviceCapability::DEPTH_RESOLVE_MIN_MAX; + } + if ( + (depth_stencil_resolve_properties.supportedStencilResolveModes & VK_RESOLVE_MODE_MIN_BIT) && + (depth_stencil_resolve_properties.supportedStencilResolveModes & VK_RESOLVE_MODE_MAX_BIT) + ) + { + capabilities |= GraphicsDeviceCapability::STENCIL_RESOLVE_MIN_MAX; + } + // Find queue families: uint32_t queueFamilyCount = 0; vkGetPhysicalDeviceQueueFamilyProperties(physicalDevice, &queueFamilyCount, nullptr); diff --git a/WickedEngine/wiVersion.cpp b/WickedEngine/wiVersion.cpp index 80f87a1c2..a97c5e60a 100644 --- a/WickedEngine/wiVersion.cpp +++ b/WickedEngine/wiVersion.cpp @@ -9,7 +9,7 @@ namespace wi::version // minor features, major updates, breaking compatibility changes const int minor = 71; // minor bug fixes, alterations, refactors, updates - const int revision = 88; + const int revision = 89; const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision);