KhronosGroup/WebGL

Add test for indexed draws after detaching shaders from linked program

Opened this issue · 0 comments

A regression test is needed for ANGLE bug http://anglebug.com/6526 , in which the following workflow was done by a customer:

glCreateShader(context = 1, type = GL_VERTEX_SHADER)
glShaderSource(context = 1, shader = 1, count = 1, string = 0x000000016fda2778, length = 0x0000000000000000)
glCompileShader(context = 1, shader = 1)
glGetShaderiv(context = 1, shader = 1, pname = GL_COMPILE_STATUS, params = 0x000000016fda275c)
glObjectLabel(context = 1, identifier = GL_SHADER, name = 1, length = 33, label = 0x0000000116d3aac0)
glCreateShader(context = 1, type = GL_FRAGMENT_SHADER)
glShaderSource(context = 1, shader = 2, count = 1, string = 0x000000016fda2778, length = 0x0000000000000000)
glCompileShader(context = 1, shader = 2)
glGetShaderiv(context = 1, shader = 2, pname = GL_COMPILE_STATUS, params = 0x000000016fda275c)
glObjectLabel(context = 1, identifier = GL_SHADER, name = 2, length = 35, label = 0x0000000116d3aac0)
glCreateProgram(context = 1)
glAttachShader(context = 1, program = 3, shader = 1)
glAttachShader(context = 1, program = 3, shader = 2)
glLinkProgram(context = 1, program = 3)
glDetachShader(context = 1, program = 3, shader = 1) <---
glDeleteShader(context = 1, shader = 1) <---
glDetachShader(context = 1, program = 3, shader = 2) <---
glDeleteShader(context = 1, shader = 2) <---
glGetProgramiv(context = 1, program = 3, pname = GL_LINK_STATUS, params = 0x000000016fda28e4)
glValidateProgram(context = 1, program = 3)
glGetProgramiv(context = 1, program = 3, pname = GL_VALIDATE_STATUS, params = 0x000000016fda28e4)
glObjectLabel(context = 1, identifier = GL_PROGRAM, name = 3, length = 27, label = 0x0000000116ec0f40)
glUseProgram(context = 1, program = 3)

Ideally we'd put the bug back in place and ensure that the newly-written test detects it before submitting.