WebGL: validate texture format matches sampler type
WebGL requires that drawing produces INVALID_OPERATION if a texture's
format doesn't match the sampler type it is bound to. This is a little
confusing because samplers have two attributes that could be called
"type": addressing mode (2D/3D/Cube), and component format
(float/signed/unsigned/shadow). ANGLE already handled checking the
addressing mode; this change adds checking for the component format.
Fixes WebGL conformance test
conformance2/uniforms/incompatible-texture-type-for-sampler.html
Bug: chromium:809237
Change-Id: I52ebfecd92625e3ee10274cb5f548d7e53de72dd
Reviewed-on: https://chromium-review.googlesource.com/c/1377611Reviewed-by:
Jamie Madill <jmadill@chromium.org>
Reviewed-by:
Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Showing
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to comment