nv50/ir/nir: fix cache mode conversion

The nir access qualifier is actually a bitfield, so we need to read out
like one.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5747>
This commit is contained in:
Karol Herbst
2020-07-06 20:06:40 +02:00
committed by Marge Bot
parent 31e344799a
commit bbf2db20fe

View File

@@ -2938,14 +2938,11 @@ Converter::getNIRArgCount(TexInstruction::Target& target)
CacheMode
Converter::convert(enum gl_access_qualifier access)
{
switch (access) {
case ACCESS_VOLATILE:
if (access & ACCESS_VOLATILE)
return CACHE_CV;
case ACCESS_COHERENT:
if (access & ACCESS_COHERENT)
return CACHE_CG;
default:
return CACHE_CA;
}
return CACHE_CA;
}
bool