From d48c10fab38217264045064b3f48ecac0c24b7bb Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Sun, 23 Jan 2022 17:41:43 +0100 Subject: [PATCH] r300: Print warning when stubbing derivatives Fixes: e1c640c3a43d741719864b35cbf855aa82be0611 Part-of: --- src/gallium/drivers/r300/compiler/radeon_program_alu.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gallium/drivers/r300/compiler/radeon_program_alu.c b/src/gallium/drivers/r300/compiler/radeon_program_alu.c index 47fdd7885c9..7ea348dc5b9 100644 --- a/src/gallium/drivers/r300/compiler/radeon_program_alu.c +++ b/src/gallium/drivers/r300/compiler/radeon_program_alu.c @@ -38,6 +38,7 @@ #include "radeon_compiler.h" #include "radeon_compiler_util.h" +#include "util/log.h" static struct rc_instruction *emit1( struct radeon_compiler * c, struct rc_instruction * after, @@ -1100,6 +1101,10 @@ int radeonStubDeriv(struct radeon_compiler* c, inst->U.I.Opcode = RC_OPCODE_MOV; inst->U.I.SrcReg[0].Swizzle = RC_SWIZZLE_0000; + mesa_logw_once("r300: WARNING: Shader is trying to use derivatives, " + "but the hardware doesn't support it. " + "Expect possible misrendering (it's not a bug, do not report it)."); + return 1; }