# Texture buffer size error

**URL:** https://discourse.vtk.org/t/texture-buffer-size-error/8484
**Category:** Support
**Tags:** python
**Created:** [May 12, 2022, 3:29pm UTC](https://discourse.vtk.org/t/texture-buffer-size-error/8484 "2022-05-12T15:29:31Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![brandonfosso](https://discourse.vtk.org/user_avatar/discourse.vtk.org/brandonfosso/32/4951_2.png) [@brandonfosso](https://discourse.vtk.org/u/brandonfosso)
#### Post date: [May 12, 2022, 3:29pm UTC](https://discourse.vtk.org/t/texture-buffer-size-error/8484/1 "2022-05-12T15:29:31Z")

</div>

Hey VTK community,

Ubuntu:18.04  
python: 3.9.12  
vtk: 9.1.0

I am rendering a large mesh and am getting the following error:

`vtkTextureObject.cxx:1025 ERR| vtkTextureObject (0x55c39d370ab0): Attempt to use a texture buffer exceeding your hardware's limits. This can happen when trying to color by cell data with a large dataset. Hardware limit is 65536 values while 321512 was requested.`

Googling, this seems to seems to be related to Mesa OpenGL. I tried updating those without any change to the error.

Has anybody seen this before or know what to do? Can one turn texturing off in VTK?

Thanks

---

<div class="post-metadata">

### Author: ![sankhesh](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sankhesh/32/73_2.png) [@sankhesh](https://discourse.vtk.org/u/sankhesh)
#### Post date: [May 14, 2022, 12:29am UTC](https://discourse.vtk.org/t/texture-buffer-size-error/8484/2 "2022-05-14T00:29:36Z")

</div>

As the error states, this is because the color map is exceeding the maximum texture size that your GPU driver can allocate. To disable color mapping, do something like `mapper->SetScalarVisibility(false)` in your pipeline.

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.vtk.org/user_avatar/discourse.vtk.org/cory.quammen/32/6751_2.png) [@cory.quammen](https://discourse.vtk.org/u/cory.quammen)
#### Post date: [May 15, 2022, 11:50pm UTC](https://discourse.vtk.org/t/texture-buffer-size-error/8484/3 "2022-05-15T23:50:01Z")

</div>

Note that this is caused by an artificially low limit in mesa has been drastically increased in more recent mesa with this merge request: [llvmpipe: increase PIPE\_CAP\_MAX\_TEXTURE\_BUFFER\_SIZE value (!9750) · Merge requests · Mesa / mesa · GitLab](https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9750)

---

<div class="post-metadata">

### Author: ![brandonfosso](https://discourse.vtk.org/user_avatar/discourse.vtk.org/brandonfosso/32/4951_2.png) [@brandonfosso](https://discourse.vtk.org/u/brandonfosso)
#### Post date: [May 16, 2022, 2:37pm UTC](https://discourse.vtk.org/t/texture-buffer-size-error/8484/4 "2022-05-16T14:37:44Z")

</div>

Thanks for responding Sankhesh. I am intentionally coloring the scalars for this figure so I need to leave that on.

---

<div class="post-metadata">

### Author: ![brandonfosso](https://discourse.vtk.org/user_avatar/discourse.vtk.org/brandonfosso/32/4951_2.png) [@brandonfosso](https://discourse.vtk.org/u/brandonfosso)
#### Post date: [May 16, 2022, 2:39pm UTC](https://discourse.vtk.org/t/texture-buffer-size-error/8484/5 "2022-05-16T14:39:35Z")

</div>

Thanks for responding Cory. It sounds like I just need wait for the fix to make it downstream.

---

<div class="post-metadata">

### Author: ![Naga\_rohith\_Reddybat](https://discourse.vtk.org/user_avatar/discourse.vtk.org/naga_rohith_reddybat/32/9163_2.png) [@Naga\_rohith\_Reddybat](https://discourse.vtk.org/u/Naga_rohith_Reddybat)
#### Post date: [August 8, 2024, 5:43pm UTC](https://discourse.vtk.org/t/texture-buffer-size-error/8484/6 "2024-08-08T17:43:45Z")

</div>

I am still getting this issue, Any fix for this

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.vtk.org/user_avatar/discourse.vtk.org/cory.quammen/32/6751_2.png) [@cory.quammen](https://discourse.vtk.org/u/cory.quammen)
#### Post date: [August 10, 2024, 1:41pm UTC](https://discourse.vtk.org/t/texture-buffer-size-error/8484/7 "2024-08-10T13:41:41Z")

</div>

What version of VTK are you using? What version of mesa?

---

<div class="post-metadata">

### Author: ![Naga\_rohith\_Reddybat](https://discourse.vtk.org/user_avatar/discourse.vtk.org/naga_rohith_reddybat/32/9163_2.png) [@Naga\_rohith\_Reddybat](https://discourse.vtk.org/u/Naga_rohith_Reddybat)
#### Post date: [August 10, 2024, 1:53pm UTC](https://discourse.vtk.org/t/texture-buffer-size-error/8484/8 "2024-08-10T13:53:21Z")

</div>

Vtk 9.1.0 python 3.9.16

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.vtk.org/user_avatar/discourse.vtk.org/cory.quammen/32/6751_2.png) [@cory.quammen](https://discourse.vtk.org/u/cory.quammen)
#### Post date: [August 10, 2024, 2:23pm UTC](https://discourse.vtk.org/t/texture-buffer-size-error/8484/9 "2024-08-10T14:23:22Z")

</div>

If you are still seeing the error, then your version of mesa is likely older than the one with the fix.

---

<div class="post-metadata">

### Author: ![Naga\_rohith\_Reddybat](https://discourse.vtk.org/user_avatar/discourse.vtk.org/naga_rohith_reddybat/32/9163_2.png) [@Naga\_rohith\_Reddybat](https://discourse.vtk.org/u/Naga_rohith_Reddybat)
#### Post date: [August 10, 2024, 2:30pm UTC](https://discourse.vtk.org/t/texture-buffer-size-error/8484/10 "2024-08-10T14:30:53Z")

</div>

Okok Can you tell me the mesa version which has the fixed code

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.vtk.org/user_avatar/discourse.vtk.org/cory.quammen/32/6751_2.png) [@cory.quammen](https://discourse.vtk.org/u/cory.quammen)
#### Post date: [August 10, 2024, 4:44pm UTC](https://discourse.vtk.org/t/texture-buffer-size-error/8484/11 "2024-08-10T16:44:36Z")

</div>

21.1 and later.

---

<div class="post-metadata">

### Author: ![Naga\_rohith\_Reddybat](https://discourse.vtk.org/user_avatar/discourse.vtk.org/naga_rohith_reddybat/32/9163_2.png) [@Naga\_rohith\_Reddybat](https://discourse.vtk.org/u/Naga_rohith_Reddybat)
#### Post date: [August 10, 2024, 4:51pm UTC](https://discourse.vtk.org/t/texture-buffer-size-error/8484/12 "2024-08-10T16:51:23Z")

</div>

Ok will try that, Thanks
