intel/compiler: Fix instruction size written calculation
We are always aligning to REG_SIZE but when we have payload sources less than REG_SIZE, size written is miscalculated. Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Francisco Jerez <currojerez@riseup.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11766>
This commit is contained in:
@@ -771,9 +771,8 @@ namespace brw {
|
|||||||
inst->header_size = header_size;
|
inst->header_size = header_size;
|
||||||
inst->size_written = header_size * REG_SIZE;
|
inst->size_written = header_size * REG_SIZE;
|
||||||
for (unsigned i = header_size; i < sources; i++) {
|
for (unsigned i = header_size; i < sources; i++) {
|
||||||
inst->size_written +=
|
inst->size_written += dispatch_width() * type_sz(src[i].type) *
|
||||||
ALIGN(dispatch_width() * type_sz(src[i].type) * dst.stride,
|
dst.stride;
|
||||||
REG_SIZE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return inst;
|
return inst;
|
||||||
|
Reference in New Issue
Block a user