Metal: Add Shadow Sampler Grad workaround for AMD

This change allows the direct translator to
use emulated gradient shadow compare functions for
AMD devices, and devices that don't support shadow compare
sampler.

Bug: angleproject:5107
Change-Id: I8cc8dcb6e6982531c2a858782869283e6dc97052
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3232818
Commit-Queue: Kyle Piddington <kpiddington@apple.com>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
This commit is contained in:
Kyle Piddington 2021-10-19 14:42:57 -07:00 коммит произвёл Angle LUCI CQ
Родитель 5ad7ae4a02
Коммит 43fd49e60c
2 изменённых файлов: 2 добавлений и 6 удалений

Просмотреть файл

@ -992,8 +992,9 @@ void DisplayMtl::initializeFeatures()
ANGLE_FEATURE_CONDITION((&mFeatures), allowRuntimeSamplerCompareMode,
supportsEitherGPUFamily(3, 1));
// AMD does not support sample_compare_grad
ANGLE_FEATURE_CONDITION((&mFeatures), allowSamplerCompareGradient,
supportsEitherGPUFamily(3, 1));
supportsEitherGPUFamily(3, 1) && !isAMD());
ANGLE_FEATURE_CONDITION((&mFeatures), allowSamplerCompareLod, supportsEitherGPUFamily(3, 1));
// http://anglebug.com/4919

Просмотреть файл

@ -558,11 +558,6 @@
/////////// Metal ////////////////
// shadow sampler doesn't support bias & gradient & lod versions
5107 MAC METAL AMD : dEQP-GLES3.*texturegrad*shadow* = SKIP
5107 MAC METAL AMD : dEQP-GLES3.*textureprojgrad*shadow* = SKIP
// last provoking vertex (for flat shading) is not supported
5232 MAC METAL : dEQP-GLES3.*flatshading* = FAIL
5232 MAC METAL AMD : dEQP-GLES3.functional.shaders.builtin_functions.pack_unpack.unpacksnorm2x16_fragment = FAIL