mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-11-21 19:20:07 +00:00
Test operator overloads for SPIR-V C++ mask enums (#5021)
Updates SPIRV-Headers in DEPS
This commit is contained in:
parent
5a78d798f7
commit
cc81529f4b
2
DEPS
2
DEPS
@ -6,7 +6,7 @@ vars = {
|
||||
'effcee_revision': '35912e1b7778ec2ddcff7e7188177761539e59e0',
|
||||
'googletest_revision': 'd9bb8412d60b993365abb53f00b6dad9b2c01b62',
|
||||
're2_revision': 'd2836d1b1c34c4e330a85a1006201db474bf2c8a',
|
||||
'spirv_headers_revision': '1d31a100405cf8783ca7a31e31cdd727c9fc54c3',
|
||||
'spirv_headers_revision': '34d04647d384e0aed037e7a2662a655fc39841bb',
|
||||
}
|
||||
|
||||
deps = {
|
||||
|
@ -322,6 +322,36 @@ TEST(CppInterface, OptimizeSameAddressForOriginalOptimizedBinary) {
|
||||
EXPECT_EQ(Header(), optimized_text);
|
||||
}
|
||||
|
||||
TEST(SpirvHeadersCpp, BitwiseOrMemoryAccessMask) {
|
||||
EXPECT_EQ(spv::MemoryAccessMask(6), spv::MemoryAccessMask::Aligned |
|
||||
spv::MemoryAccessMask::Nontemporal);
|
||||
}
|
||||
|
||||
TEST(SpirvHeadersCpp, BitwiseAndMemoryAccessMask) {
|
||||
EXPECT_EQ(spv::MemoryAccessMask::Aligned,
|
||||
spv::MemoryAccessMask::Aligned & spv::MemoryAccessMask(6));
|
||||
EXPECT_EQ(spv::MemoryAccessMask::Nontemporal,
|
||||
spv::MemoryAccessMask::Nontemporal & spv::MemoryAccessMask(6));
|
||||
EXPECT_EQ(spv::MemoryAccessMask(0), spv::MemoryAccessMask::Nontemporal &
|
||||
spv::MemoryAccessMask::Aligned);
|
||||
}
|
||||
|
||||
TEST(SpirvHeadersCpp, BitwiseXorMemoryAccessMask) {
|
||||
EXPECT_EQ(spv::MemoryAccessMask::Nontemporal,
|
||||
spv::MemoryAccessMask::Aligned ^ spv::MemoryAccessMask(6));
|
||||
EXPECT_EQ(spv::MemoryAccessMask::Aligned,
|
||||
spv::MemoryAccessMask::Nontemporal ^ spv::MemoryAccessMask(6));
|
||||
EXPECT_EQ(spv::MemoryAccessMask(6), spv::MemoryAccessMask::Nontemporal ^
|
||||
spv::MemoryAccessMask::Aligned);
|
||||
EXPECT_EQ(spv::MemoryAccessMask(0), spv::MemoryAccessMask::Nontemporal ^
|
||||
spv::MemoryAccessMask::Nontemporal);
|
||||
}
|
||||
|
||||
TEST(SpirvHeadersCpp, BitwiseNegateMemoryAccessMask) {
|
||||
EXPECT_EQ(spv::MemoryAccessMask(~(uint32_t(4))),
|
||||
~spv::MemoryAccessMask::Nontemporal);
|
||||
}
|
||||
|
||||
// TODO(antiagainst): tests for SetMessageConsumer().
|
||||
|
||||
} // namespace
|
||||
|
Loading…
Reference in New Issue
Block a user