mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 01:30:08 +01:00
v3d: Add an assert that we don't provide an invalid texture return words.
The docs had an update noting this restriction, so reflect it in the code.
This commit is contained in:
parent
d661d78464
commit
26f830d9fc
1 changed files with 8 additions and 0 deletions
|
|
@ -153,6 +153,14 @@ v3d40_vir_emit_tex(struct v3d_compile *c, nir_tex_instr *instr)
|
|||
(1 << MIN2(instr_return_channels,
|
||||
c->key->tex[unit].return_channels)) - 1;
|
||||
|
||||
/* Word enables can't ask for more channels than the output type could
|
||||
* provide (2 for f16, 4 for 32-bit).
|
||||
*/
|
||||
assert(!p1_unpacked.output_type_32_bit ||
|
||||
p0_unpacked.return_words_of_texture_data < (1 << 4));
|
||||
assert(p1_unpacked.output_type_32_bit ||
|
||||
p0_unpacked.return_words_of_texture_data < (1 << 2));
|
||||
|
||||
uint32_t p0_packed;
|
||||
V3D41_TMU_CONFIG_PARAMETER_0_pack(NULL,
|
||||
(uint8_t *)&p0_packed,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue