broadcom/vc5: Emit flat shade flags for varying components > 24.

This means that with no flatshading we'll emit the single-byte
ZERO_ALL_FLAT_SHADE_FLAGS, and otherwise emit a set of FLAT_SHADE_FLAGS to
get all the bits we need set.

There's a _SET enum in the packet we could use to possibly set entire
ranges of the bitfield without using another packet, but this at least
fixes the conformance failure.
This commit is contained in:
Eric Anholt
2017-12-27 15:38:57 -08:00
parent 2056e4a777
commit 8e5a0ed953
4 changed files with 52 additions and 12 deletions

View File

@@ -714,8 +714,12 @@ v3d_set_fs_prog_data_inputs(struct v3d_compile *c,
memcpy(prog_data->input_slots, c->input_slots,
c->num_inputs * sizeof(*c->input_slots));
memcpy(prog_data->flat_shade_flags, c->flat_shade_flags,
sizeof(c->flat_shade_flags));
STATIC_ASSERT(ARRAY_SIZE(prog_data->flat_shade_flags) >
(V3D_MAX_FS_INPUTS - 1) / 24);
for (int i = 0; i < V3D_MAX_FS_INPUTS; i++) {
if (BITSET_TEST(c->flat_shade_flags, i))
prog_data->flat_shade_flags[i / 24] |= 1 << (i % 24);
}
}
uint64_t *v3d_compile_fs(const struct v3d_compiler *compiler,