summaryrefslogtreecommitdiff
path: root/lib/mesa/src/gallium/drivers/lima/lima_parser.c
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2022-09-02 05:18:14 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2022-09-02 05:18:14 +0000
commit5f66494d31f735486b8222ecfa0a0c9046e92543 (patch)
treef699ac8d7f6d510c30bded04f96a1209344f6a47 /lib/mesa/src/gallium/drivers/lima/lima_parser.c
parent17a5b543e3479aaa779cc68345c46d437edd05d8 (diff)
Import Mesa 22.1.7
Diffstat (limited to 'lib/mesa/src/gallium/drivers/lima/lima_parser.c')
-rw-r--r--lib/mesa/src/gallium/drivers/lima/lima_parser.c61
1 files changed, 33 insertions, 28 deletions
diff --git a/lib/mesa/src/gallium/drivers/lima/lima_parser.c b/lib/mesa/src/gallium/drivers/lima/lima_parser.c
index c3780d94f..f885c7713 100644
--- a/lib/mesa/src/gallium/drivers/lima/lima_parser.c
+++ b/lib/mesa/src/gallium/drivers/lima/lima_parser.c
@@ -525,7 +525,7 @@ parse_rsw(FILE *fp, uint32_t *value, int i, uint32_t *helper)
fprintf(fp, ": ignore depth clip near");
if ((*value & 0x00000020) == 0x00000020)
fprintf(fp, ", ignore depth clip far");
- fprintf(fp, ", unknown bits 6-9: 0x%08x", *value & 0x000003c0);
+ fprintf(fp, ", register for gl_FragDepth: $%d", (*value & 0x000003c0) >> 6);
fprintf(fp, ", unknown bits 13-15: 0x%08x */\n", *value & 0x00000e000);
break;
case 4: /* DEPTH RANGE */
@@ -594,7 +594,14 @@ parse_rsw(FILE *fp, uint32_t *value, int i, uint32_t *helper)
fprintf(fp, " */\n");
else
fprintf(fp, ", UNKNOWN\n");
- fprintf(fp, "\t\t\t\t\t\t/* %s(2)", render_state_infos[i].info);
+
+ fprintf(fp, "\t\t\t\t\t\t/* %s(3)", render_state_infos[i].info);
+ fprintf(fp, ", register for gl_FragColor: $%d $%d $%d $%d */\n",
+ (*value & 0xf0000000) >> 28,
+ (*value & 0x0f000000) >> 24,
+ (*value & 0x00f00000) >> 20,
+ (*value & 0x000f0000) >> 16);
+ fprintf(fp, "\t\t\t\t\t\t/* %s(3)", render_state_infos[i].info);
fprintf(fp, ": alpha_test_func: %d (%s) */\n",
(*value & 0x00000007),
lima_get_compare_func_string((*value & 0x00000007))); /* alpha_test_func */
@@ -667,6 +674,11 @@ parse_rsw(FILE *fp, uint32_t *value, int i, uint32_t *helper)
if ((*value & 0x00002000) == 0x00002000) /* bit 13 unknown */
fprintf(fp, ", bit 13 set");
+
+ fprintf(fp, " */\n");
+ fprintf(fp, "\n\t\t\t\t\t\t/* %s(3):", render_state_infos[i].info);
+ fprintf(fp, " register for gl_SecondaryFragColor: $%d",
+ (*value & 0xf0000000) >> 28);
fprintf(fp, " */\n");
break;
case 14: /* AUX1 */
@@ -728,14 +740,16 @@ parse_texture(FILE *fp, uint32_t *data, uint32_t start, uint32_t offset)
fprintf(fp, "\t stride: 0x%x (%d)\n", desc->stride, desc->stride);
fprintf(fp, "\t unknown_0_2: 0x%x (%d)\n", desc->unknown_0_2, desc->unknown_0_2);
- /* Word 1 - 3 */
- fprintf(fp, "/* 0x%08x (0x%08x) */\t0x%08x 0x%08x 0x%08x\n",
- start + i * 4, i * 4, *(&data[i + offset]), *(&data[i + 1 + offset]), *(&data[i + 2 + offset]));
- i += 3;
+ /* Word 1 - 5 */
+ fprintf(fp, "/* 0x%08x (0x%08x) */\t0x%08x 0x%08x 0x%08x 0x%08x 0x%08x\n",
+ start + i * 4, i * 4, *(&data[i + offset]), *(&data[i + 1 + offset]),
+ *(&data[i + 2 + offset]), *(&data[i + 3 + offset]), *(&data[i + 4 + offset]));
+ i += 5;
fprintf(fp, "\t unknown_1_1: 0x%x (%d)\n", desc->unknown_1_1, desc->unknown_1_1);
fprintf(fp, "\t unnorm_coords: 0x%x (%d)\n", desc->unnorm_coords, desc->unnorm_coords);
fprintf(fp, "\t unknown_1_2: 0x%x (%d)\n", desc->unknown_1_2, desc->unknown_1_2);
- fprintf(fp, "\t texture_type: 0x%x (%d)\n", desc->texture_type, desc->texture_type);
+ fprintf(fp, "\t cube_map: 0x%x (%d)\n", desc->cube_map, desc->cube_map);
+ fprintf(fp, "\t sampler_dim: 0x%x (%d)\n", desc->sampler_dim, desc->sampler_dim);
fprintf(fp, "\t min_lod: 0x%x (%d) (%f)\n", desc->min_lod, desc->min_lod, lima_fixed8_to_float(desc->min_lod));
fprintf(fp, "\t max_lod: 0x%x (%d) (%f)\n", desc->max_lod, desc->max_lod, lima_fixed8_to_float(desc->max_lod));
fprintf(fp, "\t lod_bias: 0x%x (%d) (%f)\n", desc->lod_bias, desc->lod_bias, lima_fixed8_to_float(desc->lod_bias));
@@ -744,29 +758,20 @@ parse_texture(FILE *fp, uint32_t *data, uint32_t start, uint32_t offset)
fprintf(fp, "\t min_mipfilter_2: 0x%x (%d)\n", desc->min_mipfilter_2, desc->min_mipfilter_2);
fprintf(fp, "\t min_img_filter_nearest: 0x%x (%d)\n", desc->min_img_filter_nearest, desc->min_img_filter_nearest);
fprintf(fp, "\t mag_img_filter_nearest: 0x%x (%d)\n", desc->mag_img_filter_nearest, desc->mag_img_filter_nearest);
- fprintf(fp, "\t wrap_s_clamp_to_edge: 0x%x (%d)\n", desc->wrap_s_clamp_to_edge, desc->wrap_s_clamp_to_edge);
- fprintf(fp, "\t wrap_s_clamp: 0x%x (%d)\n", desc->wrap_s_clamp, desc->wrap_s_clamp);
- fprintf(fp, "\t wrap_s_mirror_repeat: 0x%x (%d)\n", desc->wrap_s_mirror_repeat, desc->wrap_s_mirror_repeat);
- fprintf(fp, "\t wrap_t_clamp_to_edge: 0x%x (%d)\n", desc->wrap_t_clamp_to_edge, desc->wrap_t_clamp_to_edge);
- fprintf(fp, "\t wrap_t_clamp: 0x%x (%d)\n", desc->wrap_t_clamp, desc->wrap_t_clamp);
- fprintf(fp, "\t wrap_t_mirror_repeat: 0x%x (%d)\n", desc->wrap_t_mirror_repeat, desc->wrap_t_mirror_repeat);
- fprintf(fp, "\t unknown_2_2: 0x%x (%d)\n", desc->unknown_2_2, desc->unknown_2_2);
+ fprintf(fp, "\t wrap_s: %d (%s)\n", desc->wrap_s,
+ lima_get_wrap_mode_string(desc->wrap_s));
+ fprintf(fp, "\t wrap_t: %d (%s)\n", desc->wrap_t,
+ lima_get_wrap_mode_string(desc->wrap_t));
+ fprintf(fp, "\t wrap_r: %d (%s)\n", desc->wrap_r,
+ lima_get_wrap_mode_string(desc->wrap_r));
fprintf(fp, "\t width: 0x%x (%d)\n", desc->width, desc->width);
fprintf(fp, "\t height: 0x%x (%d)\n", desc->height, desc->height);
- fprintf(fp, "\t unknown_3_1: 0x%x (%d)\n", desc->unknown_3_1, desc->unknown_3_1);
- fprintf(fp, "\t unknown_3_2: 0x%x (%d)\n", desc->unknown_3_2, desc->unknown_3_2);
-
- /* Word 4 */
- fprintf(fp, "/* 0x%08x (0x%08x) */\t0x%08x\n",
- start + i * 4, i * 4, *(&data[i + offset]));
- i++;
- fprintf(fp, "\t unknown_4: 0x%x (%d)\n", desc->unknown_4, desc->unknown_4);
-
- /* Word 5 */
- fprintf(fp, "/* 0x%08x (0x%08x) */\t0x%08x\n",
- start + i * 4, i * 4, *(&data[i + offset]));
- i++;
- fprintf(fp, "\t unknown_5: 0x%x (%d)\n", desc->unknown_5, desc->unknown_5);
+ fprintf(fp, "\t depth: 0x%x (%d)\n", desc->depth, desc->depth);
+ fprintf(fp, "\t border_red: 0x%x (%d)\n", desc->border_red, desc->border_red);
+ fprintf(fp, "\t border_green: 0x%x (%d)\n", desc->border_green, desc->border_green);
+ fprintf(fp, "\t border_blue: 0x%x (%d)\n", desc->border_blue, desc->border_blue);
+ fprintf(fp, "\t border_alpha: 0x%x (%d)\n", desc->border_alpha, desc->border_alpha);
+ fprintf(fp, "\t unknown_5_1: 0x%x (%d)\n", desc->unknown_5_1, desc->unknown_5_1);
/* Word 6 - */
fprintf(fp, "/* 0x%08x (0x%08x) */",