Open Bug 1368534 Opened 7 years ago Updated 2 years ago

WEBGL_debug_shaders getShaderTranslatedSource() should succeed if shader translation succeeded

Categories

(Core :: Graphics: CanvasWebGL, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: jujjyl, Unassigned)

Details

(Whiteboard: [gfx-noted])

Currently it looks like calling the function getShaderTranslatedSource() from WEBGL_debug_shaders extension will succeed only if shader compilation succeeded. However this limits some of the purpose of the extension, which is to be able to debug what the translated shader was if it fails to compile.

getShaderTranslatedSource() should succeed if shader translation succeeded, independent of whether compiling the translated shader succeeds or fails. That way it will be possible to call getShaderTranslatedSource() to diagnose bugs in the shader translation process itself.

See bug 1364930 as a test case: the shader fails to compile due to a bug in shader translation, and calling getShaderTranslatedSource() gives

> Error: WebGL warning: getShaderTranslatedSource: Shader has not been successfully compiled.

Translation itself had succeeded to be able to attempt to compile, so it would be good to be able to see the translated shader here.
Severity: normal → enhancement
Whiteboard: [gfx-noted]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.