Closed Bug 845636 Opened 9 years ago Closed 9 years ago

uniform1i should generate INVALID_VALUE for invalid texture units for samplers

Categories

(Core :: Canvas: WebGL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla22

People

(Reporter: jgilbert, Assigned: jgilbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

For uniforms that are samplers, we need to emit an INVALID_VALUE when the user tries to set them outside of [0, gl.getParameter(gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS)).
Attached patch patchSplinter Review
Attachment #718796 - Flags: review?(bjacob)
Comment on attachment 718796 [details] [diff] [review]
patch

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

r=me for the WebGL changes with the naming nit, but don't forget to take out the unwanted configure.in changes.

::: configure.in
@@ +480,1 @@
>          _CC_MAJOR_VERSION=`echo ${CC_VERSION} | $AWK -F\. '{ print $1 }'`

Unrelated configure.in changes.

::: content/canvas/src/WebGLContextValidate.cpp
@@ +688,5 @@
>      return true;
>  }
>  
>  bool
> +WebGLContext::ValidateUniformForSamplers(const char* info, WebGLUniformLocation *location, WebGLint value)

How about ValidateSamplerUniformSetter?
Comment on attachment 718796 [details] [diff] [review]
patch

forgot to r+; see important comment above.
Attachment #718796 - Flags: review?(bjacob) → review+
https://hg.mozilla.org/mozilla-central/rev/40b1d8181e56
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
Blocks: 936738
You need to log in before you can comment on or make changes to this bug.