add support for SPV_INTEL_global_variable_host_access (#5786)

This commit is contained in:
Ben Ashbaugh 2024-09-17 09:31:29 -07:00 committed by GitHub
parent 04ad1e1ce3
commit 20788a4c5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 0 deletions

View File

@ -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: {

View File

@ -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) {