diff options
author | Eric Anholt <[email protected]> | 2017-12-27 15:38:57 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-01-03 14:25:23 -0800 |
commit | 8e5a0ed95307fed7cb2bbbb86d1c264bbd070ca0 (patch) | |
tree | f5a1a0aa5c8062084d60ed09af8dc88bc37b226c /src/broadcom/compiler/v3d_compiler.h | |
parent | 2056e4a777bd0eed88ff2762977955b2f2bf2f1c (diff) |
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.
Diffstat (limited to 'src/broadcom/compiler/v3d_compiler.h')
-rw-r--r-- | src/broadcom/compiler/v3d_compiler.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/broadcom/compiler/v3d_compiler.h b/src/broadcom/compiler/v3d_compiler.h index 99d58e73ae8..85def2cb02c 100644 --- a/src/broadcom/compiler/v3d_compiler.h +++ b/src/broadcom/compiler/v3d_compiler.h @@ -421,7 +421,7 @@ struct v3d_compile { * flat-shaded. This includes gl_FragColor flat-shading, which is * customized based on the shademodel_flat shader key. */ - BITSET_WORD flat_shade_flags[BITSET_WORDS(V3D_MAX_FS_INPUTS)]; + uint32_t flat_shade_flags[BITSET_WORDS(V3D_MAX_FS_INPUTS)]; struct v3d_ubo_range *ubo_ranges; bool *ubo_range_used; @@ -569,9 +569,12 @@ struct v3d_fs_prog_data { struct v3d_varying_slot input_slots[V3D_MAX_FS_INPUTS]; - /* Bitmask for whether the corresponding input is flat-shaded. + /* Array of flat shade flags. + * + * Each entry is only 24 bits (high 8 bits 0), to match the hardware + * packet layout. */ - BITSET_WORD flat_shade_flags[BITSET_WORDS(V3D_MAX_FS_INPUTS)]; + uint32_t flat_shade_flags[((V3D_MAX_FS_INPUTS - 1) / 24) + 1]; bool writes_z; bool discard; |