From 16fa4621b8fbb185fd8219be6540183bfe942f0d Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sun, 8 Oct 2023 10:09:59 -0700 Subject: [PATCH] anv: Fix transfer type assert Fix defect reported by Coverity Scan. Constant expression result (CONSTANT_EXPRESSION_RESULT) always_true_or: The or condition type != ANV_TIMESTAMP_CAPTURE_AT_CS_STALL || type != ANV_TIMESTAMP_REWRITE_COMPUTE_WALKER will always be true because type cannot be equal to two different values at the same time, so it must be not equal to at least one of them. Fixes: 5112b421462 ("anv: Handle end of pipe with MI_FLUSH_DW on transfer queue") Signed-off-by: Vinson Lee Reviewed-by: Sagar Ghuge Part-of: --- src/intel/vulkan/genX_cmd_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index 9473d76..1ff6133 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -8158,7 +8158,7 @@ void genX(cmd_emit_timestamp)(struct anv_batch *batch, * transfer queue. */ if (batch->engine_class == INTEL_ENGINE_CLASS_COPY) { - assert(type != ANV_TIMESTAMP_CAPTURE_AT_CS_STALL || + assert(type != ANV_TIMESTAMP_CAPTURE_AT_CS_STALL && type != ANV_TIMESTAMP_REWRITE_COMPUTE_WALKER); } -- 2.7.4