Skip to content

Make spvOpcodeString part of the public API#3174

Merged
s-perron merged 1 commit intoKhronosGroup:masterfrom
s-perron:i3138
Feb 20, 2020
Merged

Make spvOpcodeString part of the public API#3174
s-perron merged 1 commit intoKhronosGroup:masterfrom
s-perron:i3138

Conversation

@s-perron
Copy link
Collaborator

@s-perron s-perron commented Feb 4, 2020

Fixes #3138

@s-perron s-perron self-assigned this Feb 4, 2020
@s-perron s-perron requested a review from dneto0 February 4, 2020 19:49
Copy link
Collaborator

@dneto0 dneto0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this. I hadn't realized this was going to add an include dir dependency. I suspect it's not worth that extra complexity to get enum type in the interface for this very simple use.

#include <stddef.h>
#include <stdint.h>

#include <spirv/unified1/spirv.h>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part makes me sad. It's suboptimal to add a new project / include-dir dependency for this one feature.

spvDiagnosticPrint(const spv_diagnostic diagnostic);

// Gets the name of an instruction, without the "Op" prefix.
SPIRV_TOOLS_EXPORT const char* spvOpcodeString(const SpvOp opcode);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To break the dependency on SpvOp, can we fudge it with uint32_t like this:

// ...
// Use a uint32_t to avoid a public header dependency on spirv.h
.... spvOpcodeStringFromOpcode(uint32_t opcode_value);

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. I've tried it and it works.

@s-perron s-perron merged commit 4a80497 into KhronosGroup:master Feb 20, 2020
@s-perron s-perron deleted the i3138 branch September 10, 2021 20:10
dneto0 pushed a commit to dneto0/SPIRV-Tools that referenced this pull request Sep 14, 2024
Roll third_party/glslang/ 5e86b28..c12493f (10 commits)

KhronosGroup/glslang@5e86b28...c12493f

$ git log 5e86b28..c12493f --date=short --no-merges --format='%ad %ae %s'
2020-02-17 siglesias SPV_AMD_shader_image_load_store_lod is now validated by spirv-tools
2020-02-19 lryer Fix iomapper issue
2020-02-11 cepheus Fix part of KhronosGroup#2070: Correctly handle promotion for <unary-op>(int).
2020-02-18 swda.durl Add an option to make RTTI enabled
2020-02-06 kainino Split "is emscripten" config from "enable glslang.js"
2020-02-06 dneto Avoid enum-compare warning
2020-02-06 rex.xu Fix a parser error of GL_KHR_memory_scope_semantics
2020-01-23 kainino glslang.js: Make the SPIR-V target version configurable (1.0 ~ 1.5)
2020-02-02 timo.suoranta Fix memory corruption in TGlslIoMapper
2019-12-23 laddoc Add constant expression with mod

Roll third_party/googletest/ 10b1902d8..23b2a3b1c (21 commits)

google/googletest@10b1902...23b2a3b

$ git log 10b1902d8..23b2a3b1c --date=short --no-merges --format='%ad %ae %s'
2020-02-12 absl-team Googletest export
2020-02-11 absl-team Googletest export
2020-02-11 absl-team Googletest export
2020-02-10 absl-team Googletest export
2020-02-10 absl-team Googletest export
2020-02-07 absl-team Googletest export
2020-02-07 absl-team Googletest export
2020-02-06 durandal Googletest export
2020-02-05 absl-team Googletest export
2020-02-05 absl-team Googletest export
2020-02-03 absl-team Googletest export
2020-02-03 absl-team Googletest export
2020-01-31 absl-team Googletest export
2020-01-31 absl-team Googletest export
2020-01-29 absl-team Googletest export
2020-01-27 absl-team Googletest export
2020-01-27 absl-team Googletest export
2020-01-27 absl-team Googletest export
2020-01-24 absl-team Googletest export
2020-01-24 absl-team Googletest export
2020-01-23 absl-team Googletest export

Roll third_party/re2/ 05faa8db3..793b4e85e (10 commits)

google/re2@05faa8d...793b4e8

$ git log 05faa8db3..793b4e85e --date=short --no-merges --format='%ad %ae %s'
2020-02-17 junyer Move DeBruijnString() alongside StringGenerator.
2020-02-14 junyer Fix the check for Apple platforms. Mea culpa.
2020-02-14 junyer Provide hooks::context iff thread_local is supported.
2020-02-14 junyer Update doc/syntax.html.
2020-02-13 junyer MSVC also doesn't like casting lambdas with `+'. Sigh.
2020-02-13 junyer Only the latest MSVC allows designated initalisers.
2020-02-13 junyer Provide instrumentation points called "hooks".
2020-02-11 junyer Tidy up some GCC-only guards.
2020-02-04 junyer Tidy up the SWIG guard around LazyRE2.
2020-02-03 junyer Tweak some of the comments about FilteredRE2.

Roll third_party/spirv-cross/ 6b2add8e2..f19fdb94d (4 commits)

KhronosGroup/SPIRV-Cross@6b2add8...f19fdb9

$ git log 6b2add8e2..f19fdb94d --date=short --no-merges --format='%ad %ae %s'
2020-02-19 dsinclair Roll GLSLang, SPIRV-Tools and SPIRV-Headers
2020-02-14 post Reject SPIR-V modules with garbage ID bound.
2020-02-08 post HLSL: Declare undef variables as static.
2020-02-06 post Remove old memory_scope flag from iOS barriers.

Roll third_party/spirv-headers/ dc77030..5dbc1c3 (1 commit)

KhronosGroup/SPIRV-Headers@dc77030...5dbc1c3

$ git log dc77030..5dbc1c3 --date=short --no-merges --format='%ad %ae %s'
2020-02-07 michael.kinsner Allocate three bits for upcoming Intel extension

Roll third_party/spirv-tools/ ddcc117..4a80497 (19 commits)

KhronosGroup/SPIRV-Tools@ddcc117...4a80497

$ git log ddcc117..4a80497 --date=short --no-merges --format='%ad %ae %s'
2020-02-20 stevenperron Make spvOpcodeString part of the public API (KhronosGroup#3174)
2020-02-20 danyspin97 Fix static libraries linking order (KhronosGroup#3189)
2020-02-18 bclayton vscode: Add missing fields to schema.Opcode (KhronosGroup#3169)
2020-02-18 siglesias spirv-val: Add support for SPV_AMD_shader_image_load_store_lod (KhronosGroup#3186)
2020-02-14 afdx spirvfuzz: Fix type-related bug, change undef to zero, and add assert (KhronosGroup#3188)
2020-02-11 afdx spirv-fuzz: Fuzzer pass that adds access chains (KhronosGroup#3182)
2020-02-10 afdx spirv-fuzz: Fuzzer pass to add function calls (KhronosGroup#3178)
2020-02-10 afdx spirv-fuzz: Ensure that donated variables are always initialized (KhronosGroup#3181)
2020-02-06 afdx spirv-fuzz: Add fuzzer passes to add loads/stores (KhronosGroup#3176)
2020-02-05 afdx spirv-fuzz: Fuzzer passes to add local and global variables (KhronosGroup#3175)
2020-02-04 bclayton utils/vscode: LSP - Support OpExtInst (KhronosGroup#3140)
2020-02-04 kubak Fix typos in opt's help. Update environment version. (KhronosGroup#3170)
2020-02-04 stevenperron Start SPIRV-Tools v2020.2
2020-02-04 stevenperron Finalize SPIRV-Tools v2020.1
2020-02-04 stevenperron Update CHANGES
2020-02-04 afdx spirv-fuzz: Fuzzer pass to add composite types (KhronosGroup#3171)
2020-02-04 afdx Update script that checks copyright years. (KhronosGroup#3173)
2020-02-04 afdx spirv-fuzz: Disallow copying of null and undefined pointers (KhronosGroup#3172)
2020-02-03 dnovillo Handle TimeAMD in AmdExtensionToKhrPass. (KhronosGroup#3168)

Created with:
  roll-dep third_party/effcee third_party/glslang third_party/googletest third_party/re2 third_party/spirv-cross third_party/spirv-headers third_party/spirv-tools
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make spvOpcodeString() part of the public API

2 participants