mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
aco: Convert to use u8 literal for Unicode character to fixes msvc warning
Warning: aco_register_allocation.cpp(383): warning C4819: The file contains a character that cannot be represented in the current code page (0). Save the file in Unicode format to prevent data loss This warning was treated as error with compiling with msvc u8 is belongs to c11 standard so it's safe to use it Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18682>
This commit is contained in:
parent
b70e92fe04
commit
209a89e51d
1 changed files with 8 additions and 8 deletions
|
|
@ -379,16 +379,16 @@ UNUSED void
|
|||
print_reg(const RegisterFile& reg_file, PhysReg reg, bool has_adjacent_variable)
|
||||
{
|
||||
if (reg_file[reg] == 0xFFFFFFFF) {
|
||||
printf("☐");
|
||||
printf(u8"☐");
|
||||
} else if (reg_file[reg]) {
|
||||
const bool show_subdword_alloc = (reg_file[reg] == 0xF0000000);
|
||||
if (show_subdword_alloc) {
|
||||
const char* block_chars[] = {
|
||||
// clang-format off
|
||||
"?", "▘", "▝", "▀",
|
||||
"▖", "▌", "▞", "▛",
|
||||
"▗", "▚", "▐", "▜",
|
||||
"▄", "▙", "▟", "▉"
|
||||
u8"?", u8"▘", u8"▝", u8"▀",
|
||||
u8"▖", u8"▌", u8"▞", u8"▛",
|
||||
u8"▗", u8"▚", u8"▐", u8"▜",
|
||||
u8"▄", u8"▙", u8"▟", u8"▉"
|
||||
// clang-format on
|
||||
};
|
||||
unsigned index = 0;
|
||||
|
|
@ -401,14 +401,14 @@ print_reg(const RegisterFile& reg_file, PhysReg reg, bool has_adjacent_variable)
|
|||
} else {
|
||||
/* Indicate filled register slot */
|
||||
if (!has_adjacent_variable) {
|
||||
printf("█");
|
||||
printf(u8"█");
|
||||
} else {
|
||||
/* Use a slightly shorter box to leave a small gap between adjacent variables */
|
||||
printf("▉");
|
||||
printf(u8"▉");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
printf("·");
|
||||
printf(u8"·");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue