mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 08:50:13 +01:00
i965: Add assertion for src_stencil payload size
This helps address a coverity warning and prevents future questions about this code. Reported-by: Coverity (via Ilia) Cc: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
parent
2bec154b47
commit
c531d40927
1 changed files with 6 additions and 0 deletions
|
|
@ -3603,6 +3603,12 @@ lower_fb_write_logical_send(const fs_builder &bld, fs_inst *inst,
|
|||
assert(devinfo->gen >= 9);
|
||||
assert(bld.dispatch_width() != 16);
|
||||
|
||||
/* XXX: src_stencil is only available on gen9+. dst_depth is never
|
||||
* available on gen9+. As such it's impossible to have both enabled at the
|
||||
* same time and therefore length cannot overrun the array.
|
||||
*/
|
||||
assert(length < 15);
|
||||
|
||||
sources[length] = bld.vgrf(BRW_REGISTER_TYPE_UD);
|
||||
bld.exec_all().annotate("FB write OS")
|
||||
.emit(FS_OPCODE_PACK_STENCIL_REF, sources[length],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue