# GLSL textureGather returns bad values

**URL:** <https://forums.imgtec.com/t/glsl-texturegather-returns-bad-values/4169>\
**Category:** Uncategorized\
**Created:** [June 9, 2025, 8:20am UTC](https://forums.imgtec.com/t/glsl-texturegather-returns-bad-values/4169 "2025-06-09T08:20:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aleksigron](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.imgtec.com/aleksigron/32/685_2.png) [@aleksigron](https://forums.imgtec.com/u/aleksigron)\
**Post date:** [June 9, 2025, 8:20am UTC](https://forums.imgtec.com/t/glsl-texturegather-returns-bad-values/4169/1 "2025-06-09T08:20:56Z")

</div>

Running into some kind of driver bug on a GE8320. I’m using textureGather to read from a D16 render target texture. If something is rendered to the texture after clearing it, values are read correctly. If I only clear the texture and don’t do any draws to it, X and W components are read correctly, and Y and Z are read as 0. Same problem with D32F format, but D24\_S8 seems to be working correctly.

Test device is Moto G22 with Android 12. I found this problem because it is also happening on a Furian based GPU for a customer.

---

<div class="post-metadata">

**Author:** ![AlejandroC](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@AlejandroC](https://forums.imgtec.com/u/AlejandroC)\
**Post date:** [June 9, 2025, 10:25am UTC](https://forums.imgtec.com/t/glsl-texturegather-returns-bad-values/4169/2 "2025-06-09T10:25:40Z")

</div>

Hi aleksigron,

Thanks for your message, and welcome to the PowerVR Developer Forum!

I would like please to have a reproduction code for the issue you are experiencing that I can build and test.

Also I will need the driver version of the GE8320 GPU you are working with, details on how to get that information can be found in [Vulkan: vkGetImageMemoryRequirements2 crashes on PowerVR 8300 - #4 by AlejandroC](https://forums.imgtec.com/t/vulkan-vkgetimagememoryrequirements2-crashes-on-powervr-8300/3458/4)

Best regards,  
Alejandro

---

<div class="post-metadata">

**Author:** ![aleksigron](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.imgtec.com/aleksigron/32/685_2.png) [@aleksigron](https://forums.imgtec.com/u/aleksigron)\
**Post date:** [June 12, 2025, 6:22am UTC](https://forums.imgtec.com/t/glsl-texturegather-returns-bad-values/4169/3 "2025-06-12T06:22:20Z")

</div>

Hello AlejandroC,

The device has driver version OpenGL ES 3.2 build 1.13@5776728

Unfortunately I’m not sure how to create a minimal example to reproduce the issue.

Thanks for the quick reply,  
Aleksi

---

<div class="post-metadata">

**Author:** ![AlejandroC](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@AlejandroC](https://forums.imgtec.com/u/AlejandroC)\
**Post date:** [June 12, 2025, 1:09pm UTC](https://forums.imgtec.com/t/glsl-texturegather-returns-bad-values/4169/4 "2025-06-12T13:09:54Z")

</div>

Hi aleksigron,

Thanks for the information.

Our SDK has a variety of OpenGL ES and Vulkan samples ( [Native\_SDK/examples/OpenGLES at master · powervr-graphics/Native\_SDK · GitHub](https://github.com/powervr-graphics/Native_SDK/tree/master/examples/OpenGLES) and [Native\_SDK/examples/Vulkan at master · powervr-graphics/Native\_SDK · GitHub](https://github.com/powervr-graphics/Native_SDK/tree/master/examples/Vulkan) ). Perhaps you can change one sample which reproduces the issue and provide a patch?

Also, you could take a recording of your application with our debugging tool PVRCarbon [PVRCarbon - Imagination Developers](https://developer.imaginationtech.com/solutions/pvrcarbon/) which will record all the commands and allow to inspect them / export as C++ project.

Best regards,  
Alejandro
