Changeset 260789 in webkit
- Timestamp:
- Apr 27, 2020 3:08:26 PM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r260788 r260789 1 2020-04-27 Dean Jackson <dino@apple.com> 2 3 getShaderPrecisionFormat returns the wrong values 4 https://bugs.webkit.org/show_bug.cgi?id=211013 5 <rdar://problem/62378056> 6 7 Reviewed by Darin Adler. 8 9 Gregg pointed out that our code hardcodes values for 10 getShaderPrecisionFormat. The fix is simply to call into 11 the underlying GL function. 12 13 Covered by the existing test: webgl/1.0.3/conformance/misc/shader-precision-format.html 14 15 However, that just tests minimum values. Devices have different 16 actual results. 17 18 * platform/graphics/angle/GraphicsContextGLANGLE.cpp: 19 (WebCore::GraphicsContextGLOpenGL::getShaderPrecisionFormat): 20 1 21 2020-04-27 Simon Fraser <simon.fraser@apple.com> 2 22 -
trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp
r260301 r260789 312 312 void GraphicsContextGLOpenGL::getShaderPrecisionFormat(GCGLenum shaderType, GCGLenum precisionType, GCGLint* range, GCGLint* precision) 313 313 { 314 UNUSED_PARAM(shaderType); 315 ASSERT(range); 316 ASSERT(precision); 317 318 makeContextCurrent(); 319 320 switch (precisionType) { 321 case GraphicsContextGL::LOW_INT: 322 case GraphicsContextGL::MEDIUM_INT: 323 case GraphicsContextGL::HIGH_INT: 324 // These values are for a 32-bit twos-complement integer format. 325 range[0] = 31; 326 range[1] = 30; 327 precision[0] = 0; 328 break; 329 case GraphicsContextGL::LOW_FLOAT: 330 case GraphicsContextGL::MEDIUM_FLOAT: 331 case GraphicsContextGL::HIGH_FLOAT: 332 // These values are for an IEEE single-precision floating-point format. 333 range[0] = 127; 334 range[1] = 127; 335 precision[0] = 23; 336 break; 337 default: 338 ASSERT_NOT_REACHED(); 339 break; 340 } 314 makeContextCurrent(); 315 gl::GetShaderPrecisionFormat(shaderType, precisionType, range, precision); 341 316 } 342 317
Note: See TracChangeset
for help on using the changeset viewer.