MCPcopy Create free account
hub / github.com/ChartGPU/ChartGPU / ensureBindGroups

Function ensureBindGroups

src/renderers/createScatterDensityRenderer.ts:332–358  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

330 };
331
332 const ensureBindGroups = (): void => {
333 if (!binsBuffer || !maxBuffer || !lutView || !lastPointBuffer) return;
334 if (!computeBindGroup) {
335 computeBindGroup = device.createBindGroup({
336 label: 'scatterDensity/computeBindGroup',
337 layout: computeBindGroupLayout,
338 entries: [
339 { binding: 0, resource: { buffer: computeUniformBuffer } },
340 { binding: 1, resource: { buffer: lastPointBuffer } },
341 { binding: 2, resource: { buffer: binsBuffer } },
342 { binding: 3, resource: { buffer: maxBuffer } },
343 ],
344 });
345 }
346 if (!renderBindGroup) {
347 renderBindGroup = device.createBindGroup({
348 label: 'scatterDensity/renderBindGroup',
349 layout: renderBindGroupLayout,
350 entries: [
351 { binding: 0, resource: { buffer: renderUniformBuffer } },
352 { binding: 1, resource: { buffer: binsBuffer } },
353 { binding: 2, resource: { buffer: maxBuffer } },
354 { binding: 3, resource: lutView },
355 ],
356 });
357 }
358 };
359
360 const prepare: ScatterDensityRenderer['prepare'] = (
361 seriesConfig,

Callers 1

prepareFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected