diff options
author | Eric Anholt <[email protected]> | 2014-08-06 11:52:57 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2014-08-08 18:59:47 -0700 |
commit | 9492eb588dd001ec4578aa2ba3c258b43b76263b (patch) | |
tree | 84cd9b11f4e50f613444b572eedd814d575094c1 /src/gallium | |
parent | 961715eab2117772e0145229d6f934d351b9b27b (diff) |
vc4: Add some debug code for forcing fragment shader output color.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_program.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c index 0c821c8960d..4e991148c40 100644 --- a/src/gallium/drivers/vc4/vc4_program.c +++ b/src/gallium/drivers/vc4/vc4_program.c @@ -562,6 +562,21 @@ emit_frag_end(struct tgsi_to_qir *trans) const struct util_format_description *format_desc = util_format_description(trans->fs_key->color_format); + /* Debug: Sometimes you're getting a black output and just want to see + * if the FS is getting executed at all. Spam magenta into the color + * output. + */ + if (0) { + trans->outputs[format_desc->swizzle[0]] = + qir_uniform_ui(trans, fui(1.0)); + trans->outputs[format_desc->swizzle[1]] = + qir_uniform_ui(trans, fui(0.0)); + trans->outputs[format_desc->swizzle[2]] = + qir_uniform_ui(trans, fui(1.0)); + trans->outputs[format_desc->swizzle[3]] = + qir_uniform_ui(trans, fui(0.5)); + } + struct qreg swizzled_outputs[4] = { trans->outputs[format_desc->swizzle[0]], trans->outputs[format_desc->swizzle[1]], |