[webkit-reviews] review denied: [Bug 109853] [WEBGL] Implement OES_texture_half_float in WebKit : [Attachment 188407] An attemp to implement OES_texture_half_float
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Feb 14 19:42:50 PST 2013
Kenneth Russell <kbr at google.com> has denied review:
Bug 109853: [WEBGL] Implement OES_texture_half_float in WebKit
https://bugs.webkit.org/show_bug.cgi?id=109853
Attachment 188407: An attemp to implement OES_texture_half_float
https://bugs.webkit.org/attachment.cgi?id=188407&action=review
------- Additional Comments from Kenneth Russell <kbr at google.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=188407&action=review
> Source/WebCore/html/canvas/WebGLRenderingContext.cpp:5125
> + case GraphicsContext3D::HALF_FLOAT_OES: // OES_texture_half_float
This is incorrect; per the spec, only NULL is allowed when calling the overload
taking ArrayBufferView with HALF_FLOAT_OES type.
> Source/WebCore/platform/graphics/GraphicsContext3D.cpp:646
> +template<> ALWAYS_INLINE void unpack<GraphicsContext3D::DataFormatR16F,
float, float>(const float* source, float* destination, unsigned pixelsPerRow)
All of these conversions are incorrect. You need to define a GC3DhalfFloat
typedef (probably to short) and add routines which create half-floats. Because
the WebGL OES_texture_half_float extension doesn't support typed arrays being
passed in, you don't need the unpacking routines; you'll never see one of the
half-float formats used as a source, only a destination. However, you need to
support all of the formats of HTML elements. I think this amounts to just doing
unsigned byte to half-float conversion but am not sure.
For references see
http://en.wikipedia.org/wiki/Half-precision_floating-point_format
ftp://ftp.fox-toolkit.org/pub/fasthalffloatconversion.pdf
I think the conversion you need (uint8 to half float) is essentially just an
unsigned cast because the low 8 bits of the half-float are the mantissa and you
won't have an exponent. Again, I'm not 100% sure.
> LayoutTests/fast/canvas/webgl/oes-texture-half-float.html:5
> +<title>WebGL OES_texture_float Conformance Tests</title>
You'll need to modify this test more extensively for half-float. In particular,
you can only upload HTML elements, not typed arrays. You still should test that
rendering to a half-float texture, when supported, preserves the extended
range.
More information about the webkit-reviews
mailing list