[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] getShaderInfoLog/getProgramInfoLog format specification



For Chrome (very likely other browsers), most error reporting are
generated by browsers instead of the underlying drivers, because we
translate the shader, and check many limitations before linking.  For
these, it's possible to format them in a certain way.

However, in those errors that our pre-processing fail to catch (like
instruction limit reached), it's hard to format them.  Just as Mark
pointed out, it's all driver specific, besides, figuring out the line
number and sourceline from original shader (not the translated shader
that submitted to the driver) is not a simple task.

At the moment we do some post-processing to replace hashed names with
original names, but that's all we do at the moment for log
readability.

On Tue, Jan 6, 2015 at 2:31 AM, Florian Bösch <pyalot@gmail.com> wrote:
> Some of the frequent problems with properly handling shader/program info log
> information is:
>
> How to locate the line and column number (because different
> backends/browsers report it differently)
> How to separate log entries (that may span multiple lines) into distinct
> entries for each error reported
> empty error message ("")
> unusable error messages (like those linker error messages that reference
> Direct3D intermediary bytecode and are piped trough straight
>
> I'm wondering if it would make sense to come up with some sort of formal
> specification for WebGL 2.0 that ensures that:
>
> the returned log info is a proper structure (lists/objects)
> That line and column numbers are not mangled together with the log entry
> text
> For convenience may include the sourceline
> That ensures all reported errors are not piped trough from some backend, but
> are relevant to the source passed in
>
> Maybe something along the lines of:
>
> info-log := [error, error]
> error := object {
>   line: INT
>   column: INT
>   message: STRING
>   sourceline: STRING
> }
>
>

-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------