Commit a51b57fa by Geoff Lang Committed by Commit Bot

Revert "Vulkan: Add features to modify sampling parameters"

Bug: b/167404532 Change-Id: Iae19dfe165074e8c01216312bddd744c4fb504a4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2510012 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarTim Van Patten <timvp@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 64f04516
...@@ -421,28 +421,6 @@ struct FeaturesVk : FeatureSetBase ...@@ -421,28 +421,6 @@ struct FeaturesVk : FeatureSetBase
"Works around a bug on platforms which destroy oldSwapchain in vkCreateSwapchainKHR.", "Works around a bug on platforms which destroy oldSwapchain in vkCreateSwapchainKHR.",
&members, "http://anglebug.com/5061"}; &members, "http://anglebug.com/5061"};
// Allow forcing an LOD offset on all sampling operations for performance comparisons. ANGLE is
// non-conformant if this feature is enabled.
std::array<angle::Feature, 4> forceTextureLODOffset = {
angle::Feature{"force_texture_lod_offset_1", angle::FeatureCategory::VulkanWorkarounds,
"Increase the minimum texture level-of-detail by 1 when sampling.",
&members},
angle::Feature{"force_texture_lod_offset_2", angle::FeatureCategory::VulkanWorkarounds,
"Increase the minimum texture level-of-detail by 2 when sampling.",
&members},
angle::Feature{"force_texture_lod_offset_3", angle::FeatureCategory::VulkanWorkarounds,
"Increase the minimum texture level-of-detail by 3 when sampling.",
&members},
angle::Feature{"force_texture_lod_offset_4", angle::FeatureCategory::VulkanWorkarounds,
"Increase the minimum texture level-of-detail by 4 when sampling.",
&members},
};
// Translate non-nearest filtering modes to nearest for all samplers for performance
// comparisons. ANGLE is non-conformant if this feature is enabled.
Feature forceNearestFiltering = {"force_nearest_filtering", FeatureCategory::VulkanWorkarounds,
"Force nearest filtering when sampling.", &members};
// Translate non-nearest mip filtering modes to nearest mip for all samplers for performance // Translate non-nearest mip filtering modes to nearest mip for all samplers for performance
// comparisons. ANGLE is non-conformant if this feature is enabled. // comparisons. ANGLE is non-conformant if this feature is enabled.
Feature forceNearestMipFiltering = {"force_nearest_mip_filtering", Feature forceNearestMipFiltering = {"force_nearest_mip_filtering",
......
...@@ -1998,14 +1998,6 @@ void RendererVk::initFeatures(DisplayVk *displayVk, const ExtensionNameList &dev ...@@ -1998,14 +1998,6 @@ void RendererVk::initFeatures(DisplayVk *displayVk, const ExtensionNameList &dev
// Android mistakenly destroys the old swapchain when creating a new one. // Android mistakenly destroys the old swapchain when creating a new one.
ANGLE_FEATURE_CONDITION(&mFeatures, waitIdleBeforeSwapchainRecreation, IsAndroid() && isARM); ANGLE_FEATURE_CONDITION(&mFeatures, waitIdleBeforeSwapchainRecreation, IsAndroid() && isARM);
for (size_t lodOffsetFeatureIdx = 0;
lodOffsetFeatureIdx < mFeatures.forceTextureLODOffset.size(); lodOffsetFeatureIdx++)
{
ANGLE_FEATURE_CONDITION(&mFeatures, forceTextureLODOffset[lodOffsetFeatureIdx], false);
}
ANGLE_FEATURE_CONDITION(&mFeatures, forceNearestFiltering, false);
ANGLE_FEATURE_CONDITION(&mFeatures, forceNearestMipFiltering, false);
ANGLE_FEATURE_CONDITION( ANGLE_FEATURE_CONDITION(
&mFeatures, preferDrawClearOverVkCmdClearAttachments, &mFeatures, preferDrawClearOverVkCmdClearAttachments,
IsPixel2(mPhysicalDeviceProperties.vendorID, mPhysicalDeviceProperties.deviceID)); IsPixel2(mPhysicalDeviceProperties.vendorID, mPhysicalDeviceProperties.deviceID));
......
...@@ -2925,16 +2925,6 @@ void SamplerDesc::update(const angle::FeaturesVk &featuresVk, ...@@ -2925,16 +2925,6 @@ void SamplerDesc::update(const angle::FeaturesVk &featuresVk,
uint64_t externalFormat) uint64_t externalFormat)
{ {
mMipLodBias = 0.0f; mMipLodBias = 0.0f;
for (size_t lodOffsetFeatureIdx = 0;
lodOffsetFeatureIdx < featuresVk.forceTextureLODOffset.size(); lodOffsetFeatureIdx++)
{
if (featuresVk.forceTextureLODOffset[lodOffsetFeatureIdx].enabled)
{
// Make sure only one forceTextureLODOffset feature is set.
ASSERT(mMipLodBias == 0.0f);
mMipLodBias = static_cast<float>(lodOffsetFeatureIdx + 1);
}
}
mMaxAnisotropy = samplerState.getMaxAnisotropy(); mMaxAnisotropy = samplerState.getMaxAnisotropy();
mMinLod = samplerState.getMinLod(); mMinLod = samplerState.getMinLod();
...@@ -2956,15 +2946,6 @@ void SamplerDesc::update(const angle::FeaturesVk &featuresVk, ...@@ -2956,15 +2946,6 @@ void SamplerDesc::update(const angle::FeaturesVk &featuresVk,
GLenum magFilter = samplerState.getMagFilter(); GLenum magFilter = samplerState.getMagFilter();
GLenum minFilter = samplerState.getMinFilter(); GLenum minFilter = samplerState.getMinFilter();
if (featuresVk.forceNearestFiltering.enabled)
{
magFilter = gl::ConvertToNearestFilterMode(magFilter);
minFilter = gl::ConvertToNearestFilterMode(minFilter);
}
if (featuresVk.forceNearestMipFiltering.enabled)
{
minFilter = gl::ConvertToNearestMipFilterMode(minFilter);
}
SetBitField(mMagFilter, gl_vk::GetFilter(magFilter)); SetBitField(mMagFilter, gl_vk::GetFilter(magFilter));
SetBitField(mMinFilter, gl_vk::GetFilter(minFilter)); SetBitField(mMinFilter, gl_vk::GetFilter(minFilter));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment