pan/va: Add start property to source
The bit position of sources is more complicated than (8 * index). Make it a part of the Valhall reflection information. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15364>
This commit is contained in:

committed by
Marge Bot

parent
5a759140b0
commit
9878469833
@@ -258,7 +258,7 @@ def parse_asm(line):
|
||||
|
||||
for i, (op, src) in enumerate(zip(operands, ins.srcs)):
|
||||
parts = op.split('.')
|
||||
encoded |= encode_source(parts[0], fau) << (i * 8)
|
||||
encoded |= encode_source(parts[0], fau) << src.start
|
||||
|
||||
# Has a swizzle been applied yet?
|
||||
swizzled = False
|
||||
|
@@ -199,13 +199,13 @@ va_disasm_instr(FILE *fp, uint64_t instr)
|
||||
% endif
|
||||
<% no_comma = False %>
|
||||
% if src.absneg:
|
||||
va_print_float_src(fp, instr >> ${8 * i}, imm_mode,
|
||||
va_print_float_src(fp, instr >> ${src.start}, imm_mode,
|
||||
instr & BIT(${src.offset['neg']}),
|
||||
instr & BIT(${src.offset['abs']}));
|
||||
% elif src.is_float:
|
||||
va_print_float_src(fp, instr >> ${8 * i}, imm_mode, false, false);
|
||||
va_print_float_src(fp, instr >> ${src.start}, imm_mode, false, false);
|
||||
% else:
|
||||
va_print_src(fp, instr >> ${8 * i}, imm_mode);
|
||||
va_print_src(fp, instr >> ${src.start}, imm_mode);
|
||||
% endif
|
||||
% if src.swizzle:
|
||||
% if src.size == 32:
|
||||
|
@@ -102,6 +102,7 @@ class Source:
|
||||
def __init__(self, index, size, is_float = False, swizzle = False,
|
||||
halfswizzle = False, widen = False, lanes = False, combine = False, lane = None, absneg = False, notted = False, name = ""):
|
||||
self.is_float = is_float or absneg
|
||||
self.start = (index * 8)
|
||||
self.size = size
|
||||
self.absneg = absneg
|
||||
self.notted = notted
|
||||
|
Reference in New Issue
Block a user