Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers


Type: Posts; User: sleap

Search: Search took 0.00 seconds.

  1. A call to get dimensions of image units in GLSL, just like textureSize

    Not exactly a big suggestion but here goes...

    textureSize(sampler, level) is a handy function to get texture dimensions in a shader without having to pass them in by hand as uniforms.

    It'd be...
  2. Can anyone think of a nice way to tightly pack...

    Can anyone think of a nice way to tightly pack vec2 data?

    The trouble is indexing elements .xy and .zw. Ideally I'd like to be able to have something like this...

    float arrayUnpacked[N];...
  3. ATI: procedural drawing without any vertex data

    I'm trying to draw (glDrawArrays) without binding any vertex data, generating everything using glVertex_ID. This works absolutely fine on Nvidia cards, but not with my ATI 5850s. Nothing is drawn...
  4. Finding the GLSL image unit layout information from the application

    A number of times I've mistakenly tried to bind a GL_RG32F texture buffer to a layout(rgba32f) imageBuffer.

    This mismatch in the image unit format silently fails and all reads result in zeroes....
  5. Signed int addressing of image units limits to 2gb

    I can call glBufferData and afaik allocate 8gb of memory without an error (though the card only has 6).
    However there's not much point creating 2gb or more since the index argument for imageLoad is...
  6. Replies

    You might have already seen it, but there's...

    You might have already seen it, but there's similar locking code here:
    It's a few years old but it might be worth a look.
  7. A short update... both divide and modulus op are...

    A short update... both divide and modulus op are not cheap. It's quite a bit faster to use bitwise ops:


    Still not optimal, and I'm guessing part of the slowdown is related to...
  8. GLSL pads int arrays to 16 bytes, taking 4 times local memory

    I have an NVIDIA GTX 670, linux driver 319.49. In my shader I declare an array of integers...

    int myArray[512];

    When I use glGetProgramBinary and have a look at Nvidia's handy plaintext output...
  9. Replies

    Writing directly to the stencil buffer

    Instead of the standard increment, replace etc operations on the stencil buffer I'd like to be able to write arbitrary values directly from a shader. I don't mind of this is during typical rendering...
  10. Replies

    Stab in the dark here but have you installed the...

    Stab in the dark here but have you installed the latest video drivers?

    It might also be worth having a quick look at the DLLs your app uses on the other machine - search for "windows dependency...
  11. Running the compute shader seems to give a...

    Running the compute shader seems to give a performance boost to the OIT shader, if the OIT shader uses a large array. If the OIT shader uses a small array (<32) the performance actually drops. In...
  12. Running a compute shader with a large array makes other shaders with arrays faster.

    I've stumbled upon some strange behaviour when playing with compute shaders. I have a basic OIT implementation using linked lists (although my guess is any application which uses a fairly large local...
  13. Replies

    Nice question. I'm quite in favour of injecting...

    Nice question. I'm quite in favour of injecting #define values and creating permutations of shaders (within reason of course). However, I haven't ever noticed much performance difference doing...
  14. Thanks for the response. I'm aware of the two...

    Thanks for the response. I'm aware of the two formats. They both work for me but I've just chosen size4x32 as it works on my ATI card.

    Your declaration still causes a crash with my 310.19 drivers.
  15. NVIDIA 310.* crashes when compiling GLSL using "restrict" keyword on image unit

    title says it all.

    declare any image unit from the image load store extension will cause a crash on the call to compile the shader, eg:
    layout(size4x32) uniform imageBuffer restrict data;
  16. Replies

    Re: slow local arrays in GLSL

    Thank you both for your replies.

    Working on a single cell was to stop the compiler optimizing the array out, so I could confirm the array size was my problem, and not the operations I was...
  17. Replies

    slow local arrays in GLSL

    I'm surprised at the cost of declaring arrays in GLSL programs.
    The array doesn't need to be initialized, all I do is write to a random element and read from the same one (so the array can't be...
  18. Replies

    GLSL while (someFunction) ... infinite loop

    I've had this issue a few times now. I'm trying to create a generator style function for iteration. A basic example would be:

    bool iter(inout int i)
    if (++i >= 10)
  19. Replies

    uniform structs with image buffers

    It seems samplers, image buffers and bindless graphics pointers cannot be placed in GLSL structs. This would be quite useful in the following situation where multiple complex structures need to be...
  20. Replies

    Re: GLSL struct packing / texture buffers

    Thanks for the reply! Indeed so - I am using nvidia's GL_NV_shader_buffer_load. I guess I'm allocating memory as a texture buffer and then getting a pointer to that memory with nvidia's extension.
  21. Replies

    GLSL struct packing / texture buffers

    There seems to be very little information on this or maybe I'm looking in the wrong places. It's now possible to declare a struct in GLSL and an array of that type. This array can map to global...
Results 1 to 21 of 21