mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-19 10:00:37 +01:00
isaspec: encode: Constify bitset_params
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Acked-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27965>
This commit is contained in:
parent
381d19d138
commit
516a2a3a0e
1 changed files with 5 additions and 5 deletions
|
|
@ -437,7 +437,7 @@ pack_field(unsigned low, unsigned high, int64_t val, bool is_signed)
|
|||
*/
|
||||
|
||||
%for root in s.encode_roots():
|
||||
static bitmask_t encode${root.get_c_name()}(struct encode_state *s, struct bitset_params *p, const ${root.encode.type} src);
|
||||
static bitmask_t encode${root.get_c_name()}(struct encode_state *s, const struct bitset_params *p, const ${root.encode.type} src);
|
||||
%endfor
|
||||
|
||||
## TODO before the expr evaluators, we should generate extract_FOO() for
|
||||
|
|
@ -465,7 +465,7 @@ struct bitset_params {
|
|||
|
||||
<%def name="render_expr(leaf, expr)">
|
||||
static inline int64_t
|
||||
${s.expr_name(leaf.get_root(), expr)}(struct encode_state *s, struct bitset_params *p, const ${leaf.get_root().encode.type} src)
|
||||
${s.expr_name(leaf.get_root(), expr)}(struct encode_state *s, const struct bitset_params *p, const ${leaf.get_root().encode.type} src)
|
||||
{
|
||||
% for fieldname in expr.fieldnames:
|
||||
int64_t ${fieldname};
|
||||
|
|
@ -491,7 +491,7 @@ ${s.expr_name(leaf.get_root(), expr)}(struct encode_state *s, struct bitset_para
|
|||
%for root in s.encode_roots():
|
||||
% for leaf in s.encode_leafs(root):
|
||||
% for expr in s.bitset_used_exprs(leaf):
|
||||
static inline int64_t ${s.expr_name(leaf.get_root(), expr)}(struct encode_state *s, struct bitset_params *p, const ${leaf.get_root().encode.type} src);
|
||||
static inline int64_t ${s.expr_name(leaf.get_root(), expr)}(struct encode_state *s, const struct bitset_params *p, const ${leaf.get_root().encode.type} src);
|
||||
% endfor
|
||||
% endfor
|
||||
%endfor
|
||||
|
|
@ -523,7 +523,7 @@ static inline int64_t ${s.expr_name(leaf.get_root(), expr)}(struct encode_state
|
|||
% if snippet not in root.snippets.keys():
|
||||
<% snippet_name = "snippet" + root.get_c_name() + "_" + str(len(root.snippets)) %>
|
||||
static bitmask_t
|
||||
${snippet_name}(struct encode_state *s, struct bitset_params *p, const ${root.encode.type} src)
|
||||
${snippet_name}(struct encode_state *s, const struct bitset_params *p, const ${root.encode.type} src)
|
||||
{
|
||||
bitmask_t val = uint64_t_to_bitmask(0);
|
||||
${snippet}
|
||||
|
|
@ -534,7 +534,7 @@ ${snippet}
|
|||
% endfor
|
||||
|
||||
static bitmask_t
|
||||
encode${root.get_c_name()}(struct encode_state *s, struct bitset_params *p, const ${root.encode.type} src)
|
||||
encode${root.get_c_name()}(struct encode_state *s, const struct bitset_params *p, const ${root.encode.type} src)
|
||||
{
|
||||
% if root.encode.case_prefix is not None:
|
||||
switch (${root.get_c_name()}_case(s, src)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue