Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 10 of 28

Thread: unbound sampler declaration andd GLSL shader code

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member Regular Contributor
    Join Date
    Jul 2010

    unbound sampler declaration andd GLSL shader code


    I have the following code:

    Code :
    uniform int isBound;
    uniform usampler2D myImage;
    if (isBound == 1)
        do something with myImage, calls texelFetch;
        do something without using myImage;
    Is this allowed to leave sampler uniforms effectively not bound to anything, at certain times?
    Sorry if this question seems obvious but I have a bug whereby a single texelFetch, not executed in my code (because isBound is 0), causes my shader to freeze. Although never executed, commenting out the texelFetch call indeed removes the issue. I suspect either a GLSL compiler issue as my shader code is very complex (> 2000 lines), or a driver issue. Even more likely, a problem with my code

    Last edited by fred_em; 06-25-2013 at 07:59 AM. Reason: usampler2D, not uimage2D

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts