| 6 | // CGPUX bind table apis |
| 7 | |
| 8 | void CGPUXBindTableValue::Initialize(const CGPUXBindTableLocation& loc, const CGPUDescriptorData& rhs) |
| 9 | { |
| 10 | data = rhs; |
| 11 | data.name = nullptr; |
| 12 | data.binding = loc.binding; |
| 13 | data.binding_type = rhs.binding_type; |
| 14 | binded = false; |
| 15 | resources.resize_default(data.count); |
| 16 | for (uint32_t i = 0; i < data.count; i++) |
| 17 | { |
| 18 | resources[i] = data.ptrs[i]; |
| 19 | } |
| 20 | data.ptrs = resources.data(); |
| 21 | |
| 22 | if (data.buffers_params.offsets) |
| 23 | { |
| 24 | offsets.resize_default(data.count); |
| 25 | for (uint32_t i = 0; i < data.count; i++) |
| 26 | { |
| 27 | offsets[i] = data.buffers_params.offsets[i]; |
| 28 | } |
| 29 | data.buffers_params.offsets = offsets.data(); |
| 30 | } |
| 31 | if (data.buffers_params.sizes) |
| 32 | { |
| 33 | sizes.resize_default(data.count); |
| 34 | for (uint32_t i = 0; i < data.count; i++) |
| 35 | { |
| 36 | sizes[i] = data.buffers_params.sizes[i]; |
| 37 | } |
| 38 | data.buffers_params.sizes = sizes.data(); |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | CGPUXBindTableId CGPUXBindTable::Create(CGPUDeviceId device, const struct CGPUXBindTableDescriptor* desc) SKR_NOEXCEPT |
| 43 | { |
no test coverage detected