| 94 | } |
| 95 | |
| 96 | void CGPUXBindTable::Update(const struct CGPUDescriptorData* datas, uint32_t count) SKR_NOEXCEPT |
| 97 | { |
| 98 | for (uint32_t i = 0; i < count; i++) |
| 99 | { |
| 100 | bool updated = false; |
| 101 | const auto& data = datas[i]; |
| 102 | if (data.name) |
| 103 | { |
| 104 | const auto name_hash = cgpu_name_hash(data.name, strlen((const char*)data.name)); |
| 105 | for (uint32_t j = 0; j < names_count; j++) |
| 106 | { |
| 107 | if (name_hash == name_hashes[j]) |
| 108 | { |
| 109 | const auto& location = name_locations[j]; |
| 110 | if (!cgpux::equal_to<CGPUDescriptorData>()(data, location.value.data)) |
| 111 | { |
| 112 | auto& loc = name_locations[j]; |
| 113 | loc.value.Initialize(loc, data); |
| 114 | } |
| 115 | updated = true; |
| 116 | break; |
| 117 | } |
| 118 | } |
| 119 | } |
| 120 | else |
| 121 | { |
| 122 | SKR_UNREACHABLE_CODE(); |
| 123 | } |
| 124 | (void)updated; |
| 125 | } |
| 126 | updateDescSetsIfDirty(); |
| 127 | } |
| 128 | |
| 129 | void CGPUXBindTable::updateDescSetsIfDirty() const SKR_NOEXCEPT |
| 130 | { |
no test coverage detected