Closed
Bug 1186129
Opened 9 years ago
Closed 9 years ago
WebGL texture conversions: Fix assignment of alpha in pack premultiply of RA16F
Categories
(Core :: Graphics: CanvasWebGL, defect)
Core
Graphics: CanvasWebGL
Tracking
()
RESOLVED
FIXED
mozilla42
Tracking | Status | |
---|---|---|
firefox42 | --- | fixed |
People
(Reporter: kyle_fung, Assigned: kyle_fung)
Details
Attachments
(1 file)
1.91 KB,
patch
|
jgilbert
:
review+
|
Details | Diff | Splinter Review |
Current implementation of pack premultiply for RA16F from WebGLTexelConversions.h :
> template<> MOZ_ALWAYS_INLINE void
> pack<WebGLTexelFormat::RA16F, WebGLTexelPremultiplicationOp::Premultiply, uint16_t, uint16_t>(const uint16_t* __restrict src, uint16_t* __restrict dst)
> {
> float scaleFactor = unpackFromFloat16(src[3]);
> dst[0] = packToFloat16(unpackFromFloat16(src[0]) * scaleFactor);
> dst[1] = scaleFactor;
> }
The assignment of dst[1] should be to src[3] not scaleFactor since scaleFactor is a float unpacked from src[3].
Attachment #8636723 -
Flags: review?(jgilbert)
Updated•9 years ago
|
Attachment #8636723 -
Flags: review?(jgilbert) → review+
Comment 2•9 years ago
|
||
Comment on attachment 8636723 [details] [diff] [review]
fix-alpha-assignment.patch
Review of attachment 8636723 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/canvas/WebGLTexelConversions.h
@@ +859,5 @@
> pack<WebGLTexelFormat::RA32F, WebGLTexelPremultiplicationOp::Premultiply, float, float>(const float* __restrict src, float* __restrict dst)
> {
> float scaleFactor = src[3];
> dst[0] = src[0] * scaleFactor;
> + dst[1] = src[3];
This is clearer, but it's the same result.
Keywords: checkin-needed
Keywords: checkin-needed
Comment 4•9 years ago
|
||
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox42:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in
before you can comment on or make changes to this bug.
Description
•