summaryrefslogtreecommitdiffstats
path: root/gpu
diff options
context:
space:
mode:
authorzmo@chromium.org <zmo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-09 22:42:56 +0000
committerzmo@chromium.org <zmo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-09 22:42:56 +0000
commit0a34b580949f37f6644178a38a6617ba07721d9b (patch)
tree2e881a740fbd614cb62fc85034b4f5abb4ff1dd8 /gpu
parent7be4a96af7eecf23ec5d8655fc8bb4c1558897e2 (diff)
downloadchromium_src-0a34b580949f37f6644178a38a6617ba07721d9b.zip
chromium_src-0a34b580949f37f6644178a38a6617ba07721d9b.tar.gz
chromium_src-0a34b580949f37f6644178a38a6617ba07721d9b.tar.bz2
Change the glGetShaderPrecisionFormat emulated values.
The current returned values are wrong, so they fail the WebGL conformance test. BUG= TEST=shader-precision-format.html R=gman Review URL: https://chromiumcodereview.appspot.com/10024040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131465 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index cfb274a..ed2ff16 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -7386,16 +7386,18 @@ error::Error GLES2DecoderImpl::HandleGetShaderPrecisionFormat(
case GL_LOW_INT:
case GL_MEDIUM_INT:
case GL_HIGH_INT:
- result->min_range = -31;
- result->max_range = 31;
+ // These values are for a 32-bit twos-complement integer format.
+ result->min_range = 31;
+ result->max_range = 30;
result->precision = 0;
break;
case GL_LOW_FLOAT:
case GL_MEDIUM_FLOAT:
case GL_HIGH_FLOAT:
- result->min_range = -62;
- result->max_range = 62;
- result->precision = -16;
+ // These values are for an IEEE single-precision floating-point format.
+ result->min_range = 127;
+ result->max_range = 127;
+ result->precision = 23;
break;
default:
NOTREACHED();