aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/lima/lima_parser.c
diff options
context:
space:
mode:
authorVasily Khoruzhick <[email protected]>2020-01-10 19:33:21 -0800
committerVasily Khoruzhick <[email protected]>2020-01-12 00:10:04 -0800
commit997a30d709b2cc207c4f524ed1fb59a9ac6547e3 (patch)
tree3e04dba274d103110e9abdc904840613599aa5ee /src/gallium/drivers/lima/lima_parser.c
parent6bafd230e37c78829bae680a36e1565df03731f6 (diff)
lima: fix PLBU_CMD_PRIMITIVE_SETUP command
Apparently it doesn't depend on primitive type, the value only depends on whether we specify point size via PLBU command -- bit 12 is set in this case Reviewed-by: Qiang Yu <[email protected]> Tested-by: Andreas Baierl <[email protected]> Signed-off-by: Vasily Khoruzhick <[email protected]>
Diffstat (limited to 'src/gallium/drivers/lima/lima_parser.c')
-rw-r--r--src/gallium/drivers/lima/lima_parser.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/gallium/drivers/lima/lima_parser.c b/src/gallium/drivers/lima/lima_parser.c
index f82ae0a2c2a..ea126e9c247 100644
--- a/src/gallium/drivers/lima/lima_parser.c
+++ b/src/gallium/drivers/lima/lima_parser.c
@@ -257,22 +257,11 @@ parse_plbu_semaphore(FILE *fp, uint32_t *value1, uint32_t *value2)
static void
parse_plbu_primitive_setup(FILE *fp, uint32_t *value1, uint32_t *value2)
{
- char prim[10];
-
- if ((*value1 & 0x0000f000) == 0x00000000)
- strcpy(prim, "POINTS");
- else if ((*value1 & 0x0000f000) == 0x00003000)
- strcpy(prim, "LINES");
- else if ((*value1 & 0x0000f000) == 0x00002000)
- strcpy(prim, "TRIANGLES");
- else
- strcpy(prim, "UNKNOWN");
-
if (*value1 == 0x00000200)
fprintf(fp, "\t/* UNKNOWN_2 (PRIMITIVE_SETUP INIT?) */\n");
else
- fprintf(fp, "\t/* PRIMITIVE_SETUP: prim: %s, cull: %d (0x%x), index_size: %d */\n",
- prim,
+ fprintf(fp, "\t/* PRIMITIVE_SETUP: %scull: %d (0x%x), index_size: %d */\n",
+ (*value1 & 0x1000) ? "force point size, " : "",
(*value1 & 0x000f0000) >> 16, (*value1 & 0x000f0000) >> 16,
(*value1 & 0x00000e00) >> 9);
}