Last Comment Bug 869703 - WebGL failure retrieving uniform
: WebGL failure retrieving uniform
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Canvas: WebGL (show other bugs)
: unspecified
: x86_64 Linux
: -- normal (vote)
: mozilla24
Assigned To: Roberto Agostino Vitillo
:
: Milan Sreckovic [:milan]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-07 16:03 PDT by Roberto Agostino Vitillo
Modified: 2013-06-05 03:46 PDT (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
testcase (3.96 KB, text/plain)
2013-05-07 16:03 PDT, Roberto Agostino Vitillo
no flags Details
Patch with a possible solution. (1.78 KB, patch)
2013-05-07 16:04 PDT, Roberto Agostino Vitillo
jgilbert: review+
Details | Diff | Splinter Review
patch (1.91 KB, patch)
2013-06-03 13:30 PDT, Roberto Agostino Vitillo
no flags Details | Diff | Splinter Review
patch (2.86 KB, patch)
2013-06-04 14:05 PDT, Roberto Agostino Vitillo
ryanvm: checkin+
Details | Diff | Splinter Review

Description Roberto Agostino Vitillo 2013-05-07 16:03:27 PDT
Created attachment 746672 [details]
testcase

The attached test generates the following error (v. 20.0.1):

Warning: Error: WebGL: UniformMatrix2fv: this function expected a uniform of element size 4, got a uniform of element size 0
Source File: file:///home/vitillo/sandbox/webgl/Tut04/test.html
Line: 33

The issue seems to be that an uniform info is retrieved only on demand by reading the information from the attached shaders. If the program has been successfully linked and the shaders detached then the search will fail. Nevertheless the operation should succeed even if the shaders have been detached after linking.
Comment 1 Roberto Agostino Vitillo 2013-05-07 16:04:44 PDT
Created attachment 746674 [details] [diff] [review]
Patch with a possible solution.
Comment 2 Jeff Gilbert [:jgilbert] 2013-05-07 16:15:46 PDT
Comment on attachment 746674 [details] [diff] [review]
Patch with a possible solution.

Review of attachment 746674 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, but we should add this assert.

::: content/canvas/src/WebGLProgram.cpp
@@ -224,4 @@
>  
>  WebGLUniformInfo
>  WebGLProgram::GetUniformInfoForMappedIdentifier(const nsACString& name) {
> -    if (!mUniformInfoMap) {

Assert that mUniformInfoMap is present.
Comment 3 Benoit Jacob [:bjacob] (mostly away) 2013-05-07 18:27:32 PDT
Great analysis and patch! Thanks!
Comment 4 (mostly gone) XtC4UaLL [:xtc4uall] 2013-06-02 03:35:06 PDT
Forgot to check this in?
Comment 5 Benoit Jacob [:bjacob] (mostly away) 2013-06-02 07:09:26 PDT
Indeed, please make a version of the patch with a commit message

   Bug xxx - what the patch actually does - r=jgilbert

and flag the patch with 'checkin?'
Comment 6 Roberto Agostino Vitillo 2013-06-03 13:30:25 PDT
Created attachment 757583 [details] [diff] [review]
patch
Comment 7 Ryan VanderMeulen [:RyanVM] 2013-06-04 05:20:04 PDT
This patch doesn't apply. Please make sure it was generated per the directions below.
https://developer.mozilla.org/en-US/docs/Mercurial_FAQ#How_can_I_generate_a_patch_for_somebody_else_to_check-in_for_me.3F
Comment 8 Roberto Agostino Vitillo 2013-06-04 14:05:21 PDT
Created attachment 758183 [details] [diff] [review]
patch
Comment 9 Ryan VanderMeulen [:RyanVM] 2013-06-04 17:55:25 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/5443b4e12cda

Thanks for the patch, Roberto! :)
Comment 10 Ed Morley [:emorley] 2013-06-05 03:46:28 PDT
https://hg.mozilla.org/mozilla-central/rev/5443b4e12cda

Note You need to log in before you can comment on or make changes to this bug.