intel/fs/xe2+: Round up fs_builder::vgrf() size calculation to HW register unit.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25020>
This commit is contained in:

committed by
Jordan Justen

parent
24dcc3269b
commit
150b3e87c8
@@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
#include "brw_ir_fs.h"
|
#include "brw_ir_fs.h"
|
||||||
#include "brw_shader.h"
|
#include "brw_shader.h"
|
||||||
|
#include "brw_eu.h"
|
||||||
|
|
||||||
namespace brw {
|
namespace brw {
|
||||||
/**
|
/**
|
||||||
@@ -198,12 +199,13 @@ namespace brw {
|
|||||||
dst_reg
|
dst_reg
|
||||||
vgrf(enum brw_reg_type type, unsigned n = 1) const
|
vgrf(enum brw_reg_type type, unsigned n = 1) const
|
||||||
{
|
{
|
||||||
|
const unsigned unit = reg_unit(shader->devinfo);
|
||||||
assert(dispatch_width() <= 32);
|
assert(dispatch_width() <= 32);
|
||||||
|
|
||||||
if (n > 0)
|
if (n > 0)
|
||||||
return dst_reg(VGRF, shader->alloc.allocate(
|
return dst_reg(VGRF, shader->alloc.allocate(
|
||||||
DIV_ROUND_UP(n * type_sz(type) * dispatch_width(),
|
DIV_ROUND_UP(n * type_sz(type) * dispatch_width(),
|
||||||
REG_SIZE)),
|
unit * REG_SIZE) * unit),
|
||||||
type);
|
type);
|
||||||
else
|
else
|
||||||
return retype(null_reg_ud(), type);
|
return retype(null_reg_ud(), type);
|
||||||
|
Reference in New Issue
Block a user