зеркало из https://github.com/AvaloniaUI/angle.git
Revert "Vulkan: Add support for EXT_texture_border_clamp"
This reverts commit 4b92e089c0
.
Reason for revert: breaks "Linux MSan Tests" bot
https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20MSan%20Tests/28489/overview
Original change's description:
> Vulkan: Add support for EXT_texture_border_clamp
>
> Add support for GL_EXT_texture_border_clamp. This is implemented by
> using VK_EXT_custom_border_color.
>
> Bug: angleproject:3577
> Test: dEQP-GLES31.functional.texture.border_clamp*
> Change-Id: Ie9fa1eb5dd03b997b5ae182787641a53080a9e51
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2830192
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Bug: angleproject:3577, angleproject:5996
Change-Id: I6b62f1a4a43fcfe2d0df2c73de24db83606ce430
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2911533
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
This commit is contained in:
Родитель
2add8d9f97
Коммит
44fabb7b88
|
@ -199,13 +199,6 @@ struct FeaturesVk : FeatureSetBase
|
|||
"VkDevice supports the VK_EXT_index_type_uint8 extension",
|
||||
&members, "http://anglebug.com/4405"};
|
||||
|
||||
// Whether the VkDevice supports the VK_EXT_custom_border_color extension
|
||||
// http://anglebug.com/3577
|
||||
Feature supportsCustomBorderColorEXT = {
|
||||
"supports_custom_border_color", FeatureCategory::VulkanFeatures,
|
||||
"VkDevice supports the VK_EXT_custom_border_color extension", &members,
|
||||
"http://anglebug.com/3577"};
|
||||
|
||||
// Whether the VkDevice supports the VK_KHR_depth_stencil_resolve extension with the
|
||||
// independentResolveNone feature.
|
||||
// http://anglebug.com/4836
|
||||
|
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
#include "libANGLE/queryutils.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "common/utilities.h"
|
||||
|
||||
#include "libANGLE/Buffer.h"
|
||||
|
@ -88,6 +86,7 @@ void ConvertFromColor(const ColorGeneric &color, GLfloat *outParams)
|
|||
}
|
||||
else
|
||||
{
|
||||
ASSERT(color.type == ColorGeneric::Type::Float);
|
||||
color.colorF.writeData(outParams);
|
||||
}
|
||||
}
|
||||
|
@ -97,6 +96,7 @@ void ConvertFromColor(const ColorGeneric &color, GLint *outParams)
|
|||
{
|
||||
if (isPureInteger)
|
||||
{
|
||||
ASSERT(color.type == ColorGeneric::Type::Int);
|
||||
outParams[0] = color.colorI.red;
|
||||
outParams[1] = color.colorI.green;
|
||||
outParams[2] = color.colorI.blue;
|
||||
|
@ -104,6 +104,7 @@ void ConvertFromColor(const ColorGeneric &color, GLint *outParams)
|
|||
}
|
||||
else
|
||||
{
|
||||
ASSERT(color.type == ColorGeneric::Type::Float);
|
||||
outParams[0] = floatToNormalized<GLint>(color.colorF.red);
|
||||
outParams[1] = floatToNormalized<GLint>(color.colorF.green);
|
||||
outParams[2] = floatToNormalized<GLint>(color.colorF.blue);
|
||||
|
@ -116,12 +117,11 @@ void ConvertFromColor(const ColorGeneric &color, GLuint *outParams)
|
|||
{
|
||||
if (isPureInteger)
|
||||
{
|
||||
constexpr unsigned int kMinValue = 0;
|
||||
|
||||
outParams[0] = std::max(color.colorUI.red, kMinValue);
|
||||
outParams[1] = std::max(color.colorUI.green, kMinValue);
|
||||
outParams[2] = std::max(color.colorUI.blue, kMinValue);
|
||||
outParams[3] = std::max(color.colorUI.alpha, kMinValue);
|
||||
ASSERT(color.type == ColorGeneric::Type::UInt);
|
||||
outParams[0] = color.colorUI.red;
|
||||
outParams[1] = color.colorUI.green;
|
||||
outParams[2] = color.colorUI.blue;
|
||||
outParams[3] = color.colorUI.alpha;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1222,10 +1222,6 @@ void RendererVk::queryDeviceExtensionFeatures(const vk::ExtensionNameList &devic
|
|||
mDepthStencilResolveProperties.sType =
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES;
|
||||
|
||||
mCustomBorderColorFeatures = {};
|
||||
mCustomBorderColorFeatures.sType =
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT;
|
||||
|
||||
mMultisampledRenderToSingleSampledFeatures = {};
|
||||
mMultisampledRenderToSingleSampledFeatures.sType =
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT;
|
||||
|
@ -1329,12 +1325,6 @@ void RendererVk::queryDeviceExtensionFeatures(const vk::ExtensionNameList &devic
|
|||
vk::AddToPNextChain(&deviceProperties, &mDriverProperties);
|
||||
}
|
||||
|
||||
// Query custom border color features
|
||||
if (ExtensionFound(VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME, deviceExtensionNames))
|
||||
{
|
||||
vk::AddToPNextChain(&deviceFeatures, &mCustomBorderColorFeatures);
|
||||
}
|
||||
|
||||
// Query subgroup properties
|
||||
vk::AddToPNextChain(&deviceProperties, &mSubgroupProperties);
|
||||
|
||||
|
@ -1373,7 +1363,6 @@ void RendererVk::queryDeviceExtensionFeatures(const vk::ExtensionNameList &devic
|
|||
mIndexTypeUint8Features.pNext = nullptr;
|
||||
mSubgroupProperties.pNext = nullptr;
|
||||
mExternalMemoryHostProperties.pNext = nullptr;
|
||||
mCustomBorderColorFeatures.pNext = nullptr;
|
||||
mShaderFloat16Int8Features.pNext = nullptr;
|
||||
mDepthStencilResolveProperties.pNext = nullptr;
|
||||
mMultisampledRenderToSingleSampledFeatures.pNext = nullptr;
|
||||
|
@ -1712,12 +1701,6 @@ angle::Result RendererVk::initializeDevice(DisplayVk *displayVk, uint32_t queueF
|
|||
vk::AddToPNextChain(&createInfo, &mTransformFeedbackFeatures);
|
||||
}
|
||||
|
||||
if (getFeatures().supportsCustomBorderColorEXT.enabled)
|
||||
{
|
||||
enabledDeviceExtensions.push_back(VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME);
|
||||
vk::AddToPNextChain(&createInfo, &mCustomBorderColorFeatures);
|
||||
}
|
||||
|
||||
if (getFeatures().supportsIndexTypeUint8.enabled)
|
||||
{
|
||||
enabledDeviceExtensions.push_back(VK_EXT_INDEX_TYPE_UINT8_EXTENSION_NAME);
|
||||
|
@ -2324,11 +2307,6 @@ void RendererVk::initFeatures(DisplayVk *displayVk,
|
|||
(!mFeatures.supportsTransformFeedbackExtension.enabled &&
|
||||
mPhysicalDeviceFeatures.vertexPipelineStoresAndAtomics == VK_TRUE));
|
||||
|
||||
// TODO: http://anglebug.com/5927 - drop dependency on customBorderColorWithoutFormat.
|
||||
ANGLE_FEATURE_CONDITION(&mFeatures, supportsCustomBorderColorEXT,
|
||||
(mCustomBorderColorFeatures.customBorderColors == VK_TRUE &&
|
||||
mCustomBorderColorFeatures.customBorderColorWithoutFormat == VK_TRUE));
|
||||
|
||||
ANGLE_FEATURE_CONDITION(&mFeatures, disableFifoPresentMode, IsLinux() && isIntel);
|
||||
|
||||
ANGLE_FEATURE_CONDITION(&mFeatures, bindEmptyForUnusedDescriptorSets,
|
||||
|
|
|
@ -447,7 +447,6 @@ class RendererVk : angle::NonCopyable
|
|||
VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
|
||||
mMultisampledRenderToSingleSampledFeatures;
|
||||
VkPhysicalDeviceDriverPropertiesKHR mDriverProperties;
|
||||
VkPhysicalDeviceCustomBorderColorFeaturesEXT mCustomBorderColorFeatures;
|
||||
VkExternalFenceProperties mExternalFenceProperties;
|
||||
VkExternalSemaphoreProperties mExternalSemaphoreProperties;
|
||||
VkPhysicalDeviceSamplerYcbcrConversionFeatures mSamplerYcbcrConversionFeatures;
|
||||
|
|
|
@ -3201,26 +3201,22 @@ SamplerDesc::SamplerDesc(const angle::FeaturesVk &featuresVk,
|
|||
|
||||
void SamplerDesc::reset()
|
||||
{
|
||||
mMipLodBias = 0.0f;
|
||||
mMaxAnisotropy = 0.0f;
|
||||
mMinLod = 0.0f;
|
||||
mMaxLod = 0.0f;
|
||||
mExternalFormat = 0;
|
||||
mMagFilter = 0;
|
||||
mMinFilter = 0;
|
||||
mMipmapMode = 0;
|
||||
mAddressModeU = 0;
|
||||
mAddressModeV = 0;
|
||||
mAddressModeW = 0;
|
||||
mCompareEnabled = 0;
|
||||
mCompareOp = 0;
|
||||
mPadding = 0;
|
||||
mBorderColorType = 0;
|
||||
mBorderColor.red = 0.0f;
|
||||
mBorderColor.green = 0.0f;
|
||||
mBorderColor.blue = 0.0f;
|
||||
mBorderColor.alpha = 0.0f;
|
||||
mReserved = 0;
|
||||
mMipLodBias = 0.0f;
|
||||
mMaxAnisotropy = 0.0f;
|
||||
mMinLod = 0.0f;
|
||||
mMaxLod = 0.0f;
|
||||
mExternalFormat = 0;
|
||||
mMagFilter = 0;
|
||||
mMinFilter = 0;
|
||||
mMipmapMode = 0;
|
||||
mAddressModeU = 0;
|
||||
mAddressModeV = 0;
|
||||
mAddressModeW = 0;
|
||||
mCompareEnabled = 0;
|
||||
mCompareOp = 0;
|
||||
mReserved[0] = 0;
|
||||
mReserved[1] = 0;
|
||||
mReserved[2] = 0;
|
||||
}
|
||||
|
||||
void SamplerDesc::update(const angle::FeaturesVk &featuresVk,
|
||||
|
@ -3288,11 +3284,9 @@ void SamplerDesc::update(const angle::FeaturesVk &featuresVk,
|
|||
mMaxLod = 0.25f;
|
||||
}
|
||||
|
||||
mBorderColorType =
|
||||
(samplerState.getBorderColor().type == angle::ColorGeneric::Type::Float) ? 0 : 1;
|
||||
mBorderColor = samplerState.getBorderColor().colorF;
|
||||
|
||||
mReserved = 0;
|
||||
mReserved[0] = 0;
|
||||
mReserved[1] = 0;
|
||||
mReserved[2] = 0;
|
||||
}
|
||||
|
||||
angle::Result SamplerDesc::init(ContextVk *contextVk, Sampler *sampler) const
|
||||
|
@ -3363,30 +3357,6 @@ angle::Result SamplerDesc::init(ContextVk *contextVk, Sampler *sampler) const
|
|||
createInfo.minFilter = VK_FILTER_NEAREST;
|
||||
}
|
||||
|
||||
VkSamplerCustomBorderColorCreateInfoEXT customBorderColorInfo = {};
|
||||
if (createInfo.addressModeU == VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER ||
|
||||
createInfo.addressModeV == VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER ||
|
||||
createInfo.addressModeW == VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER)
|
||||
{
|
||||
ASSERT((contextVk->getRenderer()->getFeatures().supportsCustomBorderColorEXT.enabled));
|
||||
customBorderColorInfo.sType = VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT;
|
||||
|
||||
customBorderColorInfo.customBorderColor.float32[0] = mBorderColor.red;
|
||||
customBorderColorInfo.customBorderColor.float32[1] = mBorderColor.green;
|
||||
customBorderColorInfo.customBorderColor.float32[2] = mBorderColor.blue;
|
||||
customBorderColorInfo.customBorderColor.float32[3] = mBorderColor.alpha;
|
||||
|
||||
if (mBorderColorType == static_cast<uint32_t>(angle::ColorGeneric::Type::Float))
|
||||
{
|
||||
createInfo.borderColor = VK_BORDER_COLOR_FLOAT_CUSTOM_EXT;
|
||||
}
|
||||
else
|
||||
{
|
||||
createInfo.borderColor = VK_BORDER_COLOR_INT_CUSTOM_EXT;
|
||||
}
|
||||
|
||||
vk::AddToPNextChain(&createInfo, &customBorderColorInfo);
|
||||
}
|
||||
ANGLE_VK_TRY(contextVk, sampler->init(contextVk->getDevice(), createInfo));
|
||||
|
||||
return angle::Result::Continue;
|
||||
|
|
|
@ -924,19 +924,13 @@ class SamplerDesc final
|
|||
// 3 bits for compare op. (8 possible values)
|
||||
uint16_t mCompareOp : 3;
|
||||
|
||||
uint16_t mPadding : 15;
|
||||
// Border color and unnormalized coordinates implicitly set to contants.
|
||||
|
||||
// Values from angle::ColorGeneric::Type. Float is 0 and others are 1.
|
||||
uint16_t mBorderColorType : 1;
|
||||
|
||||
// 16*8 bits for BorderColor
|
||||
angle::ColorF mBorderColor;
|
||||
|
||||
// 32 bits reserved for future use.
|
||||
uint32_t mReserved;
|
||||
// 48 extra bits reserved for future use.
|
||||
uint16_t mReserved[3];
|
||||
};
|
||||
|
||||
static_assert(sizeof(SamplerDesc) == 48, "Unexpected SamplerDesc size");
|
||||
static_assert(sizeof(SamplerDesc) == 32, "Unexpected SamplerDesc size");
|
||||
|
||||
// Disable warnings about struct padding.
|
||||
ANGLE_DISABLE_STRUCT_PADDING_WARNINGS
|
||||
|
|
|
@ -351,9 +351,9 @@ void RendererVk::ensureCapsInitialized() const
|
|||
mNativeExtensions.robustness =
|
||||
!IsSwiftshader(mPhysicalDeviceProperties.vendorID, mPhysicalDeviceProperties.deviceID) &&
|
||||
!IsARM(mPhysicalDeviceProperties.vendorID);
|
||||
mNativeExtensions.textureBorderClampOES = false; // not implemented yet
|
||||
mNativeExtensions.discardFramebuffer = true;
|
||||
mNativeExtensions.textureBorderClampOES = getFeatures().supportsCustomBorderColorEXT.enabled;
|
||||
mNativeExtensions.textureBorderClampEXT = getFeatures().supportsCustomBorderColorEXT.enabled;
|
||||
|
||||
// Enable EXT_texture_type_2_10_10_10_REV
|
||||
mNativeExtensions.textureFormat2101010REV = true;
|
||||
|
||||
|
|
|
@ -326,28 +326,6 @@
|
|||
5641 NVIDIA VULKAN : dEQP-GLES31.functional.copy_image.non_compressed.viewclass_24_bits.rgb8ui_rgb8i.cubemap_to_texture2d = SKIP
|
||||
5641 NVIDIA VULKAN : dEQP-GLES31.functional.copy_image.non_compressed.viewclass_32_bits.rgb10_a2ui_rgba8.cubemap_to_texture3d = SKIP
|
||||
|
||||
// GL_EXT_texture_border_clamp related test failures on NVIDIA
|
||||
5978 VULKAN NVIDIA : dEQP-GLES31.functional.texture.border_clamp.formats.compressed_rgb8_etc2.linear_size_not_tile_multiple = SKIP
|
||||
5978 VULKAN NVIDIA : dEQP-GLES31.functional.texture.border_clamp.formats.compressed_rgb8_etc2.linear_size_tile_multiple = SKIP
|
||||
5978 VULKAN NVIDIA : dEQP-GLES31.functional.texture.border_clamp.formats.compressed_rgb8_etc2.nearest_size_not_tile_multiple = SKIP
|
||||
5978 VULKAN NVIDIA : dEQP-GLES31.functional.texture.border_clamp.formats.compressed_rgb8_etc2.nearest_size_tile_multiple = SKIP
|
||||
5978 VULKAN NVIDIA : dEQP-GLES31.functional.texture.border_clamp.formats.compressed_srgb8_etc2.linear_size_not_tile_multiple = SKIP
|
||||
5978 VULKAN NVIDIA : dEQP-GLES31.functional.texture.border_clamp.formats.compressed_srgb8_etc2.linear_size_tile_multiple = SKIP
|
||||
5978 VULKAN NVIDIA : dEQP-GLES31.functional.texture.border_clamp.formats.compressed_srgb8_etc2.nearest_size_not_tile_multiple = SKIP
|
||||
5978 VULKAN NVIDIA : dEQP-GLES31.functional.texture.border_clamp.formats.compressed_srgb8_etc2.nearest_size_tile_multiple = SKIP
|
||||
5978 VULKAN NVIDIA : dEQP-GLES31.functional.texture.border_clamp.per_axis_wrap_mode.texture_2d.compressed_color.nearest.s_clamp_to_edge_t_clamp_to_border_pot = SKIP
|
||||
5978 VULKAN NVIDIA : dEQP-GLES31.functional.texture.border_clamp.per_axis_wrap_mode.texture_2d.compressed_color.nearest.s_clamp_to_edge_t_clamp_to_border_npot = SKIP
|
||||
5978 VULKAN NVIDIA : dEQP-GLES31.functional.texture.border_clamp.per_axis_wrap_mode.texture_2d.compressed_color.nearest.s_repeat_t_clamp_to_border_pot = SKIP
|
||||
5978 VULKAN NVIDIA : dEQP-GLES31.functional.texture.border_clamp.per_axis_wrap_mode.texture_2d.compressed_color.nearest.s_repeat_t_clamp_to_border_npot = SKIP
|
||||
5978 VULKAN NVIDIA : dEQP-GLES31.functional.texture.border_clamp.per_axis_wrap_mode.texture_2d.compressed_color.nearest.s_mirrored_repeat_t_clamp_to_border_pot = SKIP
|
||||
5978 VULKAN NVIDIA : dEQP-GLES31.functional.texture.border_clamp.per_axis_wrap_mode.texture_2d.compressed_color.nearest.s_mirrored_repeat_t_clamp_to_border_npot = SKIP
|
||||
5978 VULKAN NVIDIA : dEQP-GLES31.functional.texture.border_clamp.per_axis_wrap_mode.texture_2d.compressed_color.linear.s_clamp_to_edge_t_clamp_to_border_pot = SKIP
|
||||
5978 VULKAN NVIDIA : dEQP-GLES31.functional.texture.border_clamp.per_axis_wrap_mode.texture_2d.compressed_color.linear.s_clamp_to_edge_t_clamp_to_border_npot = SKIP
|
||||
5978 VULKAN NVIDIA : dEQP-GLES31.functional.texture.border_clamp.per_axis_wrap_mode.texture_2d.compressed_color.linear.s_repeat_t_clamp_to_border_pot = SKIP
|
||||
5978 VULKAN NVIDIA : dEQP-GLES31.functional.texture.border_clamp.per_axis_wrap_mode.texture_2d.compressed_color.linear.s_repeat_t_clamp_to_border_npot = SKIP
|
||||
5978 VULKAN NVIDIA : dEQP-GLES31.functional.texture.border_clamp.per_axis_wrap_mode.texture_2d.compressed_color.linear.s_mirrored_repeat_t_clamp_to_border_pot = SKIP
|
||||
5978 VULKAN NVIDIA : dEQP-GLES31.functional.texture.border_clamp.per_axis_wrap_mode.texture_2d.compressed_color.linear.s_mirrored_repeat_t_clamp_to_border_npot = SKIP
|
||||
|
||||
// Pixel 4 expectations.
|
||||
5990 PIXEL4ORXL VULKAN : dEQP-GLES31.functional.android_extension_pack.extensions.oes_sample_variables = SKIP
|
||||
5990 PIXEL4ORXL VULKAN : dEQP-GLES31.functional.android_extension_pack.shaders.es31.extension_directive.oes_texture_storage_multisample_2d_array = SKIP
|
||||
|
@ -1454,3 +1432,4 @@
|
|||
5990 PIXEL4ORXL VULKAN : dEQP-GLES31.functional.uniform_location.nested_array.mat4x3_vertex = SKIP
|
||||
5990 PIXEL4ORXL VULKAN : dEQP-GLES31.functional.uniform_location.struct.case_10 = SKIP
|
||||
5990 PIXEL4ORXL VULKAN : dEQP-GLES31.functional.vertex_attribute_binding.usage.multiple_bindings.zero_stride = SKIP
|
||||
|
||||
|
|
|
@ -76,10 +76,6 @@
|
|||
4128 VULKAN NVIDIA : KHR-GLES31.core.shader_storage_buffer_object.advanced-unsizedArrayLength-vs-*-matR* = SKIP
|
||||
4128 VULKAN NVIDIA : KHR-GLES31.core.shader_storage_buffer_object.advanced-unsizedArrayLength-fs-*-matR* = SKIP
|
||||
|
||||
// GL_EXT_texture_border_clamp related test failures on NVIDIA
|
||||
5978 VULKAN NVIDIA : KHR-GLES31.core.texture_border_clamp.Texture2DDC16Linear = SKIP
|
||||
5978 VULKAN NVIDIA : KHR-GLES31.core.texture_border_clamp.Texture2DDC32FLinear = SKIP
|
||||
|
||||
////
|
||||
//// SwANGLE expectations
|
||||
////
|
||||
|
|
Загрузка…
Ссылка в новой задаче