Overview

Hardware kbl_iris
Architecture m64
Status fail
Filtered Status fail
Time 0.031631

See also historical results for this test.

stdout

Compute Shader resources - Subroutines
1. Verify that subroutines work as expected in CS.
2. Verify that subroutines array can be indexed with gl_WorkGroupID built-in variable.
3. Verify that atomicCounterIncrement, imageLoad and texelFetch functions
    work as expected when called in CS from subroutine.
1. Create CS which uses array of subroutines.
2. In CS index subroutine array with gl_WorkGroupID built-in variable.
3. In each subroutine load data from SSBO0 and write it to SSBO1.
3. Dispatch CS with DispatchCompute and DispatchComputeIndirect commands.
4. Verify SSBO1 content.
5. Repeat for different buffer and CS work sizes.
Everything works as expected.
glCreateProgram();
// 3673 returned
glCreateShader(GL_COMPUTE_SHADER);
// 3674 returned
glAttachShader(3673, 3674);
glDeleteShader(3674);
glShaderSource(3674, 2, 0x00007ffc51c8d2a0, 0x0000000000000000);
glCompileShader(3674);
glLinkProgram(3673);
glGetProgramiv(3673, GL_LINK_STATUS, 0x00007ffc51c8c354);
// params = { 1 }
glGenBuffers(2, 0x0000564abb18eb50);
// buffers = { 2201, 2202 }
glBindBuffer(GL_SHADER_STORAGE_BUFFER, 2201);
glBufferData(GL_SHADER_STORAGE_BUFFER, 1024, 0x564abc2f33d0, GL_DYNAMIC_DRAW);
glBindBuffer(GL_SHADER_STORAGE_BUFFER, 2202);
glBufferData(GL_SHADER_STORAGE_BUFFER, 256, 0x564abcf32260, GL_DYNAMIC_DRAW);
glBindBuffer(GL_SHADER_STORAGE_BUFFER, 0);
glGenBuffers(1, 0x0000564abb18eb4c);
// buffers = { 2203 }
glBindBufferBase(GL_ATOMIC_COUNTER_BUFFER, 0, 2203);
glBufferData(GL_ATOMIC_COUNTER_BUFFER, 4, 0, GL_STREAM_DRAW);
glMapBuffer(0x000092c0, 0x000088b9);
// 0x7f9236c64000 returned
glUnmapBuffer(GL_ATOMIC_COUNTER_BUFFER);
// GL_TRUE returned
glGenBuffers(2, 0x0000564abb18eb58);
// buffers = { 2204, 2205 }
glBindBuffer(GL_TEXTURE_BUFFER, 2204);
glBufferData(GL_TEXTURE_BUFFER, 256, 0x564abcf32260, GL_STATIC_DRAW);
glBindBuffer(GL_TEXTURE_BUFFER, 2205);
glBufferData(GL_TEXTURE_BUFFER, 256, 0x564abcf32260, GL_STATIC_DRAW);
glBindBuffer(GL_TEXTURE_BUFFER, 0);
glGenTextures(2, 0x0000564abb18eb60);
// textures = { 6116, 6117 }
glBindTexture(GL_TEXTURE_BUFFER, 6116);
glTexBuffer(GL_TEXTURE_BUFFER, GL_RGBA32UI, 2204);
glBindTexture(GL_TEXTURE_BUFFER, 6117);
glTexBuffer(GL_TEXTURE_BUFFER, GL_RGBA32UI, 2205);
glBindTexture(GL_TEXTURE_BUFFER, 0);
glGetSubroutineIndex(3673, 0x000091b9, Compute0);
// 0 returned
glGetSubroutineIndex(3673, 0x000091b9, Compute1);
// 1 returned
glGetSubroutineIndex(3673, 0x000091b9, Compute2);
// 2 returned
glGetSubroutineIndex(3673, 0x000091b9, Compute3);
// 3 returned
glGetSubroutineUniformLocation(3673, 0x000091b9, Compute[0]);
// 0 returned
glGetSubroutineUniformLocation(3673, 0x000091b9, Compute[1]);
// 1 returned
glGetSubroutineUniformLocation(3673, 0x000091b9, Compute[2]);
// 2 returned
glGetSubroutineUniformLocation(3673, 0x000091b9, Compute[3]);
// 3 returned
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 0, 2201);
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 1, 2202);
glBindBufferBase(GL_ATOMIC_COUNTER_BUFFER, 0, 2203);
glBindImageTexture(0, 6116, 0, GL_FALSE, 0, GL_READ_ONLY, GL_RGBA32UI);
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_BUFFER, 6117);
glUseProgram(3673);
glUniformSubroutinesuiv(0x000091b9, 4, 0x00007ffc51c8d390);
glDispatchCompute(4, 1, 1);
glBindBuffer(GL_SHADER_STORAGE_BUFFER, 2201);
glMemoryBarrier(GL_BUFFER_UPDATE_BARRIER_BIT);
glGetBufferSubData(0x000090d2, 0, 1024, 0x564abc1f3620);
glBindBuffer(GL_ATOMIC_COUNTER_BUFFER, 2203);
glGetBufferSubData(0x000092c0, 0, 4, 0x7ffc51c8d36c);
Final atomic counter value is 64 should be 16.
Test Run() failed
glUseProgram(0);
glDeleteProgram(3673);
glDeleteBuffers(1, { 2203 });
glDeleteBuffers(2, { 2201, 2202 });
glDeleteBuffers(2, { 2204, 2205 });
glDeleteTextures(2, { 6116, 6117 });

stderr

pid: 17528