# Duplicate GetGroup/GetBinding in vtkWebGPUComputeBuffer.h

**URL:** https://discourse.vtk.org/t/duplicate-getgroup-getbinding-in-vtkwebgpucomputebuffer-h/16467
**Category:** Development
**Tags:** webgpu
**Created:** [June 19, 2026, 4:55pm UTC](https://discourse.vtk.org/t/duplicate-getgroup-getbinding-in-vtkwebgpucomputebuffer-h/16467 "2026-06-19T16:55:51Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Bengt](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/f19dbf/32.png) [@Bengt](https://discourse.vtk.org/u/Bengt)
#### Post date: [June 19, 2026, 4:55pm UTC](https://discourse.vtk.org/t/duplicate-getgroup-getbinding-in-vtkwebgpucomputebuffer-h/16467/1 "2026-06-19T16:55:51Z")

</div>

Building VTK **9.6.2** with WebGPU enabled on **Windows / MSVC** fails to compile `Rendering/WebGPU/vtkWebGPUComputeBuffer.h`.

`Group` and `Binding` are declared as `vtkIdType` members but each accessor is defined twice, once hand-written returning `uint32_t`, and once via `vtkGetMacro` returning `vtkIdType`:

```cpp
// lines 91-92
uint32_t GetGroup() const { return this->Group; }
vtkGetMacro(Group, vtkIdType); // expands to vtkIdType GetGroup() const

// lines 104-105
uint32_t GetBinding() const { return this->Binding; }
vtkGetMacro(Binding, vtkIdType); // expands to vtkIdType GetBinding() const

```

After macro expansion each is a redefinition of `GetGroup()` / `GetBinding()` differing only by return type (`uint32_t` vs `vtkIdType`), which is ill-formed:

```auto
vtkWebGPUComputeBuffer.h(92): error C2556:
'vtkIdType vtkWebGPUComputeBuffer::GetGroup(void) const': overloaded function differs only by return type from 'uint32_t vtkWebGPUComputeBuffer::GetGroup(void) const'
vtkWebGPUComputeBuffer.h(92): error C2371: 'vtkWebGPUComputeBuffer::GetGroup': redefinition; different basic types

```

Are we doing something wrong? Cause that must have gone through CI/CD at some point.

Thanks!

---

<div class="post-metadata">

### Author: ![Bengt](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/f19dbf/32.png) [@Bengt](https://discourse.vtk.org/u/Bengt)
#### Post date: [June 19, 2026, 5:28pm UTC](https://discourse.vtk.org/t/duplicate-getgroup-getbinding-in-vtkwebgpucomputebuffer-h/16467/2 "2026-06-19T17:28:13Z")

</div>

We discovered that VTK\_USE\_FUTURE\_CONST=ON triggers it. Without it, vtkGetMacro expands to a non-const getter which doesn’t interfere with the const ones. We can disable it for now but this is a potential bug.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [June 20, 2026, 12:11pm UTC](https://discourse.vtk.org/t/duplicate-getgroup-getbinding-in-vtkwebgpucomputebuffer-h/16467/3 "2026-06-20T12:11:25Z")

</div>

@jaswantp It looks like @tclabault wrote this originally, but we should investigate it. A method changing return type based on `const` is confusing anyways.

---

<div class="post-metadata">

### Author: ![jaswantp](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jaswantp/32/10046_2.png) [@jaswantp](https://discourse.vtk.org/u/jaswantp)
#### Post date: [June 20, 2026, 2:58pm UTC](https://discourse.vtk.org/t/duplicate-getgroup-getbinding-in-vtkwebgpucomputebuffer-h/16467/4 "2026-06-20T14:58:02Z")

</div>

we should remove the overload that returns `uint32_t`.

---

<div class="post-metadata">

### Author: ![Bengt](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/f19dbf/32.png) [@Bengt](https://discourse.vtk.org/u/Bengt)
#### Post date: [June 20, 2026, 3:49pm UTC](https://discourse.vtk.org/t/duplicate-getgroup-getbinding-in-vtkwebgpucomputebuffer-h/16467/5 "2026-06-20T15:49:11Z")

</div>

Please note that this happens in other WebGPU headers too with the same problem. I forgot which ones but there were at least two others.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [June 22, 2026, 10:04am UTC](https://discourse.vtk.org/t/duplicate-getgroup-getbinding-in-vtkwebgpucomputebuffer-h/16467/6 "2026-06-22T10:04:01Z")

</div>

> [@Bengt](#):
>
> VTK\_USE\_FUTURE\_CONST=ON

I dont think VTK\_USE\_FUTURE\_CONST=ON is reader for prime time yet, it is only tested independantly by @seanm , but maybe will be turned on in some CI in the coming months.

---

<div class="post-metadata">

### Author: ![Bengt](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/f19dbf/32.png) [@Bengt](https://discourse.vtk.org/u/Bengt)
#### Post date: [June 22, 2026, 1:22pm UTC](https://discourse.vtk.org/t/duplicate-getgroup-getbinding-in-vtkwebgpucomputebuffer-h/16467/7 "2026-06-22T13:22:16Z")

</div>

Thanks @mwestphal , sounds good.

That said, VTK\_USE\_FUTURE\_BOOL could use the same treatment as some vtkSetClampMacro which are now bool are trying to force int clamping values resulting in a compile time warning (or error if treated as such).

---

<div class="post-metadata">

### Author: ![jaswantp](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jaswantp/32/10046_2.png) [@jaswantp](https://discourse.vtk.org/u/jaswantp)
#### Post date: [June 22, 2026, 8:20pm UTC](https://discourse.vtk.org/t/duplicate-getgroup-getbinding-in-vtkwebgpucomputebuffer-h/16467/8 "2026-06-22T20:20:40Z")

</div>

should the `uint32_t` getters be deprecated? or removed?

note that deprecating them will not address your issue unless you set `VTK_LEGACY_REMOVE` which may have side effects.

---

<div class="post-metadata">

### Author: ![seanm](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/s/a88e4f/32.png) [@seanm](https://discourse.vtk.org/u/seanm)
#### Post date: [June 22, 2026, 8:50pm UTC](https://discourse.vtk.org/t/duplicate-getgroup-getbinding-in-vtkwebgpucomputebuffer-h/16467/9 "2026-06-22T20:50:18Z")

</div>

> [@mwestphal](#):
>
> I dont think VTK\_USE\_FUTURE\_CONST=ON is reader for prime time yet, it is only tested independantly by @seanm , but maybe will be turned on in some CI in the coming months.

Well, I only use a subset of VTK of course, but we’ve been shipping our app built with VTK\_USE\_FUTURE\_CONST for years. It’s ready for prime time in that sense.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [June 23, 2026, 11:13am UTC](https://discourse.vtk.org/t/duplicate-getgroup-getbinding-in-vtkwebgpucomputebuffer-h/16467/10 "2026-06-23T11:13:38Z")

</div>

Even if it isn’t ready, this is a bug regardless of the setting. It’s just that the setting actually uncovered an issue in this case.
