Commit 5aed7c74 by Eric Binet Committed by Commit Bot

Narrow point size range clamping to affected versions

Bug: angleproject:2970 Change-Id: Ie14725b0cf30738d394320c24a72bc947135f5cf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1993204Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 23b8857b
......@@ -45,6 +45,7 @@ Google Inc.
Kai Ninomiya
Victor Costan
Shahbaz Youssefi
Eric Binet
Adobe Systems Inc.
Alexandru Chiculita
......
......@@ -320,4 +320,14 @@ void PrintSystemInfo(const SystemInfo &info)
}
std::cout << std::endl;
}
VersionInfo ParseNvidiaDriverVersion(uint32_t version)
{
return {
version >> 22, // major
version >> 14 & 0xff, // minor
version >> 6 & 0xff, // subMinor
version & 0x3f // patch
};
}
} // namespace angle
......@@ -123,6 +123,8 @@ void GetDualGPUInfo(SystemInfo *info);
// Dumps the system info to stdout.
void PrintSystemInfo(const SystemInfo &info);
VersionInfo ParseNvidiaDriverVersion(uint32_t version);
} // namespace angle
#endif // GPU_INFO_UTIL_SYSTEM_INFO_H_
......@@ -195,6 +195,7 @@ angle_source_set("angle_vulkan_backend") {
libs = []
deps = [
":angle_vulkan_entry_points",
"$angle_root:angle_gpu_info_util",
"$angle_root:angle_image_util",
"$angle_root/third_party/vulkan-headers/src:vulkan_headers",
"$angle_spirv_tools_dir:spvtools_val",
......
......@@ -17,6 +17,7 @@
#include "common/debug.h"
#include "common/platform.h"
#include "common/system_utils.h"
#include "gpu_info_util/SystemInfo.h"
#include "libANGLE/Context.h"
#include "libANGLE/Display.h"
#include "libANGLE/renderer/driver_utils.h"
......@@ -1390,8 +1391,18 @@ void RendererVk::initFeatures(const ExtensionNameList &deviceExtensionNames)
ANGLE_FEATURE_CONDITION((&mFeatures), forceCPUPathForCubeMapCopy, IsWindows() && isIntel);
// Work around incorrect NVIDIA point size range clamping.
// TODO(jmadill): Narrow driver range once fixed. http://anglebug.com/2970
ANGLE_FEATURE_CONDITION((&mFeatures), clampPointSize, isNvidia);
// http://anglebug.com/2970#c10
// Clamp if driver version is:
// < 430 on Windows
// < 421 otherwise
angle::VersionInfo nvidiaVersion;
if (isNvidia)
{
nvidiaVersion =
angle::ParseNvidiaDriverVersion(this->mPhysicalDeviceProperties.driverVersion);
}
ANGLE_FEATURE_CONDITION((&mFeatures), clampPointSize,
isNvidia && nvidiaVersion.major < uint32_t(IsWindows() ? 430 : 421));
// Work around ineffective compute-graphics barriers on Nexus 5X.
// TODO(syoussefi): Figure out which other vendors and driver versions are affected.
......
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