MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / Update

Method Update

modules/engine/graphics/src/common/cgpux.cpp:96–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96void 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
129void CGPUXBindTable::updateDescSetsIfDirty() const SKR_NOEXCEPT
130{

Callers 1

cgpux_bind_table_updateFunction · 0.45

Calls 2

InitializeMethod · 0.45

Tested by

no test coverage detected