From bbf2db20fef7a0cd9188c92790a60eff6900bfdc Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Mon, 6 Jul 2020 20:06:40 +0200 Subject: [PATCH] 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: --- src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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 -- 2.30.2