From: Karol Herbst Date: Mon, 6 Jul 2020 18:06:40 +0000 (+0200) Subject: nv50/ir/nir: fix cache mode conversion X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bbf2db20fef7a0cd9188c92790a60eff6900bfdc;p=mesa.git 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 Part-of: --- diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp index d5b81b84c35..a972b51b623 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp @@ -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