mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 04:20:08 +01:00
i965: Make convert_attr_sources_to_hw_regs handle stride == 0.
This makes expressions like component(fs_reg(ATTR, n), 7) get a proper <0,1,0> region instead of the invalid <0,8,0>. Nobody uses this today, but I plan to. v2: Rebase on Matt's changes; simplify. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> [v1]
This commit is contained in:
parent
26f9469a46
commit
f88c175a29
1 changed files with 2 additions and 1 deletions
|
|
@ -1614,11 +1614,12 @@ fs_visitor::convert_attr_sources_to_hw_regs(fs_inst *inst)
|
|||
inst->src[i].nr +
|
||||
inst->src[i].reg_offset;
|
||||
|
||||
unsigned width = inst->src[i].stride == 0 ? 1 : inst->exec_size;
|
||||
struct brw_reg reg =
|
||||
stride(byte_offset(retype(brw_vec8_grf(grf, 0), inst->src[i].type),
|
||||
inst->src[i].subreg_offset),
|
||||
inst->exec_size * inst->src[i].stride,
|
||||
inst->exec_size, inst->src[i].stride);
|
||||
width, inst->src[i].stride);
|
||||
reg.abs = inst->src[i].abs;
|
||||
reg.negate = inst->src[i].negate;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue