Add int/uint to vertex attrib data type

RESOLVED FIXED in Firefox 46

Status

()

RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: brad.kotsopoulos, Assigned: brad.kotsopoulos)

Tracking

46 Branch
mozilla46
Points:
---

Firefox Tracking Flags

(firefox46 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

3 years ago
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36

Steps to reproduce:

https://www.khronos.org/registry/webgl/sdk/tests/deqp/functional/gles3/instancedrendering.html?webglVersion=2&quiet=0

The last 8 test cases, for int/uint vectors.




Actual results:

In WebGLContext::ValidateBufferFetching we divide by the result of actualStride()

... = ((checked_byteLength - checked_sizeOfLastElement) / vd.actualStride()) + 1;

actualStride() calls componentSize() with type = LOCAL_GL_INT, which isn't handled in the enum, and returns 0.  We end up dividing by zero.

We get the following error message (as the divide by zero is caught by using checked ints):

FAIL instanced_rendering.types.int: GL error INVALID_OPERATION in drawArraysInstanced


Expected results:

We should return the size of int and uint.
(Assignee)

Comment 1

3 years ago
Posted patch vertex_attrib_data_v1.pat (obsolete) — Splinter Review
Change to add int/uint support to switch statement.
Attachment #8707650 - Flags: review?(jmuizelaar)
Attachment #8707650 - Flags: review?(jgilbert)
Comment on attachment 8707650 [details] [diff] [review]
vertex_attrib_data_v1.pat

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

::: dom/canvas/WebGLVertexAttribData.h
@@ +62,5 @@
>          case LOCAL_GL_FLOAT:
>              return sizeof(GLfloat);
>  
>          default:
> +            MOZ_ASSERT(!"Should never get here!");

MOZ_ASSERT(false, "...
Attachment #8707650 - Flags: review?(jmuizelaar)
Attachment #8707650 - Flags: review?(jgilbert)
Attachment #8707650 - Flags: review+
(Assignee)

Comment 3

3 years ago
Fixing assert.
Attachment #8707650 - Attachment is obsolete: true
(Assignee)

Updated

3 years ago
Keywords: checkin-needed
(Assignee)

Updated

3 years ago
Assignee: nobody → bkotsopoulos

Comment 6

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/b113b4874656
Status: UNCONFIRMED → RESOLVED
Last Resolved: 3 years ago
status-firefox46: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in before you can comment on or make changes to this bug.