I’m writing compute shaders on google version 2.79. When Google update to 81 version, my shaders show error (with empty description) on linking program with shaders. In Google update log I did not find the information.
After testing i saw that error is shown when i try write in buffer with index 11 and more.
Has anyone encountered this error? Why does she appear? How to avoid it?
You haven’t really given the reader much to go on here.
Presumably you’re getting an error trying to link an OpenGL ES compute shader. However… Google version 2.79 (and 81) … of what exactly? On what OS/GPU/driver/driver version? What exactly is the error message that you do get with empty description? Buffer index 11 for what – UBOs or SSBOs? What is the shader source code you’re providing when you get this link error?
What values do GL_MAX_COMPUTE_UNIFORM_BLOCKS and GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS have on your patform? Are you exceeding these limits with your buffer binding? FWIW, the OpenGL ES 3.2 spec (if you were using a GLES 3.2 profile) only requires 12 and 4 for these, respectively. If you’re getting this error for UBO bindings, index 11 is suspiciously close to the former,
Working fine in Google version 79.0.3945.79
Error in versin 81.0.4044.138
OS: Windows 10 64 bit
GPU: NVIDIA GeForce GTX 760
Driver version: 220.127.116.1111 (date 01.06.2018)
I can not send the full code. If necessary, I can write a similar program and send it
When I created buffers, i take type “SHADER_STORAGE_BUFFER”. When i bind it to arg of shader program i switch it to texture:
There’s so much confusion in your previous posts it’s hard to even know where to start.
First, Google is a company, not a software platform or library. So “Google version” makes no sense.
Websearching these version numbers reveals that you are talking about Chrome, a Google web browser.
So presumably you’re trying to run a computer shader in WebGL inside of Google Chrome.
Given all the confusion below, I’d suggest you put aside your current project, go grab an existing WebGL compute shader demo that says it runs in Google Chrome, and go study it carefully. Do some reading until you understand it. Then modify it to do what you want.
Why are you running such old graphics drivers rather than the latest version?
That’s not how it works. Buffer objects themselves have no type. They’re just (conceptually) a block of data in graphics memory. It’s what you do with a buffer object (e.g. what buffer bind target(s) you bind it to) that determine what it is being used for at that specific time in your OpenGL command sequence. Read about them here: Buffer Objects.
The 1st line isn’t even valid GL / GLES. I think you meant glTexBuffer() here. If that were it, it associates the specified buffer object handle with the texture previously bound to the texture buffer bind point on the default texture image unit.
The 2nd unbinds the last texture from the default texture image unit (NOTE: not the same thing as image unit).
The 3rd binds the specified texture to the specified image unit. Read more about that here: Image_Load_Store#Images_in_the_context
And the 4th could possibly be storing the image unit index in a shader uniform.
So we’re missing code here, but it appears you’re trying to create a TBO and then setup to access it as an image in the shader.
However, in the portion of your shader code you’ve quoted:
it does things with an SSBO, not a Image sampler. So I have no idea what you’re doing. If you’re trying to access tex as an image, why aren’t you doing it through the image unit you bound it to using an image sampler? And if you actually did want to access the underlying buffer object as an SSBO instead, why did you show setup code where you bind it to an image unit and pass that image unit to a shader uniform (presumably) backed by an image sampler?
Also, for what it’s worth, the relevant limit for the number of image units is GL_MAX_IMAGE_UNITS. In OpenGL ES 3.2, the minimum value for this is 4, and (though it doesn’t matter to you) under OpenGL 4.6, the minimum value for this is 8.