Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- include/vkd3d_shader.h | 12 ++++++------ libs/vkd3d-shader/spirv.c | 13 ++++++------- programs/vkd3d-compiler/main.c | 16 ++++++++-------- 3 files changed, 20 insertions(+), 21 deletions(-)
diff --git a/include/vkd3d_shader.h b/include/vkd3d_shader.h index f6dc4773..3efd355f 100644 --- a/include/vkd3d_shader.h +++ b/include/vkd3d_shader.h @@ -75,12 +75,12 @@ enum vkd3d_shader_compile_option_buffer_uav
enum vkd3d_shader_compile_option_formatting_flags { - VKD3D_SHADER_COMPILE_OPTION_FORMATTING_NONE = 0x00000000, - VKD3D_SHADER_COMPILE_OPTION_FORMATTING_COLOUR = 0x00000001, - VKD3D_SHADER_COMPILE_OPTION_FORMATTING_INDENT = 0x00000002, - VKD3D_SHADER_COMPILE_OPTION_FORMATTING_OFFSETS = 0x00000004, - VKD3D_SHADER_COMPILE_OPTION_FORMATTING_HEADER = 0x00000008, - VKD3D_SHADER_COMPILE_OPTION_FORMATTING_FRIENDLY_NAMES = 0x00000010, + VKD3D_SHADER_COMPILE_OPTION_FORMATTING_NONE = 0x00000000, + VKD3D_SHADER_COMPILE_OPTION_FORMATTING_COLOUR = 0x00000001, + VKD3D_SHADER_COMPILE_OPTION_FORMATTING_INDENT = 0x00000002, + VKD3D_SHADER_COMPILE_OPTION_FORMATTING_OFFSETS = 0x00000004, + VKD3D_SHADER_COMPILE_OPTION_FORMATTING_HEADER = 0x00000008, + VKD3D_SHADER_COMPILE_OPTION_FORMATTING_RAW_IDS = 0x00000010,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_COMPILE_OPTION_FORMATTING_FLAGS), }; diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 560e8573..994b5ac1 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -63,11 +63,11 @@ static uint32_t get_binary_to_text_options(enum vkd3d_shader_compile_option_form } valuemap[] = { - {VKD3D_SHADER_COMPILE_OPTION_FORMATTING_COLOUR, SPV_BINARY_TO_TEXT_OPTION_COLOR }, - {VKD3D_SHADER_COMPILE_OPTION_FORMATTING_INDENT, SPV_BINARY_TO_TEXT_OPTION_INDENT }, - {VKD3D_SHADER_COMPILE_OPTION_FORMATTING_OFFSETS, SPV_BINARY_TO_TEXT_OPTION_SHOW_BYTE_OFFSET}, - {VKD3D_SHADER_COMPILE_OPTION_FORMATTING_HEADER, SPV_BINARY_TO_TEXT_OPTION_NO_HEADER, true}, - {VKD3D_SHADER_COMPILE_OPTION_FORMATTING_FRIENDLY_NAMES, SPV_BINARY_TO_TEXT_OPTION_FRIENDLY_NAMES }, + {VKD3D_SHADER_COMPILE_OPTION_FORMATTING_COLOUR, SPV_BINARY_TO_TEXT_OPTION_COLOR }, + {VKD3D_SHADER_COMPILE_OPTION_FORMATTING_INDENT, SPV_BINARY_TO_TEXT_OPTION_INDENT }, + {VKD3D_SHADER_COMPILE_OPTION_FORMATTING_OFFSETS, SPV_BINARY_TO_TEXT_OPTION_SHOW_BYTE_OFFSET}, + {VKD3D_SHADER_COMPILE_OPTION_FORMATTING_HEADER, SPV_BINARY_TO_TEXT_OPTION_NO_HEADER, true}, + {VKD3D_SHADER_COMPILE_OPTION_FORMATTING_RAW_IDS, SPV_BINARY_TO_TEXT_OPTION_FRIENDLY_NAMES, true}, };
for (i = 0; i < ARRAY_SIZE(valuemap); ++i) @@ -2271,8 +2271,7 @@ struct vkd3d_dxbc_compiler *vkd3d_dxbc_compiler_create(const struct vkd3d_shader
vkd3d_spirv_builder_init(&compiler->spirv_builder, vkd3d_dxbc_compiler_get_entry_point_name(compiler));
- compiler->formatting = VKD3D_SHADER_COMPILE_OPTION_FORMATTING_FRIENDLY_NAMES - | VKD3D_SHADER_COMPILE_OPTION_FORMATTING_INDENT + compiler->formatting = VKD3D_SHADER_COMPILE_OPTION_FORMATTING_INDENT | VKD3D_SHADER_COMPILE_OPTION_FORMATTING_HEADER;
for (i = 0; i < compile_info->option_count; ++i) diff --git a/programs/vkd3d-compiler/main.c b/programs/vkd3d-compiler/main.c index 2780d3ec..cc3a105e 100644 --- a/programs/vkd3d-compiler/main.c +++ b/programs/vkd3d-compiler/main.c @@ -149,8 +149,8 @@ static void print_usage(const char *program_name) " standard output.\n" " --formatting=<type> Specify the formatting options for text output.\n" " Valid values are 'none', 'print', 'colour', 'indent',\n" - " 'offsets', 'header', and 'friendly-names'.\n" - " Default is --formatting=friendly-names,indent,header.\n" + " 'offsets', 'header', and 'raw-ids'.\n" + " Default is --formatting=indent,header.\n" " --print-source-types Display the supported source types and exit.\n" " --print-target-types Display the supported target types for the specified\n" " source type and exit.\n" @@ -235,12 +235,12 @@ static bool parse_formatting(uint32_t *formatting, char *arg) } opts[] = { - {"none", VKD3D_SHADER_COMPILE_OPTION_FORMATTING_NONE }, - {"colour", VKD3D_SHADER_COMPILE_OPTION_FORMATTING_COLOUR }, - {"indent", VKD3D_SHADER_COMPILE_OPTION_FORMATTING_INDENT }, - {"offsets", VKD3D_SHADER_COMPILE_OPTION_FORMATTING_OFFSETS }, - {"header", VKD3D_SHADER_COMPILE_OPTION_FORMATTING_HEADER }, - {"friendly-names", VKD3D_SHADER_COMPILE_OPTION_FORMATTING_FRIENDLY_NAMES }, + {"none", VKD3D_SHADER_COMPILE_OPTION_FORMATTING_NONE}, + {"colour", VKD3D_SHADER_COMPILE_OPTION_FORMATTING_COLOUR}, + {"indent", VKD3D_SHADER_COMPILE_OPTION_FORMATTING_INDENT}, + {"offsets", VKD3D_SHADER_COMPILE_OPTION_FORMATTING_OFFSETS}, + {"header", VKD3D_SHADER_COMPILE_OPTION_FORMATTING_HEADER}, + {"raw-ids", VKD3D_SHADER_COMPILE_OPTION_FORMATTING_RAW_IDS}, }; char *tok;