Skip to content

Commit

Permalink
add support for SPV_INTEL_global_variable_host_access (#5786)
Browse files Browse the repository at this point in the history
  • Loading branch information
bashbaug authored Sep 17, 2024
1 parent 04ad1e1 commit 20788a4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions source/binary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,7 @@ spv_result_t Parser::parseOperand(size_t inst_offset,
case SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT:
case SPV_OPERAND_TYPE_FPENCODING:
case SPV_OPERAND_TYPE_OPTIONAL_FPENCODING:
case SPV_OPERAND_TYPE_HOST_ACCESS_QUALIFIER:
case SPV_OPERAND_TYPE_LOAD_CACHE_CONTROL:
case SPV_OPERAND_TYPE_STORE_CACHE_CONTROL:
case SPV_OPERAND_TYPE_NAMED_MAXIMUM_NUMBER_OF_REGISTERS: {
Expand Down
10 changes: 10 additions & 0 deletions test/binary_to_text_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,16 @@ INSTANTIATE_TEST_SUITE_P(
"OpDecorate %1 CacheControlStoreINTEL 3 StreamingINTEL\n",
})));

INSTANTIATE_TEST_SUITE_P(
HostAccessINTEL, RoundTripInstructionsTest,
Combine(::testing::Values(SPV_ENV_UNIVERSAL_1_0),
::testing::ValuesIn(std::vector<std::string>{
"OpDecorate %1 HostAccessINTEL NoneINTEL \"none\"\n",
"OpDecorate %1 HostAccessINTEL ReadINTEL \"read\"\n",
"OpDecorate %1 HostAccessINTEL WriteINTEL \"write\"\n",
"OpDecorate %1 HostAccessINTEL ReadWriteINTEL \"readwrite\"\n",
})));

using MaskSorting = TextToBinaryTest;

TEST_F(MaskSorting, MasksAreSortedFromLSBToMSB) {
Expand Down

0 comments on commit 20788a4

Please sign in to comment.