Mesa (main): aco: do not use designated initializers
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Apr 5 17:26:48 UTC 2022
Module: Mesa
Branch: main
Commit: 28dbabec8e50f8074e8da39bb23214678ad24aee
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=28dbabec8e50f8074e8da39bb23214678ad24aee
Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date: Mon Apr 4 10:54:07 2022 +0200
aco: do not use designated initializers
Designated initializers are a C++20 feature, but we don't use C++20. In
fact, enabling C++20 for ACO triggers new compiler errors due to some
equality semantics details.
So let's instead stop using designated initializers here.
Reviewed-by: Daniel Schürmann <daniel at schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15706>
---
src/amd/compiler/aco_opcodes_cpp.py | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/amd/compiler/aco_opcodes_cpp.py b/src/amd/compiler/aco_opcodes_cpp.py
index da6cb8ad3d4..8735a1345ea 100644
--- a/src/amd/compiler/aco_opcodes_cpp.py
+++ b/src/amd/compiler/aco_opcodes_cpp.py
@@ -37,40 +37,40 @@ is_atomic = "".join([opcodes[name].is_atomic for name in reversed(opcode_names)]
%>
extern const aco::Info instr_info = {
- .opcode_gfx7 = {
+ {
% for name in opcode_names:
${opcodes[name].opcode_gfx7},
% endfor
},
- .opcode_gfx9 = {
+ {
% for name in opcode_names:
${opcodes[name].opcode_gfx9},
% endfor
},
- .opcode_gfx10 = {
+ {
% for name in opcode_names:
${opcodes[name].opcode_gfx10},
% endfor
},
- .can_use_input_modifiers = std::bitset<${len(opcode_names)}>("${can_use_input_modifiers}"),
- .can_use_output_modifiers = std::bitset<${len(opcode_names)}>("${can_use_output_modifiers}"),
- .is_atomic = std::bitset<${len(opcode_names)}>("${is_atomic}"),
- .name = {
+ std::bitset<${len(opcode_names)}>("${can_use_input_modifiers}"),
+ std::bitset<${len(opcode_names)}>("${can_use_output_modifiers}"),
+ std::bitset<${len(opcode_names)}>("${is_atomic}"),
+ {
% for name in opcode_names:
"${name}",
% endfor
},
- .format = {
+ {
% for name in opcode_names:
aco::Format::${str(opcodes[name].format.name)},
% endfor
},
- .operand_size = {
+ {
% for name in opcode_names:
${opcodes[name].operand_size},
% endfor
},
- .classes = {
+ {
% for name in opcode_names:
(instr_class)${opcodes[name].cls.value},
% endfor
More information about the mesa-commit
mailing list