MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / GetMakeVisibleScope

Function GetMakeVisibleScope

source/val/validate_memory.cpp:269–276  ·  view source on GitHub ↗

This function is only called for OpLoad, OpStore, OpCopyMemory, OpCopyMemorySized, OpCooperativeMatrixLoadNV, OpCooperativeMatrixStoreNV, OpCooperativeVectorLoadNV, OpCooperativeVectorStoreNV.

Source from the content-addressed store, hash-verified

267// OpCooperativeMatrixStoreNV, OpCooperativeVectorLoadNV,
268// OpCooperativeVectorStoreNV.
269uint32_t GetMakeVisibleScope(const Instruction* inst, uint32_t mask,
270 uint32_t mask_index) {
271 assert(mask & uint32_t(spv::MemoryAccessMask::MakePointerVisibleKHR));
272 uint32_t this_bit = uint32_t(spv::MemoryAccessMask::MakePointerVisibleKHR);
273 uint32_t index =
274 mask_index - 1 + MemoryAccessNumWords(mask & (this_bit | (this_bit - 1)));
275 return inst->GetOperandAs<uint32_t>(index);
276}
277
278bool DoesStructContainRTA(const ValidationState_t& _, const Instruction* inst) {
279 for (size_t member_index = 1; member_index < inst->operands().size();

Callers 1

CheckMemoryAccessFunction · 0.85

Calls 1

MemoryAccessNumWordsFunction · 0.85

Tested by

no test coverage detected