Overview

Hardware kbl_iris
Architecture m64
Status fail
Filtered Status fail
Time 0.008799

See also historical results for this test.

stdout

Atomic Counters used to access Uniform Buffer Objects
Atomic counters are used to access UBOs. In that way each shader invocation can access UBO at unique offset.
This scenario is a base for some practical algorithms. Verify that it works as expected.
glCreateProgram();
// 3365 returned
glCreateShader(GL_VERTEX_SHADER);
// 3366 returned
glAttachShader(3365, 3366);
glDeleteShader(3366);
glShaderSource(3366, 1, 0x00007ffe47bd3b10, 0x0000000000000000);
glCompileShader(3366);
glCreateShader(GL_FRAGMENT_SHADER);
// 3367 returned
glAttachShader(3365, 3367);
glDeleteShader(3367);
glShaderSource(3367, 1, 0x00007ffe47bd3af0, 0x0000000000000000);
glCompileShader(3367);
glLinkProgram(3365);
glGetProgramInfoLog(3365, 1024, 0x00007ffe47bd393c, 0x00007ffe47bd3530);
// length = { 0 }
glGetUniformBlockIndex(3365, Data);
// 0 returned
glUniformBlockBinding(3365, 0, 1);
glGenBuffers(1, 0x000055833a333498);
// buffers = { 2328 }
glBindBuffer(GL_ATOMIC_COUNTER_BUFFER, 2328);
glBufferData(GL_ATOMIC_COUNTER_BUFFER, 4, 0x7ffe47bd3f88, GL_DYNAMIC_COPY);
glBindBuffer(GL_ATOMIC_COUNTER_BUFFER, 0);
glGenBuffers(1, 0x000055833a33349c);
// buffers = { 2329 }
glBindBuffer(GL_UNIFORM_BUFFER, 2329);
glBufferData(GL_UNIFORM_BUFFER, 4096, 0x55833a5d3b80, GL_DYNAMIC_COPY);
glBindBuffer(GL_UNIFORM_BUFFER, 0);
glGenTextures(1, 0x000055833a3334b0);
// textures = { 125 }
glBindTexture(GL_TEXTURE_2D, 125);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexImage2D(GL_TEXTURE_2D, 0, GL_R32UI, 16, 16, 0, GL_RED_INTEGER, GL_UNSIGNED_INT, 0);
glBindTexture(GL_TEXTURE_2D, 0);
glGenFramebuffers(1, 0x000055833a3334ac);
// framebuffers = { 85 }
glBindFramebuffer(GL_FRAMEBUFFER, 85);
glFramebufferTexture(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, 125, 0);
glBindFramebuffer(GL_FRAMEBUFFER, 0);
glGenBuffers(1, 0x000055833a3334a4);
// buffers = { 2330 }
glBindBuffer(GL_ARRAY_BUFFER, 2330);
glBufferData(GL_ARRAY_BUFFER, 176, 0x7ffe47bd3a80, GL_STATIC_DRAW);
glBindBuffer(GL_ARRAY_BUFFER, 0);
glGenVertexArrays(1, 0x000055833a3334a0);
// arrays = { 893 }
glBindVertexArray(893);
glBindBuffer(GL_ARRAY_BUFFER, 2330);
glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 44, 0);
glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 44, 0x8);
glVertexAttribPointer(2, 3, GL_FLOAT, GL_FALSE, 44, 0x14);
glVertexAttribPointer(3, 3, GL_FLOAT, GL_FALSE, 44, 0x20);
glBindBuffer(GL_ARRAY_BUFFER, 0);
glEnableVertexAttribArray(0);
glEnableVertexAttribArray(1);
glEnableVertexAttribArray(2);
glEnableVertexAttribArray(3);
glBindVertexArray(0);
glBindFramebuffer(GL_FRAMEBUFFER, 85);
glViewport(0, 0, 16, 16);
glBindBufferBase(GL_ATOMIC_COUNTER_BUFFER, 0, 2328);
glBindBufferBase(GL_UNIFORM_BUFFER, 1, 2329);
glUseProgram(3365);
glBindVertexArray(893);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
glReadBuffer(GL_COLOR_ATTACHMENT0);
glReadPixels(0, 0, 16, 16, GL_RED_INTEGER, GL_UNSIGNED_INT, 0x7ffe47bd3b70);
0
0
Counter value is 0 should be 1
Test Run() failed
glDeleteFramebuffers(1, { 85 });
glDeleteTextures(1, { 125 });
glViewport(0, 0, 400, 300);
glDeleteBuffers(1, { 2328 });
glDeleteBuffers(1, { 2329 });
glDeleteVertexArrays(1, { 893 });
glDeleteBuffers(1, { 2330 });
glDeleteProgram(3365);
glUseProgram(0);

stderr

pid: 17531