Skip to content

Commit

Permalink
properly handle the load and store cache control operand types
Browse files Browse the repository at this point in the history
Without handling these operand types, disassembling a SPIR-V module that uses the cache control extension produces an invalid operand type error.
  • Loading branch information
bashbaug committed May 8, 2024
1 parent 9241a58 commit 37ee313
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/binary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,8 @@ spv_result_t Parser::parseOperand(size_t inst_offset,
case SPV_OPERAND_TYPE_OVERFLOW_MODES:
case SPV_OPERAND_TYPE_PACKED_VECTOR_FORMAT:
case SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT:
case SPV_OPERAND_TYPE_LOAD_CACHE_CONTROL:
case SPV_OPERAND_TYPE_STORE_CACHE_CONTROL:
case SPV_OPERAND_TYPE_NAMED_MAXIMUM_NUMBER_OF_REGISTERS: {
// A single word that is a plain enum value.

Expand Down

0 comments on commit 37ee313

Please sign in to comment.