From: Vasily Khoruzhick Date: Sun, 15 Mar 2020 19:09:30 +0000 (-0700) Subject: lima: decode depth/stencil write bits in RSW X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0c41937440276498b76c30657bc8d884ed8220db;p=mesa.git lima: decode depth/stencil write bits in RSW Now that we know the bits that are responsible for enabling depth/stencil writes in shader we can decode them properly. Reviewed-by: Andreas Baierl Signed-off-by: Vasily Khoruzhick Tested-by: Marge Bot Part-of: --- diff --git a/src/gallium/drivers/lima/lima_parser.c b/src/gallium/drivers/lima/lima_parser.c index 6dd8513f929..6770be8f919 100644 --- a/src/gallium/drivers/lima/lima_parser.c +++ b/src/gallium/drivers/lima/lima_parser.c @@ -478,11 +478,19 @@ parse_rsw(FILE *fp, uint32_t *value, int i, uint32_t *helper) fprintf(fp, "(1): depth test disabled || writes not allowed"); fprintf(fp, "\n\t\t\t\t\t\t/* %s(2)", render_state_infos[i].info); - fprintf(fp, ": blend_func %d (%s)", ((*value & 0x0000000e) >> 1), + fprintf(fp, ": depth_func %d (%s)", ((*value & 0x0000000e) >> 1), lima_get_compare_func_string((*value & 0x0000000e) >> 1)); fprintf(fp, ", offset_scale: %d", (*value & 0x00ff0000) >> 16); fprintf(fp, ", offset_units: %d", (*value & 0xff000000) >> 24); - fprintf(fp, ", unknown bits 4-15: 0x%08x */\n", *value & 0x0000fff0); + if (*value & 0x400) + fprintf(fp, ", shader writes depth or stencil"); + if (*value & 0x800) + fprintf(fp, ", shader writes depth"); + if (*value & 0x1000) + fprintf(fp, ", shader writes stencil"); + fprintf(fp, " */\n\t\t\t\t\t\t/* %s(3)", render_state_infos[i].info); + fprintf(fp, ": unknown bits 4-9: 0x%08x", *value & 0x000003f0); + fprintf(fp, ", unknown bits 13-15: 0x%08x */\n", *value & 0x00000e000); break; case 4: /* DEPTH RANGE */ fprintf(fp, ": viewport.far = %f, viewport.near = %f */\n",